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
2
votes
3 answers

Best way to perform universal instantiation in Coq

Suppose I have an hypothesis H : forall ( x : X ), P x and a variable x : X in the context. I want to perform universal instantiation and obtain a new hypothesis H' : P x. What is the most painless way to do this? Apparently apply H in x does not…
user287393
  • 1,221
  • 8
  • 13
2
votes
2 answers

How exactly does the possessive quantifier work?

At the end of the page there is at attempted explanation of how do greedy, reluctant and possessive quantifiers work: http://docs.oracle.com/javase/tutorial/essential/regex/quant.html However I tried myself an example and I don't seem to understand…
Ariel
  • 1,222
  • 2
  • 14
  • 25
2
votes
1 answer

Coq arrow type in universal hypotesis with existential goal

I have the following theorem to prove: Goal (exists x, ~P x) <-> ~(forall x, P x). After a split unfold not. split. the first implication is very easy, basically we have to use the x introduced from the forall in the existential quantifier intros.…
2
votes
1 answer

(apply qe) does not eliminate all quantifiers at once?

I am asking Z3 to do quantifier elimination in the UFLIA theory, using the SMTLIB 2 interface. So I assert a formula with 21 existentially quantified variables, of them seven are integer and 14 are Boolean. Then I do (apply qe) and Z3 returns a goal…
2
votes
3 answers

Elimination rule for finitely-bounded quantifiers

I have the following goal: ∀x ∈ {0,1,2,3,4,5}. P x I want to break this goal down into the six subgoals P 0, P 1, P 2, P 3, P 4 and P 5. This is easily done by apply auto. But what is the relevant rule that auto is using to do this? I ask because…
John Wickerson
  • 1,204
  • 12
  • 23
2
votes
2 answers

Php Preg_Replace not matching quantity of characters

I'm trying to filter a string by preg_replacing. Anything but numbers and dot and no more than 5 numbers before the dot. PHP 5.4.3 under wamp(UptoDate). Good Matche: 0.01 0.1 12345.11 12345.1 1 12345 Bad…
2
votes
1 answer

Defining custom quantifiers

I'm trying to get Z3 to verify some formal proofs that uses an iterated maximum in the notation. For example, for f a function (↑i:  0 ≤ i < N:  f(i)) designates the highest value of f when it is applied to a value between 0 and N. It can be nicely…
simon1505475
  • 675
  • 3
  • 9
1
vote
1 answer

Exclusion and inclusion in Z3

I am trying to model inclusion and exclusion of elements in sets with Z3. In particular inclusion of elements with distinct values, and exclusion of elements not already in a target set. So basically I want to have a set U and have Z3 find a set U_d…
Mintish
  • 13
  • 3
1
vote
1 answer

Does pull_nested_quantifiers option work with simplify in Z3?

I would like to pull all nested quantifiers in a formula to the outermost level. I expected the following commands to work in Z3 but they don't: (set-option :pull-nested-quantifiers true) (simplify (exists ((x Int)) (and (>= x 0) …
pad
  • 41,040
  • 7
  • 92
  • 166
1
vote
1 answer

Javascript RegEx "invalid quantifier"

var search = new RegExp("(?.*)", "g"); Is there something wrong with the RegEx? Firebug just says "invalid quantifier". Thats it, no more information.
Display Name
  • 448
  • 2
  • 5
  • 14
1
vote
1 answer

formal axiomatic def of an example Kripke model in terms of ∀, ∃

I am looking for a formal axiomatic definition of an example Kripke model in terms of ∀, ∃ assuming knowledge of simple predicate logic, boolean logic,... All descriptions of Kripke models I encounter simply introduce new notations through…
propaganda
  • 470
  • 2
  • 6
  • 14
1
vote
1 answer

Why is the rightmost character captured in backreference when using a character class with quantifiers?

If I have pattern ([a-z]){2,4} and string "ab", what would I expect to see in backreference \1 ? I'm getting "b", but why "b" rather than "a"? I'm sure there is a valid explanation, but reading around various sites explaining regexes, I haven't…
Monkeybrain
  • 766
  • 5
  • 23
1
vote
1 answer

Translate English sentence into predicated wff

I have a school assignment that needs to translate the English sentence into predicate logic. The question is "Every fruit that is an apple is not a mango." The domain is the whole world, and M(x) means x is a mango, A(x) means x is an apple, F(x)…
sky0215
  • 29
  • 5
1
vote
1 answer

Dafny as a SAT-QBF solver is not giving right results

I am trying to get the habit to use Dafny as a friendly SAT-QBF solver for some simple formulae, since doing it in, for instance, Z3 is too uncomfortable. The context for this is that I have implemented Cooper's algorithm for quantifier elimination…
Theo Deep
  • 666
  • 4
  • 15
1
vote
2 answers

Java regex very slow (translate nested quantifiers to possessive quantifiers)

I've found this regular expression to match urls (originally in Javascript by Daring Fireball) which in java works but in some cases is extremly slow: private final static String pattern = "\\b" + "(" + // Capture 1:…
UnableToLoad
  • 315
  • 6
  • 18