Skip to content

Mathematical logic and quantifiers

Read universal and existential claims precisely, distinguish a hedge for each scenario from one hedge for all scenarios, and construct the right counterexample.

Mathematical logic expresses statements and the rules for combining and reasoning about them. Quantifiers specify whether a claim holds for every object in a stated domain or for at least one. In quant work, this distinguishes “each scenario has a hedge that works” from “one hedge works in every scenario”—a difference that can invalidate a claimed guarantee.

First, say what the statement means

A predicate is a statement with inputs: for example, P(s,h)P(s,h) means “hedge hh has a nonnegative payoff in state ss.” Its truth depends on the inputs. Define their domains before evaluating the claim. Meyer’s MIT notes, slides 2W.2–2W.5, introduce predicates and their domains.

The basic connectives combine statements pp and qq:

SymbolRead asWhen it is true
¬p\neg pnot pppp is false
p∧qp\wedge qpp and qqBoth are true
p∨qp\vee qpp or qqAt least one is true, including both
p⇒qp\Rightarrow qif pp, then qqEvery case except pp true and qq false
p⇔qp\Leftrightarrow qpp if and only if qqThey have the same truth value
An implication does not assert its converse: p⇒qp\Rightarrow q need not imply q⇒pq\Rightarrow p. Nor does it establish causation. “If this trade passes every required check, accept it” does not by itself say that passing those checks is the only route to acceptance. A biconditional would make both directions part of the rule. See Aspnes, “Operations on propositions”.

“Every” and “at least one”

The universal quantifier ∀\forall means “for every”; the existential quantifier ∃\exists means “there exists at least one.” An existential claim does not imply uniqueness.
∀s∈S,  P(s,h)and∃h∈H,  P(s,h)\forall s\in S,\;P(s,h) \qquad\text{and}\qquad \exists h\in H,\;P(s,h)
The first checks every state for a specified hedge. The second seeks a hedge for a specified state. Each leaves the other input unspecified; a complete claim must also fix or quantify it. Parentheses clarify which expression a quantifier governs. These domain and scope choices are part of the mathematics, not punctuation. Liu and Pitassi, “Predicate logic”, pp. 23–27, explain this distinction.

Two states, two hedge choices

Consider a fictional one-period hedging example. The allowed actions are exactly H={A,B}H=\{A,B\}; states are S={up,down}S=\{\text{up},\text{down}\}. Stipulated payoffs, in monetary units, are:

StateChoose AChoose B
Up+1+1−1-1
Down−1-1+1+1

Let P(s,h)P(s,h) mean that the displayed payoff is at least zero. Now compare:

∀s∈S,  ∃h∈H,  P(s,h)⏟trueversus∃h∈H,  ∀s∈S,  P(s,h)⏟false.\underbrace{\forall s\in S,\;\exists h\in H,\;P(s,h)}_{\text{true}} \qquad\text{versus}\qquad \underbrace{\exists h\in H,\;\forall s\in S,\;P(s,h)}_{\text{false}}.

For the first claim, choose A in the up state and B in the down state. Every row has a qualifying action. For the second, commit to A or B once: A fails down, and B fails up. Neither column qualifies.

Fictional payoffs: A pays plus 1 in up and minus 1 in down; B pays minus 1 in up and plus 1 in down. Every state has a passing hedge, but neither single hedge passes both states.
Fictional payoffs: A pays plus 1 in up and minus 1 in down; B pays minus 1 in up and plus 1 in down. Every state has a passing hedge, but neither single hedge passes both states.
Original finite example. Payoffs are monetary units; PASS means nonnegative. The action set contains A and B only, with no mixtures or additional trades.
Read nested quantifiers left to right: the hedge in ∀s∃h\forall s\exists h may depend on the state; the hedge in ∃h∀s\exists h\forall s must be the same across states. That dependence is the general issue behind alternating quantifiers. Liu and Pitassi, pp. 25–26.
The first statement does not grant the trader knowledge of tomorrow’s state. Selecting yesterday’s position using tomorrow’s outcome would introduce look-ahead bias. A genuinely contingent strategy must specify when information arrives and which actions are available then.

The domain matters just as much. If a 50:50 combination of A and B were allowed at the displayed linear payoffs, it would pay zero in both states. That would make the second claim true in the enlarged action set. This toy example establishes a logical distinction; it does not specify traded prices, financing or an executable market strategy.

Negation tells you what a counterexample must do

Negating a quantifier swaps “every” and “there exists,” while negating its predicate:

¬(∀x∈D,  Q(x))⇔∃x∈D,  ¬Q(x),\neg\bigl(\forall x\in D,\;Q(x)\bigr) \Leftrightarrow \exists x\in D,\;\neg Q(x), ¬(∃x∈D,  Q(x))⇔∀x∈D,  ¬Q(x).\neg\bigl(\exists x\in D,\;Q(x)\bigr) \Leftrightarrow \forall x\in D,\;\neg Q(x).

Consequently,

¬(∀s∈S,  ∃h∈H,  P(s,h))⇔∃s∈S,  ∀h∈H,  ¬P(s,h).\neg\bigl(\forall s\in S,\;\exists h\in H,\;P(s,h)\bigr) \Leftrightarrow \exists s\in S,\;\forall h\in H,\;\neg P(s,h).
To refute “every state has a passing hedge,” you need one state in which every available hedge fails. One failed state–hedge pair is insufficient: in our table, A fails down but B passes there. Negation preserves the order of the variables as it flips their quantifiers. See Aspnes, “Negation and quantifiers”.

A universal statement over an empty domain is true; an existential statement over it is false. Thus “every failed trade was flagged” can be true when there were no failed trades. It does not establish that any failure was observed or that the flagging system was tested.

From a claim to a check

For a finite domain, exhaustive checking can establish a universal claim; our four payoff cells settle both statements. Testing a sample from a larger domain cannot establish that all cases pass. Write down the domain, the quantifier order and the evidence that would refute the claim before designing the check.

For translating the connectives into executable conditions, Branching Programs and Boolean Logic develops compound tests and explicit grouping in Python. The public preview is available without membership; the full lesson requires membership.

Sources

  • James Aspnes, Yale University, Mathematical Logic, §§2.1–2.2 and 3.1–3.2.5: connectives, predicates, quantifiers, negation, domains and nesting.
  • David Liu and Toniann Pitassi, University of Toronto, Mathematical Expression and Reasoning for Computer Science, Chapter 1, pp. 20–27: propositional and predicate logic, alternating quantifiers and negation.
  • Albert R. Meyer, MIT, Predicate Logic, 14 September 2005, slides 2W.2–2W.5: predicates, quantifiers and the domain of discourse.
Last updated
  • mathematical logic
  • quantifiers
  • mathematical foundations
  • model validation
← Back to the glossaryBack to top ↑