Implication distribution rule 2026-10-25
From infer . Assume , then assume . Implication elimination rule gives and , hence . Discharge and then by the implication introduction rule. The original premise and any surrounding assumptions remain available.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 20 4 Solution Created 2026-10-03 Updated 2026-10-07
In the simply typed lambda calculus, types are generated from atomic types by the arrow constructor . A typed lambda term is a lambda term equipped with a derivation of a judgement , where the context assigns types to its free variables. The basic typing rules areThe Implicational Curry-Howard correspondence reads atomic types as propositions and as logical implication. A typed variable is an assumption, abstraction is the implication introduction rule discharging that assumption, and application is the implication elimination rule. Consequently a typed lambda term is a proof in implicational Intuitionistic propositional logic, and a natural deduction proof recursively supplies such a term. For example, expresses implication reflexivity. Products, sums, and the empty type extend the correspondence to conjunction, disjunction, and falsity; pure arrow types give precisely the implicational fragment. Beta reduction removes an introduction followed immediately by its elimination, matching proof simplification.
A Church numeral iswhere means repetitions of application. At base type , it has type . The following Church numeral arithmetic terms use left-associated application:Their concise conclusions areFor successor, the initial adds one application. For addition, the inner supplies applications and supplies more. For multiplication, the repeated operation applies times, and repetitions give . For exponentiation, iterates the operation on : each iteration replaces a function by its -fold iterate, yielding . Zero iterations give , so this encoding takes , including . The explicit outer abstractions make the result the standard Church numeral even at exponent zero, without needing eta equivalence.
Successor, addition, and multiplication operate on the same . The displayed exponentiation term has type : its exponent iterates an operation on functions. Thus the numeral syntax admits several type instances; one should not force every occurrence into one fixed monomorphic Church type.
The Y combinator is the fixed-point combinatorFor , beta reduction gives . Since , we obtain . This allows a recursive program body to receive a representation of itself.
Here the computation is in the untyped lambda calculus. The self-application would require a simple type satisfying , impossible for finite simple types. Accordingly is not a typed lambda term of the simply typed system. The Strong normalization theorem for simply typed lambda calculus also rules out a universal divergent fixed-point operator there.
To obtain a lambda representation of partial computable functions, encode machine configurations as finite data using Church numerals, Church pairs, and Church Booleans. Initial configuration, one transition, the halting test, and output extraction are primitive recursive functions, represented by lambda terms through the initial functions, composition, and lambda definition of primitive recursion by pair iteration. If these representations are , , , and , defineUse normal-order beta reduction so the Church Boolean halting test selects one branch without evaluating the unused recursive branch. A halting computation follows finitely many transitions and returns the Church numeral of the output. A nonhalting computation forces successive tests forever and has no head normal form; by normal-order normalization theorem, it cannot be beta equivalent to a Church numeral. Thus every partial computable function is represented, with divergence preserved; every total computable function is the halting special case. This explains the role of in computational universality while keeping the typed proof interpretation precise.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 21 4 ii Solution Created 2026-10-03 Updated 2026-10-06
Write and . The displayed formula is . A proof of logical implication may use its temporary assumption more than once; this is ordinary natural deduction, not a linear proof system.
Assume , then , then , then . The identity weakening rule derives from the hypotheses and . Discharging by the implication introduction rule gives . Applying by the implication elimination rule gives . Discharge to obtain . Applying gives an ; discharge to obtain a ; apply once more to obtain , and finally discharge .
Here is the complete decorated natural deduction derivation, split at its intermediate conclusion to keep the tree readable. Superscript labels mark which assumption occurrences are discharged; both occurrences labelled are discharged together.To avoid an excessively wide final tree, continue the same derivation as follows, using the right-hand derived premise above:followed byThus the concise lambda term, with bound-variable types determined by the displayed tree, isUnder the Curry-Howard correspondence, implication introduction rules correspond to lambda abstractions, implication elimination rules to applications, and the identity weakening rule retains the first term while allowing an unused second hypothesis. No other inference rule or classical axiom is required.
Write for . The following derives Peirce's law directly from the printed primitive rules, including double-negation elimination:
| Line | Formula | Justification |
|---|---|---|
| 1 | Assume for the final implication | |
| 2 | Assume locally | |
| 3 | Assume inside the scope of 2 | |
| 4 | Negation elimination rule, 2 and 3 | |
| 5 | Logical falsity elimination rule, 4 | |
| 6 | Implication introduction rule, discharging 3–5 | |
| 7 | Implication elimination rule, 1 and 6 | |
| 8 | Negation elimination rule, 2 and 7 | |
| 9 | Negation introduction rule, discharging 2–8 | |
| 10 | Double-negation elimination, 9 | |
| 11 | Implication introduction rule, discharging 1–10 |
The displayed derivation is invalid, although its final conjecture is valid. Its existential-elimination step exports with the local witness name still free, violating the eigenvariable condition. Introducing an existential quantifier afterwards does not repair that earlier invalid rule application.
Move the existential quantifier introduction rule inside the witness scope:
| Line | Formula | Justification |
|---|---|---|
| 1 | Premise | |
| 2 | Premise | |
| 3 | Assume with fresh | |
| 4 | Universal quantifier elimination rule, 1 | |
| 5 | Implication elimination rule, 3 and 4 | |
| 6 | Existential quantifier introduction rule, 5 | |
| 7 | Existential quantifier elimination rule, 2 and 3–6 |
Only requires a natural deduction proof. Assume . Within that assumption, temporarily assume . By disjunction introduction, obtain ; applying by the implication elimination rule gives . Discharge by the implication introduction rule to derive . Disjunction introduction now gives . Finally discharge by the implication introduction rule:All temporary assumptions are discharged. No classical rule is needed; the same proof works in Intuitionistic propositional logic. The false propositional formula has no proof in this sound natural deduction system.
Keep the premise open. Assume , then temporarily assume . Two applications of the implication elimination rule produce and then , contradicting the temporary . Discharge using the negation introduction rule, then discharge using the implication introduction rule.This natural deduction proof uses only the supplied introduction and elimination rules. Line 6 is an application of the negation elimination rule; no classical contradiction principle is needed.
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.
Typed lambda term 2026-10-07
A typed lambda term carries a type derivation under a context of typed free variables. The rules for variables, abstraction, and application correspond to assumptions, the implication introduction rule, and the implication elimination rule under the Implicational Curry-Howard correspondence. General fixed-point combinators belong to the untyped lambda calculus; self-application cannot be given a finite simple type.

