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
1
vote
1 answer

CVC4: settings to syntheize functions over bools with quantifiers?

I'm currently using CVC4 to solve formulas of the following form: exists f1, ..., fn . P(f1, ..., fn) /\ forall (b1...bk) . Q(f1,...fn,b1,...bk) Here, the f1...fn are functions from some number of Bool to Bool, and the b1...bk are boolean…
jmite
  • 8,171
  • 6
  • 40
  • 81
1
vote
1 answer

How can I prove the lemma in Exercise 4.6 in “Programming and Proving in Isabelle/HOL”?

I am trying to solve Exercise 4.6 in “Programming and Proving in Isabelle/HOL”. It asks to define a function elems :: "'a list ⇒ 'a set" that converts a list into a set, and to prove the lemma "x ∈ elems xs ⟹ ∃ ys zs . xs = ys @ x # zs ∧ x ∉ elems…
Wolfgang Jeltsch
  • 781
  • 5
  • 10
1
vote
1 answer

How can I efficiently prove existential propositions with multiple variables in Isabelle/Isar?

Say I want to prove the lemma ∃ n m k . [n, m, k] = [2, 3, 5] in Isabelle/Isar. If I go ahead as suggested in the Isabelle/HOL tutorial on page 45, my proof looks as follows: lemma "∃ n m k . [n, m, k] = [2, 3, 5]" proof show "∃ m k . [2, m, k] =…
Wolfgang Jeltsch
  • 781
  • 5
  • 10
1
vote
2 answers

c# regex find 2 isolated char in password

i didn't find another solution for this specific problem, so i hope you guys can help. I need to test if a given password has 2 or more uppercase letters and i want to use regular expressions to do so. what i have now is this: if…
Nazzaroth
  • 63
  • 7
1
vote
3 answers

Regex quantifiers - as many between two characters

I'm trying to find all the text between two characters but sometimes the string contains the delimiter character. For example, If I use (.*?)=(.*?),* On the following string: color=blue,weight=100kg, It will result in: match #1: color=blue match…
Haddock-san
  • 745
  • 1
  • 12
  • 25
1
vote
1 answer

Fixed quanitifer for regex with comma separated words

I have this regex for multiple words separated by comma: \w+(,\w+)* The amount of words should be limited to exactly four, I tried the following but this didn't do the job: \w{1}(,\w+){3} Example of valid input: 12, en_US, default, mobile Example of…
Kurt Felix
  • 33
  • 4
1
vote
1 answer

Quantifiers and Arrays in Z3

Z3 answers with "unknown" when given this code using quantifiers over arrays: (declare-const ia Int) (declare-const ib Int) (declare-const la Int) (declare-const lb Int) (declare-const A (Array Int Int)) (declare-const a (Array Int…
roo
  • 149
  • 9
1
vote
1 answer

How to create a .NET Regex with a dynamic quantifier

I am trying to extract blocks of JSON data from a data stream in the following format: Some-Header-Name:Value Content-Length:Value Some-Other-Header:Value {JSON data string of variable length} The stream contains many instances of…
Tim Coulter
  • 8,705
  • 11
  • 64
  • 95
1
vote
1 answer

Postgres asterisc regex quantifier not working

In Postgres 9.5.1 the following command works: select regexp_replace('JamesBond007','\d+',''); Output: JamesBond However the asterisc does not seem to work: select regexp_replace('JamesBond007','\d*',''); it produces: JamesBond007 Even more…
absurd
  • 1,035
  • 3
  • 14
  • 35
1
vote
1 answer

"Empty" interval quantifiers in Java Pattern class

In Java Pattern class, the expressions with quantifier alone, like + or additional quantifiers, like a++++ are not allowed, and both cases will throw a exception (because of dangling meta character). However Pattern class allows to use a interval…
m.cekiera
  • 5,365
  • 5
  • 21
  • 35
1
vote
2 answers

Existential and universal Quantifiers in AI

I have just started first order predicate logic. Why does universal quantifier and single implication go together? Similarly existential quantifier and conjunction go together? Take the statement: Some frogs are green Why then is this an incorrect…
Rahul
  • 47
  • 7
1
vote
2 answers

Regex searching for time doesn't want to be non-greedy

I'm trying to run a regex in Spiceworks to parse through email headers to select the first instance of time for ticket assignment purposes. The regex itself works, but it picks up all instances of time rather than just one. Here's the regex:…
user3761389
  • 25
  • 1
  • 5
1
vote
1 answer

Best way to instantiate nested existential statement in Coq

Suppose I have a nested existential statement H : exists ( a : A ) ( b : B ) ( c : C ) ... ( z : Z ), P a b c ... z in the context. What is the best way instantiate H and obtain a new hypothesis H' : P a b c ... z? Doing so by repeated inversion…
user287393
  • 1,221
  • 8
  • 13
1
vote
0 answers

Z3 issues with propagating equalities under quantifiers

I have the following simple example for which Z3 times out: (set-option :produce-models true) (define-fun T_0 (($in1 Real) ($in2 Real) ($out Real) ($assms Bool) ($prop Bool)) Bool (and (= $assms (< $in1 $in2)) (= $prop (=> $assms…
1
vote
1 answer

Regex quantifiers and character classes

There are examples and descriptions of regex quantifiers in Java Tutorial. Greedy - eats full string then back off by one character and try again Regex: .*foo // greedy String to search: xfooxxxxxxfoo Found "xfooxxxxxxfoo" Reluctant - start at…
user3613844
  • 273
  • 2
  • 8