2-satisfiability 2026-10-18
2-satisfiability restricts SAT to CNF in which each Boolean clause has at most two Boolean literals. The example in Boolean satisfiability problem is therefore a 2-SAT instance. Unlike general SAT and 3-SAT, 2-SAT has a polynomial-time algorithm; its tractability concerns finding a satisfying assignment or deciding that none exists, not merely checking a candidate. 3-SAT allows up to three Boolean literals per Boolean clause and is NP-complete, even though it includes many individually easy instances such as this one.[ref]
The key logical equivalence is
where are Boolean literals. It expresses a two-Boolean literal Boolean clause as two logical implications. Representing these logical implications as edges in a directed graph gives a route to the polynomial-time algorithm. In the example, says both and : enabling the feature requires its component, and an absent component excludes the feature.
Boolean satisfiability problem Created 2026-09-24 Updated 2026-10-18
The Boolean satisfiability problem asks whether a Boolean formula has an assignment making it true. A complete assignment is a Boolean valuation: it gives every Boolean variable a truth value, consistently at all occurrences. A satisfying assignment, also called a model of a Boolean formula, makes the entire Boolean formula true. A solver's answer SAT asserts that at least one satisfying assignment exists; UNSAT asserts that the input is an unsatisfiable Boolean formula. These are statements about existence, rather than the truth value under one particular Boolean valuation.
For conjunctive normal form, or CNF, write
Each Boolean literal is a Boolean variable or its logical negation. Each Boolean clause uses inclusive logical disjunction: one true Boolean literal suffices. The outer logical conjunction requires every Boolean clause to succeed under the same Boolean valuation. Choosing a different Boolean valuation for each Boolean clause would answer a different question.
Consider the original three-Boolean variable example
At the Boolean valuation , the Boolean literals in have values , those in have values , and those in have values . Every Boolean clause therefore has truth value one, so has truth value one: this is a satisfying assignment.
The complete truth table has Boolean valuations. Exactly two are satisfying assignments: and . In particular, satisfies the first two Boolean clauses but falsifies the third, so satisfying most Boolean clauses does not suffice for SAT. That different objective belongs to maximum satisfiability.
Figure 2.
All eight Boolean valuations of the original CNF example, with its two satisfying assignments highlighted
. Details.
A short proof of completeness avoids listing all eight rows. If , the Boolean clause forces , after which forces ; is already true. If , forces , after which forces ; is already true. These two cases exhaust the truth values of and produce precisely the two satisfying assignments above.
Verifying a satisfying assignment and finding a satisfying assignment are different tasks. Given a candidate, evaluate the Boolean formula once; finding a candidate requires choosing compatible truth values across all its Boolean clauses. The Cook-Levin theorem says that general SAT is NP-complete, even though a proposed satisfying assignment is efficiently checkable. Its proof encodes a bounded nondeterministic computation as a Boolean formula whose satisfying assignments describe accepting computations. Stephen A. Cook's 1971 paper established this connection between computational complexity theory and propositional logic.[ref]
A concrete use is checking finite configuration rules. Let mean that an optional feature is enabled, that a fallback is selected, and that the feature's required component is installed. Require a feature or fallback, require the component whenever the feature is enabled, and forbid using the fallback with that component. Logical implication rewrites the second rule as ; De Morgan's laws rewrite the third rule as . Their logical conjunction is exactly , so its two satisfying assignments give the two allowed configurations. The usefulness of SAT lies in expressing local rules uniformly while demanding one globally consistent Boolean valuation. The conclusion concerns exactly these encoded rules.
Contrapositive Created 2026-10-03 Updated 2026-10-25
The contrapositive of a logical implication reverses the direction and applies logical negation to both sides: . In classical propositional logic they are equivalent, so either can be proved in place of the other. The contrapositive of “divisibility by four implies being an even number” says that a number that is not an even number cannot be divisible by four.
In Intuitionistic propositional logic, still implies its contrapositive: assumptions and would yield and hence a contradiction. The reverse direction is not generally valid. From and , one obtains only ; obtaining additionally requires double-negation elimination.
Converse implication 2026-10-14
The converse implication of is . It exchanges hypothesis and conclusion without logical negation. It need not follow from the original logical implication: is an even number but is not divisible by four. Thus “being an even number implies divisibility by four” is false, although the original implication holds for all natural numbers. Proving both directions establishes an “if and only if” statement; proving a contrapositive establishes the original implication classically, without establishing its converse implication.
In the usual first-order Hilbert system, logical implication discharge requires the appropriate generalization restriction: a variable generalized in the derivation must not be free in the assumption being discharged. Equivalently use a proof system whose generalization rule already forbids variables free in open assumptions. One can first discharge a temporary assumption and then generalize if the quantified variable is not free in the remaining assumptions. Ignoring this side condition would allow deriving universal conclusions from a single arbitrary instance as an open hypothesis.
A propositional formula false on the all-true and all-false Boolean valuations has a disjunctive normal form in which every minterm contains a positive literal and a negative literal. Grouping the positive propositional variables into and the negated propositional variables into the negation of a logical disjunction writes each minterm as . De Morgan's laws therefore give the negation of a logical conjunction of such logical implications. For a contradiction use .
Formation rule Created 2026-10-31 Updated 2026-11-05
A formation rule specifies how well-formed expressions can be constructed from simpler expressions in a formal language. The formal grammar of propositional formulas has rules for propositional variables, negation and binary logical implication.
For an atomic formula (including logical equality), put , and put . Preserve logical conjunction, logical implication and universal quantification recursively, while setting
Logical negation is logical implication to logical falsity, so . The displayed logical disjunction and existence clauses are intuitionistically equivalent to the usual negative forms and . Every translated first-order formula is stable by stability of a formula under double negation. In classical logic the translation is equivalent to the original first-order formula by mathematical induction and double-negation elimination.
The implicational fragment of intuitionistic propositional logic contains formulas built from atoms using only logical implication, with only implication introduction, implication elimination, and assumptions as proof rules.
Intuitionistic propositional logic Created 2026-09-24 Updated 2026-11-05
Intuitionistic propositional logic formalizes reasoning in which a proof of a logical disjunction supplies a proof of one disjunct, and a proof of an logical implication transforms proofs of its antecedent into proofs of its consequent. It has the usual introduction and elimination rules for conjunction, disjunction and implication, together with elimination from falsity, but does not adopt the unrestricted law of excluded middle or double-negation elimination.
A two-world Kripke model for intuitionistic propositional logic illustrates the difference. Let , with forced only at . At , neither nor is forced: is not available there, and its possible future truth prevents . Consequently is not forced at . This gives a semantic counterexample to unrestricted excluded middle, while preserving the persistence of intuitionistic Kripke forcing.
Logical connective Created 2026-09-28 Updated 2026-10-14
A logical connective forms a compound proposition from component propositions; logical truth and logical falsity are the zero-input cases. Logical negation has one input, while logical conjunction, logical disjunction, and logical implication each have two. In classical propositional logic, these logical connectives are truth-functional: their output value is determined by their input values, as listed in a truth table. This does not characterize every kind of logical connective in every logic. See forall x: Calgary, section 10.1.
Logical implication Created 2026-09-28 Updated 2026-10-25
Logical implication forms the proposition , read “if , then ”. In classical propositional logic, it is false exactly when is true and is false. Equivalently, it has the same truth table as , using logical negation and logical disjunction. A false hypothesis makes the logical implication true regardless of its conclusion; thus it asserts neither the hypothesis nor a causal connection.
For example, for every natural number , divisibility by four implies that is an even number: . At , both statements are true. At , the hypothesis is false and the conclusion true; at , both are false. The only forbidden case is a multiple of four that is not an even number.
In Intuitionistic propositional logic, a proof of consists of a construction transforming any proof of into a proof of . The implication introduction rule proves under a temporary assumption ; the modus ponens rule applies the result when is available. The classical identification with is not generally intuitionistically valid.
Mathematical logic Created 2026-09-24 Updated 2026-10-18
Mathematical logic studies formal languages, formal proofs, model theory, computability theory, and the foundations of mathematics. It makes the rules of reasoning explicit enough that reasoning itself becomes an object of mathematics. Proof theory studies deductions; model theory studies interpretations in which statements hold.
Three questions organize the subject: is an expression a well-formed first-order formula, is it true in a specified first-order structure, and does it have a formal proof from specified axioms? These questions are distinct. For example, is a first-order sentence in an appropriate first-order language; it is false in the natural numbers but true in the rational numbers, with .
The beauty of mathematical logic is that the same logical connectives and rules of universal quantification and existential quantification organize arguments across mathematics. Classical propositional logic uses two truth values; Intuitionistic propositional logic interprets logical implication through constructions on proofs, without unrestricted law of excluded middle. This proof-based framework is developed in Frank Pfenning, Natural Deduction, sections 1–3.
The Gödel-Gentzen negative translation transforms into . Induct on a natural deduction derivation. The translated logical conjunction, logical implication and universal rules are ordinary intuitionistic rules. Logical disjunction and existential introduction add double logical negation; their elimination rules first derive the double logical negation of the stable translated conclusion, then use its stability. Classical double-negation elimination translates precisely to stability. If logical equality atoms are double-negated, transport a stable translated conclusion through a logical equality by contradiction and then remove the resulting double logical negation. Original nonlogical axioms must also be translated; the result does not say arbitrary untranslated classical first-order theories are intuitionistically valid.
Using the supplied counting function, an appropriate first-order sentence is
Here the counting comparison expresses the threshold and the existential quantification expresses teaching at least one course. The word “if” supplies this direction of logical implication; it does not assert that these are the only reasons a faculty member can be busy. With the intended meanings of the nonlogical symbols, no further counting axioms are needed for this translation. If those meanings were unspecified, the displayed first-order sentence alone would not define arithmetic or connect the counting function to the supervision relation.
Assume first that is false on the all-true and all-false Boolean valuations. Use the truth-table normal form from part (ii). Every satisfying Boolean valuation on the finitely many propositional variables must have at least one true propositional variable and at least one false propositional variable. Its minterm therefore has the form
where conjoins its true propositional variables and disjoins its false propositional variables; both lists are nonempty. This is equivalent to . If the satisfying Boolean valuations are indexed by , De Morgan's laws gives
If there are no satisfying Boolean valuations, take and : the result is , again always false.
Conversely, on the all-true Boolean valuation every nonempty is true, so every is true. On the all-false Boolean valuation every nonempty is false, so every logical implication is again true. Negating their logical conjunction gives false on both Boolean valuations. Logical equivalence transfers these values to . The usual nonempty meaning of logical conjunction and logical disjunction of propositional variables is used here; allowing empty or without qualification would destroy this converse.
A Boolean valuation is an arbitrary function assigning one of the two truth values to each propositional variable. It extends uniquely to all propositional formulas by following the construction of the propositional formula:
For logical implication, is false exactly when is true and is false; otherwise it is true. Here the operations on the right are Boolean operations on truth values. Structural recursion gives existence, and structural induction gives uniqueness: once the immediate subformulas have their values, the outer connective fixes the resulting value.
For this calculus the deduction theorem for propositional logic is
For the reverse logical implication, retain the logical derivation from , add the assumption , and use modus ponens rule.
For the forward logical implication, induct on a logical derivation from . For each line we construct a logical derivation of from . If , use (ii). If is an axiom instance or belongs to , it is already derivable from ; L1 gives , and modus ponens rule finishes that case.
If comes from and by modus ponens rule, the induction hypothesis supplies
Part (iii) supplies .
If comes by the elimination rule E from and , the induction hypothesis supplies
The L2 instance with combines these by two applications of modus ponens rule. Thus the rule E also survives the discharge construction. These are all possible lines, proving the theorem for the final line .
Suppose both extensions were inconsistent. By the explosion argument in (i), the extension by proves , and the extension by proves . The deduction theorem for propositional logic therefore yields
The identity theorem gives and . Apply E to the first displayed logical implication and the identity logical implication with antecedent to obtain . Apply E to the identity logical implication with antecedent and the second displayed logical implication to obtain . This contradicts propositional consistency of .
Consequently at least one of the two one-formula extensions is propositionally consistent. The formal proof uses the source's own calculus, including its rule E, rather than assuming an unproved completeness theorem for this presentation.
Zorn's lemma states that a nonempty partially ordered set in which every chain has an upper bound contains a maximal element. Here a chain means a subset totally ordered by the inherited order; it need not have a greatest member.
View every partial function as its graph, a subset of . The family is a set by axiom of separation from the power set of this product. Let be a chain and put . If two members of the union assign values to the same input, the chain property makes one graph contain the other, so those values agree. Thus is a partial function.
If and , choose a chain member containing in its domain. Its rational-scalar closure gives . If , choose two chain members containing them; the larger one contains both, and therefore contains with value . Hence satisfies the required additive identity and domain closure. Consequently
and it is an upper bound for the chain. For the empty chain its union is the empty function, which satisfies the defining logical implications vacuously, so this case is covered too.