Every propositional formula generated by a parenthesized grammar has equally many opening and closing parentheses. By structural induction, atomic formulas begin with equal zero counts; negation preserves them; and a parenthesized binary logical connective adds its two subformula counts and one parenthesis of each kind. An optional paired-parenthesis construction also adds one to both counts. This necessary syntactic invariant is useful for checking generated expressions, though equal counts alone do not guarantee correctly nested syntax.
Boolean formula Created 2026-10-06 Updated 2026-10-18
A Boolean formula is a finite expression built from Boolean variables and Boolean operations, equivalently a propositional formula with two-valued semantics. A Boolean valuation determines its truth value. In , logical negation acts only on , and the outer logical conjunction combines with . Occurrences of the same Boolean variable share one truth value. The Boolean satisfiability problem asks whether some Boolean valuation makes the Boolean formula true.
Boolean game 2026-10-24
A finite game represented succinctly by propositional logic. Each player controls a disjoint collection of Boolean variables and chooses their truth values. Together those choices determine a Boolean valuation. A player's goal is a propositional formula, with payoff one if satisfied and zero otherwise. The control sets normally form a set partition of all variables.
A pure strategy strategy profile is a Nash equilibrium if every unsatisfied player remains unsatisfied after every change to that player's controlled variables. Checking a candidate can therefore require solving a Boolean satisfiability problem, even though evaluating its current payoffs is easy.
Boolean valuation Created 2026-09-29 Updated 2026-10-14
A Boolean valuation assigns each primitive proposition a value in , equivalently , and extends recursively to every propositional formula using the classical logical connectives. The same primitive proposition always receives the same value within one Boolean valuation. For compound propositional formulas and ,
Every other case receives the opposite value. Thus gives . A truth table varies the assignment; recursive evaluation computes one row. The truth-functional restriction means that changing what the primitive propositions describe, while retaining their values, cannot change the value of the compound propositional formula. See forall x: Calgary, chapter 9 and section 10.1.
Given a succinct Boolean game and a complete pure strategy strategy profile, determine whether it is a Nash equilibrium. The problem is co-NP-complete for goal propositional formulas, even with one player. This differs from existential equilibrium checking in a Boolean game, which searches for some qualifying Nash equilibrium.
A negative instance has a short complexity certificate: a currently unsatisfied player and new truth values for that player's controlled Boolean variables that make the goal true. Evaluating the current and changed propositional formulas takes polynomial time, proving membership in co-NP.
For hardness, given a propositional formula , let one player control and a fresh variable , with goal . The all-false candidate has payoff zero. It is a Nash equilibrium exactly when is an unsatisfiable Boolean formula, since any satisfying assignment permits an improvement by also setting true. This is a polynomial-time many-one reduction from unsatisfiability. The fresh guard ensures that the candidate loses independently of the input formula's value there.
co-NP 2026-10-24
The class of decision problems whose complements belong to NP. Equivalently, negative instances admit polynomially bounded witnesses verifiable in polynomial time. A problem is co-NP-complete when it is in co-NP and every problem in co-NP has a polynomial-time reduction to it. Unsatisfiability of a propositional formula is a basic example: its complement is the NP-complete Boolean satisfiability problem.
De Morgan's laws Created 2026-09-28 Updated 2026-10-14
De Morgan's laws exchange logical conjunction and logical disjunction when a logical negation moves across them:
Here denotes logical equivalence: the two propositional formulas agree under every Boolean valuation.[ref]
A complete verification uses the four rows of a truth table. In input order , both sides of the first logical equivalence have output sequence ; both sides of the second have . A proof in words is equally short: failure of “both” means at least one failure, whereas failure of “at least one” means both fail. The differing middle rows explain why simply pushing logical negation inward without changing AND to OR is wrong.
For the events in Boolean operations on events, the corresponding set identities are
One can prove these identities by checking an arbitrary set element : its two membership truth values obey De Morgan's laws. The same reasoning works for any two subsets of a common universal set.
Figure 1.
De Morgan's laws shade the same set whether a compound event is complemented first or its component events are complemented first
. Details.
For a nested program test, let mean “backup recent”, mean “backup verified”, and mean “manual override authorized”. Rejecting when neither an acceptable backup nor an override is present gives
The transformed condition reads “backup stale or unverified, and no override”. Apply the second of De Morgan's laws at the outside, then the first at the inner logical conjunction. For it rejects; changing only to one makes it accept. With Boolean operands in Python, not ((recent and verified) or override) and ((not recent) or (not verified)) and (not override) have the same result and inspect the operands in the same order, with the same skipped operands.
Given two weighted formula utility representations with binary rational numbers as weights, decide whether their values agree on every Boolean valuation. This problem is co-NP-complete.
For membership, a valuation witnessing unequal values certifies non-equivalence. Evaluate all propositional formulas and add their weights exactly in polynomial time. For hardness, compare the one-rule base with the empty base. They are equivalent exactly when is an unsatisfiable Boolean formula. Thus even very small weighted rule bases express a universal equivalence question.
Given a Boolean game and a query propositional formula , decide whether some pure strategy Nash equilibrium satisfies . The problem is complete for the existential second level of the polynomial hierarchy.
For membership, existentially choose a Boolean valuation and universally check every player's every unilateral deviation. The goal must remain false under all such deviations for each player whose goal is currently false. Each individual check takes polynomial time.
For hardness, start with a two-block quantified Boolean formula . Give player 1 control of and the constant true goal. Give player 2 control of and goal , and use as the query. A queried Nash equilibrium exists exactly when some choice of leaves player 2 unable to falsify by changing . This is precisely the input quantified statement, and the construction is a polynomial-time reduction.
Every finite collection of finite propositional formulas mentions only finitely many Boolean variables. Two Boolean valuations agreeing on those variables satisfy exactly the same formulas. They therefore have the same value under any weighted formula utility representation using that collection.
This observation limits representation over infinite sets. On , the function indicating whether the selected subset is infinite cannot be represented by a finite rule base: if is the finite set of mentioned indices, and agree on all those indices but require values zero and one. Completeness claims for finite propositional rule bases must therefore specify a finite underlying set or restrict the functions represented.
Logical equivalence Created 2026-10-14 Updated 2026-10-25
Two propositional formulas are logically equivalent in classical propositional logic when they have the same truth value under every Boolean valuation. Identical output columns in a truth table prove logical equivalence; one differing row refutes it. De Morgan's laws give useful examples.
Negation Created 2026-09-24 Updated 2026-10-14
Logical negation exchanges zero and one: and . For a numerical bit , this is ; applying logical negation twice restores . It acts on the entire propositional formula in its scope. Parentheses therefore matter: says that neither condition holds, while also accepts every case where holds. At their values are zero and one.
On a set, logical negation becomes taking a complement in a fixed universal set. In Boolean operations on events, “not even” selects . “Not both even and at least four” selects ; it does not require both qualifications to fail. De Morgan's laws make the scope of these compound negations precise.
Negation elimination rule 2026-10-25
From a propositional formula and its negation, infer logical falsity. This identifies a contradiction inside a natural deduction derivation; a later negation introduction rule may discharge the assumption that led to it.
Negation normal form 2026-10-24
A propositional formula or first-order formula is in negation normal form when its negations occur only directly before atomic formulas, and its other logical connectives are conjunction and disjunction, together with quantifiers in the first-order case. Remove implications using , then push negations inward using De Morgan's laws, double-negation cancellation, and
In particular, negating an implication gives , so its antecedent retains its original sign after the outer negation has been pushed through.
A Boolean function satisfying the displayed condition. Composition of one-preserving Boolean functions is one-preserving, since each inner output is one on an all-one input. Consequently structural induction shows that a variable-built propositional formula using only one-preserving logical connectives, such as , is true under the all-one Boolean valuation.
Use a sequential SATPlan encoding with times . The fluent universe is
There are nine support Boolean variables and three clearance Boolean variables per time layer. Static block types, parameter inequalities and permanent table availability are handled during action grounding. For each well-typed ground action from parts (b)–(c), introduce an occurrence Boolean variable for . Allow at most one action per layer, including no action, so that a horizon of encodes at most physical actions.
The complete initial-state formula is
Every well-typed fluent not initially true is explicitly false. The final goal formula is simply . Leaving unrelated final facts unconstrained is appropriate; leaving unrelated initial facts unconstrained would introduce imaginary starting states.
For each , include all action precondition axioms , after removing static true conditions. For example,
The precondition axiom for similarly requires .
For every fluent , let be the logical disjunction of actions at adding , and the logical disjunction deleting it. Include the successor-state axiom
It combines action effects with the frame axiom, preventing unsupported changes. A fully grounded example is
Apply the same construction to every support and clearance fluent, using the exact add/delete lists. If no action occurs, both effect logical disjunctions are false, so all fluents persist.
The sequential action exclusion axioms are for every pair of distinct grounded actions . For example,
forbids selecting those two occurrences together. Do not add a requirement that some action occur in every layer: that would remove idle padding and change “at most ” into an exact-length requirement. One may additionally include true planning state invariants, such as a block having at most one support and a block support carrying at most one block; the unlimited table must be exempt from the latter restriction.
Finally, conjoin , , and all precondition, successor and exclusion formulas over the layers to obtain . It is a propositional formula; if a solver requires conjunctive normal form, use a satisfiability-preserving Tseitin transformation with auxiliary Boolean variables. The equivalence between this encoding and real action sequences follows from sequential SATPlan correctness: a satisfying assignment induces exactly the stated STRIPS trajectory, and every sufficiently short valid plan supplies such an assignment.
Minimax search applies because this is a finite, deterministic two-player zero-sum game with perfect information. Each move assigns a previously unassigned Boolean variable, so play terminates after exactly moves. Both players observe the whole partial Boolean valuation, and there are no chance moves. Give terminal positions payoff when the propositional formula is true and when it is false, measured for . At an -node take the maximum child value and at a -node the minimum. Backward induction then computes the winner and a corresponding winning strategy.
Depth ; at most complete plays; partial-assignment states; and tree nodes. Here “different games” means complete move histories for the fixed propositional formula, rather than different syntactic formulas or merely different terminal Boolean valuations.
At depth , the players have chosen an ordered list of distinct variables and a truth value for each, giving
Thus complete histories number : variable orders and assignments. Different variable orders can reach the same terminal Boolean valuation, of which there are only .
For a game state, each variable is unassigned, false or true, giving possibilities. Ownership and variable-assignment order are irrelevant in this version, and the next player is determined by the parity of the number already assigned. The full game tree, which keeps histories separate, has
The depth counts edges; there are levels. These bounds explore the full tree even when a formula's truth might be inferable from a partial assignment, since the stated stopping rule waits for all variables.
Solve the finite state graph by winning-set fixed-point iteration, treating positions outside both winning regions as draws. A naive recursive minimax search over histories may run forever around a cycle. Store each ownership-sensitive state once, with a player-to-move flag and all legal successors.
Let and be terminal states where the propositional formula is true and false, respectively. Initialize . Repeatedly add nonterminal positions as follows:
For , start at and exchange the players in the existential and universal conditions. Terminal states keep their original labels and are excluded from these predecessor rules, avoiding a vacuous all-successors test at a terminal loss. Each process stabilizes after at most strict growth steps; predecessor counters implement both regions via the winning-position attractor in an infinite game construction in graph time.
The admission round supplies a decreasing rank. At a state controlled by the winning player, choose a successor of smaller rank; at an opposing state, every successor already has smaller rank. Hence these strategies force a finite terminal win. The two winning regions are disjoint. Outside both, each player can keep the play outside the opponent's winning region, so neither can force a terminal win against best defence. Under the convention in (h), assign those remaining positions value ; the other regions have values and .
This is a finite reachability game calculation, with memoryless strategies read from successor choices. Merely calling the first back-edge encountered a draw is unsound: a cycle can have an exit through which one player can force a win.
A propositional type is a set of propositional formulas; a Boolean valuation realizes it if every member is true, and omits it if at least one member is false. A consistent propositional theory locally omits if every formula which implies all members of modulo is refutable modulo . Equivalently, whenever is consistent, there is a for which is consistent. For a consistent propositional type, this says that it is a nonprincipal propositional type.
The extended omitting types theorem for propositional logic says that if a consistent locally omits each of a countable family , there is one Boolean valuation satisfying and omitting them all. It also works inside any prescribed finite condition consistent with .
To prove it, start with such a condition , taking when none is prescribed. At stage , choose such that
Such a choice exists by local omission. More explicitly, failure would imply for every , hence , contradicting the stage invariant. Every finite subset of lies inside a consistent stage. By the propositional compactness theorem and the completeness theorem for propositional logic, it has a Boolean valuation. That Boolean valuation satisfies and makes the selected member of every type false. All types are therefore omitted simultaneously. No effective test for consistency is assumed, and the argument does not require the ambient propositional language to be countable. Only the family of omission requirements is countable.