Questions tagged [quantifiers]

In logic, quantification is the binding of a variable ranging over a domain. The variable thereby becomes bound by an operator called a quantifier.

In logic, quantification is the binding of a variable ranging over a domain. The variable thereby becomes bound by an operator called a quantifier.

The two fundamental kinds of quantification in predicate logic are universal quantification and existential quantification.

233 questions
4
votes
4 answers

How does the ? make a quantifier lazy in regex

I've been looking into regex lately and figured that the ? operator makes the *,+, or ? lazy. My question is how does it do that? Is it that *? for example is a special operator, or does the ? have an effect on the * ? In other words, does regex…
Uriel Katz
  • 319
  • 1
  • 8
  • 21
4
votes
1 answer

Z3: Check if model is unique

Is there a way in Z3 to prove/show that a given model is unique and that no other solution exists? A small example to demonstrate (declare-const a1 Int) (declare-const a2 Int) (declare-const a3 Int) (declare-const b1 Int) (declare-const b2…
Cristiano Sousa
  • 934
  • 1
  • 6
  • 31
3
votes
1 answer

How to skolemize multiple combinations of universal and existential quantifieres?

What is the skolemized form of (∀u∃v a(u,v)) ∧ (∀x∃y a(x,y)) ? I am unsure, because there are different perenex normal forms possible: ∀u∃v ∀x∃y (a(u,v) ∧ a(x,y)) ∀u∀x ∃v∃y (a(u,v) ∧ a(x,y)) … There would different skolemized forms follow: ∀u ∀x…
Jojo
  • 51
  • 1
  • 5
3
votes
1 answer

Display quantified-out formula

how do I display the result of quantifier elimination ? z3 seems to be happy with the following input (set-option :elim-quantifiers true) (declare-fun y () Real) (simplify (exists ((x Real)) (>= x y))) but it returns it the same as output. Thanks
bobosoft
  • 51
  • 4
3
votes
1 answer

Customize LIA quantifier elimination in Z3

I'm doing quantifier elimination on LIA using F# and Z3 3.2 API. Z3 used to have QUANT_ARITH configuration which indicates the use of Cooper's method or the Omega test for LIA quantifier elimination. But that option was replaced by ELIM_QUANTIFIERS…
pad
  • 41,040
  • 7
  • 92
  • 166
3
votes
1 answer

What is the use of max m in the lazy quantifiers {n,m}??

In regex, we have greedy and lazy quantifiers. The greedy quantifier {n,m} matches the preceding atom/character/group a minimum of n and a maximum of m occurrences, inclusive. If I have a collection of strings: a aa aaa aaaa aaaaaaaaaa With a{2,4},…
Iggy
  • 5,129
  • 12
  • 53
  • 87
3
votes
4 answers

Regex Python / group quantifiers

I want to match a list of variables which look like directories, e.g.: Same/Same2/Foot/Ankle/Joint/Actuator/Sensor/Temperature/Value=4.123 Same/Same2/Battery/Name=SomeString Same/Same2/Home/Land/Some/More/Stuff=0.34 The length of the…
runDOSrun
  • 10,359
  • 7
  • 47
  • 57
3
votes
1 answer

What are triggers in Dafny/Boogie?

I have been limping along in Dafny without understanding triggers. Perhaps as a result, the programs I write seem to give the verifier a hard time. Sometimes I spend tons of time fiddling with my proof, trying to convince Dafny/Boogie that it's…
Jason Orendorff
  • 42,793
  • 6
  • 62
  • 96
3
votes
2 answers

Java RegEx - check if a string ends with an exact number of digits

The Java matches method returns 'true' for all of the following // check if a string ends with an exact number of digits (yyyyMMdd 8 digits) String s20180122_1 = "fileNamePrefix_20171219"; String s20180122_2 =…
badbee
  • 45
  • 4
3
votes
1 answer

Why does this regex pattern not match?

Regex101 link: https://regex101.com/r/MsZy0A/2 I have the following regex pattern; .++b with the following test data; aaaaaaaacaeb. What I don't understand is the "Possessive quantifier". I've read that it doesn't backtrack, which it normally does.…
JordyvD
  • 1,565
  • 1
  • 18
  • 45
3
votes
2 answers

Converting Z3 QBF formula directly to pcnf

I'm using Z3 theorem prover (using Z3Py: the Z3 API in Python) to create QBF (Quantified Boolean formula). Is there any way in Z3 to directly convert your qbf formula into Prenex normal form ?
Pushpa
  • 448
  • 3
  • 10
3
votes
1 answer

Existential quantification of typeclass constraints

I am not sure why ko does not typecheck. Is there a particularly enlightening explanation ? {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE NoMonomorphismRestriction, FlexibleInstances #-} module Wrap where class…
nicolas
  • 9,549
  • 3
  • 39
  • 83
3
votes
1 answer

approximate nearest neighbors time complexity

I'm reading this paper Product quantization for nearest neighbor search. On the last row of table II page 5 it gives the complexity given in this table for searching the k smallest elements is the average complexity for n >> k and when the …
dontloo
  • 10,067
  • 4
  • 29
  • 50
3
votes
1 answer

"Quantifier quantifies nothing" but I never asked for a quantifier

Consider the following Perl-flavoured?? (i suppose not?) regex to test if a string is a palindrome: ^((.)(?1)\2|.?)$ try it here. the following my regex palindrome { ^((.)(?1)\2|.?)$ } say "$word is a palindrome" if $word ~~…
cat
  • 3,888
  • 5
  • 32
  • 61
3
votes
1 answer

Quantifier to print only three digit numbers in a Java regular expression

What is the quantifier to print only three digit numbers in a string in Java regular expressions? Input : 232,60,121,600,1980 Output : 232,121,600 Instead my output is coming as: Output : 232,121,600,198 I am using (\\d{3}). What quantifier should…
1 2
3
15 16