Work backwards from the outermost available logical connective. One strategy applies the disjunction elimination rule to the premise first, constructs the whole target in each case, and then closes the cases. In the tables, a context such as means that assumptions on lines 1 and 2 remain open. A range in a discharge rule denotes the entire local subproof.
| Line | Context | Formula | Justification |
|---|---|---|---|
| 1 | Premise | ||
| 2 | Temporary assumption | ||
| 3 | conjunction elimination rule on 2 | ||
| 4 | conjunction elimination rule on 2 | ||
| 5 | disjunction introduction rule on 4 | ||
| 6 | conjunction introduction rule on 3, 5 | ||
| 7 | Temporary assumption | ||
| 8 | conjunction elimination rule on 7 | ||
| 9 | conjunction elimination rule on 7 | ||
| 10 | disjunction introduction rule on 9 | ||
| 11 | conjunction introduction rule on 8, 10 | ||
| 12 | disjunction elimination rule on 1, 6, 11; discharge 2, 7 |
A second strategy applies the conjunction introduction rule backwards to the target first. Prove and separately, each by the disjunction elimination rule on the premise, and combine them:
| Line | Context | Formula | Justification |
|---|---|---|---|
| 1 | Premise | ||
| 2 | Temporary assumption | ||
| 3 | conjunction elimination rule on 2 | ||
| 4 | Temporary assumption | ||
| 5 | conjunction elimination rule on 4 | ||
| 6 | disjunction elimination rule on 1, 3, 5; discharge 2, 4 | ||
| 7 | Temporary assumption | ||
| 8 | conjunction elimination rule on 7 | ||
| 9 | disjunction introduction rule on 8 | ||
| 10 | Temporary assumption | ||
| 11 | conjunction elimination rule on 10 | ||
| 12 | disjunction introduction rule on 11 | ||
| 13 | disjunction elimination rule on 1, 9, 12; discharge 7, 10 | ||
| 14 | conjunction introduction rule on 6, 13 |
Both derivations establishCounting only applications of inference rules, each proof has nine steps: four conjunction elimination rule applications, two disjunction introduction rule applications, and three remaining applications. The first uses two conjunction introduction rule applications and one disjunction elimination rule; the second uses one and two, respectively. The second has two additional temporary-assumption lines, giving 14 displayed lines instead of 12, but assumptions are not additional inference applications. Its duplicated case analysis is exchanged for avoiding construction of the complete logical conjunction separately in both cases. In a proof tree it also repeats the use of the original premise.
Extract the universally quantified logical implication and the existentially quantified logical conjunction from the premise. Use one fresh witness for both conjuncts of the latter, so that the resulting and concern the same object:
| Line | Context | Formula | Justification |
|---|---|---|---|
| 1 | Premise | ||
| 2 | conjunction elimination rule on 1 | ||
| 3 | conjunction elimination rule on 1 | ||
| 4 | Temporary assumption | ||
| 5 | conjunction elimination rule on 4 | ||
| 6 | conjunction elimination rule on 4 | ||
| 7 | universal elimination on 2; instantiate at | ||
| 8 | implication elimination rule on 7, 5 | ||
| 9 | conjunction introduction rule on 8, 6 | ||
| 10 | existential quantifier introduction rule on 9; witness | ||
| 11 | existential quantifier elimination rule on 3, 10; discharge 4; fresh |
The witness occurs in no undischarged premise or final conclusion. Therefore the existential quantifier elimination rule is valid and gives
Each parenthesized pair in the given Boolean function tests equality of two input bits:This is logical equivalence, or the two-input XNOR gate function. Thus is one whenever either input pair agrees. Generate the four complemented inputs with four inverters, and define the following NAND gate outputs:Feed these four outputs into a single four-input NAND gate. De Morgan's laws giveHere juxtaposition denotes logical conjunction. The construction uses only inverters, two-input NAND gates and one four-input NAND gate, as required.
Let . In the following natural deduction proofs, indentation and vertical bars mark assumption scopes. Rule names are the introduction and elimination rules supplied by the paper.
First work backwards from the premise using disjunction elimination, proving the whole desired logical conjunction in each case:Alternatively, first transform the goal by conjunction introduction, obtaining and by separate disjunction elimination proofs:The essential difference is the final rule: the first proof splits the premise once, while the second splits the goal first and then analyzes the premise twice. Counting only rule applications, both displayed proofs take nine inference steps. The first uses four conjunction elimination steps, two disjunction introduction steps, two conjunction introduction steps and one disjunction elimination; the second replaces one conjunction introduction with a second disjunction elimination. If assumption lines are counted as displayed proof lines, the second is longer, 14 rather than 12, because it opens four case assumptions rather than two. Thus a raw line count and an inference-step count need not agree.
1 H premise
2 | P ∧ Q assumption
3 | P ∧-elim-L 2
4 | Q ∧-elim-R 2
5 | Q ∨ R ∨-intro-L 4
6 | P ∧ (Q ∨ R) ∧-intro 3,5
7 | P ∧ R assumption (new case)
8 | P ∧-elim-L 7
9 | R ∧-elim-R 7
10 | Q ∨ R ∨-intro-R 9
11 | P ∧ (Q ∨ R) ∧-intro 8,10
12 P ∧ (Q ∨ R) ∨-elim 1,2–6,7–111 H premise
2 | P ∧ Q assumption
3 | P ∧-elim-L 2
4 | P ∧ R assumption (new case)
5 | P ∧-elim-L 4
6 P ∨-elim 1,2–3,4–5
7 | P ∧ Q assumption
8 | Q ∧-elim-R 7
9 | Q ∨ R ∨-intro-L 8
10 | P ∧ R assumption (new case)
11 | R ∧-elim-R 10
12 | Q ∨ R ∨-intro-R 11
13 Q ∨ R ∨-elim 1,7–9,10–12
14 P ∧ (Q ∨ R) ∧-intro 6,13All requester indices in the following expressions are interpreted modulo four. Let mean that requester is the first asserted request after last recipient :An empty logical conjunction is true. Decode the remembered index and combine the four priority orders:Exactly one is high when any request is high. Write as bits . The next-state function and Moore machine outputs areThus an idle step preserves the priority memory. The are combinational selection signals, not the current-cycle grants: exposing them directly as outputs would change the design into a Mealy machine. If a requester remains continuously asserted, each intervening successful grant advances the circular order, so it receives service after at most four grant decisions.
Eliminating logical implications givesAn absorption step simplifies this to the disjunctive normal formEach one-literal term is a permitted logical conjunction in a disjunctive normal form.
Assume the logical conjunction temporarily, then eliminate the premise's logical disjunction by cases. A natural deduction proof, with each indented assumption delimiting its own subproof, is:
1. not P or not Q premise
2. | P and Q temporary assumption
3. | P and-elim-L, 2
4. | Q and-elim-R, 2
5. | | not P first disjunction case
6. | | false not-elim, 3,5
7. | | not Q second disjunction case
8. | | false not-elim, 4,7
9. | false or-elim, 1, cases 5-6 and 7-8
10. not (P and Q) not-intro, discharge 2-9Lines 5–6 and 7–8 are separate sibling subproofs, not one nested inside the other. Both derive the same contradiction under the common assumption on line 2. Logical disjunction elimination discharges the two case assumptions, and negation introduction then discharges the logical conjunction assumption. The sole undischarged premise is the required one. This proof uses only the supplied logical conjunction, logical disjunction and negation rules; no converse form of De Morgan's laws is being assumed as an extra rule.
First negate the implication, then move the negation through the existential quantifier and the logical conjunction:This is negation normal form, because each negation is immediately in front of an atomic predicate. The occurrence of remains free. Keeping also avoids assuming any additional order axioms for the relation symbol ; if it has its usual linear-order interpretation, that atom can instead be expressed as .
Use a three-sample run detector. Just before clock edge , let two stored bits and hold the input values at edges and . Initialise both to zero. With input , definePrimes denote the next stored state, with all assignments simultaneous at the clock edge. The output is the logical conjunction of the present input and its two preceding samples. By induction on clock edges, the stated interpretation of is maintained, proving the required behaviour. Two bits of state suffice.
Primitive positive formula 2026-10-06
A primitive positive formula is generated from atomic formulas using only logical conjunction and existential quantification. It can be put in the form with each atomic. The exam terminology tame formula refers to this fragment. Its reduced product transfer needs only filter intersection and upward closure, together with coordinatewise choices of witnesses.
Propositional logic Created 2026-09-24 Updated 2026-10-14
Propositional logic studies reasoning with whole propositions represented by letters such as and , and propositional formulas built from them using logical connectives. The classical two-valued, truth-functional presentation below assigns each primitive proposition either true or false: each compound value depends only on its component values. This is classical propositional logic; other systems, including Intuitionistic propositional logic, have different semantics and rules.
Starting with and , one can build by logical negation, by logical conjunction, by logical disjunction, and by logical implication, then combine these into larger propositional formulas. Parentheses specify the construction: has logical conjunction as its outermost logical connective. Primitive propositions have no internal structure in this language; a first-order formula can additionally describe objects and quantify over them. The formation rules are given in forall x: Calgary, chapter 6.
The following truth table shows the four basic logical connectives. Logical disjunction is inclusive: is true when either or both inputs are true. Classical logical implication has exactly the same values as ; its only false row has true and false. These truth conditions are specified in forall x: Calgary, chapter 9.
Evaluate from the inside out: first the logical implication, then the outer logical conjunction. The final column also tests the logical implication expressing the modus ponens rule:At , the logical implication is false, so the logical conjunction is false. The abstract syntax tree below separates the construction of the propositional formula from the values propagated through it. Both occurrences of receive the same value from the Boolean valuation. With the opposite assignment , the logical implication is true but the logical conjunction is still false because its second input is false. Recursive evaluation and exhaustive truth tables are explained in forall x: Calgary, chapter 11.
The last column is always true: is a tautology. This expresses the logical validity of the modus ponens rule: whenever both premises and are true, is true. It does not say the premises are true under every Boolean valuation; their logical conjunction is true only on the first row. For a short natural deduction proof outline, assume , extract both conjuncts, apply the implication elimination rule to obtain , then discharge the assumption by the implication introduction rule. See forall x: Calgary, sections 17.3–17.5.
Three tests answer different questions: Boolean satisfiability requires at least one true row, a tautology requires every row true, and a contradiction has every row false. Thus is a tautology, is a contradiction, and is satisfiable but not a tautology: it is true only at . See forall x: Calgary, sections 12.1–12.4.
Propositional logic is useful because an inference pattern can be checked once and reused for many choices of propositions. Its beauty is that a finite truth table completely settles classical truth-functional questions about a fixed propositional formula. But logical validity does not verify real atomic claims. If means “the switch is closed” and means “the lamp is lit”, a valid use of the modus ponens rule still requires establishing its premises about the apparatus; the truth table supplies neither an observation nor a causal explanation. See forall x: Calgary, chapter 2 and chapter 10.
Set difference Created 2026-10-05 Updated 2026-10-14
The set difference keeps the set elements of that do not belong to :Thus set difference combines logical conjunction (AND) with logical negation (NOT): pass the first condition and fail the second. The definition applies to any two sets; need not be a subset of .
For and , the two orders give different answers:The common member is removed in both directions. A database filter illustrates the usefulness: if is the set of records matching the first condition and the set matching the second, selects records matching the first but not the second. The Venn diagram in set union shades both directions separately.
The name relative complement emphasizes that the ambient set is : is the complement of within . If a larger universal set contains and , then . Changing that larger universal set does not change the set difference, because membership still requires belonging to . In ZF the set difference exists by the axiom schema of separation. It also gives relative complements within a fixed tuple domain in finite relation closure for set-theoretic coding.
Set intersection Created 2026-09-24 Updated 2026-10-14
The intersection keeps exactly the set elements common to both sets:Membership in an intersection therefore uses logical conjunction (AND). For and , the only shared member is , so . The Venn diagram in set union shades only the overlap for this operation.
An intersection is useful when every requirement must hold. If and are the sets of database records passing two separate conditions, their intersection gives the records passing both. Similarly, satisfying two equations requires belonging to the intersection of their solution sets. The same membership rule applies even when the objects have entirely different meanings.
For a family of sets, the intersection contains exactly the set elements belonging to every set :Here universal quantification expresses “every”. If all the sets lie within a fixed universal set , the intersection over no indexing members is defined to be : there are no requirements to fail. This convention depends on specifying . By contrast, intersecting with the empty set always gives .
Stability of a formula under double negation 2026-10-05
A first-order formula is stable when intuitionistic first-order logic proves . Double negations and logical falsity are stable. Logical conjunction of stable first-order formulas is stable; a logical implication is stable when its consequent is stable; and universal quantification preserves stability. For logical implication, from and , assuming contradicts the first hypothesis, giving and then . For universality, obtain from for arbitrary , then use stability and generalize.
Unsatisfiable Boolean formula 2026-10-18
An unsatisfiable Boolean formula has no satisfying assignment. Forthe Boolean valuation falsifies the first Boolean clause, and falsifies the second. Both possible truth values fail, proving
UNSAT. Each Boolean clause alone has a satisfying assignment, but their logical conjunction does not: compatibility is the central issue. By contrast, finding just one failed Boolean valuation for a general Boolean formula only rejects that candidate. Finding one successful Boolean valuation proves SAT; proving UNSAT requires excluding every candidate, possibly with a compact argument rather than a full truth table. Verifying a satisfying assignment Created 2026-10-18 Updated 2026-10-25
For a CNF input with Boolean variables, Boolean clauses, and Boolean literal occurrences, first check that the supplied Boolean valuation gives each input Boolean variable exactly one truth value. Evaluate each Boolean literal by lookup or logical negation, each Boolean clause by logical disjunction, and the Boolean formula by logical conjunction. Indexed Boolean variables and constant-cost lookups give an operation count; with a finite binary string encoding the check still takes polynomial time. Thus a satisfying assignment is a certificate in computational complexity for SAT, proving that SAT belongs to NP. Finding it by exhaustive checking can require candidate Boolean valuations; this enumeration cost is not a lower bound on every possible SAT algorithm.[ref]
CS 252, Lecture 8: Constraint Satisfaction Problems (Carnegie Mellon University). CS 252, Lecture 8: Constraint Satisfaction Problems, p. 3, §3 opening paragraph: assignments as certificates and membership in NP

