From 58cf2c40955671f9116d6addb889b9e4f29a290b Mon Sep 17 00:00:00 2001 From: KokunoYumeto <208192274+KokunoYumeto@users.noreply.github.com> Date: Sat, 28 Nov 2026 01:32:35 +0100 Subject: [PATCH 01/19] cut-elimination: the falsity constant, contraction with cuts, the existential case Found while reviewing the French translation (KokunoYumeto/OpenLogic-fr): - OLP-0655 ce-largest.tex: in the atomic case, A = bot principal in an L-bot axiom was not covered, and 'Delta = Delta, A' for Delta', A; contraction admissibility is applied to proofs with cuts of lower rank (its proof carries over); the case of an existential cut formula was missing. Co-Authored-By: Claude Opus 5.5 (cherry picked from commit b18d2f4e20c79ab3442516edd6457587e4aaad21) --- .../proof-theory/cut-elimination/ce-largest.tex | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/content/proof-theory/cut-elimination/ce-largest.tex b/content/proof-theory/cut-elimination/ce-largest.tex index 0a31f5d0..e2878896 100644 --- a/content/proof-theory/cut-elimination/ce-largest.tex +++ b/content/proof-theory/cut-elimination/ce-largest.tex @@ -122,8 +122,13 @@ by induction on $\pheight{\pi_2}$. If $\pheight{\pi_2} = 0$, then $!A, \Gamma \Sequent \Delta$ is an axiom. If $!A$ is not principal, some atomic $!C$ is !!a{element} of both~$\Gamma$ and $\Delta$, and $\Gamma -\Sequent \Delta$ itself is an axiom. If $!A$ is principal, then -$\Delta = \Delta, !A$. In this case, $\pi_1$ ends in $\Gamma \Sequent +\Sequent \Delta$ itself is an axiom. If $!A \ident \lfalse$ is principal, the axiom is an +instance of \LeftR{\lfalse}; deleting the occurrences of~$\lfalse$ in +the succedents of~$\pi_1$ from which the end-sequent's $\lfalse$ +descends yields a cut-free proof of $\Gamma \Sequent \Delta$, since +$\lfalse$ is never principal on the right. If $!A$ is principal +otherwise, then +$\Delta = \Delta', !A$. In this case, $\pi_1$ ends in $\Gamma \Sequent \Delta', !A, !A$. We obtain a cut-free proof of $\Gamma \Sequent \Delta', !A$ by applying \olref[seq][inv]{prop:G3c-cont-adm} (admissibility of contraction). If $\pheight{\pi_2} > 0$ it ends in a @@ -274,11 +279,17 @@ \CutCS{} inference on some~$!B(t)$. The end-sequent of the resulting !!{proof} (and it now is a correct !!{proof}) is of the form $\Gamma, \dots, \Gamma \Sequent \Delta, \dots, \Delta$. Apply - admissibility of contraction to turn it into !!a{proof} of~$\Gamma + admissibility of contraction (its proof carries over to !!{proof}s in + $\Log{G3c} + \CutCS$, without introducing cuts of higher rank) to turn it into !!a{proof} of~$\Gamma \Sequent \Delta$ and replace $\pi$ with it. We have replaced one cut on $\lforall[x][!B(x)]$ with (possibly many) cuts on $!B(t)$, but these are all of lower rank. Any cuts already occurring in $\pi_1$ or $\pi_2$ remain present, but they are also all of lower rank. + \item $!A \ident \lexists[x][!B(x)]$. Dual to the previous case: + apply \olref{lem:inv-G3c-cut} to~$\pi_2$, mark the occurrences + of~$\lexists[x][!B(x)]$ in~$\pi_1$ from which the cut formula + descends, and replace the \RightR{\lexists} inferences with a marked + $!B(t)$ in the premise by cuts on~$!B(t)$, which are of lower rank. \end{enumerate} \end{proof} From 122d9c0d776d74502a25c5c13d406220d1c269ce Mon Sep 17 00:00:00 2001 From: KokunoYumeto <208192274+KokunoYumeto@users.noreply.github.com> Date: Sun, 29 Nov 2026 10:30:45 +0100 Subject: [PATCH 02/19] proof-theory: fix calculus overview and minimal-logic conventions Found in the translations' records of errors of the English (the errata harvest of 28-29 November 2026: GPT-6 Astra, OpenAI, ChatGPT Pro mode, classified every record against 2e19d095 and made this patch; applied here by Claude Opus 5.5, Anthropic, effort max). Each issue with its sources is in ENGLISH_ERRATA_CONSOLIDATED.tsv: - HV-0729 OLP-0685 proof-theory.tex:1: The source file is the proof-theory part driver and its olpart identifier is pt with title Proof Theory. Its Part metadata comment incorrectly names model-theory. Correct this exact factual metadata mismatch; imports and ... Co-Authored-By: Claude Opus 5.5 (cherry picked from commit 8a33c05e4e5e33c25528588ad2e98a80163e463e) --- content/proof-theory/proof-theory.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/proof-theory/proof-theory.tex b/content/proof-theory/proof-theory.tex index de397917..b67ba4db 100644 --- a/content/proof-theory/proof-theory.tex +++ b/content/proof-theory/proof-theory.tex @@ -1,4 +1,4 @@ -% Part: model-theory +% Part: proof-theory \documentclass[../../include/open-logic-part]{subfiles} From 34a36433c1688dbe812b041b29681e43d599e1cf Mon Sep 17 00:00:00 2001 From: KokunoYumeto <208192274+KokunoYumeto@users.noreply.github.com> Date: Sun, 29 Nov 2026 10:30:45 +0100 Subject: [PATCH 03/19] proof-theory/sequent-calculus+proof-theory/proof-search: fix rule contexts and admissibility arguments; search bounds and countermodel construction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found in the translations' records of errors of the English (the errata harvest of 28-29 November 2026: GPT-6 Astra, OpenAI, ChatGPT Pro mode, classified every record against 2e19d095 and made this patch; applied here by Claude Opus 5.5, Anthropic, effort max). Each issue with its sources is in ENGLISH_ERRATA_CONSOLIDATED.tsv: - HV-0730 OLP-0700 introduction.tex:60: The preceding sentences explicitly fix Gamma and Delta as multisets, whose order is irrelevant; the following multiplicity equation defines their additive multiset union. Calling these two objects sequences contradicts that ... - HV-0732 OLP-0700 introduction.tex:91: The supplied G1/G3 and search rules have no primitive truth or biconditional rules, while default configuration enables both primitive constructors. Thus unexpanded top or Iff defeats the unqualified completeness/search ... - HV-0733 OLP-0700 introduction.tex:92: Read the displayed rules and rules-proofs.tex:50–62: instantiations must be closed, and no identity rules exist. Thus the broader assertion for arbitrary first-order formulas fails for forall x P(x)=>P(y), and the ... - HV-0735 OLP-0707 rules-G3c.tex:57: Read the universal-left premise and conclusion in this table. The retained quantified formula and the separate multiset Gamma require a comma, as in the conclusion and the other quantified rules. - HV-0737 OLP-0711 rules-proofs.tex:130: The immediately following recursion gives a single axiom height 0 and adds 1 per inference (lines 138–143). A one-inference proof has no sequent strictly between its two endpoints, so the informal node count is inconsistent; ... - HV-0738 OLP-0711 rules-proofs.tex:156: Multiset equality permits permutation of the antecedent, not replacement of the succedent E by D. The preceding instantiation takes C=E and Delta empty, so both displayed succedents must be E. - HV-0740 OLP-0705 rules-G1i.tex:3: The file path and its own table caption identify G1i, but the Section metadata comment copies G1c. Correct only the inaccurate section identifier; all rule diagrams are handled by their separate mathematical decisions. - HV-0741 OLP-0705 rules-G1i.tex:111: The caption removes the bare bottom=>empty axiom and right weakening, but retains primitive right negation with an empty-succedent premise. Under minimal negation defined as A->bottom, =>not-bottom should follow from ... - HV-0742 OLP-0705 rules-G1i.tex:112: The table at line 12 has the bare falsity axiom bottom=>, whereas the caption names a contextual G3 axiom absent from this table. The existing removal of right weakening is retained. - HV-0744 OLP-0708 rules-G3i.tex:3: The file path and its own table caption identify G3i, but the Section metadata comment copies G3c. Correct only the inaccurate section identifier; all rule diagrams are handled by their separate mathematical decisions. - HV-0745 OLP-0708 rules-G3i.tex:42: Read the complete G3i table and its single-conclusion context restriction. Every other right logical rule has one conclusion formula. Each copied Delta in the two disjunction rules permits a second conclusion occurrence; the ... - HV-0746 OLP-0708 rules-G3i.tex:64: Read the universal-left premise and conclusion in this table. The retained quantified formula and the separate multiset Gamma require a comma, as in the conclusion and the other quantified rules. - HV-0747 OLP-0708 rules-G3i.tex:89: This is the G3i table, so the G1 names are copied from the wrong caption. Merely deleting falsity axioms leaves not P,P=>Q derivable by the displayed left-negation rule. Restricting that rule to empty succedents blocks ... - HV-0750 OLP-0709 rules-LK.tex:125: The caption identifies LK, while rules-G1c.tex owns tab:G1c. Keeping that label in both tables creates a duplicate reference target. Rename only the LK table label; the proof-theory introduction uses the G1c and G3c labels for ... - HV-0751 OLP-0710 rules-mG3i.tex:3: The file path and its own table caption identify mG3i, but the Section metadata comment copies G3c. Correct only the inaccurate section identifier; all rule diagrams are handled by their separate mathematical decisions. - HV-0752 OLP-0710 rules-mG3i.tex:57: Read the universal-left premise and conclusion in this table. The retained quantified formula and the separate multiset Gamma require a comma, as in the conclusion and the other quantified rules. - HV-0753 OLP-0710 rules-mG3i.tex:64: The multiple-conclusion intuitionistic table adds the arbitrary succedent context in the conclusions of right negation and implication, but omits it from right forall. Without it, =>forall x(Px->Px),Q (Q atomic) has no ... - HV-0754 OLP-0710 rules-mG3i.tex:81: The displayed system is mG3i, with no mG1i or mG1m definition in the chapter. Deleting only falsity axioms retains explosion via primitive left negation. Restricting that rule to empty contexts alone leaves the same ... - HV-0755 OLP-0710 rules-mG3i.tex:84: The mG3i table reuses the G3c table target declared in rules-G3c.tex. Its own distinct target must identify mG3i, as its caption does. - HV-0756 OLP-0702 proof-examples.tex:15: Rules-proofs.tex:30–36 defines the conclusion occurrence as principal and premise occurrences as active. Both backward-search descriptions select a conclusion occurrence, so both must say principal. - HV-0757 OLP-0702 proof-examples.tex:26: The end-sequent at line 18 has antecedent {(C and D)->E}. Right implication introduces C->(D->E) on the right and preserves this antecedent; the subsequent diagram already uses the correct Gamma. - HV-0759 OLP-0702 proof-examples.tex:65: The two premises have (C and D) on the right of the first and E on the left of the second; the binary conclusion introduces (C and D)->E on the left. This matches left implication at lines 42–45, not unary right implication. - HV-0760 OLP-0702 proof-examples.tex:89: The surrounding proof displays each finish with DisplayProof. Axiom/UnaryInf build the proof box; the missing DisplayProof leaves the short tree unprinted and the proof stack uncleared. The existing next display is a separate ... - HV-0761 OLP-0702 proof-examples.tex:107: The premise at line 105 is E=>E. Left weakening adds C on the left and leaves the right-hand E unchanged; the following weakening and left-implication steps also require E as the succedent. - HV-0762 OLP-0702 proof-examples.tex:128: Set D=E=P atomic and C a compound formula. Every top sequent in the fragment at lines 60–64 is then an atomic identity axiom through P, although C is not atomic. Thus atomicity of all three is sufficient, not necessary. The ... - HV-0763 OLP-0702 proof-examples.tex:132: The preceding fully schematic G1c proof was completed at lines 91–122. The unresolved non-atomic identity problem in lines 124–136 concerns G3c; the next proposition supplies its identity expansion. fCenter is itself a ... - HV-0764 OLP-0702 proof-examples.tex:142: The recursive right-hand side is depth(B)+1, so the quantified immediate subformula must be B, not the formula A being defined. The proof at lines 170–173 repeats the wrong matrix A(x); it is corrected to B(x). The subsequent ... - HV-0765 OLP-0702 proof-examples.tex:150: Contraction has the same formula above and below; in G3c universal-left and existential-right the principal formula is retained in the premise. All newly decomposed active formulas in the logical rules have smaller depth by ... - HV-0766 OLP-0702 proof-examples.tex:200: Four antecedent lists in the same identity tree leave a dangling separator immediately before the sequent sign. Removing those four separators repairs that repeated punctuation defect without adding or deleting a formula; it ... - HV-0767 OLP-0702 proof-examples.tex:217: Both right-conjunction premises have two occurrences of the antecedent conjunction. The rule shares that entire context. Left contraction then removes one antecedent occurrence and cannot change the succedent. The final ... - HV-0769 OLP-0702 proof-examples.tex:262: Checked rules-G1c.tex and rules-G1i.tex directly. Classical shared-context implication-left has first premise Gamma=>Delta,A; the printed intuitionistic rule has Gamma=>A. Literal single-succedent restriction forces Delta ... - HV-0770 OLP-0702 proof-examples.tex:264: Neither of the displayed negation proofs contains Delta. The first extension uses only single-succedent sequents, but its unnamed premise subproof pi_1 also needs that restriction. The second extension explicitly creates the ... - HV-0771 OLP-0702 proof-examples.tex:282: Read the alternate universal proof and the freshness definition in rules-proofs.tex:61–63. If x is free in B(x), c occurs in the conclusion antecedent B(c), violating freshness. If the quantification is vacuous, c need not ... - HV-0772 OLP-0702 proof-examples.tex:297: The quantified formula metavariable is !D in its depth bound and both induction instances. D! reverses the established marker and is a typographical error. - HV-0773 OLP-0702 proof-examples.tex:302: The desired second induction sequent is B,C,Gamma=>Delta,C. Taking D=C requires antecedent context Pi=B,Gamma and succedent context Lambda=Delta, as the next displayed proof confirms. - HV-0774 OLP-0702 proof-examples.tex:322: This G3c induction case introduces an unnamed fresh constant and immediately invokes B(c), then refers to the way c was chosen. Naming that chosen constant c supplies the omitted symbol and matches the displayed eigenvariable ... - HV-0776 OLP-0699 interpretation-rules.tex:13: The sequent definition allows arbitrary formulas, including P(x); the earlier FOL semantics evaluates such formulas under an assignment. Reading truth in a structure as universal assignment satisfaction does not distribute ... - HV-0777 OLP-0699 interpretation-rules.tex:27: The source calls all G3c rules truth-preserving under one structure. Universal-right is a counterexample: in a two-element structure with P true only of the interpretation of fresh a, =>P(a) is true while =>forall x P(x) is ... - HV-0781 OLP-0699 interpretation-rules.tex:68: The G3c table supplies paired rules for negation, conjunction, disjunction, implication and the two quantifiers, but falsity has only the falsity-left axiom and no right introduction. The local True/Iff expansion convention is ... - HV-0782 OLP-0699 interpretation-rules.tex:86: The sequent-truth definition at lines 13–15 says false antecedent or true succedent. With P true and Q false, P=>Q is false although the reversed source condition holds. Adding a right formula preserves the correctly stated ... - HV-0783 OLP-0699 interpretation-rules.tex:94: The necessity assertion is overbroad for an arbitrary formula A. With A=falsity, the falsity axiom, right negation and one right-disjunction step prove excluded middle without contraction. For a predicate atom P, a ... - HV-0784 OLP-0699 interpretation-rules.tex:116: Read the whole structural-rule motivation. In the full calculus a proof can end in a redundant contraction, and a compound A can be principal on the left. The corrected argument explicitly tests the calculus with only axioms ... - HV-0786 OLP-0706 rules-G2c.tex:3: The file path and its own table caption identify G2c, but the Section metadata comment copies G1c. Correct only the inaccurate section identifier; all rule diagrams are handled by their separate mathematical decisions. - HV-0788 OLP-0703 quantifiers.tex:32: Rules-proofs.tex:50–56 requires closed instantiating terms. Substituting a free variable x for c can both invalidate a closed-term quantifier inference and capture an occurrence under a quantifier. Requiring t closed preserves ... - HV-0790 OLP-0703 quantifiers.tex:80: Both diagrams occur under the explicit left-universal case at line 74; their conclusions introduce the quantified formula on the left and retain the succedent. Thus both printed right-universal labels are wrong. - HV-0792 OLP-0703 quantifiers.tex:103: The final argument interleaves two clauses. Since c is not an eigenconstant and t contains none, all eigenconstants remain the same and no eigenconstant is introduced below its own inference. Restoring the clause order states ... - HV-0793 OLP-0703 quantifiers.tex:126: The induction parameter at line 122 counts dirty inferences. Choosing an already clean highest inference need not lower it. Choose a highest dirty inference instead: all eigenvariable inferences in its immediate premise proof ... - HV-0794 OLP-0703 quantifiers.tex:153: Two formerly dirty inferences may share c solely with each other; renaming one makes both clean. The procedure therefore lowers the dirty count by at least one, not exactly one. Strong induction on n justifies applying the ... - HV-0795 OLP-0698 admissible-derivable.tex:62: Read the complete conjunction simulation. Contraction removes one copy of A and B conjoined and preserves the separate context Gamma; the missing comma merges those two antecedent constituents. - HV-0796 OLP-0698 admissible-derivable.tex:67: The singular indefinite article a cannot modify plural inferences. Removing a repairs the grammatical number mismatch; the two uses of using are stylistic and are retained. - HV-0797 OLP-0698 admissible-derivable.tex:114: With all Gamma true and all Delta false, the two premises require not(A and B) and (A or B), hence exactly one of A,B is true: this falsifies A iff B. Thus these premises yield the biconditional on the left, not on the right. ... - HV-0798 OLP-0698 admissible-derivable.tex:124: The book explicitly defines schematic proofs in proof-examples.tex116–130 as having formula-independent structure and height, and distinguishes arbitrary-identity expansions in G3c from such schematic proofs. The corrected ... - HV-0799 OLP-0698 admissible-derivable.tex:139: An arbitrary added formula A may contain an internal eigenconstant. Adding it to that quantifier inference conclusion would violate freshness, although pi was regular. The preceding regularization/substitution construction ... - HV-0800 OLP-0698 admissible-derivable.tex:141: The displayed object is Gamma=>Delta,A, a sequent. Rules-proofs.tex:110–112 names the concluding node of a sequent proof its end-sequent; it is not an end-formula. - HV-0802 OLP-0698 admissible-derivable.tex:192: The mathematical adjective is misspelled admissable in this explanatory sentence, whereas the heading and definition use admissible. Correct the literal spelling. - HV-0803 OLP-0698 admissible-derivable.tex:211: The G3c table has both atomic-identity and bottom-left axioms. Adding a succedent formula preserves either type, so the base case is correct only after including bottom in Gamma as the second alternative. - HV-0805 OLP-0701 invertibility.tex:24: Ordinary invertibility asserts premise provability from conclusion provability, without a supplied height bound. The h_i are not introduced or quantified in this clause. Removing them gives the exact unbounded notion; the next ... - HV-0806 OLP-0701 invertibility.tex:26: The preceding rule has n premises. Height-preserving inversion must quantify independently over every proof-height bound h, not only the integer equal to the premise count. The underscore notation itself renders correctly ... - HV-0810 OLP-0701 invertibility.tex:74: For the n=0 conjunction-inversion case, bottom-left axioms need not have a shared atomic formula. A conjunction is not bottom, so the bottom remains in Gamma when the conjunction is replaced by its two conjuncts. The original ... - HV-0811 OLP-0701 invertibility.tex:118: The induction hypothesis is precisely conjunction-left inversion: replace the selected A and B conjunction in each premise by two antecedent occurrences A,B. The following proof diagram at lines 124 and 127 already gives these ... - HV-0812 OLP-0701 invertibility.tex:171: The cited substitution lemma requires that a is not an eigenconstant of pi_1 and that the inserted constant c is not one either. Regularity of pi_1 alone supplies neither restriction in vacuous cases. Regularize/rename its ... - HV-0815 OLP-0701 invertibility.tex:233: The G3c table contains bottom-left axioms as well as atomic identities. Right contraction preserves the bottom in Gamma; left contraction either leaves that context bottom or leaves one copy when the contracted formula itself ... - HV-0817 OLP-0701 invertibility.tex:338: The substitution of a for c in the contracted universal proof requires c not to be an eigenconstant and the inserted a not to be one. The preceding freshness statement only controls the end-sequent; if the matrix is vacuous it ... - HV-0819 OLP-0701 invertibility.tex:366: The sentence asserts existence of one proof pi_1 prime; the singular article token !!a{proof} cannot take the following plural s. - HV-0820 OLP-0713 translations.tex:33: The proof translates a G1c axiom into G3c. G1c permits every identity A=>A, while G3c requires atomic identities and uses identity expansion for the others. Both rule tables and the cited proposition state these facts. - HV-0821 OLP-0713 translations.tex:43: The cited prop:lor-G3-adm derives G3c rules inside G1c, the opposite direction. For G1c conjunction-left/disjunction-right, weaken the missing active formula into the translated premise and apply the G3c rule. For G1c ... - HV-0822 OLP-0713 translations.tex:77: Compare the two quantifier tables: G3c universal-left and existential-right retain the principal formula in their premises, whereas G1c does not. In the reverse translation keep that retained formula as a context occurrence, ... - HV-0823 OLP-0713 translations.tex:94: The second right-disjunction application must have the context Delta followed by two copies of A or B. The doubled comma has no formula between its separators and is an accidental punctuation duplication. - HV-1008 OLP-0680 introduction.tex:103: The actual G3c rules instantiate only closed terms and have no identity rules; the countermodel is a variable-free term model. The valid open sequent forall x P(x)=>P(y) is not found by this raw search, and the valid identity ... - HV-1009 OLP-0683 search-algorithm.tex:20: Atomic formulas have no backward logical reduction and are only checked for closure. A branch that has already closed at an axiom also need not decompose its remaining compounds. The actual scheduling step selects non-atomic ... - HV-1017 OLP-0679 completeness.tex:17: The satisfaction assertion immediately following is for formula A. The metavariable letter is missing after its ! marker. - HV-1018 OLP-0679 completeness.tex:23: Theta and Xi are defined as unions of branch contexts with multiplicity removed. Each is a set of formulas, not a single formula. - HV-1019 OLP-0679 completeness.tex:26: The aborted case explicitly has a finite branch whose final atomic leaf has no successor. Restrict the successor and atomic-persistence assertions to nonterminal positions; the infinite case still has a successor at every index. - HV-1020 OLP-0679 completeness.tex:33: The failure-branch succedent is consistently named Lambda_n; Delta_n is undefined in the associated-constant sentence. - HV-1023 OLP-0679 completeness.tex:61: The function and predicate interpretation clauses explicitly declare arity m. Their function argument list, predicate-domain Cartesian power, and defining atom must all use m. The later generic atomic-truth statement may ... - HV-1024 OLP-0679 completeness.tex:107: Atomic occurrences persist with their original indices, so the minimum over all indices need never increase. The algorithm actually selects the minimum non-atomic index and allocates new indices above the current maximum. ... - HV-1025 OLP-0679 completeness.tex:122: With k the current maximum as in the algorithm, newly created formulas get k+1 and k+2 for conjunction-left, k+1 on each separate conjunction-right branch, and k+1 for the existential witness. Reusing k would collide with an ... - HV-1033 OLP-0684 tableaux.tex:120: An open branch may have no ordinary eligible formula while retaining a reusable true-universal or false-existential formula. The algorithm cannot unconditionally select a nonexistent first formula. Make ordinary expansion ... - HV-1036 OLP-0684 tableaux.tex:138: In a finite function-free saturated branch every eligible instance may already occur, so no first term meeting the stated novelty condition exists. A vacuous matrix can also exhaust novel instances despite infinitely many ... - HV-1039 OLP-0684 tableaux.tex:151: An open tableau generated for an invalid sequent cannot translate to a proof of that sequent in a sound calculus. The conversion is from closed tableaux; failed open branches instead support the preceding countermodel ... - HV-1040 OLP-0684 tableaux.tex:152: A tableau may close using a previously expanded compound formula that a naive G3 sequent label has deleted. Accumulated branch contexts retain that historical formula. For ordinary rules retaining the principal formula as side ... - HV-1041 OLP-0684 tableaux.tex:172: A,B,C are arbitrary formula metavariables, and no atomicity hypothesis is given. G3c identity axioms require the repeated formula to be atomic. Each of these four top sequents is derivable by general identity expansion, so ... Co-Authored-By: Claude Opus 5.5 (cherry picked from commit d322d779a56272e4b3ec0af3884113ca013b3a23) --- .../proof-search/completeness.tex | 54 ++++++++------- .../proof-search/introduction.tex | 9 ++- .../proof-search/search-algorithm.tex | 9 +-- .../proof-theory/proof-search/tableaux.tex | 66 +++++++++++-------- .../sequent-calculus/admissible-derivable.tex | 19 +++--- .../sequent-calculus/interpretation-rules.tex | 39 ++++++----- .../sequent-calculus/introduction.tex | 13 +++- .../sequent-calculus/invertibility.tex | 25 +++---- .../sequent-calculus/proof-examples.tex | 60 +++++++++-------- .../sequent-calculus/quantifiers.tex | 18 ++--- .../sequent-calculus/rules-G1i.tex | 8 +-- .../sequent-calculus/rules-G2c.tex | 2 +- .../sequent-calculus/rules-G3c.tex | 2 +- .../sequent-calculus/rules-G3i.tex | 18 ++--- .../sequent-calculus/rules-LK.tex | 2 +- .../sequent-calculus/rules-mG3i.tex | 15 +++-- .../sequent-calculus/rules-proofs.tex | 6 +- .../sequent-calculus/translations.tex | 23 ++++--- 18 files changed, 221 insertions(+), 167 deletions(-) diff --git a/content/proof-theory/proof-search/completeness.tex b/content/proof-theory/proof-search/completeness.tex index 08c152b6..942455a8 100644 --- a/content/proof-theory/proof-search/completeness.tex +++ b/content/proof-theory/proof-search/completeness.tex @@ -10,28 +10,32 @@ \olsection{Completeness} -We now show that the proof search algorithm is fool-proof, i.e., if it +Throughout this section, $\Gamma\Sequent\Delta$ is a finite sequent +of equality-free first-order sentences. We now show that the proof +search algorithm is fool-proof, i.e., if it aborts or never halts, there is no !!{proof} of the starting sequent~$\Gamma \Sequent \Delta$. To do this, we define !!a{structure}~$\Struct M$ such that for all $!A \in \Gamma$, -$\Sat{M}{!A}$, and for all~$! \in \Delta$, $\Sat/{M}{!A}$. In other +$\Sat{M}{!A}$, and for all~$!A \in \Delta$, $\Sat/{M}{!A}$. In other words, all !!{formula}s in~$\Gamma$ are true and all !!{formula}s in~$\Delta$ are false in~$\Struct M$, i.e., $\Gamma \Sequent \Delta$ is not valid. Since \Log{G3c} is sound, $\Gamma \Sequent \Delta$ has no !!{proof} -We define $\Struct{M}$ from a pair $\Theta, \Xi$ of !!{formula}s and a +We define $\Struct{M}$ from a pair $\Theta, \Xi$ of sets of !!{formula}s and a set~$C$ of !!{constant}s. We obtain $\Theta, \Xi$ and~$C$ from a \emph{failure branch} of the failed (aborted or non-terminating) run -of the proof search. A failure branch is a sequence $\Pi_n \Sequent +of the proof search. A failure branch is a finite or infinite sequence $\Pi_n \Sequent \Lambda_n$ of sequents and sets of !!{constant}s~$C_n$ such that $\Pi_0 \Sequent \Lambda_0$ is the end-sequent $\Gamma \Sequent -\Delta$, and $\Pi_{n+1} \Sequent \Lambda_{n+1}$ is a premise of $\Pi_n +\Delta$, and, at each nonterminal position, +$\Pi_{n+1} \Sequent \Lambda_{n+1}$ is a premise of $\Pi_n \Sequent \Lambda_n$ generated at stage~$n+1$ for which the algorithm does not find !!a{proof}. Such a premise must obviously exist for -each~$n$, since otherwise the algorithm would have found !!a{proof}. +each nonterminal position, since otherwise that search subtree +would already have closed. We let $C_n$ be the set of !!{constant}s associated with~$\Pi_n -\Sequent \Delta_n$. +\Sequent \Lambda_n$. If the algorithm aborts at a top-most sequent consisting only of atomic !!{formula}s, the branch ending in that sequent is a failure @@ -58,10 +62,10 @@ \item If $c \in \Domain{M}$, $\Assign{c}{M} = c$. \item If $f$ is an $m$-place !!{function} in $\Gamma \Sequent \Delta$, and $t_1$, \dots, $t_m \in \Domain{M}$, then $\Assign{f}{M}(t_1, \dots, t_m) = -f(t_1, \dots, t_n)$. +f(t_1, \dots, t_m)$. \item If $R$ is an $m$-place !!{predicate} in $\Gamma \Sequent \Delta$, then $\Assign{R}{M} = \Setabs{\tuple{t_1, \dots, t_m} \in -\Domain{M}^n}{R(t_1, \dots, t_n) \in \Theta}$. +\Domain{M}^m}{R(t_1, \dots, t_m) \in \Theta}$. \end{enumerate} $\Struct{M}$ is a \emph{term model} in that its domain is a set of terms, and the !!{constant}s and !!{function}s are interpreted so as @@ -90,7 +94,7 @@ \Theta$ by definition of~$\Struct{M}$. Together we have: if $!A \in \Theta$, then $\Sat{M}{!A}$. -If $!A$ is atomic and $!A \in \Pi_n$ then $!A \in \Pi_{n+1}$ and if +At a nonterminal position, if $!A$ is atomic and $!A \in \Pi_n$ then $!A \in \Pi_{n+1}$ and if $!A \in \Lambda_n$ then $!A \in \Lambda_{n+1}$. (This follows from the way the proof search algorithm generates successor sequents.) Hence, if $!A \in \Theta \cap \Xi$ then for some~$n$, $!A \in \Pi_n \cap @@ -104,22 +108,24 @@ of lower !!{depth} than~$!A$. We prove (1) and (2) for $!A$ by distinguishing cases. -First note that when $!A^i$ occurs in $\Pi_n \Sequent \Lambda_n$ then -$!A^i$ also occurs in $\Pi_{n+1} \Sequent \Lambda_{n+1}$ unless $i$ is -the smallest index in $\Pi_n \Sequent \Lambda_n$. Since the smallest -index increases in topmost sequents added at each stage, eventually we -reach $\Pi_n \Sequent \Lambda_n$ in which $!A^i$ occurs, and $i$ is -the smallest index. At stage $n+1$ the algorithm reduces~$!A^i$. In -other words, if $!A \in \Theta$, then for some $n$, $\Pi_n = \Pi_n', -!A^i$ and $i$ is the smallest index. And if $!A \in \Xi$, then for -some $n$, $\Lambda_n = \Lambda_n', !A^i$ and $i$~is the smallest -index. +Consider a non-atomic occurrence $!A^i$ on the failure branch. +Until it is selected, it persists in each successor sequent. The +algorithm selects the least index among non-atomic occurrences; +atomic occurrences with smaller indices are ignored. Each reduction +removes its selected occurrence or reindexes its retained copy, and +all new indices exceed the current maximum. Thus only finitely many +eligible occurrences can precede~$i$, and no new one can precede it. +Consequently $!A^i$ is eventually reduced. A finite failure branch +cannot end while a non-atomic occurrence remains. In particular, +every non-atomic formula in~$\Theta$ or~$\Xi$ is selected on the +corresponding side at some stage. In the cases below, let $k$ denote +the maximum index just before that reduction. \begin{enumerate} \item $!A \in \Theta$ and $!A \ident !B \land !C$. Then for some $n$, $\Pi_n = \Pi_n', (!B \land !C)^i$. $\Pi_{n+1} \Sequent \Lambda_{n+1}$ is the corresponding premise of~\LeftR{\land}, i.e., - $\Pi_{n+1} = \Pi_n', !B^k, !C^{k+1}$. Consequently, $!B, !C \in + $\Pi_{n+1} = \Pi_n', !B^{k+1}, !C^{k+2}$. Consequently, $!B, !C \in \Theta$. By inductive hypothesis, $\Sat{M}{!B}$ and $\Sat{M}{!C}$. By definition of $\Sat{M}{}$, we have $\Sat{M}{!B \land !C}$. @@ -127,8 +133,8 @@ $\Lambda_n = \Lambda_n', !B \land !C$. $\Pi_{n+1} \Sequent \Lambda_{n+1}$ is one of the two premises of~\RightR{\land} with conclusion $\Pi_n \Sequent \Lambda'_n, !B \land !C$, i.e., - $\Lambda_{n+1} = \Lambda_n', !B^k$ or $\Lambda_{n+1} = \Lambda_n', - !C^k$. Consequently, either $!B \in \Xi$ or $!C \in \Xi$. By + $\Lambda_{n+1} = \Lambda_n', !B^{k+1}$ or $\Lambda_{n+1} = \Lambda_n', + !C^{k+1}$. Consequently, either $!B \in \Xi$ or $!C \in \Xi$. By inductive hypothesis, either $\Sat/{M}{!B}$ or $\Sat/{M}{!C}$. By definition of $\Sat{M}{}$, we have $\Sat/{M}{!B \land !C}$. @@ -138,7 +144,7 @@ \item $!A \in \Theta$ and $!A \ident \lexists[x][!B(x)]$. Then for some $n$, $\Pi_n = \Pi_n', \lexists[x][!B(x)]^i$. $\Pi_{n+1} \Sequent \Lambda_{n+1}$ is the corresponding premise - of~\LeftR{\lexists}, i.e., $\Pi_{n+1} = \Pi_n', !B(c)^k$ for + of~\LeftR{\lexists}, i.e., $\Pi_{n+1} = \Pi_n', !B(c)^{k+1}$ for some~$c$. Consequently, $!B(c) \in \Theta$ and~$c \in C$. By inductive hypothesis, $\Sat{M}{!B(c)}$. By definition of $\Sat{M}{}$, we have $\Sat{M}{\lexists[x][!B(x)]}$. diff --git a/content/proof-theory/proof-search/introduction.tex b/content/proof-theory/proof-search/introduction.tex index 01be46d7..b64b8c3e 100644 --- a/content/proof-theory/proof-search/introduction.tex +++ b/content/proof-theory/proof-search/introduction.tex @@ -10,6 +10,11 @@ \olsection{Introduction} +For proof search, expand $\ltrue$ as $\lnot\lfalse$ and +$!A\liff!B$ as $(!A\lif!B)\land(!B\lif!A)$ recursively before +applying the algorithm or its complexity measures. These expansions +preserve truth, so countermodels also falsify the original input. + The axioms and inference rules of !!{proof} systems like \Log{G3c} or \Log{N1i} define what trees of sequents or !!{formula}s count as correct !!{proof}s. Given such a tree of sequents or !!{formula}s @@ -100,8 +105,8 @@ The key idea to showing that a proof search algorithm is fool-proof is to show that if the algorithm fails, we can show from the way it fails that the sequent can't possibly have !!a{proof}. And the way to show -that is to show that it is not valid. In classical first-order logic, -valid sequents $\Gamma \Sequent \Delta$ are those where every +that is to show that it is not valid. In this chapter we work with finite sequents of equality-free +first-order sentences. For these, valid sequents $\Gamma \Sequent \Delta$ are those where every !!{structure} makes at least one !!{formula} in $\Gamma$ is false or at least one !!{formula} in~$\Delta$ is true. \Log{G3c} is \emph{sound}, i.e., it !!{prove}s only valid sequents. This is diff --git a/content/proof-theory/proof-search/search-algorithm.tex b/content/proof-theory/proof-search/search-algorithm.tex index d3fcac59..e2021798 100644 --- a/content/proof-theory/proof-search/search-algorithm.tex +++ b/content/proof-theory/proof-search/search-algorithm.tex @@ -10,16 +10,17 @@ \olsection{Search Algorithm for \Log{G3c}} -We describe a search algorithm for \Log{G3c}. It is not the only +We describe a search algorithm for \Log{G3c} on finite sequents of +equality-free first-order sentences. It is not the only possible one, and not even the most efficient one. But it is correct: if a sequent $\Gamma \Sequent \Delta$ has !!a{proof}, it will eventually halt and find !!a{proof}. It is also fool-proof: if it halts without having found !!a{proof}, or never halts, then $\Gamma \Sequent \Delta$ is not valid to begin with. -A key necessary feature of the algorithm is that it ensures that every -!!{formula} in $\Gamma \Sequent \Delta$, or in a sequent produced in -the proof search, is ``reduced,'' i.e., it is treated as the principal +A key necessary feature of the algorithm is that every eligible +non-atomic formula occurrence on a continuing open search branch is +eventually ``reduced,'' i.e., it is treated as the principal formula of an inference rule applied backwards, and that this happens as often as necessary. We call this feature \emph{fairness}. diff --git a/content/proof-theory/proof-search/tableaux.tex b/content/proof-theory/proof-search/tableaux.tex index 9bc24a0e..8eacd1cc 100644 --- a/content/proof-theory/proof-search/tableaux.tex +++ b/content/proof-theory/proof-search/tableaux.tex @@ -117,10 +117,13 @@ Proof search is easy in tableaux. We generate a tableau in stages. At stage $0$, simply write down the starting !!{formula}s at the top. At -stage $n+1$, do the following for each leaf node: Find the first -(top-most) non-atomic signed formula not yet checked off that is not of the form $\sFmla{\True}{\lforall}$ or $\sFmla{\False}{\lexists}$. Apply the branch -extension rule to that formula. Once the rule has been applied in -every branch that includes the signed formula in question, check it +stage $n+1$, do the following for each open leaf node: If there is +a non-atomic signed formula not yet expanded on that branch, other than +$\sFmla{\True}{\lforall}$ or $\sFmla{\False}{\lexists}$, choose the +first (top-most) one and apply its branch extension rule. Record that +expansion on the branch. If there is none, skip this step and proceed +to the reusable quantifiers below. Once the rule has been applied on +every open branch below the signed occurrence, check the occurrence off. (The example above is generated using this algorithm.) Signed !!{formula}s of the form $\sFmla{\True}{\lforall}$ and @@ -135,7 +138,9 @@ c_0$ if no !!{constant} occurs) and the !!{function}s occurring in the starting !!{formula}s, and such that the corresponding signed !!{formula} $\sFmla{\True}{!B(t)}$ or~$\sFmla{\False}{!B(t)}$ does not -already occur on the branch. +already occur on the branch. If no such term exists, add no node +for that formula at this stage; reconsider it at later stages when +new constants or instances may be available. If this proof search does not produce a closed tableau, it either contains a finite open branch where all non-atomic !!{formula}s are @@ -148,41 +153,48 @@ \Setabs{!A}{\sFmla{\True}{!A} \text{ on the branch}}$ and $\Xi = \Setabs{!A}{\sFmla{\False}{!A} \text{ on the branch}}$.) -Tableaux generated by this proof search method can easily be -translated into \Log{G3c} proofs by assigning a sequent to every node. -If the starting formulas correspond to a sequent $\Gamma \Sequent -\Delta$, label each of the starting formulas by $\Gamma \Sequent -\Delta$. If a branch is extended by applying a branch extension rule -to a signed !!{formula} $\sFmla{\True}{!A}$, then the leaf is -labelled $!A, \Pi \Sequent \Lambda$, and if it is applied to a signed -!!{formula} $\sFmla{\False}{!A}$, the leaf is labelled $\Pi \Sequent -\Lambda, !A$. Where the tableau applies a \TRule{\True}{\star} rule, -apply the \LeftR{\star} rule to the sequent (with $!A$ principal); -where it applies a \TRule{\False}{\star} rule, apply the \RightR{\star} -rule. The premises of the rule are the sequents that label the -corresponding nodes added to the tableau. Once a tableau closes with -$\sFmla{\True}{!A}$ and $\sFmla{\False}{!A}$, the label of the final -leaf node will be a sequent of the form $!A, \Pi \Sequent \Lambda, -!A$. Some successive nodes in the tableau will be assigned the same -sequent; delete duplicates. For instance, the tableau above translates -into the !!{proof}: +Closed tableaux generated by this proof search method can easily be +translated into \Log{G3c} proofs by retaining the accumulated +branch formulas in sequent contexts: true formulas go on the left, +false formulas on the right. Treat the consecutive nodes created by +one expansion as a single block. Keep an expanded principal formula +in the context, since a later tableau closure may still refer to it. + +Work upward from closed branches. A branch closed by +$\sFmla{\True}{\lfalse}$ gives a bottom-left axiom. An opposite-signed +pair gives a sequent $!A,\Pi\Sequent\Lambda,!A$; this is an identity +axiom when $!A$ is atomic and otherwise has the generalized identity +proof of \olref[seq][ex]{prop:G3c-axioms}. +For each expansion block, use the corresponding \LeftR{\star} or +\RightR{\star} rule with the retained branch context. Where retaining +the principal formula creates an extra copy in the conclusion, +remove it by admissible contraction. The universal-left and +existential-right rules already retain their principal formulas. +This yields a proof of the starting sequent. +For the example above, the same rule pattern gives the following +proof; its four top sequents use generalized identity when the +schematic formulas are not atomic: \begin{maxwidth} $ -\Axiom$!A \fCenter !A, !B$ +\AxiomC{} +\Deduce$!A \fCenter !A, !B$ \RightLabel{\RightR{\lor}} \UnaryInf$!A \fCenter !A \lor !B$ -\Axiom$!A \fCenter !A, !C$ +\AxiomC{} +\Deduce$!A \fCenter !A, !C$ \RightLabel{\RightR{\lor}} \UnaryInf$!A \fCenter !A \lor !C$ \RightLabel{\RightR{\land}} \BinaryInf$!A \fCenter (!A \lor !B) \land (!A \lor !C)$ -\Axiom$!B, !C \fCenter !A, !B$ +\AxiomC{} +\Deduce$!B, !C \fCenter !A, !B$ \RightLabel{\RightR{\lor}} \UnaryInf$!B, !C \fCenter !A \lor !B$ \RightLabel{\LeftR{\land}} \UnaryInf$!B \land !C \fCenter !A \lor !B$ -\Axiom$!B, !C \fCenter !A, !C$ +\AxiomC{} +\Deduce$!B, !C \fCenter !A, !C$ \RightLabel{\RightR{\lor}} \UnaryInf$!B, !C \fCenter !A \lor !C$ \RightLabel{\LeftR{\land}} diff --git a/content/proof-theory/sequent-calculus/admissible-derivable.tex b/content/proof-theory/sequent-calculus/admissible-derivable.tex index dc60dd8d..d512cc86 100644 --- a/content/proof-theory/sequent-calculus/admissible-derivable.tex +++ b/content/proof-theory/sequent-calculus/admissible-derivable.tex @@ -59,12 +59,12 @@ \RightLabel{$\LeftR{\land}_2$} \UnaryInf$!A \land !B, !A \land !B, \Gamma \fCenter \Delta$ \RightLabel{\LeftR{\Contraction}} -\UnaryInf$!A \land !B \Gamma \fCenter \Delta$ +\UnaryInf$!A \land !B, \Gamma \fCenter \Delta$ \DisplayProof \] \end{ex} -Simulating a inferences using one rule using other rules is one way to +Simulating inferences using one rule using other rules is one way to show that a rule is admissible. But it is not the only way, and some rules are admissible but can't be so simulated. Rules that can be are called \emph{derivable}. @@ -112,7 +112,7 @@ \item \Axiom$\Gamma, !A, !B \fCenter \Delta$ \Axiom$\Gamma \fCenter \Delta, !A, !B$ \RightLabel{\LeftR{\liff}} -\BinaryInf$\Gamma \fCenter \Delta, !A \liff !B$ +\BinaryInf$!A \liff !B, \Gamma \fCenter \Delta$ \DisplayProof \item \Axiom$!A, \Gamma \fCenter \Delta, !B$ @@ -121,7 +121,8 @@ \BinaryInf$\Gamma \fCenter \Delta, !A \liff !B$ \DisplayProof \end{enumerate} -are derivable in (a)~\Log{G1c} and (b)~\Log{G3c}. +are derivable in~\Log{G1c}. In~\Log{G3c}, show that the right +rule is derivable and that both rules are admissible. \end{prob} @@ -136,9 +137,10 @@ is admissible in~\Log{G3c}. The idea of the proof is simple: suppose there is !!a{proof}~$\pi$ of the premise $\Gamma \Sequent \Delta$ in~\Log{G3c}. -Add the !!{formula}~$!A$ to the succedent of every sequent +First rename the eigenvariables of~$\pi$ so that none occurs in~$!A$, +without changing its height. Add the !!{formula}~$!A$ to the succedent of every sequent in~$\pi$. Axioms remain axioms; correct inferences are still correct -inferences. The end-!!{formula} of the new !!{proof} is $\Gamma \Sequent +inferences. The end-sequent of the new !!{proof} is $\Gamma \Sequent \Delta, !A$. The rule $\RightR{\Weakening}$ is, however, not derivable @@ -189,7 +191,7 @@ \end{defn} Note that it is enough for a rule to be !!{height}-preserving -admissable that, whenever the premises~$S_i$ have !!{proof}s~$\pi_i$ +admissible that, whenever the premises~$S_i$ have !!{proof}s~$\pi_i$ with !!{height}~$h_i = \pheight{\pi_i}$, there is !!a{proof}~$\pi$ of the conclusion of !!{height}~$\pheight{\pi}$ no greater than the maximum of the~$h_i$. In particular, if there is only one @@ -209,7 +211,8 @@ is a \Log{G3c}-!!{proof} $\pi'$ of $\Gamma \Sequent \Delta, !A$ with $\pheight{\pi'} = n$. We prove this by induction on~$n$. If $n=0$, then $\pi$ is just the axiom $\Gamma \Sequent \Delta$ (i.e., some - atomic $!C$ occurs in both $\Gamma$ and~$\Delta$), and so is $\Gamma + atomic $!C$ occurs in both $\Gamma$ and~$\Delta$, or $\lfalse$ occurs + in~$\Gamma$), and so is $\Gamma \Sequent \Delta, !A$. If $n = \pheight{\pi} >0$, the !!{proof}~$\pi$ has a last inference. We distinguish cases according to which rule was used. We give just one example: suppose the last inference was diff --git a/content/proof-theory/sequent-calculus/interpretation-rules.tex b/content/proof-theory/sequent-calculus/interpretation-rules.tex index 41861909..2eda55ba 100644 --- a/content/proof-theory/sequent-calculus/interpretation-rules.tex +++ b/content/proof-theory/sequent-calculus/interpretation-rules.tex @@ -11,7 +11,8 @@ \olsection{Interpretation of Rules} Recall the interpretation of a sequent: A sequent $\Gamma \Sequent -\Delta$ is true in !!a{structure}~$\Struct{M}$ if either at least one +\Delta$ is true in !!a{structure}~$\Struct{M}$ under a fixed variable +assignment if either at least one $!A \in \Gamma$ is false or at least one~$!A \in \Delta$ is true. We can read the logical rules of~\Log{G3c} as codifying the truth conditions for their principal !!{formula}s. Consider \RightR{\lif}. @@ -24,9 +25,11 @@ \lif !B$ is false if $!A$~is true and $!B$~is false. So $!A \lif !B \Sequent \ $ is true iff both $\ \Sequent !A$ and $!B \Sequent \ $ are true. The conclusion of \LeftR{\lif} is equivalent to the -conjunction of its premises. This pattern ensures that the rules -of~\Log{G3c} are sound (if all premises are true, the conclusion is -true). They also ensure completeness. +conjunction of its premises. This pattern ensures that the propositional rules +of~\Log{G3c} preserve truth in each fixed interpretation, and hence +are sound. The quantifier rules preserve validity, using their +eigenvariable conditions. The decomposition of truth conditions is +also used to prove completeness. In fact, the truth conditions for any truth-functional connective can be described in this way as a set of sequents. This follows from the @@ -65,8 +68,9 @@ rule.) \end{prob} -In \Log{G3c}, each connective and quantifier has exactly two rules: a -left rule and a right rule. In \Log{G1c}, however, there are two +In \Log{G3c}, each nonconstant primitive connective and each quantifier +has exactly two rules: a left rule and a right rule. Falsity is instead +governed by its axiom. In \Log{G1c}, however, there are two \LeftR{\land} and two \RightR{\lor} rules. The reason is that Gentzen's original system~\Log{LK}, on which \Log{G1c} is modeled, had a variant~\Log{LJ} for an important non-classical logic, viz., @@ -76,24 +80,25 @@ impossible to use the \RightR{\lor} rule of~\Log{G3c}, as its premise contains both $!A$ and~$!B$ in the succedent. Gentzen thus used a pair of \RightR{\lor} rules for \Log{LJ}, and used the same for~\Log{LK}. -The intuitionistic version~\Log{G1i} similarly is just~\Log{G1c} with -all succedents restricted to at most one !!{formula}. (\Log{G3c} also +The intuitionistic version~\Log{G1i} similarly restricts all succedents +to at most one !!{formula}, and changes the first premise of +$\LeftR{\lif}$ to $\Gamma \Sequent !A$, without the side succedent. (\Log{G3c} also has an intuitionistic version, but it some of its rules differ from the corresponding rules in~\Log{G3c}. For instance, it, too, uses a pair of \RightR{\lor} rules.) That the structural rules of~\Log{G1c} are sound is easy to see. For instance, if $\Gamma \Sequent \Delta$ contains a false !!{formula} on -the right or a true !!{formula} on the left, so does $\Gamma \Sequent +the left or a true !!{formula} on the right, so does $\Gamma \Sequent \Delta, !A$: the same one, whether $!A$ is true or false is irrelevant. So if the premise of~\RightR{\Weakening} is true, so is its conclusion. Note that here the converse is not true. The conclusion may be true because $!A$ is true, and then the premise is not guaranteed to be true. -Why have structural rules at all? Contraction (\RightR{\Contraction}, -\LeftR{\Contraction}) is needed for instance to !!{prove} $\ \Sequent !A -\lor \lnot !A$. If you start with $!A \Sequent !A$ you first get +Why have structural rules at all? For a predicate atom~$!A$, +contraction (\RightR{\Contraction}, \LeftR{\Contraction}) is needed +for instance to !!{prove} $\ \Sequent !A \lor \lnot !A$. If you start with $!A \Sequent !A$ you first get $\Sequent !A, \lnot !A$ by~\RightR{\lnot}. Then you can use the two versions of \RightR{\lor} in succession, once to get $!A \lor \lnot !A$ from $\lnot !A$, and once to get $!A \lor \lnot !A$ from~$!A$. @@ -113,11 +118,11 @@ \DisplayProof \] There are in fact valid sequents which you could not !!{prove} -in~\Log{G1c} without weakening or contraction. For instance, -!!a{proof} of the sequent $!A \Sequent !B \lif !A$ in~\Log{G1c} has to -end in \RightR{\lif} (since only $!B \lif !A$ can be principal), and -that requires $!B, !A \Sequent !A$ as a premise. This, in turn, -requires \LeftR{\Weakening} to get it from the axiom $!A \Sequent !A$: +in~\Log{G1c} without weakening or contraction. For instance, take $!A$ and~$!B$ to be distinct atomic !!{formula}s. +A proof of $!A \Sequent !B \lif !A$ using only axioms and logical rules +would have to end in \RightR{\lif}, with $!B, !A \Sequent !A$ as a +premise. This premise is neither an axiom nor the conclusion of a +logical rule. With \LeftR{\Weakening}, we obtain the following proof: \[ \Axiom$!A \fCenter !A$ \RightLabel{\LeftR{\Weakening}} diff --git a/content/proof-theory/sequent-calculus/introduction.tex b/content/proof-theory/sequent-calculus/introduction.tex index 7c358b19..038bd98c 100644 --- a/content/proof-theory/sequent-calculus/introduction.tex +++ b/content/proof-theory/sequent-calculus/introduction.tex @@ -49,7 +49,8 @@ the empty conjunction to be~$\ltrue$) and $!D$~be the disjunction of the !!{formula}s in~$\Delta$ (taking the empty disjunction to be~$\lfalse$). Then the sequent $\Gamma \Sequent \Delta$ is true (in -some structure~$\Struct{M}$) iff $!G \lif !D$ is true. In classical +some structure~$\Struct{M}$ under a fixed variable assignment) iff +$!G \lif !D$ is true. In classical logic, this amounts to the same as saying that either one of the !!{formula}s in~$\Gamma$ is false, or one of the !!{formula}s in~$\Delta$ is true. @@ -57,7 +58,7 @@ If $\Gamma$ is a multiset of !!{formula}s, we write $\Gamma, !A$ (or $!A, \Gamma$) for the result of adding $!A$ to~$\Gamma$. If $\Delta$ is also a multiset of !!{formula}s, then $\Gamma, \Delta$ is the -multiset union of the two sequences---if $\Gamma$ contains $!A$ with +multiset union of the two multisets---if $\Gamma$ contains $!A$ with \emph{multiplicity}~n (i.e., it contains $n$ copies of~$!A$) and $\Delta$ with multiplicity~$m$, then $\Gamma, \Delta$ contains $!A$ with multiplicity~$n+m$. If the multiset on one side of a sequent is @@ -88,8 +89,14 @@ called ``contraction'' (\LeftR{\Contraction}, \RightR{\Contraction}) and ``weakening'' (\LeftR{\Weakening}, \RightR{\Weakening}). +For the proof-theory calculi, $\ltrue$ abbreviates $\lnot\lfalse$ +and $!A\liff!B$ abbreviates $(!A\lif!B)\land(!B\lif!A)$. +Expand these recursively before applying rules or computing syntactic +measures or subformulas. + The systems \Log{G1c} and \Log{G3c} happen to be sound and complete -for classical logic. In other words, every sequent !!{provable} in +for classical first-order logic without identity, restricted to sequents +of !!{sentence}s. In other words, every such sequent !!{provable} in these systems is true in every !!{structure}, and every sequent that is true in every !!{structure} has !!a{proof}. So the question \emph{whether} a sequent has !!a{proof} can also be answered by other diff --git a/content/proof-theory/sequent-calculus/invertibility.tex b/content/proof-theory/sequent-calculus/invertibility.tex index 867eedbf..4f14546a 100644 --- a/content/proof-theory/sequent-calculus/invertibility.tex +++ b/content/proof-theory/sequent-calculus/invertibility.tex @@ -21,9 +21,9 @@ \DisplayProof \] is \emph{invertible} in a system if, whenever $\Proves S$ then -$\Proves[h_i] S_i$ for $i = 1$, \dots,~$n$. It is +$\Proves S_i$ for $i = 1$, \dots,~$n$. It is \emph{!!{height}-preserving invertible} (or \emph{!!{hp}-invertible}) -in a system if, whenever $\Proves_n S$ then $\Proves[n] S_i$ for $i = +in a system if, for every $h$, whenever $\Proves[h] S$ then $\Proves[h] S_i$ for $i = 1$, \dots,~$n$. \end{defn} @@ -71,7 +71,9 @@ \pheight{\pi}$. We do this by induction on $n = \pheight{\pi}$. If $n = 0$, $\pi$ consists of just an axiom: $!A \land !B, \Gamma -\Sequent \Delta$. In \Log{G3c}, axioms are of the form $!C, \Gamma +\Sequent \Delta$. If $\lfalse$ occurs in~$\Gamma$, the sequent $!A, !B, \Gamma +\Sequent \Delta$ is again a bottom-left axiom. Otherwise the axiom is +of the form $!C, \Gamma \Sequent \Delta, !C$ with $!C$ atomic. In other words, $!C$ can't be $!A \land !B$. If $!A \land !B, \Gamma \Sequent \Delta$ is an axiom, then some atomic $!C$ must be !!a{element} of both $\Gamma$ @@ -115,7 +117,7 @@ Here $!C \lif !D$ on the left is principal, and the context on the left is $!A \land !B, \Gamma'$ (i.e., $\Gamma = \Gamma', !C \lif !D$). The inductive hypothesis yields !!{proof}s $\pi_1'$ and $\pi_2'$ of -$!A \land !B, \Gamma' \Sequent \Delta, !C$ and $!A \land !B, \Gamma', +$!A, !B, \Gamma' \Sequent \Delta, !C$ and $!A, !B, \Gamma', !D \Sequent \Delta$, respectively. These two sequents can again serve as premises for the \LeftR{\lif} rule to get~$\pi'$: \[ @@ -169,7 +171,7 @@ ending in it has $\pheight{\pi_1} < \pheight{\pi}$. Moreover, the eigenvariable condition gives us that $a$ does not occur in $\Gamma$, $\Delta$, or $\lforall[x][!A(x)]$. Since we may assume that - $\pi_1$ is regular, $\Subst{\pi_1}{c}{a}$ is !!a{proof} of the same + $\pi_1$ is regular and that its eigenvariables are distinct from $a$ and~$c$, $\Subst{\pi_1}{c}{a}$ is !!a{proof} of the same !!{height} of $\Gamma \Sequent \Delta, !A(c)$ by \olref[qua]{lem:subst-regular}. @@ -230,10 +232,11 @@ If $n=0$, $\pi$ is just an axiom. But if $\Gamma \Sequent \Delta, !A, !A$ is an axiom of~\Log{G3c}, so is $\Gamma \Sequent \Delta, !A$: -either some atomic~$!C$ is !!a{element} of both $\Gamma$ and~$\Delta$, -or $!A$ is atomic and !!a{element} of~$\Gamma$. The same reasoning -applies if the end-sequent is $!A, !A, \Gamma \Sequent -\Delta$. +either $\lfalse$ occurs in~$\Gamma$, some atomic~$!C$ is !!a{element} +of both $\Gamma$ and~$\Delta$, or $!A$ is atomic and !!a{element} +of~$\Gamma$. The same reasoning applies if the end-sequent is +$!A, !A, \Gamma \Sequent \Delta$: contracting two left occurrences +of~$\lfalse$ still leaves a bottom-left axiom. If $n>0$, $\pi$ ends in some rule~$R$. If $!A$ is not principal in this last inference, we can obtain !!a{proof}~$\pi'$ as in the proof @@ -335,7 +338,7 @@ By \olref{lem:invert-quant}, there is !!a{proof}~$\pi_1'$ with !!{height} $\le \pheight{\pi_1}$ of $\Gamma \fCenter \Delta, !B(c), !B(a)$ for any~$c$ not occuring in $\Gamma \fCenter \Delta, -\lforall[x][!B(x)], !B(a)$. We may assume that $\pi_1'$ is regular; so +\lforall[x][!B(x)], !B(a)$. We may assume that $\pi_1'$ is regular and has no eigenvariable equal to $a$ or~$c$; so by \olref[qua]{lem:subst-regular} the !!{proof} $\Subst{\pi_1'}{a}{c}$ is !!a{proof} of $\Gamma \fCenter \Delta, !B(a), !B(a)$ also of !!{height} $\le \pheight{\pi_1}$. Now the inductive @@ -363,7 +366,7 @@ \DisplayProof \] The inductive hypothesis applies to~$\pi_1$ and there is -!!a{proof}s~$\pi_1'$ of $\Gamma \Sequent \Delta, \lexists[x][!B(x)], +!!a{proof}~$\pi_1'$ of $\Gamma \Sequent \Delta, \lexists[x][!B(x)], !B(t)$. (Note that no inversion lemma is needed here!) The !!{proof}~$\pi'$ then is: \[ diff --git a/content/proof-theory/sequent-calculus/proof-examples.tex b/content/proof-theory/sequent-calculus/proof-examples.tex index 5229ee7b..81501100 100644 --- a/content/proof-theory/sequent-calculus/proof-examples.tex +++ b/content/proof-theory/sequent-calculus/proof-examples.tex @@ -12,7 +12,7 @@ To give !!{proof}s of sequents it is typically convenient to work your way upwards from the end-sequent by selecting !!a{formula} in it as -the active !!{formula} and writing the premises of the corresponding +the principal !!{formula} and writing the premises of the corresponding rule on top of the sequent, then repeating the process until it leads to axioms. For instance, suppose we want to prove the sequent \[(!C \land !D) \lif !E \Sequent !C \lif (!D \lif !E)\] @@ -23,14 +23,14 @@ \RightLabel{\RightR{\lif}} \UnaryInf$ \Gamma \fCenter \Delta, !A \lif !B $ \DisplayProof\] -suggests we should take $\Gamma = \{!C \lif (!D \lif !E)\}$, $\Delta = +suggests we should take $\Gamma = \{(!C \land !D) \lif !E\}$, $\Delta = \emptyset$, $!A \ident !C$ and $!B \ident !D \lif !E$. So the last inference of a proof could be \[\Axiom$ !C, (!C \land !D) \lif !E \fCenter !D \lif !E$ \RightLabel{\RightR{\lif}} \UnaryInf$(!C \land !D) \lif !E \fCenter !C \lif (!D \lif !E)$ \DisplayProof\] -If we repeat this idea, focusing on $!D \lif !E$ as active formula, we +If we repeat this idea, focusing on $!D \lif !E$ as principal formula, we generate \[\Axiom$ !D, !C, (!C \land !D) \lif !E \fCenter !E$ \RightLabel{\RightR{\lif}} @@ -62,7 +62,7 @@ \RightLabel{\RightR{\land}} \BinaryInf$!D, !C \fCenter !E, !C \land !D$ \Axiom$!D, !C, !E \fCenter !E$ -\RightLabel{\RightR{\lif}} +\RightLabel{\LeftR{\lif}} \BinaryInf$ !D, !C, (!C \land !D) \lif !E \fCenter !E$ \RightLabel{\RightR{\lif}} \UnaryInf$!C, (!C \land !D) \lif !E \fCenter !D \lif !E$ @@ -87,6 +87,7 @@ \UnaryInf$!D, !C \fCenter !C$ \RightLabel{\RightR{\Weakening}} \UnaryInf$!D, !C \fCenter !E, !C$ +\DisplayProof \] Overall, we have !!a{proof} in \Log{G1c} which looks like this: \[ @@ -104,7 +105,7 @@ \BinaryInf$!D, !C \fCenter !E, !C \land !D$ \Axiom$!E \fCenter !E$ \RightLabel{\LeftR{\Weakening}} -\UnaryInf$!C, !E \fCenter !C$ +\UnaryInf$!C, !E \fCenter !E$ \RightLabel{\LeftR{\Weakening}} \UnaryInf$!D, !C, !E \fCenter !E$ \RightLabel{\LeftR{\lif}} @@ -124,12 +125,12 @@ In \Log{G3c}, axioms are sequents of the form $!A, \Gamma \Sequent \Delta, !A$ where $!A$ must be atomic. So although $!D, !C \Sequent !E, !C$ looks like an axiom of \Log{G3c} ($\Gamma = \{!D\}$; $\Delta = -\{!E\}$), it is only \emph{really} an axiom if $!C$ in fact is atomic. -Our proof fragment is only a complete proof in \Log{G3c} if $!C$, +\{!E\}$), it is certainly an axiom if $!C$ in fact is atomic. +Our proof fragment is a complete proof in \Log{G3c} if $!C$, $!D$, and $!E$ are atomic !!{formula}s. Although we haven't, strictly speaking, shown that -\[\Log{G1c} \Proves (!C \land !D) \lif !E \fCenter !C \lif (!D \lif +\[\Log{G3c} \Proves (!C \land !D) \lif !E \fCenter !C \lif (!D \lif !E),\] in practice this is all we need to do (and can do). That's because every sequent of the form $!A, \Gamma \Sequent \Delta, !A$ is provable in \Log{G3c}, even if $!A$ itself is not atomic. We can show @@ -139,17 +140,17 @@ The \emph{depth}~$\depth{!A}$ of !!a{formula} is defined as follows: \begin{enumerate} \item If $!A$ is atomic, $\depth{!A} = 0$. - \item If $!A \ident \lnot !B$, $!A \ident \lforall[x][A]$, or - $!A \ident \lexists[x][A]$, then $\depth{!A} = \depth{!B} + 1$. + \item If $!A \ident \lnot !B$, $!A \ident \lforall[x][!B]$, or + $!A \ident \lexists[x][!B]$, then $\depth{!A} = \depth{!B} + 1$. \item If $!A \ident (!B \land !C)$, $(!B \lor !C)$, or $(!B \lif !C)$, then $\depth{!A} = \max(\depth{!B},\depth{!C}) + 1$. \end{enumerate} \end{defn} It is not hard to prove that $\depth{A(x)} = \depth{A(t)}$ for any -term~$t$. The important fact for us is that in any rule, the depth of -the principal !!{formula} is always greater than the depth of the -active !!{formula}s. For instance, we have: +term~$t$. The important fact for us is that in any logical rule, the depth of +the principal !!{formula} is greater than the depth of the +active !!{formula}s other than retained copies of the principal !!{formula}. For instance, we have: \begin{align*} \depth{P(x)} = \depth{P(a)} & = 0,\\ \depth{\lforall[x][P(x)]} & = 1,\\ @@ -168,7 +169,7 @@ atomic and $!A \Sequent !A$ already is a !!{proof} in~\Log{G1c} of the required form. If $\depth{!A} > 0$, $!A$ is constructed from !!{formula}s of lower depth, e.g, $!A \ident \lnot !B$, $!A \ident - (!B \land !C)$, or $!A \ident \lforall[x][A(x)]$. The inductive + (!B \land !C)$, or $!A \ident \lforall[x][!B(x)]$. The inductive hypothesis is that for all $!D$ with $\depth{!D} < \depth{!A}$, $\Log{G1c} \Proves !D \Sequent !D$ from atomic axioms. @@ -197,26 +198,26 @@ \[ \AxiomC{} \RightLabel{$\pi_1$} - \Deduce$!B, \fCenter !B$ + \Deduce$!B \fCenter !B$ \RightLabel{\LeftR{\Weakening}} - \UnaryInf$!B, !C, \fCenter !B$ + \UnaryInf$!B, !C \fCenter !B$ \RightLabel{\LeftR{\land}} \UnaryInf$!B \land !C, !C\fCenter !B$ \RightLabel{\LeftR{\land}} \UnaryInf$!B \land !C, !B \land !C \fCenter !B$ \AxiomC{} \RightLabel{$\pi_2$} - \Deduce$!C, \fCenter !C$ + \Deduce$!C \fCenter !C$ \RightLabel{\LeftR{\Weakening}} - \UnaryInf$!B, !C, \fCenter !C$ + \UnaryInf$!B, !C \fCenter !C$ \RightLabel{\LeftR{\land}} \UnaryInf$!B \land !C, !C \fCenter !C$ \RightLabel{\LeftR{\land}} \UnaryInf$!B \land !C, !B \land !C \fCenter !C$ \RightLabel{\RightR{\land}} - \BinaryInf$!B \land !C \fCenter !B \land !C$ + \BinaryInf$!B \land !C, !B \land !C \fCenter !B \land !C$ \RightLabel{\LeftR{\Contraction}} - \UnaryInf$!B \land !C \fCenter !B$ + \UnaryInf$!B \land !C \fCenter !B \land !C$ \DisplayProof \] @@ -260,15 +261,16 @@ \] in the case where $!A \ident \lnot !B$. However, there are sequent systems in which this wouldn't have worked. The intuitionistic -sequent calculus \Log{G1i} is like \Log{G1c}, except it restricts all -sequents to at most one !!{formula} on the right side of a sequent. If -$\Delta = \emptyset$, then the first !!{proof} would also be -!!a{proof} in~\Log{G1i}, but the second would not be, since +sequent calculus \Log{G1i} restricts all sequents to at most one +!!{formula} on the right. It also changes the first premise of +$\LeftR{\lif}$ to $\Gamma \Sequent !A$, without the side succedent. If +the sub-!!{proof}~$\pi_1$ has at most one !!{formula} in every succedent, +then the first !!{proof} would also be !!a{proof} in~\Log{G1i}, but the second would not be, since one sequent contains both $!B$ and~$\lnot !B$ on the right. Note that even in \Log{G1c} we could not have used an alternate order of rules in the case where $!A \ident \lforall[x][!B(x)]$. The -following is \emph{not} !!a{proof} +following is \emph{not} !!a{proof} when $x$ occurs free in~$!B(x)$ \[ \AxiomC{} \RightLabel{$\pi_1$} @@ -279,7 +281,7 @@ \UnaryInf$\lforall[x][!B(x)] \fCenter \lforall[x][!B(x)]$ \DisplayProof \] -since the eigenvariable condition on~$\RightR{\lforall}$ is violated. +since then the eigenvariable condition on~$\RightR{\lforall}$ is violated. \begin{prop}\ollabel{prop:G3c-axioms} Any sequent of the form $!A, \Gamma @@ -294,12 +296,12 @@ \Gamma \Sequent \Delta, !A$ is an axiom of~\Log{G3c}. Now suppose $n>0$. Again we distinguish cases. The inductive -hypothesis is: for all $D!$ with $\depth{!D} < n$, and all $\Pi$ +hypothesis is: for all $!D$ with $\depth{!D} < n$, and all $\Pi$ and $\Lambda$, $\Log{G3c} \Proves !D, \Pi \Sequent \Lambda, !D$. Here is the case for $!A \ident (!B \land !C)$. We use the inductive hypothesis twice: once for $!D = !B$, $\Pi = !C, \Gamma$, and $\Lambda = \Delta$ to get !!a{proof}~$\pi_1$ of $!B, !C, \Gamma \Sequent -\Delta, !B$, and once for $!D = !C$, $\Pi = !B, \Lambda$, and $\Lambda +\Delta, !B$, and once for $!D = !C$, $\Pi = !B, \Gamma$, and $\Lambda = \Delta$ to get !!a{proof}~$\pi_2$ of $!B, !C, \Gamma \Sequent \Delta, !C$. Here is the !!{proof} of~$!B \land !C, \Gamma \Sequent \Delta, !B \land !C$: @@ -319,7 +321,7 @@ \DisplayProof \] -For $!A \ident \lforall[x][!B(x)]$, pick !!a{constant} not +For $!A \ident \lforall[x][!B(x)]$, pick !!a{constant}~$c$ not in~$\lforall[x][!B(x)]$, $\Gamma$, or~$\Delta$. Apply the inductive hypothesis for $!D = !B(c)$, $\Pi = \lforall[x][!B(x)], \Gamma$ and $\Lambda = \Delta$. This gives !!a{proof}~$\pi_1$ of $!B(c), diff --git a/content/proof-theory/sequent-calculus/quantifiers.tex b/content/proof-theory/sequent-calculus/quantifiers.tex index ae8b481c..5180ad01 100644 --- a/content/proof-theory/sequent-calculus/quantifiers.tex +++ b/content/proof-theory/sequent-calculus/quantifiers.tex @@ -29,7 +29,7 @@ \begin{lem}\ollabel{lem:subst-regular} If $\pi$ is regular, ends in $\Gamma \Sequent \Delta$, $c$ is !!a{constant} not used as an -eigenvariable in~$\pi$, and $t$~is a term not containing any +eigenvariable in~$\pi$, and $t$~is a closed term not containing any eigenvariables of~$\pi$, then $\Subst{\pi}{t}{c}$ resulting from~$\pi$ by replacing every occurrence of~$c$ by~$t$ is a regular !!{proof}. The end-sequent of $\Subst{\pi}{t}{c}$ is $\Subst{\Gamma}{t}{c} @@ -77,7 +77,7 @@ \AxiomC{} \RightLabel{$\pi'$} \Deduce$!A(s(c),c), \lforall[x][!A(x,c)], \Gamma(c) \fCenter \Delta'(c)$ - \RightLabel{\RightR{\lforall}} + \RightLabel{\LeftR{\lforall}} \UnaryInf$\lforall[x][!A(x,c)], \Gamma(c) \fCenter \Delta'(c)$ \DisplayProof \] @@ -89,7 +89,7 @@ \AxiomC{} \RightLabel{$\Subst{\pi'}{t}{c}$} \Deduce$!A(s(t),t), \lforall[x][!A(x,t)], \Gamma(t) \fCenter \Delta'(t)$ - \RightLabel{\RightR{\lforall}} + \RightLabel{\LeftR{\lforall}} \UnaryInf$\lforall[x][!A(x,t)], \Gamma(t) \fCenter \Delta'(t)$ \DisplayProof \] @@ -101,8 +101,8 @@ (or two regular !!{proof}s in the case of two-premise rules). The new sequent differs from the end-sequent of $\pi$ only in that $c$ was replaced by the term~$t$. Moreover, the eigenvariables of $\pi$ - and Since $t$ was assumed not to contain an eigenvariable of~$\pi$ - and $\Subst{\pi}{t}{c}$ are the same, the new end-sequent does not + and $\Subst{\pi}{t}{c}$ are the same. Since $t$ was assumed not to + contain an eigenvariable of~$\pi$, the new end-sequent does not contain an eigenvariable of $\Subst{\pi}{t}{c}$. Consequently, $\Subst{\pi}{t}{c}$ is regular. \end{proof} @@ -120,10 +120,10 @@ another inference nor does it occur anywhere in~$\pi$ except the immediate sub-!!{proof} of the inference, and \emph{dirty} otherwise. Let $n$ be the number of dirty eigenvariable inferences in~$\pi$. We -show, by induction on~$n$, that $\pi$~can be transformed into the +show, by strong induction on~$n$, that $\pi$~can be transformed into the required regular !!{proof}~$\pi'$. If $n=0$, all eigenvariable inferences in~$\pi$ are clean, so and $\pi$ is regular, and there is -nothing to prove. Otherwise, pick a highest eigenvariable inference, +nothing to prove. Otherwise, pick a highest dirty eigenvariable inference, say \RightR{\lforall}. The sub-!!{proof}~$\pi_1$ of~$\pi$ ending in it is of the form \[ @@ -136,7 +136,7 @@ \] Note that as $c$ is an eigenvariable, it does not occur in~$\Gamma$, $\Delta$, or $\lforall[x][!A(x)]$. The proof $\pi_2$ is regular, since -it contains no eigenvariable inferences at all. Let $a$ be +all its eigenvariable inferences are clean in~$\pi$. Let $a$ be !!a{constant} not occuring in~$\pi$. By \olref{lem:subst-regular}, $\Subst{\pi_2}{a}{c}$ is a regular proof of $\Gamma \fCenter \Delta, !A(a)$, to which we can apply~$\RightR{\lforall}$. If we replace $\pi_1$ in~$\pi$ by the proof $\pi_1'$, @@ -150,7 +150,7 @@ \] we have replaced a dirty eigenvariable inference by a clean one, and the only difference is the replacement of the eigenvariable $c$ -by~$a$. The resulting proof has $n-1$ dirty eigenvariable inferences, +by~$a$. The resulting proof has at most $n-1$ dirty eigenvariable inferences, and the result follows from the inductive hypothesis. \end{proof} diff --git a/content/proof-theory/sequent-calculus/rules-G1i.tex b/content/proof-theory/sequent-calculus/rules-G1i.tex index 1d799abf..987a943f 100644 --- a/content/proof-theory/sequent-calculus/rules-G1i.tex +++ b/content/proof-theory/sequent-calculus/rules-G1i.tex @@ -1,6 +1,6 @@ % Part: proof-theory % Chapter: sequent-calculus -% Section: rules-G1c +% Section: rules-G1i \documentclass[../../../include/open-logic-section]{subfiles} @@ -108,9 +108,9 @@ $\RightR{\forall}$ and $\LeftR{\exists}$, the !!{constant}~$a$ must not occur in the conclusion sequent. $\Gamma$ is a multisets of !!{formula}s, and $\Delta$ may be empty or contain a single -!!{formula}. There is no \RightR{\Contraction} rule. \Log{G1m} is -\Log{G1i} without~\RightR{\Weakening} and without axioms $\lfalse, -\Gamma \Sequent \Delta$.} +!!{formula}. There is no \RightR{\Contraction} rule. For \Log{G1m}, use nonempty succedents and read $\lnot !A$ +as $!A\lif\lfalse$, omitting both primitive negation rules. +Its remaining rules are those of \Log{G1i} without~\RightR{\Weakening} and without the axiom $\lfalse \Sequent \quad$.} \ollabel{tab:G1i} \end{table} diff --git a/content/proof-theory/sequent-calculus/rules-G2c.tex b/content/proof-theory/sequent-calculus/rules-G2c.tex index 4fd7a9b5..f29f5b6b 100644 --- a/content/proof-theory/sequent-calculus/rules-G2c.tex +++ b/content/proof-theory/sequent-calculus/rules-G2c.tex @@ -1,6 +1,6 @@ % Part: proof-theory % Chapter: sequent-calculus -% Section: rules-G1c +% Section: rules-G2c \documentclass[../../../include/open-logic-section]{subfiles} diff --git a/content/proof-theory/sequent-calculus/rules-G3c.tex b/content/proof-theory/sequent-calculus/rules-G3c.tex index 614099d3..0bc243fd 100644 --- a/content/proof-theory/sequent-calculus/rules-G3c.tex +++ b/content/proof-theory/sequent-calculus/rules-G3c.tex @@ -54,7 +54,7 @@ \UnaryInf$ \Gamma \fCenter \Delta, !A \lif !B $ \DisplayProof \\[4ex] -\Axiom$ !A(t), \lforall[x][!A(x)]\Gamma \fCenter \Delta$ +\Axiom$ !A(t), \lforall[x][!A(x)], \Gamma \fCenter \Delta$ \RightLabel{\LeftR{\lforall}} \UnaryInf$ \lforall[x][!A(x)],\Gamma \fCenter \Delta$ \DisplayProof diff --git a/content/proof-theory/sequent-calculus/rules-G3i.tex b/content/proof-theory/sequent-calculus/rules-G3i.tex index c7d950c1..03939e8c 100644 --- a/content/proof-theory/sequent-calculus/rules-G3i.tex +++ b/content/proof-theory/sequent-calculus/rules-G3i.tex @@ -1,6 +1,6 @@ % Part: proof-theory % Chapter: sequent-calculus -% Section: rules-G3c +% Section: rules-G3i \documentclass[../../../include/open-logic-section]{subfiles} @@ -39,14 +39,14 @@ \DisplayProof & \begin{tabular}[t]{@{}r@{}} -\Axiom$\Gamma \fCenter \Delta, !A$ +\Axiom$\Gamma \fCenter !A$ \RightLabel{\RightR{\lor}} -\UnaryInf$ \Gamma \fCenter \Delta, !A \lor !B$ +\UnaryInf$ \Gamma \fCenter !A \lor !B$ \DisplayProof \\[3ex] -\Axiom$ \Gamma \fCenter \Delta, !B$ +\Axiom$ \Gamma \fCenter !B$ \RightLabel{\RightR{\lor}} -\UnaryInf$ \Gamma \fCenter \Delta, !A \lor !B$ +\UnaryInf$ \Gamma \fCenter !A \lor !B$ \DisplayProof\\[3ex] \end{tabular} \\[4ex] @@ -61,7 +61,7 @@ \UnaryInf$ \Gamma \fCenter !A \lif !B $ \DisplayProof \\[4ex] -\Axiom$ !A(t), \lforall[x][!A(x)]\Gamma \fCenter \Delta$ +\Axiom$ !A(t), \lforall[x][!A(x)], \Gamma \fCenter \Delta$ \RightLabel{\LeftR{\lforall}} \UnaryInf$ \lforall[x][!A(x)],\Gamma \fCenter \Delta$ \DisplayProof @@ -86,8 +86,10 @@ not occur in the conclusion sequent. $\Gamma$ is a multisets of !!{formula}s, and $\Delta$ may be empty or contain a single !!{formula}. In axioms, the !!{formula}~$!C$ must be atomic. -\Log{G1m} is \Log{G1i} without axioms $\lfalse, \Gamma \Sequent -\Delta$.} +The minimal calculus \Log{G3m} uses the nonempty-succedent +fragment of \Log{G3i}, treats $\lnot !A$ as $!A\lif\lfalse$, +and omits the primitive negation rules and the falsity axioms +$\lfalse,\Gamma\Sequent\Delta$.} \ollabel{tab:G3i} \end{table} diff --git a/content/proof-theory/sequent-calculus/rules-LK.tex b/content/proof-theory/sequent-calculus/rules-LK.tex index be3f4a1b..eff042b3 100644 --- a/content/proof-theory/sequent-calculus/rules-LK.tex +++ b/content/proof-theory/sequent-calculus/rules-LK.tex @@ -122,7 +122,7 @@ $\LeftR{\exists}$, the !!{constant}~$a$ must not occur in the conclusion sequent. $\Gamma$, $\Delta$, and~$\Pi$ are sequences of !!{formula}s.} -\ollabel{tab:G1c} +\ollabel{tab:LK} \end{table} \end{document} \ No newline at end of file diff --git a/content/proof-theory/sequent-calculus/rules-mG3i.tex b/content/proof-theory/sequent-calculus/rules-mG3i.tex index a6ad463a..6bfffc3f 100644 --- a/content/proof-theory/sequent-calculus/rules-mG3i.tex +++ b/content/proof-theory/sequent-calculus/rules-mG3i.tex @@ -1,6 +1,6 @@ % Part: proof-theory % Chapter: sequent-calculus -% Section: rules-G3c +% Section: rules-mG3i \documentclass[../../../include/open-logic-section]{subfiles} @@ -54,14 +54,14 @@ \UnaryInf$ \Gamma \fCenter \Delta, !A \lif !B $ \DisplayProof \\[4ex] -\Axiom$ !A(t), \lforall[x][!A(x)]\Gamma \fCenter \Delta$ +\Axiom$ !A(t), \lforall[x][!A(x)], \Gamma \fCenter \Delta$ \RightLabel{\LeftR{\lforall}} \UnaryInf$ \lforall[x][!A(x)],\Gamma \fCenter \Delta$ \DisplayProof & \Axiom$ \Gamma \fCenter !A(a) $ \RightLabel{\RightR{\lforall}} -\UnaryInf$ \Gamma \fCenter \lforall[x][!A(x)]$ +\UnaryInf$ \Gamma \fCenter \Delta, \lforall[x][!A(x)]$ \DisplayProof \\[4ex] \Axiom$ !A(a), \Gamma \fCenter \Delta $ @@ -78,10 +78,11 @@ logic. In $\RightR{\forall}$ and $\LeftR{\exists}$, the !!{constant}~$a$ must not occur in the conclusion sequent. $\Gamma$~and $\Delta$ are multisets of !!{formula}s. In axioms, the -!!{formula}~$!C$ must be atomic. \Log{mG1m} is -\Log{mG1i} without axioms $\lfalse, -\Gamma \Sequent \Delta$.} -\ollabel{tab:G3c} +!!{formula}~$!C$ must be atomic. The minimal calculus \Log{mG3m} uses the fragment of +\Log{mG3i} with nonempty succedent multisets, treats $\lnot !A$ +as $!A\lif\lfalse$, and omits the primitive negation rules and +the falsity axioms $\lfalse,\Gamma\Sequent\Delta$.} +\ollabel{tab:mG3i} \end{table} \end{document} \ No newline at end of file diff --git a/content/proof-theory/sequent-calculus/rules-proofs.tex b/content/proof-theory/sequent-calculus/rules-proofs.tex index 7dffa212..0568b61a 100644 --- a/content/proof-theory/sequent-calculus/rules-proofs.tex +++ b/content/proof-theory/sequent-calculus/rules-proofs.tex @@ -127,8 +127,8 @@ It is often necessary to measure the complexity of !!{proof}s as a natural number. We could simply count the number of sequents in !!a{proof}, but often a more useful measure is the !!{height} of -!!a{proof}: it is the maximal number of sequents between the -end-sequent and an initial sequent. We can also give an inductive +!!a{proof}: it is the maximal number of inference steps from the +end-sequent to an initial sequent. We can also give an inductive definition. \begin{defn} @@ -153,7 +153,7 @@ we take $!C \ident !E$, $\Gamma = \{!D\}$ and $\Delta = \emptyset$ in $!C, \Gamma \Sequent \Delta, !C$ we get exactly the sequent $!D, !E \Sequent !E$. (Remember that we are dealing with multi\emph{sets} and -so $!D, !E \Sequent !E$ and $!E, !D \Sequent !D$ are the same +so $!D, !E \Sequent !E$ and $!E, !D \Sequent !E$ are the same sequent.) Since $!D, !E \Sequent !D$ is an instance of an axiom of~\Log{G3c}, it diff --git a/content/proof-theory/sequent-calculus/translations.tex b/content/proof-theory/sequent-calculus/translations.tex index 2b2a98ac..65c03983 100644 --- a/content/proof-theory/sequent-calculus/translations.tex +++ b/content/proof-theory/sequent-calculus/translations.tex @@ -30,7 +30,7 @@ If $n = 0$, then $\pi$ is an axiom. The axiom $\lfalse \Sequent \quad$ is also an axiom in~\Log{G3c} (take the context $\Gamma, - \Delta$ to be empty). In \Log{G3c}, axioms $!A \Sequent !A$ with + \Delta$ to be empty). In \Log{G1c}, axioms $!A \Sequent !A$ with arbitrary, not just atomic~$!A$ are allowed. But we proved in \olref[ex]{prop:G3c-axioms} that all such sequents are !!{provable} in~\Log{G3c}. @@ -40,10 +40,12 @@ in~\Log{G3c}, i.e., that the immediate sub-!!{proof}s have translations in~\Log{G3c}. If the rule~$R$ is also a rule in \Log{G3c}, we apply it to the translated !!{proof}s of the premises. - For those rules that are no also rules of~\Log{G3c}, we have already - shown that they are at least admissible. So, if rule~$R$ was - $\LeftR{\land}$ or $\RightR{\lor}$, apply - \olref[adm]{prop:lor-G3-adm}. If it was a weakening rule, apply + For rules that are not also rules of~\Log{G3c}, we use admissible + weakening. If rule~$R$ was $\LeftR{\land}$ or $\RightR{\lor}$, first + add the missing active conjunct or disjunct by + \olref[adm]{prop:weak-G3c-adm}, then apply the \Log{G3c} rule. + For $\LeftR{\lforall}$ or $\RightR{\lexists}$, first add the retained + principal !!{formula} by weakening, then apply the \Log{G3c} rule. If it was a weakening rule, apply \olref[adm]{prop:weak-G3c-adm}. If it was a contraction rule, apply \olref[inv]{prop:G3c-cont-adm}. \end{proof} @@ -75,8 +77,9 @@ If $\pi$ ends in a rule~$R$, the inductive hypothesis yields !!{proof}s in \Log{G1c} of the premises, and we can apply the same rule~$R$ to those !!{proof}s. The exceptions are the rules - \LeftR{\land} and \RightR{\lor}, which differ between \Log{G1c} - and~\Log{G3c}. The \Log{G3c} versions are derivable in \Log{G1c} as follows: + \LeftR{\land}, \RightR{\lor}, \LeftR{\lforall}, and \RightR{\lexists}, + which differ between \Log{G1c} and~\Log{G3c}. The first two + \Log{G3c} rules are derivable in \Log{G1c} as follows: \[ \Axiom$!A, !B, \Gamma \fCenter \Delta$ \RightLabel{\LeftR{\land}} @@ -91,11 +94,15 @@ \RightLabel{\RightR{\lor}} \UnaryInf$\Gamma \fCenter \Delta, !A \lor !B, !B$ \RightLabel{\RightR{\lor}} - \UnaryInf$\Gamma \fCenter \Delta, , !A \lor !B, !A \lor !B$ + \UnaryInf$\Gamma \fCenter \Delta, !A \lor !B, !A \lor !B$ \RightLabel{\RightR{\Contraction}} \UnaryInf$\Gamma \fCenter \Delta, !A \lor !B$ \DisplayProof \] + For \LeftR{\lforall} and \RightR{\lexists}, apply the \Log{G1c} rule + with the retained principal !!{formula} as part of the context. + This produces two copies of that !!{formula}; one application of + the corresponding contraction rule yields the required conclusion. \end{proof} \end{document} \ No newline at end of file From 26299b3f48fd5b69d3b6918aa3b44ad808f7e0a3 Mon Sep 17 00:00:00 2001 From: KokunoYumeto <208192274+KokunoYumeto@users.noreply.github.com> Date: Sun, 29 Nov 2026 10:30:45 +0100 Subject: [PATCH 04/19] proof-theory/cut-elimination: fix cut transformations, measures and midsequent dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found in the translations' records of errors of the English (the errata harvest of 28-29 November 2026: GPT-6 Astra, OpenAI, ChatGPT Pro mode, classified every record against 2e19d095 and made this patch; applied here by Claude Opus 5.5, Anthropic, effort max). Each issue with its sources is in ENGLISH_ERRATA_CONSOLIDATED.tsv: - HV-0825 OLP-0659 introduction.tex:98: The first cut definition concatenates the two independent contexts. This second display instead has the same Gamma and Delta in each premise and retains one copy; the preceding sentence explicitly introduces it as ... - HV-0828 OLP-0656 ce-topmost.tex:70: Case E (lines 359 onward) treats both-principal last inferences, which can have positive cut height just as the permutation cases C and D do. The source range omits that necessary case. - HV-0829 OLP-0656 ce-topmost.tex:72: Read both versions of A/B. The first common-atom arguments do not cover a bottom-left axiom (its succedent may even be empty). The alternate cases at lines 97–121 separately cover identity and bottom. The inserted scope ... - HV-0830 OLP-0656 ce-topmost.tex:107: In the second alternative-identity case, the right premise pi_2 is the axiom with A already in Delta. The other, left proof pi_1 ends in Gamma=>Delta-prime,A,A and is the proof to which right contraction applies. - HV-0832 OLP-0656 ce-topmost.tex:167: In the generic right-rule permutation, Pi contains the active antecedent formulas consumed by R. The new conclusion has antecedent Gamma alone; a trailing comma before the sequent sign denotes no further formula and is accidental. - HV-0833 OLP-0656 ce-topmost.tex:258: The two premises share exists x B(x),Gamma-prime; A alone is cut. Removing the shared existential is not licensed by CutCS. The immediately following permutation and contraction preserve it. - HV-0834 OLP-0656 ce-topmost.tex:323: Case D defines Delta=Delta-prime,B and C. This left premise is pi_1 weakened by C, so it has exactly one conjunction. Using unprimed Delta adds a second conjunction and breaks the shared context with the right premise. - HV-0835 OLP-0656 ce-topmost.tex:352: Both premises at lines 347 and 350 share Delta-prime,B and C. Right conjunction adds precisely one further conjunction. The unprimed Delta already contains one, so the printed conclusion would contain three before contraction ... - HV-0836 OLP-0656 ce-topmost.tex:365: The quantifier reduction cuts B(t), which need not literally occur as a syntactic subformula of forall x B(x). Substitution of a term preserves logical depth, so its depth equals that of the matrix and is strictly smaller than ... - HV-0838 OLP-0656 ce-topmost.tex:484: The implication reduction cuts C with shared antecedent B,Gamma, but its right premise has only C,Gamma. Apply the existing height-preserving left weakening notation to pi_2 double-prime, adding B, in both the first reduction ... - HV-0839 OLP-0656 ce-topmost.tex:548: If x is not free in B(x), the chosen instantiation term need not occur in B(t), so its absence cannot be inferred from pi_2. A fresh constant gives the same vacuous instance. In all cases renaming pi_1-prime eigenconstants ... - HV-0840 OLP-0656 ce-topmost.tex:577: The exercise uses universal-left, a one-premise rule in the table. Case C handles one-premise permutations; case D is explicitly the two-premise case. - HV-0841 OLP-0656 ce-topmost.tex:611: In the combined diagram the lower cut has left premise Gamma=>Delta,B and right premise B,Gamma=>Delta. Its cut formula B is removed, leaving Gamma=>Delta. The source incorrectly retains that distinguished B in the conclusion. - HV-0842 OLP-0656 ce-topmost.tex:618: Cut height was defined only for a proof ending in one cut with cut-free premises. The transformed cut-free subproof itself has no such last-cut height, and its ordinary height need not strictly grow. What the rank-first ... - HV-0843 OLP-0655 ce-largest.tex:29: Inspecting the cited inversion construction: if the last inference is binary and principal, each inverted proof is one immediate subproof and may discard all cuts in the other branch. Thus the stated inspection does not ... - HV-0844 OLP-0655 ce-largest.tex:43: The proof has fixed R as the rule being inverted and has just disposed of the case in which the last rule is R. In all other cases the final inference is a different rule. Renaming this local last rule S prevents identifying ... - HV-0845 OLP-0655 ce-largest.tex:123: The French branch already repairs the principal-bottom case, but its immediately preceding nonprincipal case still assumes a common atom. If pi_2 is a bottom-left axiom with bottom in Gamma, A may be nonprincipal while Delta ... - HV-0847 OLP-0655 ce-largest.tex:133: The induction is on height(pi_2). A selected premise of its final rule is proved by a strictly shorter immediate subproof, not by pi_2 itself. Height-preserving weakening of that subproof and pi_1 yields the displayed shared ... - HV-0849 OLP-0655 ce-largest.tex:221: The displayed replacement uses Subst(pi_1-prime,t,c) even though pi_1-prime may contain cuts. Choose c outside both finite original proofs, hence outside every nonvacuous witness instance and all original eigenconstants; for a ... - HV-0850 OLP-0655 ce-largest.tex:242: Correctness after deleting a marked universal does not prove it was never active: an unmarked duplicate occurrence can still supply the same rule instance. Only the resulting end-sequent Gamma=>Delta is needed to replace the ... - HV-0852 OLP-0655 ce-largest.tex:271: At a binary context-sharing inference, adding Gamma/Delta only to one premise and the conclusion leaves the other premise with different contexts. Weakening the companion proof by the same accumulated contexts restores the ... - HV-0854 OLP-0655 ce-largest.tex:280: Inversion may discard branches and their cuts, as the first lemma construction shows, and substitution copies need not retain every original cut. The rank-reduction conclusion only needs every surviving copy to have lower ... - HV-0856 OLP-0655 ce-largest.tex:286: The exercise starts with a final conjunction cut and asks to replace it by cuts of lower rank. This is exactly the conjunction case left as an exercise in lem:max-cut-red-G3c; lem:inv-G3c-cut only inverts a logical rule and is ... - HV-0857 OLP-0655 ce-largest.tex:311: The topmost lemma requires cut-free premises. The present summary explicitly allows lower-rank cuts above the selected maximal cut, which is the local maximal-rank reduction lemma just proved and the lemma invoked in the ... - HV-0858 OLP-0660 intuitionistic.tex:1: Read the whole standalone fragment and both G3c/mG3i tables. Its arbitrary Delta/Lambda contexts are classical, while its implication-left first premise retains the principal formula. This is not a literal G3c primitive rule, ... - HV-0859 OLP-0660 intuitionistic.tex:43: All adjacent cut premises use the formula metavariable !B. B! reverses its marker and is a typographical error. - HV-0860 OLP-0660 intuitionistic.tex:53: Ordinary Cut concatenates the two contexts. The cut on C of B,Gamma=>Delta,C and C,Pi=>Lambda yields B,Gamma,Pi=>Delta,Lambda, with no duplicated Pi/Lambda. The subsequent cut on B concatenates Gamma,Pi and Gamma,Pi, yielding ... - HV-0863 OLP-0661 midsequent.tex:22: Without the matrix restriction every formula is of the displayed form with an empty prefix. The later proof explicitly uses that no quantified subformula occurs under a propositional connective in a prenex end-formula (lines ... - HV-0864 OLP-0661 midsequent.tex:50: The hypothesis only says B is quantifier-free, which allows a compound matrix such as P or Q. G3c identity axioms require an atomic repeated formula. Its general identity-expansion proposition supplies proofs of these two top ... - HV-0865 OLP-0661 midsequent.tex:75: The existential is the principal conclusion formula of right-exists; B(t) is its newly decomposed active instance in the premise. The sentence is selecting those right-exists inferences by the formula introduced. - HV-0866 OLP-0661 midsequent.tex:76: The preceding extraction diagram names the upper subproof pi_1. No pi_1 prime has been defined here, and the subsequent deletion step also refers to pi_1. - HV-0868 OLP-0661 midsequent.tex:106: Order zero includes an atomic identity proof and any purely propositional proof, which has no quantifier inference to select. The end-sequent works in that case. If at least one quantifier inference exists, all quantifier ... - HV-0870 OLP-0661 midsequent.tex:152: The original pi_3 ends in C,Gamma-prime=>Delta-prime,A(c). The permuted binary inference needs the additional universal side formula in that succedent. Its proof is obtained by the height-preserving weakening already ... - HV-0871 OLP-0661 midsequent.tex:172: Order counts propositional inferences below a quantifier inference. Deleting an inference can decrease this count; it need not preserve it exactly. The proof needs only nonincrease for all surviving quantifier inferences and a ... - HV-0872 OLP-0661 midsequent.tex:194: The surrounding premise and conclusion have context Gamma-prime, and right-exists changes only the succedent. The formula marker ! before the Greek context is stray. - HV-0874 OLP-0658 interpolation.tex:14: The introductory entailment has no closedness assumption on A and B, and the theorem below correctly promises a formula. For A=B=P(x), no sentence C is equivalent to P(x) under all assignments in a structure where P has both ... - HV-0875 OLP-0658 interpolation.tex:73: G3c also has bottom-left axioms without a repeated atom. The text explicitly reserves those cases as exercises immediately after its four identity cases, so the initial base-case assertion must be restricted to identity axioms ... - HV-0876 OLP-0658 interpolation.tex:84: The construction needs one valid interpolant, not uniqueness. Bottom conjunction bottom also works in every context and contains no nonlogical vocabulary; context-specific alternatives may work as well. Bottom is the simplest ... - HV-0877 OLP-0658 interpolation.tex:91: The partition data do not rule out A itself as an interpolant when other context formulas make the needed sequents derivable. What fails uniformly is the proposed direct use of these two identity axioms. Negating A remains the ... - HV-0878 OLP-0658 interpolation.tex:137: Repartitioning a premise does not make the conclusion lose all interpolants: the lemma being proved supplies one independently of that auxiliary choice. The specific induction construction needs the active formula on the same ... - HV-0879 OLP-0658 interpolation.tex:354: The new right-universal conclusion has the extra formula C1, so the original eigenvariable condition alone does not suffice. The immediately following Maehara language bound excludes c from C1 because c is absent from ... - HV-0882 OLP-0658 interpolation.tex:404: To abstract the constant b, the replacement variable must avoid existing binders and existing free occurrences. For example, replacing b with y in forall y P(b,y) without freshening captures the new occurrence. Choosing a ... - HV-0884 OLP-0658 interpolation.tex:518: The ambient language can contain symbols not used by the theory. Renaming R defines the full ambient language L-prime, but the symbols actually occurring in Gamma-prime form only a subset. The subsequent language-intersection ... - HV-0885 OLP-0658 interpolation.tex:524: Iterated right-universal inversion and final generalization require distinct fresh names for the separate arguments. If two c_i coincide, the displayed instances constrain only a diagonal, and a general relation on arbitrary ... - HV-0886 OLP-0658 interpolation.tex:532: Maehara gives vocabulary inclusion, not equality, and the two partition languages include the newly introduced c_i. Their intersection excludes R and R-prime and is contained in (L(Gamma) minus R) union {c_i}; this is the ... - HV-0887 OLP-0658 interpolation.tex:538: There are two separate proofs of the two implication directions. Right-implication and right-universal alone cannot introduce their conjunction, which is the defined biconditional (admissible-derivable.tex:109). ... - HV-0888 OLP-0658 interpolation.tex:542: R is the fixed predicate symbol introduced above, not a formula metavariable. The extra ! marker is inconsistent with its other occurrences and attempts metavariable formatting on a predicate. - HV-0889 OLP-0658 interpolation.tex:548: The proof applies completeness of Gamma to an arbitrary sentence in the full common language, which is not warranted by completeness in a proper sublanguage. Counterexample: a complete theory T in a smaller language with a new ... Co-Authored-By: Claude Opus 5.5 (cherry picked from commit ec4ac96a7f60c7b4d9ea0e07fa8fa1257268d03c) --- .../cut-elimination/ce-largest.tex | 40 +++++++------ .../cut-elimination/ce-topmost.tex | 41 +++++++------ .../cut-elimination/interpolation.tex | 59 +++++++++++-------- .../cut-elimination/introduction.tex | 2 +- .../cut-elimination/intuitionistic.tex | 17 +++--- .../cut-elimination/midsequent.tex | 35 ++++++----- 6 files changed, 114 insertions(+), 80 deletions(-) diff --git a/content/proof-theory/cut-elimination/ce-largest.tex b/content/proof-theory/cut-elimination/ce-largest.tex index e2878896..3d6e9dcc 100644 --- a/content/proof-theory/cut-elimination/ce-largest.tex +++ b/content/proof-theory/cut-elimination/ce-largest.tex @@ -26,9 +26,8 @@ with !!{proof}~$\pi'$ (or !!{proof}s~$\pi'$, $\pi''$ depending on whether the rule has one or two premises). Moreover, (a)~$\pheight{\pi'}\le\pheight{\pi}$ (and -$\pheight{\pi''}\le\pheight{\pi}$) and (b)~the number of \CutCS{} -inferences as well as their ranks is the same in~$\pi'$ (and $\pi''$) -as in~$\pi$. +$\pheight{\pi''}\le\pheight{\pi}$) and (b)~for each rank, the number of \CutCS{} +inferences in~$\pi'$ (and in~$\pi''$) is no greater than in~$\pi$. \end{lem} \begin{proof} @@ -40,8 +39,8 @@ sub-!!{proof}s are the !!{proof}s~$\pi_i$ we want, and (a) and~(b) are both satisfied. In all other cases, we applied the inductive hypothesis to the immediate sub-!!{proof}s of~$\pi$, i.e., those -leading to the premise(s) of the last inference~$R$, and then applied -that same rule $R$ to the results. The conditions (a) and~(b) hold for +leading to the premise(s) of the last inference~$S$, and then applied +that same rule $S$ to the results. The conditions (a) and~(b) hold for the immediate sub-!!{proof}s of the new proof, and so (a) and~(b) hold for the entire proof. It remains to verify the case where the last inference is~\CutCS. We do this again for one example only: suppose @@ -119,8 +118,8 @@ \CutCS{} inferences in~$\pi_1$ and $\pi_2$ must have rank $< \depth{!A} = 0$, there can be no \CutCS{} inferences in~$\pi_1$ or~$\pi_2$. We show that $\Gamma \Sequent \Delta$ has a cut-free proof -by induction on $\pheight{\pi_2}$. If $\pheight{\pi_2} = 0$, then $!A, -\Gamma \Sequent \Delta$ is an axiom. If $!A$ is not principal, some +by induction on $\pheight{\pi_2}$, uniformly for all such first-premise proofs and contexts. If $\pheight{\pi_2} = 0$, then $!A, +\Gamma \Sequent \Delta$ is an axiom. If $!A$ is not principal, either $\lfalse$ occurs in~$\Gamma$ or some atomic $!C$ is !!a{element} of both~$\Gamma$ and $\Delta$, and $\Gamma \Sequent \Delta$ itself is an axiom. If $!A \ident \lfalse$ is principal, the axiom is an instance of \LeftR{\lfalse}; deleting the occurrences of~$\lfalse$ in @@ -135,7 +134,7 @@ rule~$R$. Take a premise of that rule: it has the form $!A, \Gamma', \Pi \Sequent \Delta', \Lambda$, where $\Pi$ and $\Lambda$ are the active !!{formula}s of~$R$. \olref[seq][adm]{prop:weak-G3c-adm} -applied to~$\pi_1$ and $\pi_2$ yields !!{proof}s of $\Gamma, \Gamma', +applied to~$\pi_1$ and the immediate sub-!!{proof} of~$\pi_2$ ending in that premise yields !!{proof}s of $\Gamma, \Gamma', \Pi \Sequent \Delta, \Delta', \Lambda, !A$ and $!A, \Gamma, \Gamma', \Pi \Sequent \Delta, \Delta', \Lambda$, to which the induction hypothesis applies. This gives us !!a{proof} of $\Gamma, \Gamma', \Pi @@ -223,9 +222,15 @@ \] \item $!A \ident \lforall[x][!B(x)]$. The !!{proof}s $\pi_1$ and $\pi_2$ end in $\Gamma \Sequent \Delta, \lforall[x][!B(x)]$ and - $\lforall[x][!B(x)], \Gamma \Sequent \Delta$. By + $\lforall[x][!B(x)], \Gamma \Sequent \Delta$. Choose $c$ fresh for both $\pi_1$ and~$\pi_2$. By \olref{lem:inv-G3c-cut}, there is !!a{proof}~$\pi_1'$ of $\Gamma \Sequent \Delta, !B(c)$. + Before using a copy of~$\pi_1'$ with an instance term~$t$, rename its + eigenvariables away from~$t$ and the contexts added by weakening. + The term~$t$ is closed. Uniform substitution and weakening preserve + \CutCS{} inferences and do not increase the depth of their cut + !!{formula}s, so the substitution and weakening arguments also apply + to these proofs with cuts of lower rank. Now consider the !!{proof}~$\pi_2$. It ends in $\lforall[x][!B(x)], \Gamma \Sequent \Delta$. Moving upward from the end-sequent @@ -244,9 +249,7 @@ None of them are active in a rule other than \LeftR{\lforall} (only active !!{formula}s of \LeftR{\lforall} get marked). Delete all marked occurrences of $\lforall[x][!B(x)]$ in $\pi_2$. - If this is a correct !!{proof}, the marked occurrences of - $\lforall[x][!B(x)]$ were never active; they all came directly from - axioms. The !!{proof} ends in~$\Gamma \Sequent \Delta$ and we can + If this is a correct !!{proof}, it ends in~$\Gamma \Sequent \Delta$ and we can replace $\pi$ by it. We have a removed a cut of maximal rank. Otherwise, what we have is not a correct proof because we have @@ -274,7 +277,10 @@ \DisplayProof \] and add $\Gamma$ to the left and $\Delta$ to the right of every - sequent below it. Repeat until all \LeftR{\lforall} ``inferences'' + sequent below it. At each binary rule, also weaken its companion + premise proof by the same contexts, so that the shared contexts + still agree; rename eigenvariables away from added contexts first. + Repeat until all \LeftR{\lforall} ``inferences'' with a marked $!B(t)$ in the premise have been replaced by a \CutCS{} inference on some~$!B(t)$. The end-sequent of the resulting !!{proof} (and it now is a correct !!{proof}) is of the form @@ -283,8 +289,8 @@ $\Log{G3c} + \CutCS$, without introducing cuts of higher rank) to turn it into !!a{proof} of~$\Gamma \Sequent \Delta$ and replace $\pi$ with it. We have replaced one cut on $\lforall[x][!B(x)]$ with (possibly many) cuts on $!B(t)$, but - these are all of lower rank. Any cuts already occurring in $\pi_1$ or - $\pi_2$ remain present, but they are also all of lower rank. + these are all of lower rank. Any surviving copies of cuts already occurring in $\pi_1$ or + $\pi_2$ are also all of lower rank. \item $!A \ident \lexists[x][!B(x)]$. Dual to the previous case: apply \olref{lem:inv-G3c-cut} to~$\pi_2$, mark the occurrences of~$\lexists[x][!B(x)]$ in~$\pi_1$ from which the cut formula @@ -295,7 +301,7 @@ \begin{prob} Verify the case where $!A \ident (!B \land !C)$ in the proof of -\olref{lem:inv-G3c-cut}. That is, show that if there is +\olref{lem:max-cut-red-G3c}. That is, show that if there is !!a{proof}~$\pi$ ending in \[ \AxiomC{} @@ -319,7 +325,7 @@ % \end{prob} -\olref[top]{lem:cut-adm-G3c} establishes that we can replace a \CutCS{} +\olref{lem:max-cut-red-G3c} establishes that we can replace a \CutCS{} inference of highest rank in !!a{proof} by \CutCS{} inferences of lower rank. We can again use this lemma to show that we can eliminate any number of \CutCS{} inferences from !!a{proof} by successively diff --git a/content/proof-theory/cut-elimination/ce-topmost.tex b/content/proof-theory/cut-elimination/ce-topmost.tex index e6dfbd34..dcd93379 100644 --- a/content/proof-theory/cut-elimination/ce-topmost.tex +++ b/content/proof-theory/cut-elimination/ce-topmost.tex @@ -67,7 +67,10 @@ and a cut !!{height} $< \cheight{\pi}$, or has cut rank~$< \cutrank{\pi}$. The case where $\cheight{\pi} = 0$ (both premises are axioms) are covered by cases~A and~B. The cases where $\cheight{\pi} > -0$ are covered by cases C--D. +0$ are covered by cases C--E. + +The first versions of cases A and B assume that the axioms are atomic +identity axioms; the alternative versions below also cover falsity axioms. \paragraph{Case A:} Some $!B$ occurs in both $\Gamma$ and~$\Delta$. @@ -104,7 +107,7 @@ \Delta$ and $\Delta = \Delta', !A$. In the first case, $\pi_2$ is !!a{proof} of $!A, !A, \Gamma' \Sequent \Delta$ and by admissibility of \LeftR{\Contraction} (\olref[seq][inv]{prop:G3c-cont-adm}) there is -!!a{proof} of $\Gamma \Sequent \Delta$. In the second case, $\pi_2$ is +!!a{proof} of $\Gamma \Sequent \Delta$. In the second case, $\pi_1$ is !!a{proof} of $\Gamma \Sequent \Delta', !A, !A$ and by admissibility of \RightR{\Contraction} we get !!a{proof} of $\Gamma \Sequent \Delta$. @@ -164,7 +167,7 @@ \RightLabel{\CutCS} \BinaryInf$\Gamma, \Pi \fCenter \Delta', !D, \Lambda$ \RightLabel{$R$} -\UnaryInf$\Gamma, \fCenter \Delta', !D, !D$ +\UnaryInf$\Gamma \fCenter \Delta', !D, !D$ \DisplayProof \] We use !!{height}-preserving weakening to obtain $\pi_1'$ and $\pi_3'$ @@ -257,7 +260,7 @@ \UnaryInf$!A, \lexists[x][!B(x)], \Gamma' \fCenter \Delta$ \RightSubproofLabel{$\pi_2$} \RightLabel{\CutCS} -\BinaryInf$\Gamma' \fCenter \Delta$ +\BinaryInf$\lexists[x][!B(x)], \Gamma' \fCenter \Delta$ \DisplayProof \] We again apply the inductive hypothesis to @@ -320,7 +323,7 @@ \[ \AxiomC{} \RightLabel{$\pi_1''$} -\Deduce$\Gamma \fCenter \Delta, !B \land !C, !C, !A$ +\Deduce$\Gamma \fCenter \Delta', !B \land !C, !C, !A$ \AxiomC{} \RightLabel{$\pi_4'$} \Deduce$!A, \Gamma \fCenter \Delta', !B \land !C, !C$ @@ -349,7 +352,7 @@ \RightLabel{$\pi_6$} \Deduce$\Gamma \fCenter \Delta', !B \land !C, !C$ \RightLabel{\RightR{\land}} -\BinaryInf$\Gamma \fCenter \Delta, !B \land !C, !B \land !C$ +\BinaryInf$\Gamma \fCenter \Delta', !B \land !C, !B \land !C$ \DisplayProof \] To get !!a{proof} of $\Gamma \Sequent \Delta$, i.e., $\Gamma \fCenter @@ -362,7 +365,8 @@ one for each possible !!{main operator} of~$!A$. In each case, we turn a \CutCS{} with cut !!{formula}~$!A$ into one or more -cuts on sub-!!{formula}s of~$!A$, namely on the active !!{formula}s of +cuts on proper sub-!!{formula}s of~$!A$ or substitution instances of +its quantified matrix, all of smaller depth, namely on the active !!{formula}s of the inferences of which~$!A$ is the principal !!{formula}. These cases are therefore often referred to as ``reduction'' or ``conversion'' of the cut inference. @@ -481,8 +485,8 @@ \RightLabel{$\pi_1'$} \Deduce$!B, \Gamma \fCenter \Delta, !C$ \AxiomC{} -\RightLabel{$\pi_2''$} -\Deduce$!C, \Gamma \fCenter \Delta$ +\RightLabel{$\pi_2''[!B \Sequent {}]$} +\Deduce$!C, !B, \Gamma \fCenter \Delta$ \RightLabel{\CutCS} \BinaryInf$!B, \Gamma \fCenter \Delta$ \DisplayProof @@ -545,8 +549,10 @@ assume the !!{proof}~$\pi$ is regular, so $c$~is the eigenvariable of only the following~$\RightR{\lforall}$ inference and only occurs above it, i.e., only occurs in~$\pi_1'$ and is not an eigenvariable of an -inference in~$\pi_1'$. Since $c$ does not occur in~$\pi_2$, it cannot -occur in~$t$. By \olref[seq][qua]{lem:subst-regular}, the +inference in~$\pi_1'$. If $x$ is not free in~$!B(x)$, choose $t$ to be a fresh constant; +this does not change~$!B(t)$. Rename any eigenvariables of~$\pi_1'$ +that occur in~$t$ to fresh constants, without changing the end-sequent +or height. By \olref[seq][qua]{lem:subst-regular}, the !!{proof}~$\Subst{\pi_1'}{t}{c}$ is !!a{proof} of $\Gamma \Sequent \Delta, !B(t)$. We now apply the inductive hypothesis to the !!{proof} \[ @@ -574,7 +580,7 @@ \end{prob} \begin{prob} -Verify the sub-case of case~D in the proof of \olref{lem:cut-adm-G3c} +Verify the sub-case of case~C in the proof of \olref{lem:cut-adm-G3c} where $!A$ is not principal in the last inference of~$\pi_1$, which ends in~$\LeftR{\lforall}$. \end{prob} @@ -604,19 +610,20 @@ \RightLabel{$\pi_1'$} \Deduce$!B, \Gamma \fCenter \Delta, !C$ \AxiomC{} -\RightLabel{$\pi_2''$} -\Deduce$!C, \Gamma \fCenter \Delta$ +\RightLabel{$\pi_2''[!B \Sequent {}]$} +\Deduce$!C, !B, \Gamma \fCenter \Delta$ \RightLabel{\CutCS} \BinaryInf$!B, \Gamma \fCenter \Delta$ \RightSubproofLabel{$\pi_1''$} \RightLabel{\CutCS} -\BinaryInf$!B, \Gamma \fCenter \Delta$ +\BinaryInf$\Gamma \fCenter \Delta$ \DisplayProof \] The top \CutCS{} between $\pi_1'$ and $\pi_2''$ has both lower cut rank and lower cut !!{height} than~$\pi$. But the -!!{proof}~$\pi_1''$---the result of applying the inductive -hypothesis---no longer has lower cut !!{height} than~$\pi$. Since the +!!{proof} obtained by eliminating the upper cut may have greater +!!{height}, so the lower cut using it need not have lower cut +!!{height} than~$\pi$. Since the cut !!{formula} of the lower \CutCS{} is $!B$, its cut \emph{rank}, however, is lower than the cut rank of~$\pi$. diff --git a/content/proof-theory/cut-elimination/interpolation.tex b/content/proof-theory/cut-elimination/interpolation.tex index 7d72b7a6..a7caf715 100644 --- a/content/proof-theory/cut-elimination/interpolation.tex +++ b/content/proof-theory/cut-elimination/interpolation.tex @@ -11,7 +11,7 @@ \olsection{Maehara's Lemma and Craig's Interpolation Theorem} The interpolation theorem, due to William Craig, states that if $!A -\Entails !B$ then there is !!a{sentence}~$!C$ (the \emph{interpolant}) +\Entails !B$ then there is !!a{formula}~$!C$ (the \emph{interpolant}) such that $!A \Entails !C$ and $!C \Entails !B$. Importantly, the interpolant~$!C$ can be chosen so that the !!{constant}s and !!{predicate}s occurring in~$!C$ all occur in both~$!A$ and~$!B$. (We @@ -71,8 +71,8 @@ $n=\pheight{\pi}$. If $n=0$, then $\maeh{\Gamma_1}{\Gamma_2} \Sequent - \maeh{\Delta_1}{\Delta_2}$ is an axiom, and some atomic - !!{formula}~$!A$ occurs in both $\Gamma_1, \Gamma_2$ and $\Delta_1, + \maeh{\Delta_1}{\Delta_2}$ is an axiom. First suppose it is an + atomic identity axiom, so some atomic !!{formula}~$!A$ occurs in both $\Gamma_1, \Gamma_2$ and $\Delta_1, \Delta_2$. There are four cases depending on whether $!A$~belongs to the first part or the second on the left, and whether it belongs to the first or second part on the right. @@ -81,15 +81,16 @@ that both $\Gamma_1 \Sequent \Delta_1, !C$ and $!C, \Gamma_2 \Sequent \Delta_2$ are !!{provable}. The first is already an axiom regardless of how we pick~$!C$ since $!A$ occurs on both the left - and right. Our only option to guarantee that $!C, \Gamma_2 - \Sequent \Delta_2$ is !!{provable} is to let $!C \ident \lfalse$. + and right. One choice guaranteeing that $!C, \Gamma_2 + \Sequent \Delta_2$ is !!{provable} is $!C \ident \lfalse$. \item $!A \in \Gamma_1$ and $!A \in \Delta_2$. Then $\Gamma_1 \Sequent \Delta_1, !A$ and $!A, \Gamma_2 \Sequent \Delta_2$ are both axioms, so we can pick $!C \ident !A$. \item $!A \in \Gamma_2$ and $!A \in \Delta_1$. Then $!A, \Gamma_1 \Sequent \Delta_1$ and $\Gamma_2 \Sequent \Delta_2, !A$ would be - axioms, but they have~$!A$ on the wrong sides. So $!A$ isn't the - interpolant. However, using $\RightR{\lnot}$ and $\LeftR{\lnot}$ + axioms, but they have~$!A$ on the wrong sides. These axioms do not + directly supply the two sequents required for $!A$ to be an + interpolant. Instead, using $\RightR{\lnot}$ and $\LeftR{\lnot}$ we can !!{prove} $\Gamma_1 \Sequent \Delta_1, \lnot!A$ and $\lnot !A, \Gamma_2 \Sequent \Delta_2$. @@ -134,8 +135,9 @@ first part we assigned the active !!{formula}~$!A$ also to the first part the premise. This is a choice we get to make. The inductive hypothesis would also apply if we assigned the active - formula to the other part, but then we would not be able to find - an interpolant (exercise: try it). + formula to the other part, but then the interpolant supplied by + the induction hypothesis would not directly give the two + sequents needed below (exercise: try this construction). Consider the first situation first, where $\lnot !A$~belongs to the first part. By inductive hypothesis, there is an @@ -351,8 +353,9 @@ of $\Gamma_1 \Sequent \Delta_1, !A(c), !C_1$ and $!C_1, \Gamma_2 \Sequent \Delta_2$. We can apply $\RightR{\lforall}$ to the first to obtain $\Gamma_1 \Sequent \Delta_1, \lforall[x][!A(x)], !C_1$. - (The eigenvariable condition is satisfied, since it was already - satisfied in the \RightR{\lforall} rule at the end of~$\pi$.) Thus + (The eigenvariable condition is satisfied: the original rule + excludes $c$ from its conclusion, and the language-intersection + argument below also excludes $c$ from the added context $!C_1$.) Thus $!C_1$ would be an interpolant if the condition that $\Lang L(!C_1) \subseteq \Lang L(\Gamma_1, \Delta_1, \lforall[x][!A(x)]) \cap \Lang L(\Gamma_2, \Delta_2)$ is satisfied. By the inductive @@ -401,7 +404,8 @@ L(!C_1)$ and $b \notin \Lang L(\Gamma_1, \Delta_1, \lexists[x][!A(x)]) \cap \Lang L(\Gamma_2, \Delta_2)$? First of all, by replacing all occurrences of~$b$ in~$!C_1$ by - !!a{variable}~$y$ we can write $!C_1 \ident \Subst{!C_1'}{b}{y}$ + !!a{variable}~$y$ that occurs neither free nor bound in~$!C_1$, + we can write $!C_1 \ident \Subst{!C_1'}{b}{y}$ where $!C_1'$~does not contain~$b$. Furthermore, either $b \notin \Lang L(\Gamma_1, \Delta_1, \lexists[x][!A(x)])$ or $b \notin \Lang L(\Gamma_2, \Delta_2)$. We can take $!C \ident @@ -515,39 +519,48 @@ \begin{proof} Suppose $\Gamma$ implicitly defines~$R$. Let $R'$, $\Gamma'$ be as - above and $\Lang L' = \Lang L(\Gamma') = \Lang L \setminus \{R\} - \cup \{R'\}$. By hypothesis, we have + above and let $\Lang L' = (\Lang L \setminus \{R\}) + \cup \{R'\}$ be the renamed ambient language, so that + $\Lang L(\Gamma') \subseteq \Lang L'$. By hypothesis, we have \begin{align*} \Gamma, \Gamma' & \Sequent \lforall[x_1][\dots\lforall[x_n][(R(x_1,\dots,x_n) \liff R'(x_1, \dots, x_n))]] - \intertext{Let $c_1$, \dots,~$c_n$ be !!{constant}s not occurring in~$\Gamma$. By the invertibility lemma we have} + \intertext{Let $c_1$, \dots,~$c_n$ be pairwise distinct !!{constant}s + not occurring in~$\Gamma$. By the invertibility lemma we have} \Gamma, \Gamma', R(c_1,\dots,c_n) & \Sequent R'(c_1, \dots, c_n) \intertext{Apply Maehara's Lemma to} \maeh{\Gamma, R(c_1,\dots,c_n)}{\Gamma'} & \Sequent \maeh{\ }{R'(c_1, \dots, c_n)} - \intertext{to find an~$!A \ident !A(x_1, \dots, x_n)$ such that} + \intertext{to find an interpolant, which we write as $!A(c_1,\dots,c_n)$. + Here $!A(x_1,\dots,x_n)$ is obtained by simultaneously replacing the + distinguished constants $c_i$ by variables $x_i$, first renaming + bound variables to avoid capture. Then} \Gamma, R(c_1,\dots,c_n) & \Sequent !A(c_1, \dots, c_n) \\ !A(c_1, \dots, c_n), \Gamma' & \Sequent R'(c_1, \dots, c_n) - \intertext{have !!{proof}s. Since $\Lang L(!A) = \Lang L_1 \cap - \Lang L_2 = \Lang L(\Gamma) \setminus \{R\}$, $!A$~does not contain~$R$. + \intertext{have !!{proof}s. The language of the interpolant $!A(c_1,\dots,c_n)$ is contained in + $\bigl(\Lang L(\Gamma) \setminus \{R\}\bigr) + \cup \{c_1,\dots,c_n\}$. In particular, $!A$~contains neither $R$ nor $R'$. Replace $R'$ everywhere by~$R$ in the !!{proof} of the second sequent to get !!a{proof} of} !A(c_1, \dots, c_n), \Gamma & \Sequent R(c_1, \dots, c_n) \end{align*} - Apply \RightR{\lif} and \RightR{\lforall} to get !!a{proof} of + Apply \RightR{\lif} to each direction, combine the two implications + using \RightR{\land} (with the usual definition of $\liff$), and + then apply \RightR{\lforall} successively to get !!a{proof} of \[ \Gamma \Sequent \lforall[x_1][\dots\lforall[x_n][(R(x_1,\dots,x_n) \liff !A(x_1, \dots, x_n))]]. \] - This shows that $!A(x_1, \dots, x_n)$ explicitly defines $!R$ + This shows that $!A(x_1, \dots, x_n)$ explicitly defines $R$ in~$\Gamma$. \end{proof} A third result which is equivalent to interpolation (and, like it, can be proved using Maehara's Lemma) is the following theorem: If two -consistent theories~$\Gamma_1$, $\Gamma_2$ contain a complete theory -$\Gamma$ in the language~$\Lang L(\Gamma) \subseteq \Lang L(\Gamma_1) -\cap \Lang L(\Gamma_2)$, then $\Gamma_1 \cup \Gamma_2$ is consistent. +consistent theories~$\Gamma_1$, $\Gamma_2$ contain a theory +$\Gamma$ that is complete with respect to every !!{sentence} in the +full common language $\Lang L(\Gamma_1) \cap \Lang L(\Gamma_2)$, +then $\Gamma_1 \cup \Gamma_2$ is consistent. Recall that a complete theory is one such that for every !!{sentence}~$!A$ in its language either $\Gamma \Proves !A$ or diff --git a/content/proof-theory/cut-elimination/introduction.tex b/content/proof-theory/cut-elimination/introduction.tex index 37d9ad67..a6e0ffd9 100644 --- a/content/proof-theory/cut-elimination/introduction.tex +++ b/content/proof-theory/cut-elimination/introduction.tex @@ -95,7 +95,7 @@ \[ \Axiom$\Gamma \fCenter \Delta, !A$ \Axiom$!A, \Gamma \fCenter \Delta$ -\RightLabel{\Cut} +\RightLabel{\CutCS} \BinaryInf$\Gamma \fCenter \Delta$ \DisplayProof \] diff --git a/content/proof-theory/cut-elimination/intuitionistic.tex b/content/proof-theory/cut-elimination/intuitionistic.tex index c2318f14..c6c6f964 100644 --- a/content/proof-theory/cut-elimination/intuitionistic.tex +++ b/content/proof-theory/cut-elimination/intuitionistic.tex @@ -1,3 +1,8 @@ +Here the retained-principal \LeftR{\lif} rule is used as a derived +rule of~\Log{G3c}: weaken its second premise with $!B \lif !C$, apply +the ordinary \LeftR{\lif} rule, and contract the two copies of +$!B \lif !C$ in the conclusion. + If $!A \ident (!B \lif !C)$ then $\pi$ ends in \[ \AxiomC{} @@ -40,7 +45,7 @@ \[ \AxiomC{} \RightLabel{$\pi_1'$} -\Deduce$B!, \Gamma \fCenter \Delta, !C$ +\Deduce$!B, \Gamma \fCenter \Delta, !C$ \AxiomC{} \RightLabel{$\pi_2''$} \Deduce$!C, \Pi \fCenter \Lambda$ @@ -50,8 +55,7 @@ \] Both its cut rank and cut !!{height} are less than the cut rank and !!{height} of~$\pi$, so the induction hypothesis yields a -\Log{G3c}-!!{proof}~$\pi_2'''$ of $!B, \Gamma, \Pi, \Pi \fCenter \Delta, \Lambda, -\Lambda$. Now apply the inductive hypothesis to the !!{proof} ending +\Log{G3c}-!!{proof}~$\pi_2'''$ of $!B, \Gamma, \Pi \fCenter \Delta, \Lambda$. Now apply the inductive hypothesis to the !!{proof} ending in \Cut, \[ \AxiomC{} @@ -59,13 +63,12 @@ \Deduce$\Gamma, \Pi \fCenter \Delta, \Lambda, !B$ \AxiomC{} \RightLabel{$\pi_2'''$} -\Deduce$!B, \Gamma, \Pi, \Pi \fCenter \Delta, \Lambda, -\Lambda$ +\Deduce$!B, \Gamma, \Pi \fCenter \Delta, \Lambda$ \RightLabel{\Cut} -\BinaryInf$!B, \Gamma, \Pi \fCenter \Delta, \Lambda$ +\BinaryInf$\Gamma, \Gamma, \Pi, \Pi \fCenter \Delta, \Delta, \Lambda, \Lambda$ \DisplayProof \] (it has cut rank $< \cutr{\pi}$) to obtain !!a{proof} of $\Gamma, -\Gamma, \Pi, \Pi, \Pi \fCenter \Delta, \Lambda, \Lambda, \Lambda$. We +\Gamma, \Pi, \Pi \fCenter \Delta, \Delta, \Lambda, \Lambda$. We obtain the !!{proof} $\pi'$ of $\Gamma, \Pi \fCenter \Delta, \Lambda$ by applying \olref[seq][inv]{prop:G3c-cont-adm}. \ No newline at end of file diff --git a/content/proof-theory/cut-elimination/midsequent.tex b/content/proof-theory/cut-elimination/midsequent.tex index 7fa3267a..630db834 100644 --- a/content/proof-theory/cut-elimination/midsequent.tex +++ b/content/proof-theory/cut-elimination/midsequent.tex @@ -19,7 +19,7 @@ quantifier inferences. (!!^a{formula}~$!A$ is \emph{prenex} (or in \emph{prenex form}) if it is of the form \[\mathsf{Q}_1x_1\dots\mathsf{Q}_nx_n\,!B(x_1,\dots,x_n)\] where each -$\mathsf{Q}_i$ is either $\lforall$ or~$\lexists$.) An important +$\mathsf{Q}_i$ is either $\lforall$ or~$\lexists$, and $!B$ is quantifier-free.) An important consequence of the midsequent theorem is Herbrand's theorem. Its general case is a little hard to describe, but very generally it takes the form: for every !!{provable} !!{sentence}~$!A$ of first-order @@ -45,10 +45,13 @@ !!{formula}~$\lexists[x][!B(x)]$. The converse, i.e., that if $\lexists[x][!B(x)]$ has a Herbrand disjunction, then it is provable, is easy. In fact, the Herbrand disjunction entails $\lexists[x][!B(x)]$. -E.g., here is !!a{proof} in~$\Log{G3c}$ for the case where $n=2$: +E.g., here is !!a{proof} in~$\Log{G3c}$ for the case where $n=2$, +using \olref[seq][ex]{prop:G3c-axioms} for the two top sub-!!{proof}s: \[ -\Axiom$!B(t_1) \fCenter \lexists[x][!B(x)], !B(t_1), !B(t_2)$ -\Axiom$!B(t_2) \fCenter \lexists[x][!B(x)], !B(t_1), !B(t_2)$ +\AxiomC{} +\Deduce$!B(t_1) \fCenter \lexists[x][!B(x)], !B(t_1), !B(t_2)$ +\AxiomC{} +\Deduce$!B(t_2) \fCenter \lexists[x][!B(x)], !B(t_1), !B(t_2)$ \RightLabel{\LeftR{\lor}} \BinaryInf$!B(t_1) \lor !B(t_2) \fCenter \lexists[x][!B(x)], !B(t_1), !B(t_2)$ \RightLabel{\RightR{\lexists}} @@ -72,8 +75,8 @@ \DisplayProof \] If these are all the $\RightR{\lexists}$ inferences in~$\pi$ with -$\lexists[x][!B(x)]$ active, then there are no other quantifier -inferences in~$\pi_1'$. That's because $!B(x)$ contains no other +$\lexists[x][!B(x)]$ principal, then there are no other quantifier +inferences in~$\pi_1$. That's because $!B(x)$ contains no other quantifiers, and the end-sequent doesn't contain any !!{formula}s on the left. In other words, $ \fCenter \lexists[x][!B(x)], !B(t_1), \dots, !B(t_n)$ is the mid-sequent of~$\pi$. Moreover, since there are @@ -103,9 +106,10 @@ number of propositional inferences below it, and the order~$o(\pi)$ of $\pi$ as the sum of the orders of all its quantifier inferences. If $o(\pi) = 0$, then no quantifier inference has a propositional - inference below it, and we are done: Since all quantifier inferences - have one premise, there is a single topmost quantifier inference. - Its premise is the midsequent. + inference below it, and we are done. If there is no quantifier + inference, the end-sequent is a midsequent. Otherwise, since all + quantifier inferences have one premise, there is a single topmost + quantifier inference, whose premise is the midsequent. If $o(\pi) > 0$, pick a bottom-most quantifier inference with order $>0$. Since it has order $>0$, there must be a propositional @@ -149,7 +153,7 @@ \RightLabel{$\pi_2'$} \Deduce$\Gamma' \fCenter \Delta', \lforall[x][!A(x)], !A(c), !B$ \AxiomC{} -\RightLabel{$\pi_3$} +\RightLabel{$\pi_3'$} \Deduce$!C, \Gamma' \fCenter \Delta', \lforall[x][!A(x)], !A(c)$ \RightLabel{\LeftR{\lif}} \BinaryInf$!B \lif !C, \Gamma' \fCenter \Delta', \lforall[x][!A(x)], !A(c)$ @@ -158,7 +162,8 @@ \DisplayProof \] where $\pi_2'$ is obtained from~$\pi_2$ by weakening with~$!A(c)$ on -the right. (This does not add any inferences, in particular, no +the right, and $\pi_3'$ is obtained from~$\pi_3$ by weakening with +$\lforall[x][!A(x)]$ on the right. (This does not add any inferences, in particular, no quantifier inferences which might affect the order. It also does not violate any eigenvariable conditions in~$\pi_2$, since no constants in~$!A(c)$ are used as eigenvariables in~$\pi_2$.) The eigenvariable @@ -169,11 +174,11 @@ obtain !!a{proof}~$\pi_1''$ of $!B \lif !C, \Gamma' \fCenter \Delta', \lforall[x][!A(x)]$. The proof of the admissibility of $\RightR{\Contraction}$ for $\lforall[x][!A(x)]$ and the proof of -invertibility of $\RightR{\lforall}$ used in that proof did not change +invertibility of $\RightR{\lforall}$ used in that proof did not increase the order of any inference: it, at most, deleted inferences. Thus, there are no more quantifier inferences in~$\pi_1''$ than in~$\pi_1$, -and each quantifier inference in~$\pi_1''$ has the same number of -proposional inferences below it as its corresponding inference +and each quantifier inference in~$\pi_1''$ has no more +proposional inferences below it than its corresponding inference in~$\pi_1$---with the exception of the last \RightR{\lforall}: it had a \LeftR{\lif} below it in~$\pi$, which we have moved above it in~$\pi_1''$. Replace $\pi_1$ in $\pi$ by $\pi_1''$. The resulting @@ -191,7 +196,7 @@ \RightLabel{$\pi_2$} \Deduce$\Gamma' \fCenter \Delta', \lexists[x][!A(x)], !A(t), !B$ \RightLabel{\RightR{\lexists}} -\UnaryInf$!\Gamma' \fCenter \Delta', \lexists[x][!A(x)], !B$ +\UnaryInf$\Gamma' \fCenter \Delta', \lexists[x][!A(x)], !B$ \AxiomC{} \RightLabel{$\pi_3$} \Deduce$\Gamma' \fCenter \Delta', \lexists[x][!A(x)], !C$ From 4d85981f47b043e7b7bd5a5d34dfa44726498b97 Mon Sep 17 00:00:00 2001 From: KokunoYumeto <208192274+KokunoYumeto@users.noreply.github.com> Date: Sun, 29 Nov 2026 10:30:45 +0100 Subject: [PATCH 05/19] proof-theory/natural-deduction: fix grafting, quantifier conditions and calculus translations Found in the translations' records of errors of the English (the errata harvest of 28-29 November 2026: GPT-6 Astra, OpenAI, ChatGPT Pro mode, classified every record against 2e19d095 and made this patch; applied here by Claude Opus 5.5, Anthropic, effort max). Each issue with its sources is in ENGLISH_ERRATA_CONSOLIDATED.tsv: - HV-0895 OLP-0668 rules-proofs.tex:37: The English phrase such as an this case is a literal preposition/article typo. The intended ordinary phrase is such as in this case; the premise classification is unchanged. - HV-0896 OLP-0668 rules-proofs.tex:67: The first introduction discharges no B assumption. An unused x label is logically permitted, but contradicts the next sentence saying the example omitted that label. Removing it makes the display illustrate the stated ... - HV-0898 OLP-0668 rules-proofs.tex:131: The following inductive definition and rules-N1 table have formula nodes and assumption leaves. Sequent nodes and identity axioms belong to N2 in the next section. Correct the proof-object description to match the explicit ... - HV-0899 OLP-0668 rules-proofs.tex:136: The source misspells occurrence in the open-assumption definition and occurrences in the final worked-example description. Both are spelling corrections only. - HV-0900 OLP-0668 rules-proofs.tex:142: The definition says that proofs are finite trees of formulas inductively as follows but omits the participle connecting that tree description to the following inductive clauses. Defined supplies the missing word. - HV-0902 OLP-0668 rules-proofs.tex:151: The conditional proof-constructor sentence needs then before the displayed conclusions. The printed the leaves the if-clause without its grammatical continuation. - HV-0903 OLP-0668 rules-proofs.tex:177: The ternary constructor explicitly pairs delta1,delta2,delta3 with premises A1,A2,A3. Its third branch mistakenly repeats the second premise. - HV-0904 OLP-0668 rules-proofs.tex:191: The general preceding discharge clause and the N1c rule table already entail discharge for classical reductio. The explicit rule-by-rule list is nevertheless incomplete: FalseCl is a unary rule that discharges its indicated ... - HV-0905 OLP-0668 rules-proofs.tex:202: The immediately imported file is rules-N1 and the reference is tab:N1. These are formula-tree rules N1c/N1i, whereas N2 is introduced in the next section. - HV-0906 OLP-0668 rules-proofs.tex:221: This height definition is for the N1 formula proofs just defined, whose end object is a formula. Sequents are not their tree nodes. - HV-0908 OLP-0668 rules-proofs.tex:232: The quantified noun phrase one of the two requires plural versions; the two conjunction-elimination rules are already shown. - HV-0909 OLP-0668 rules-proofs.tex:245: The subject is the plural immediate subproofs of the two displayed last inferences, so its verb is are. Each immediate subproof is the same single-assumption tree, as the example says. - HV-0910 OLP-0668 rules-proofs.tex:247: Delta1 is the single assumption and the text correctly assigns it height zero earlier. Delta2 and delta3 each append one conjunction-elimination inference, so both have height one. - HV-0912 OLP-0669 sequents.tex:13: This paragraph describes formula conclusions and open assumptions before constructing the N2 sequent notation. Those are the N1 systems from the preceding section; G1 has sequent nodes already. - HV-0913 OLP-0669 sequents.tex:45: N1 permits vacuous discharge, including classical reductio, so the claimed exact correspondence requires the N2 classical rule to allow absence of its indicated negated assumption too. The existing optional-context list covers ... - HV-0915 OLP-0669 sequents.tex:83: The surrounding prose and conclusion use formula metavariable !B. Its ! marker is missing in this one labelled antecedent. - HV-0916 OLP-0669 sequents.tex:137: Induction supplies an N1 proof of the premise C, while delta-prime names the completed implication proof after the B assumptions are discharged. The source also labels its translated formula-tree subproofs with the unprimed ... - HV-0920 OLP-0665 quantifiers.tex:32: This lemma introduces a new replacement term and literally replaces constants throughout formulas, unlike a shorthand after a fixed term declaration. A regular proof from P(c) by vacuous universal introduction to forall x P(c) ... - HV-0921 OLP-0665 quantifiers.tex:111: The last inference under discussion is binary existential elimination, but the output tree repeats universal introduction with an undefined delta-prime. Uniform substitution changes the major existential to A(x,t), the ... - HV-0922 OLP-0665 quantifiers.tex:132: The chapter requires global label compatibility: any two assumptions with the same label must have the same formula, even if discharged in separate branches. Renaming c in one subtree can turn one labelled P(c) into P(a) while ... - HV-0923 OLP-0665 quantifiers.tex:139: Existential elimination has two immediate subproofs. Its eigenconstant is confined to the minor-premise proof; allowing it in the major-premise proof would not imply the preceding definition of regularity. This makes the local ... - HV-0924 OLP-0665 quantifiers.tex:145: Renaming an already clean highest inference need not reduce the induction parameter. A highest dirty one has only clean eigeninferences above it, so its immediate subproof is regular, and c cannot be an eigenvariable in that ... - HV-0926 OLP-0662 grafting.tex:25: The upper subproof concludes A under B, and the following implication elimination concludes A. The introduced implication must therefore be B -> A, as the preceding prose already states. - HV-0927 OLP-0662 grafting.tex:51: Formula compatibility alone does not prevent discharge capture. If a substituted open C^y is inserted above an existing y-discharge, that discharge closes it even though the grafting operation intends to retain it. ... - HV-0928 OLP-0662 grafting.tex:54: Grafting removes the selected open B^x leaves from delta1. They cannot still be counted as assumptions supplied by delta1; any new B^x assumptions must instead come from the inserted delta2. This follows directly by inspecting ... - HV-0929 OLP-0662 grafting.tex:66: This definition substitutes proofs with labelled sequent contexts into an N2 proof. The inserted proof is also N2; N1 proofs have formula nodes. - HV-0930 OLP-0662 grafting.tex:68: Merely adjoining Gamma2 retains the removed x:B dependency, whereas N2 contexts record exactly the remaining open assumptions. Also, a label can be reused in a separately discharged branch; only leaves contributing to the ... - HV-0931 OLP-0662 grafting.tex:81: Only delta1 and delta2 are quantified. The recursion traverses delta1, whose selected leaves are replaced by fixed delta2. The added explanation verifies preservation of inference contexts and both freshness conditions, rather ... - HV-0932 OLP-0670 translation-G2i.tex:13: A full-source search finds the G2c table but no definition of G2i before its use. Restricting the multiplicative G2c left-or rule alone would force at least one branch to have empty succedent, excluding the ordinary ... - HV-0933 OLP-0670 translation-G2i.tex:25: The translated conclusion is C. In the singleton-succedent case the proposition must identify C with that sole formula; A has not been bound elsewhere in this statement. - HV-0934 OLP-0670 translation-G2i.tex:31: No G2ci calculus is defined. The proposition and its explicit cut-induction case concern G2i with Cut. - HV-0935 OLP-0670 translation-G2i.tex:42: The inductive translation is into intuitionistic N2i, as stated in the proposition. Classical N2c subproofs would not establish that result. - HV-0936 OLP-0670 translation-G2i.tex:67: The displayed inference adds A to the antecedent; its rule name and surrounding case heading must both be left weakening. - HV-0938 OLP-0670 translation-G2i.tex:86: The G2i source proof pi1 has unlabelled multiset contexts. The induction-result N2i proof is the object with labelled y:A and x:A, and the proof in which no x-labelled formula is discharged after the initial alpha-renaming ... - HV-0939 OLP-0670 translation-G2i.tex:105: Induction first supplies delta1 of the premise; appending implication introduction produces the desired delta. The original reverses that construction. - HV-0940 OLP-0670 translation-G2i.tex:123: Both cases direct assumption/discharge label renaming in an unlabelled source G2i proof pi_i. Those labels belong to the inductively obtained N2i proof delta_i. Replace the source proof name by its corresponding translated ... - HV-0941 OLP-0670 translation-G2i.tex:135: The inserted implication elimination uses delta1 with open context Gamma1-prime, so its conclusion and every affected descendant context must retain those assumptions. Bound labels and eigenconstants are freshened when forming ... - HV-0942 OLP-0670 translation-G2i.tex:154: The second source premise of right conjunction concludes B, so induction supplies a translated proof of B. The repeated A changes the required premise; the independently mistaken renaming object is PT-608. - HV-0945 OLP-0670 translation-G2i.tex:201: The proof announces cases by the last rule and closes its induction after Cut, without a local sketch/remaining-case qualification, although the theorem covers disjunction, negation and both quantifiers. A short uniform ... - HV-0946 OLP-0671 translation-N2i.tex:14: The proposition translates from N2 to a G2 sequent calculus. Its intuitionistic target must be G2i, paired with G2c, as both section title and proof intend. - HV-0947 OLP-0671 translation-N2i.tex:54: The induction statement maps a bottom conclusion to empty succedent in every case, including vacuous implication introduction. Right-implication needs an explicit consequent C in its premise, so restore it by right weakening ... - HV-0948 OLP-0671 translation-N2i.tex:92: Delta2 concludes B, so its induction result is empty exactly when B is bottom, independently of A. Restore B by right weakening when necessary. For A=bottom, the promised output must remain empty: use bottom=>empty as the ... - HV-0949 OLP-0671 translation-N2i.tex:96: The induction announces cases without limiting them to examples but omits conjunction, disjunction, negation, quantifiers and intuitionistic falsity. A short remaining-rule algorithm suffices: introductions use right rules; ... - HV-0950 OLP-0671 translation-N2i.tex:113: The target G2 proof uses unlabelled formula multisets. The induction-result premise is not an N2 labelled context, so its extraneous x: must be removed. - HV-0951 OLP-0671 translation-N2i.tex:115: The displayed classical proof always ends in the singleton A. For A=bottom an additional cut with bottom=>empty gives exactly the proposition's empty target. Vacuous classical discharge is permitted by the N1/N2 convention and ... - HV-0952 OLP-0671 translation-N2i.tex:119: The construction explicitly uses Cut, and single-succedent shape alone does not eliminate it. State the extended calculus as in the proposition. The shared-succedent intuitionistic left-or rule also needs to be used directly; ... Co-Authored-By: Claude Opus 5.5 (cherry picked from commit 7cc5c295f393f2a59acea9595a28c59048050bf5) --- .../natural-deduction/grafting.tex | 41 ++++++++----- .../natural-deduction/quantifiers.tex | 38 ++++++++---- .../natural-deduction/rules-proofs.tex | 31 +++++----- .../natural-deduction/sequents.tex | 14 +++-- .../natural-deduction/translation-G2i.tex | 59 ++++++++++++++----- .../natural-deduction/translation-N2i.tex | 44 ++++++++++---- 6 files changed, 152 insertions(+), 75 deletions(-) diff --git a/content/proof-theory/natural-deduction/grafting.tex b/content/proof-theory/natural-deduction/grafting.tex index 2d41f203..7c778b16 100644 --- a/content/proof-theory/natural-deduction/grafting.tex +++ b/content/proof-theory/natural-deduction/grafting.tex @@ -22,7 +22,7 @@ \AxiomC{$\Discharge{!B}{x}$} \DeduceC{$!A$} \DischargeRule{\Intro{\lif}}{x} -\UnaryInfC{$!B \lif !C$} +\UnaryInfC{$!B \lif !A$} \AxiomC{} \DeduceC{$!B$} \RightLabel{\Elim{\lif}} @@ -48,37 +48,50 @@ \end{defn} Provided that $\delta_1$ and $\delta_2$ don't have different -assumption !!{formula}s labelled with the same label, and no open -assumption of~$\delta_2$ contains an eigenvariable of~$\delta_1$, the +assumption !!{formula}s labelled with the same label, no open +assumption label of~$\delta_2$ is discharged in~$\delta_1$, and no +open assumption of~$\delta_2$ contains an eigenvariable of~$\delta_1$, the resulting $\Subst{\delta_1}{\delta_2}{!B^x}$ is a correct !!{proof}, -and its open assumptions are those of $\delta_1$ together with those -of~$\delta_2$. When grafting !!{proof}s, these conditions will -typically be satisfied. The first is satisfied whenever $\delta_1$ and -$\delta_2$ are subproofs of a larger !!{proof}. If the second is not -satisfied, we can rename the eigenvariables of~$\delta_1$ so that it -is. +and its open assumptions are those of $\delta_1$ other than the +replaced occurrences of~$!B^x$, together with those of~$\delta_2$. When grafting !!{proof}s, these conditions will +typically be satisfied. Compatibility holds whenever $\delta_1$ and $\delta_2$ are +subproofs of a larger !!{proof}. The remaining conditions can be +ensured by consistently renaming discharged-assumption labels and +eigenvariables of~$\delta_1$. Freshen internal discharged labels of +the inserted copies when necessary, preserving their open labels. A corresponding definition applies to \Log{N2c} and~\Log{N2i}. \begin{defn} If $\delta_1$ is a \Log{N2c}-!!{proof} (or \Log{N2i}-!!{proof}) of~$x:!B, \Gamma_1 \Sequent !A$, and $\delta_2$ is a -\Log{N1c}-!!{proof} (\Log{N1i}-!!{proof}) of~$\Gamma_2 \Sequent !B$, +\Log{N2c}-!!{proof} (\Log{N2i}-!!{proof}) of~$\Gamma_2 \Sequent !B$, then $\Subst{\delta_1}{\delta_2}{x:!B}$ is the result of replacing -every axiom $x:!B \Sequent !B$ in~$\delta_1$ by~$\delta_2$, and adding -$\Gamma_2$ to the context of every sequent below such axioms. +each axiom $x:!B \Sequent !B$ corresponding to the designated open +assumption by~$\delta_2$, and replacing $x:!B$ by~$\Gamma_2$ in the +context of every sequent below a replaced axiom. Discharged-assumption +labels are first renamed as necessary so that no already discharged +occurrence is mistaken for the designated open assumption. \end{defn} \begin{prop} If $\delta_1 \Proves x:!B, \Gamma_1 \Sequent !A$ and $\delta_2 \Proves \Gamma_2 \Sequent !B$, then $\Subst{\delta_1}{\delta_2}{x:!B} \Proves \Gamma_1, \Gamma_2 \Sequent -!A$, provided no eigenvariable of~$\delta_1$ occurs in~$\Gamma_2$. +!A$, provided the labels are compatible, no label in~$\Gamma_2$ +is discharged in~$\delta_1$, and no eigenvariable of~$\delta_1$ +occurs in~$\Gamma_2$. \end{prop} \begin{proof} - By induction on $\pheight{\delta}$. + By induction on $\pheight{\delta_1}$. At a designated axiom use + $\delta_2$; leave other axioms unchanged. At an inference, apply + the induction hypothesis to its immediate sub-!!{proof}s and repeat + the inference with the updated contexts. The label conditions + prevent discharge capture, and the eigenvariable condition is + preserved because the new open assumptions contain no eigenvariable + of~$\delta_1$. \end{proof} \end{document} \ No newline at end of file diff --git a/content/proof-theory/natural-deduction/quantifiers.tex b/content/proof-theory/natural-deduction/quantifiers.tex index c08648fb..5f66b159 100644 --- a/content/proof-theory/natural-deduction/quantifiers.tex +++ b/content/proof-theory/natural-deduction/quantifiers.tex @@ -29,7 +29,7 @@ \begin{lem}\ollabel{lem:subst-regular} If $\delta$ is regular, ends in~$!C$, $c$ is !!a{constant} not used as an eigenvariable -in~$\delta$, and $t$~is a term not containing any eigenvariables +in~$\delta$, and $t$~is a closed term not containing any eigenvariables of~$\delta$, then $\Subst{\delta}{t}{c}$ resulting from~$\delta$ by replacing every occurrence of~$c$ by~$t$ is a regular !!{proof}. The end-!!{formula} of $\Subst{\delta}{t}{c}$ is $\Subst{!C}{t}{c}$. If @@ -110,19 +110,24 @@ \] By induction hypothesis, $\Subst{\delta_1'}{t}{c}$ and $\Subst{\delta_2'}{t}{c}$ are regular !!{proof}s of - $\lexists[x][!A(x,c)]$ and of $!C$ from the open + $\lexists[x][!A(x,t)]$ and of $\Subst{!C}{t}{c}$ from the open assumption~$!A(a,t)$. Since $a$ is an eigenvariable of~$\delta$, $a$~does not occur in~$t$. Therefore, the last inference in $\Subst{\delta}{t}{c}$, \[ \AxiomC{} - \RightLabel{$\Subst{\delta'}{t}{c}$} - \DeduceC{$!A(a,t)$} - \RightLabel{\Intro{\lforall}} - \UnaryInfC{$\lforall[x][!A(x,t)]$} + \RightLabel{$\Subst{\delta_1'}{t}{c}$} + \DeduceC{$\lexists[x][!A(x,t)]$} + \AxiomC{$\Discharge{!A(a,t)}{x}$} + \RightLabel{$\Subst{\delta_2'}{t}{c}$} + \DeduceC{$\Subst{!C}{t}{c}$} + \DischargeRule{\Elim{\lexists}}{x} + \BinaryInfC{$\Subst{!C}{t}{c}$} \DisplayProof \] - is correct: $\Subst{!A(x,t)}{a}{x} \ident \Subst{!A(a,c)}{t}{c}$, neither the conclusion~$!C$ nor any open assumption contains~$a$. + is correct: $\Subst{!A(x,t)}{a}{x} \ident \Subst{!A(a,c)}{t}{c}$, + and neither the conclusion~$\Subst{!C}{t}{c}$ nor any remaining + open assumption contains~$a$. \end{enumerate} \end{proof} @@ -130,19 +135,26 @@ If $\delta$ is !!a{proof} in \Log{N1c} or \Log{N1i}, then there is a regular !!{proof}~$\delta'$ with the same structure (in particular, the same !!{height}) which differs from $\delta$ only by replacing -eigenvariables. +eigenvariables and consistently renaming discharged-assumption labels. \end{prop} \begin{proof} +First consistently rename discharged-assumption labels so that +no discharge label is reused outside the assumptions discharged by +its inference. This preserves all open assumptions and the proof +structure, and prevents later local substitutions from creating +incompatible formulas with the same label. For the purpose of the proof only, call an eigenvariable inference of~$\delta$ \emph{clean} if its eigenvariable is not the eigenvariable of another inference nor does it occur anywhere in~$\delta$ except the -immediate sub-!!{proof} of the inference, and \emph{dirty} otherwise. +immediate sub-!!{proof} of \Intro{\lforall}, or the sub-!!{proof} +leading to the minor premise of \Elim{\lexists}, respectively, and +\emph{dirty} otherwise. Let $n$ be the number of dirty eigenvariable inferences in~$\delta$. We show, by induction on~$n$, that $\delta$~can be transformed into the required regular !!{proof}~$\delta'$. If $n=0$, all eigenvariable inferences in~$\delta$ are clean, and so $\delta$ is regular, and there is -nothing to prove. Otherwise, pick a highest eigenvariable inference, +nothing to prove. Otherwise, pick a highest dirty eigenvariable inference, say \Intro{\lforall}. The sub-!!{proof}~$\delta_1$ of~$\delta$ ending in it is of the form \[ @@ -155,7 +167,9 @@ \] Note that as $c$ is an eigenvariable, it does not occur in~$\lforall[x][!A(x)]$ or an open assumption. The proof $\delta_2$ is -regular, since it contains no eigenvariable inferences at all. Let $a$ +regular, since all eigenvariable inferences above the selected +inference are clean. Moreover, $c$ is not an eigenvariable of +$\delta_2$, since such an upper inference would also be dirty. Let $a$ be !!a{constant} not occurring in~$\delta$. By \olref{lem:subst-regular}, $\Subst{\delta_2}{a}{c}$ is a regular proof of $!A(a)$. By the eigenvariable condition, no open assumption @@ -179,7 +193,7 @@ \begin{prob} Describe the case in the proof of \olref{prop:regular} where the -topmost eigenvariable inference is~\Elim{\lexists}. +selected highest dirty eigenvariable inference is~\Elim{\lexists}. \end{prob} We will not appeal to the proposition just proved explicitly, but we diff --git a/content/proof-theory/natural-deduction/rules-proofs.tex b/content/proof-theory/natural-deduction/rules-proofs.tex index b0718e89..2861db15 100644 --- a/content/proof-theory/natural-deduction/rules-proofs.tex +++ b/content/proof-theory/natural-deduction/rules-proofs.tex @@ -34,7 +34,7 @@ are the \emph{premises}. The !!{formula} on the left is the \emph{principal} !!{formula}~$!A \lif !B$. All !!{elimination} rules have one such premise, always on the far left. It is called the -\emph{major} premise of the inference. If there are others, such as an +\emph{major} premise of the inference. If there are others, such as in this case, they are called \emph{minor} premises. The premise(s) of !!{introduction} rules are also called major premise(s). The !!{formula} below the line is the \emph{conclusion}. @@ -65,7 +65,7 @@ assumptions: \[ \AxiomC{$\Discharge{!A}{y}$} -\DischargeRule{\Intro{\lif}}{x} +\RightLabel{\Intro{\lif}} \UnaryInfC{$!B \lif !A$} \DischargeRule{\Intro{\lif}}{y} \UnaryInfC{$!A \lif (!B \lif !A)$} @@ -128,18 +128,18 @@ the discharged~$!A(c)$, does not occur in~$!B$, and does not occur in~$!A$. This is called the \emph{eigenvariable condition}. -!!^{proof}s in \Log{N1c} and~\Log{N1i} are finite trees of sequents -that are inductively generated from axioms using the rules of +!!^{proof}s in \Log{N1c} and~\Log{N1i} are finite trees of !!{formula} occurrences +that are inductively generated from assumptions using the rules of inference. Each leaf is an assumption, possibly labelled with a discharge label, and every other !!{formula} follows from the !!{formula}s immediately above it by one of the inference rules of the -system. If an occurence of a !!{formula} as an assumption in the tree +system. If an occurrence of a !!{formula} as an assumption in the tree above an inference has not been discharged by an inference above it, it is called \emph{open} (at the inference). \begin{defn}\ollabel{defn:proof} \emph{!!^{proof}s} in \Log{N1c} and~\Log{N1i} are finite trees of -!!{formula}s inductively as follows: +!!{formula}s defined inductively as follows: \begin{enumerate} \item\ollabel{defn:prf:assumption} Every !!{formula} labelled by a discharge label such as $x$ or $y$, by itself is @@ -148,7 +148,7 @@ \item\ollabel{defn:prf:one-prem} If $R$ is a rule with one, two, or three premises $!A_1$, $!A_2$, $!A_3$, conclusion~$!A$, and $\delta_1$, $\delta_2$, $\delta_3$ are !!{proof}s ending in $!A_1$, - $!A_2$, $!A_3$, respectively, the + $!A_2$, $!A_3$, respectively, then \[ \AxiomC{} \RightLabel{$\delta_1$} @@ -175,7 +175,7 @@ \DeduceC{$!A_2$} \AxiomC{} \RightLabel{$\delta_3$} - \DeduceC{$!A_2$} + \DeduceC{$!A_3$} \RightLabel{$R$} \TrinaryInfC{$!A$} \DisplayProof @@ -188,7 +188,8 @@ \emph{open assumptions} of the !!{proof} if they are open assumptions of $\delta_1$, $\delta_2$, or~$\delta_3$, except those occurrences discharged by the rule. If the rule is labelled~$x$ (or - $x\, y$), then for \Intro{\lif} and~\Intro{\lnot}, that is all open + $x\, y$), then for \Intro{\lif}, \Intro{\lnot}, and (in \Log{N1c}) \FalseCl, + that is all open assumptions in~$\delta_1$ labelled~$x$; for \Elim{\lexists}, it is all open assumptions labelled~$x$ in~$\delta_2$; for \Elim{\lor}, it is all open assumptions labelled~$x$ in~$\delta_2$ and all open @@ -199,7 +200,7 @@ The !!{proof}s used in the inductive construction of !!a{proof} are called its \emph{sub-!!{proof}s}. The sub-!!{proof}s ending in the premises of an inference are called the \emph{immediate -sub-!!{proof}s} of the inference. The rules of \Log{N2c} and \Log{N2i} +sub-!!{proof}s} of the inference. The rules of \Log{N1c} and \Log{N1i} are given in \olref{tab:N1} \subfile{rules-N1} @@ -218,7 +219,7 @@ sub-!!{proof}s~$\delta_1$, $\delta_2$, and~$\delta_3$, then $\pheight{\delta} = \max(\pheight{\delta_1}, \pheight{\delta_2}, \pheight{\delta_3}) + 1$. \end{enumerate} -If a sequent~$S$ has !!a{proof} of height $\le n$, we write $\Proves[n] S$. +If !!a{formula}~$S$ has !!a{proof} of height $\le n$, we write $\Proves[n] S$. \end{defn} \begin{ex} @@ -229,7 +230,7 @@ \] is !!a{proof}~$\delta_1$. Its height is~$0$. From $\delta_1$ we can obtain two !!{proof}s~$\delta_2$ and~$\delta_3$ -by applying one of the two version of~\Elim{\land} +by applying one of the two versions of~\Elim{\land} \[ \AxiomC{$!A \land !B^x$} \RightLabel{\Elim{\land}[2]} @@ -242,9 +243,9 @@ \DisplayProof \] The immediate sub-!!{proof}s of the last inference in~$\delta_2$ and -in~$\delta_3$ is the same: $!A \land !B$. Both !!{proof}s have the +in~$\delta_3$ are the same: $!A \land !B$. Both !!{proof}s have the occurrence of $!A\land !B$ as an open assumption. We have -$\pheight{\delta_1} = \pheight{\delta_2} = 1$. +$\pheight{\delta_2} = \pheight{\delta_3} = 1$. The rule \Intro{\land} requires two premises of the form $!B$ and $!A$ to justify a conclusion of the form~$!B \land !A$. Thus, the following @@ -263,7 +264,7 @@ \DisplayProof \] Its height $\pheight{\delta_4} = \max(\pheight{\delta_2}, -\pheight{\delta_3})+1 = \max(1,1) + 1 = 2$. It has two occurences of +\pheight{\delta_3})+1 = \max(1,1) + 1 = 2$. It has two occurrences of $!A \land !B$ as assumptions, both are open. Finally we can apply \Intro{\lif} to obtain $\delta_5$: diff --git a/content/proof-theory/natural-deduction/sequents.tex b/content/proof-theory/natural-deduction/sequents.tex index ba46c567..e18c2bb0 100644 --- a/content/proof-theory/natural-deduction/sequents.tex +++ b/content/proof-theory/natural-deduction/sequents.tex @@ -10,7 +10,7 @@ \olsection{Natural Deduction with Sequents: \Log{N2c} and~\Log{N2i}} -!!^a{proof}~$\delta$ in \Log{G1c} or \Log{G1i} shows that its +!!^a{proof}~$\delta$ in \Log{N1c} or \Log{N1i} shows that its end-!!{formula}~$!A$ follows from its open assumptions. If $\Gamma$ is the set of !!{formula}s~$!B$, where $!B^x$ occurs as an open assumptions in~$\delta$, we can write this as $\delta \Proves \Gamma @@ -43,6 +43,8 @@ applications of the corresponding rules in \Log{N2c} and~\Log{N2i} also when the corresponding context !!{formula}s $!A$, $!B$, and $!A(a)$ are not present in the context of the relevant premise. +The same convention applies to \FalseCl in~\Log{N2c}: its indicated +negated assumption may be absent from the premise context. \begin{prop} If $\delta$ is !!a{proof} in~\Log{N1c} or \Log{N1i} of~$!A$, then @@ -80,7 +82,7 @@ \[ \AxiomC{} \RightLabel{$\delta_1'$} - \Deduce$x:B, \Gamma \fCenter !C$ + \Deduce$x:!B, \Gamma \fCenter !C$ \RightLabel{\Intro{\lif}} \UnaryInf$\Gamma \fCenter !B \lif !C$ \DisplayProof @@ -134,14 +136,14 @@ \UnaryInf$\Gamma \fCenter !B \lif !C$ \DisplayProof \] - By inductive hypothesis, there is !!a{proof} in~\Log{N1c} + By inductive hypothesis, there is !!a{proof}~$\delta_1'$ in~\Log{N1c} (\Log{N1i}) of~$!C$. In the first case, $!B^x$ is an open - assumption of~$\delta'$; in the second case it is not. We can take + assumption of~$\delta_1'$; in the second case it is not. We can take the !!{proof}~$\delta'$ to be \[ \bottomAlignProof \AxiomC{$\Discharge{!B}{x}$} - \RightLabel{$\delta_1$} + \RightLabel{$\delta_1\prime$} \DeduceC{$!C$} \DischargeRule{\Intro{\lif}}{x} \UnaryInfC{$!B \lif !C$} @@ -149,7 +151,7 @@ \quad\text{ or }\quad \bottomAlignProof \AxiomC{} - \RightLabel{$\delta_1$} + \RightLabel{$\delta_1\prime$} \DeduceC{$!C$} \RightLabel{\Intro{\lif}} \UnaryInfC{$!B \lif !C$} diff --git a/content/proof-theory/natural-deduction/translation-G2i.tex b/content/proof-theory/natural-deduction/translation-G2i.tex index d40847b8..3bf5ffc5 100644 --- a/content/proof-theory/natural-deduction/translation-G2i.tex +++ b/content/proof-theory/natural-deduction/translation-G2i.tex @@ -10,6 +10,19 @@ \olsection{Translating from \Log{G2i} to \Log{N2i}} +Here \Log{G2i} is the intuitionistic variant of \Log{G2c}: all +sequents have at most one formula on the right. In addition, replace +its \LeftR{\lor} rule by the shared-succedent rule +\[ +\Axiom$!A,\Gamma_1 \fCenter \Delta$ +\Axiom$!B,\Gamma_2 \fCenter \Delta$ +\RightLabel{\LeftR{\lor}} +\BinaryInf$!A\lor !B,\Gamma_1,\Gamma_2 \fCenter \Delta$ +\DisplayProof +\] +where $\Delta$ is empty or a singleton. All other axioms and rules +are those of \Log{G2c} subject to the same succedent restriction. + The antecedents of sequents in \Log{G2i} are multisets~$\Gamma$ of !!{formula}s, while those of sequents in \Log{N2i} are sets~$\Gamma'$ of labelled formulas with the property that every label occurs only @@ -22,13 +35,13 @@ \begin{prop}\ollabel{prop:G2i-to-N2i} If $\Log{G2i} + \Cut \Proves \Gamma \Sequent \Delta$ then $\Log{N2i} \Proves \Gamma' \Sequent !C$, where $!C \ident \lfalse$ if $\Delta$ is -empty and $\Delta = \{!A\}$ otherwise, and $\Gamma'$ corresponds +empty and $\Delta = \{!C\}$ otherwise, and $\Gamma'$ corresponds to~$\Gamma$. \end{prop} \begin{proof} We show that if $\pi$ is !!a{proof} of $\Gamma \Sequent \Delta$ in - \Log{G2ci}, then there is a~$\Gamma'$ corresponding to~$\Gamma$ and + $\Log{G2i}+\Cut$, then there is a~$\Gamma'$ corresponding to~$\Gamma$ and !!a{proof}~$\delta$ of~$\Gamma' \Sequent !C$ in~\Log{N2i}. We do this by induction on $n = \pheight{\pi}$. @@ -39,7 +52,7 @@ If $n>0$, $\pi$ ends in a rule~$R$. The inductive hypothesis guarantees that there are !!{proof}s of sequents corresponding to - the premises of that rule in~\Log{N2c}. We can assume that all + the premises of that rule in~\Log{N2i}. We can assume that all discharge labels in those proofs are distinct, and that a label $x$ only occurs above an inference that discharges it, if it is discharged at all (by relabelling if necessary). We then show how @@ -64,7 +77,7 @@ \AxiomC{} \RightLabel{$\pi_1$} \Deduce$\Gamma \fCenter \Delta$ - \RightLabel{\RightR{\Weakening}} + \RightLabel{\LeftR{\Weakening}} \UnaryInf$!A, \Gamma \fCenter \Delta$ \DisplayProof \] @@ -83,13 +96,13 @@ \UnaryInf$!A, \Gamma \fCenter \Delta$ \DisplayProof \] - The induction hypothesis applied to $\pi_1$ yields !!a{proof} + The induction hypothesis applied to $\pi_1$ yields !!a{proof}~$\delta_1$ of~$\Pi, \Gamma' \Sequent !C$, where $\Pi \subseteq \{x : !A, y:!A\}$. If $\Pi = \{x : !A, y:!A\}$, replace all labelled - !!{formula}s $y:!A$ in~$\pi_1$ by $x:!A$. Since $x$~occurs in the - context of the end-sequent of~$\pi_1$ we can assume that no - inference in~$\pi_1$ discharges !!a{formula} of the form~$x:!B$, - i.e., no $x:!B$ on the left side of a sequent in~$\pi_1$ is + !!{formula}s $y:!A$ in~$\delta_1$ by $x:!A$. Since $x$~occurs in the + context of the end-sequent of~$\delta_1$ we can assume that no + inference in~$\delta_1$ discharges !!a{formula} of the form~$x:!B$, + i.e., no $x:!B$ on the left side of a sequent in~$\delta_1$ is active. Consequently, the result is still !!a{proof} in~\Log{N2i}. \item If $R$ is $\RightR{\lif}$, $\pi$ ends in \[ @@ -102,8 +115,8 @@ \] By the inductive hypothesis, there is !!a{proof}~$\delta_1$ of $x: !A, \Gamma' \Sequent !B$ or $\Gamma' \Sequent !B$ where $\Gamma'$ - corresponds to~$\Gamma$. We can take $\delta_1$ - to be $\delta$ plus an application of \Intro{\lif}. + corresponds to~$\Gamma$. We can take $\delta$ + to be $\delta_1$ plus an application of \Intro{\lif}. \item If $R$ is \LeftR{\lif}, $\pi$ ends in \[ \AxiomC{} @@ -120,7 +133,7 @@ \Sequent !A$ and $\delta_2$ of $x: !B, \Gamma_2' \Sequent !C$ or of of $\Gamma_2' \Sequent !C$. If $\delta_2$ is of the latter form, $\delta_2$ can serve as~$\delta$. Otherwise, we can relabel all - formulas and discharge labels in~$\pi_1$ to ensure that no label + formulas and discharge labels in~$\delta_1$ to ensure that no label occurs in both $\delta_1$ and~$\delta_2$. Then $\Gamma_1' \cup \Gamma_2'$ corresponds to $\Gamma_1 \cup \Gamma_2$. Since $x:!B$ occurs in the end-sequent of~$\delta_2$, $x:!B$ cannot be active in @@ -132,10 +145,15 @@ \RightLabel{$\delta_1$} \Deduce$\Gamma_1' \fCenter !A$ \RightLabel{\Elim{\lif}} - \BinaryInf$x: !A \lif !B \fCenter !B$ + \BinaryInf$x: !A \lif !B, \Gamma_1' \fCenter !B$ \DisplayProof \] - and every occurrence of $x:!B$ in~$\delta_2$ by $x:!A \lif !B$. + and replace $x:!B$ in each affected context of~$\delta_2$ by + $x:!A \lif !B,\Gamma_1'$, as in the grafting definition. Before + grafting, rename eigenvariables of~$\delta_2$ away from the + inserted open assumptions, and freshen internal discharged labels + and eigenvariables of inserted copies while preserving their + open-assumption labels. The result $\Subst{\delta_2}{\delta_3}{x:!B}$ is !!a{proof} of $x:!A \lif !B, \Gamma_1', \Gamma_2' \Sequent !C$. \item If $R$ is \RightR{\land}, $\pi$ ends in @@ -151,8 +169,8 @@ \DisplayProof \] The inductive hypothesis yields proof $\delta_1$ of $\Gamma_1' - \Sequent !A$ and $\delta_2$ of $\Gamma_2' \Sequent !A$. By - relabelling all formulas and discharge labels in~$\pi_2$ we can + \Sequent !A$ and $\delta_2$ of $\Gamma_2' \Sequent !B$. By + relabelling all formulas and discharge labels in~$\delta_2$ we can ensure that no label occurs in both $\delta_1$ and $\delta_2$. Then $\Gamma_1' \cup \Gamma_2'$ corresponds to $\Gamma_1 \cup \Gamma_2$. We obtain !!a{proof}~$\delta$ by applying $\Intro{\land}$ @@ -201,6 +219,15 @@ $\delta_2$ by $\delta_1$ to obtain~$\delta$ as the !!{proof}~$\Subst{\delta_2}{\delta_1}{x:!A}$ of $\Gamma_1', \Gamma_2' \Sequent !C$. \end{enumerate} + The remaining right logical rules translate by the corresponding + introductions. For each remaining left rule, combine the induction + results with the corresponding elimination from a fresh assumption + of its principal formula, grafting at a used active assumption and + retaining an unchanged proof when that assumption is unused. + Discharge may be vacuous. The original eigenvariable conditions + hold for the smaller translated contexts. Before each graft, + freshen internal eigenvariables away from the inserted assumptions + and use the stated label convention. \end{proof} \end{document} \ No newline at end of file diff --git a/content/proof-theory/natural-deduction/translation-N2i.tex b/content/proof-theory/natural-deduction/translation-N2i.tex index e4458ab0..1d5d45f5 100644 --- a/content/proof-theory/natural-deduction/translation-N2i.tex +++ b/content/proof-theory/natural-deduction/translation-N2i.tex @@ -11,7 +11,7 @@ \olsection{Translating from \Log{N2} to \Log{G2}} \begin{prop}\ollabel{prop:N2-to-G2} If $\Log{N2c}\ (\Log{N2i}) \Proves -\Gamma \Sequent !A$ then $\Log{G2c}\ (\Log{N2i}) + \Cut \Proves \Gamma' +\Gamma \Sequent !A$ then $\Log{G2c}\ (\Log{G2i}) + \Cut \Proves \Gamma' \Sequent \Delta$ where $\Gamma'$ is the multiset of !!{formula}s resulting from $\Gamma$ by removing labels, and $\Delta = \{!A\}$ if $!A$ is not~$\lfalse$, and $\Delta = \emptyset$ if it is. @@ -52,8 +52,9 @@ \DisplayProof \] The inductive hypothesis yields !!a{proof}~$\pi_1$ of $\Gamma' - \Sequent !C$, from which we obtain $\pi$ by applying - \LeftR{\Weakening} with~$!B$, and then~\RightR{\lif}. + \Sequent !C$, or of $\Gamma'\Sequent\ $ if $!C\ident\lfalse$. + In the latter case first apply \RightR{\Weakening} with~$!C$. + Then apply \LeftR{\Weakening} with~$!B$ and \RightR{\lif} to obtain~$\pi$. \item If $R$ is \Elim{\lif}, $\delta$ ends in \[ \AxiomC{} @@ -68,7 +69,10 @@ \] where $\Gamma = \Gamma_1 \cup \Gamma_2$. The inductive hypothesis yields !!{proof}s $\pi_1$ of $\Gamma_1' \Sequent !B \lif !A$ and - $\pi_2$ of $\Gamma_2' \Sequent !B$. We obtain the !!{proof}~$\pi$ as + $\pi_2$ of $\Gamma_2' \Sequent !B$, except that the latter has + empty succedent when $!B\ident\lfalse$. In that case first add + \RightR{\Weakening} with~$!B$ to~$\pi_2$. If $!A\not\ident\lfalse$, + we obtain the !!{proof}~$\pi$ as \[ \AxiomC{} \RightLabel{$\pi_1$} @@ -89,10 +93,18 @@ $!C$ but $(\Gamma_1 \cup \Gamma_2)'$ contains only one copy. We can correct this by adding suitable \LeftR{\Contraction} inferences. - In the event that $!A \ident \lfalse$, the inductive hypothesis - applied to $\delta_2$ yields !!a{proof} of $\Gamma_2' \Sequent \ $, - from which we can obtain the !!{proof}~$\pi$ by adding suitable - \LeftR{\Weakening} inferences and a \RightR{\Weakening} with~$!A$. + If $!A\ident\lfalse$, use the axiom $\lfalse\Sequent\ $ in place + of $!A\Sequent !A$ in the same construction. Its \LeftR{\lif} + inference and subsequent \Cut$\,$ then both have empty succedent, + as required. Apply the same antecedent contractions. +\item For the remaining rules, translate introductions by the corresponding + right rules and eliminations by the corresponding left rules followed + by \Cut. As in the implication cases, use empty succedents for bottom + conclusions, restore an intermediate bottom formula by right weakening + when required, and use left weakening for vacuous discharge. Translate + \FalseInt{} by right weakening. Contract repeated contexts, and in + \Log{G2c} the repeated common succedent from \LeftR{\lor}, as necessary. + The original eigenvariable conditions survive removal of labels. \item If $R$ is \FalseCl, $\delta$ ends in \[ \AxiomC{} @@ -110,15 +122,23 @@ \UnaryInf$\fCenter !A, \lnot !A$ \AxiomC{} \RightLabel{$\pi_1$} - \Deduce$x: \lnot !A, \Gamma' \fCenter $ + \Deduce$\lnot !A, \Gamma' \fCenter $ \RightLabel{\Cut} \BinaryInf$\Gamma' \fCenter !A$ \DisplayProof \] + If $!A\ident\lfalse$, append a cut with the axiom + $\lfalse\Sequent\ $ to obtain the required empty succedent. + If the \FalseCl inference discharges no assumption, its premise + lacks $x:\lnot !A$. The induction hypothesis then already supplies + $\Gamma'\Sequent\ $; retain that proof when $!A\ident\lfalse$, + and otherwise apply \RightR{\Weakening} with~$!A$. \end{enumerate} -Note that only the translation of \FalseCl{} results in -!!a{proof}~$\pi$ with more than one !!{formula} on the right. That is, -the translation of a~\Log{N2i} !!{proof} is a \Log{G2i}-!!{proof}. +All nonclassical cases can be carried out directly in +$\Log{G2i}+\Cut$, using its shared-succedent \LeftR{\lor} rule. +The \FalseCl construction uses a classical sequent with two formulas +on the right. Thus a~\Log{N2i} !!{proof} translates to a +$\Log{G2i}+\Cut$ !!{proof}. \end{proof} \end{document} \ No newline at end of file From 9dbd3736f946634908a8a723ca497990837b88d5 Mon Sep 17 00:00:00 2001 From: KokunoYumeto <208192274+KokunoYumeto@users.noreply.github.com> Date: Sun, 29 Nov 2026 10:30:45 +0100 Subject: [PATCH 06/19] proof-theory/normalization: fix reduction measures and normalization claims Found in the translations' records of errors of the English (the errata harvest of 28-29 November 2026: GPT-6 Astra, OpenAI, ChatGPT Pro mode, classified every record against 2e19d095 and made this patch; applied here by Claude Opus 5.5, Anthropic, effort max). Each issue with its sources is in ENGLISH_ERRATA_CONSOLIDATED.tsv: - HV-0953 OLP-0672 introduction.tex:16: Delta1 is introduced as the proof of A; delta2 proves B from A. Remove the conflicting name on the implication proof and label the displayed right proof of A as delta1. - HV-0954 OLP-0672 introduction.tex:54: The literal bound excludes open assumptions, quantified instances, and primitive falsity. A proof from bottom to atomic P already contains an assumption not among the conclusion's subformulas; a proof of P -> not-not-P uses ... - HV-0955 OLP-0677 segments.tex:3: The file path, pt/nor/seg identifier and Segments and Cuts heading all identify the segments section. The copied descriptive source comment introduction is incorrect. - HV-0956 OLP-0677 segments.tex:66: Clause 3 of the immediately following definition orders a segment from a minor-premise occurrence to that inference's conclusion. The explanatory sentence reverses the order. - HV-0958 OLP-0677 segments.tex:78: All members of this formula sequence use the formula metavariable marker !A; it is missing on this successor member. - HV-0959 OLP-0677 segments.tex:84: The second sentence has only the noun phrase "the ones that are called cuts" and no main predicate. Restore the missing predicate identifying the targeted segments. - HV-0960 OLP-0677 segments.tex:96: The formal definition just above explicitly includes singleton segments introduced by FalseInt. The prose summary must retain that alternative. - HV-0961 OLP-0677 segments.tex:104: The maximum defining cut rank is undefined on an empty set without a convention. The following induction applies the measures to all proofs, including normal ones. Set rank and the already naturally empty sum to zero explicitly. - HV-0962 OLP-0675 permutations.tex:22: Every displayed repeated major formula is B conjunction C, and the final inference is conjunction elimination. The introductory cut-formula identification has the wrong connective. - HV-0963 OLP-0675 permutations.tex:68: A length-two segment starting at an assumption can become a singleton assumption directly used by elimination. Such a singleton is excluded by the cut definition, so the cut may disappear rather than survive with a shorter length. - HV-0964 OLP-0675 permutations.tex:75: Cut length sums only cuts of the current maximum rank. Converting a lower-rank cut need not change it; when rank drops, many previously lower-rank cuts can become maximal and their total length can be larger. The valid descent ... - HV-0965 OLP-0675 permutations.tex:80: There are at least two paths through the two minor branches, but only maximal-rank paths contribute to cut length. With the converted formula maximal and rank unchanged, each path loses a node or disappears, giving the claimed ... - HV-0967 OLP-0675 permutations.tex:319: The exercise asks only one pair, existential elimination followed by existential elimination. There is no second (latter) case to identify. - HV-0969 OLP-0675 permutations.tex:345: The original converted display reuses eigenconstant c for two existential eliminations, violating the declared unique-eigenvariable regularity. Independently freshened copies with c1,c2 and z1,z2 preserve the final C and open ... - HV-0970 OLP-0675 permutations.tex:383: Verified an explicit valid propositional counterexample: A=P or Q, C=R and S. A case inference on D or E has two A-assumption minor premises; its A conclusion is eliminated with two C-introduction branches, and C is then ... - HV-0971 OLP-0676 reductions.tex:15: The definition of singleton cuts explicitly includes FalseInt, and this section eventually treats that alternative. The opening must either include it or delimit the introduction case; the correction does both. - HV-0972 OLP-0676 reductions.tex:53: Vacuous implication introduction leaves no B^x site, so reduction discards the entire argument proof and may lose its open assumptions. Also delta3 may itself have open B^x, and same-formula label compatibility does not ... - HV-0973 OLP-0676 reductions.tex:65: There is no delta4 in the implication example. More substantially, the following paragraphs themselves explain that cuts in delta3 may be duplicated and boundary segments can change, contradicting an unconditional ... - HV-0974 OLP-0676 reductions.tex:80: Diagram-specific rightmost selection does not uniformly exclude copied maximal cuts in introduction premises or crossing segments whose endpoint is below the copied subtree. The independently checked permutation counterexample ... - HV-0975 OLP-0676 reductions.tex:90: A proof ending in FalseInt grafted into a major-premise assumption creates a singleton cut by the explicit definition, just as an introduction-ending proof does. Its formula is still B, so the existing strictly smaller-depth ... - HV-0976 OLP-0676 reductions.tex:97: This is the same assumption formula metavariable !B^x discussed throughout the grafting argument; its marker is missing in this one occurrence. - HV-0977 OLP-0676 reductions.tex:112: The substitution lemma requires that t contain no eigenconstant of the proof being substituted into. Regularity alone does not enforce this for a vacuous quantified matrix, whose displayed instance may hide all constants of t. ... - HV-0979 OLP-0676 reductions.tex:304: The B branch already has label x. Giving arbitrary different C the same label violates the explicit compatibility requirement. Use y for C and label the disjunction elimination with both discharged labels, matching all other ... - HV-0982 OLP-0673 normalization-thm.tex:32: The preceding endpoint-based topmost criterion permits the checked rank-1 counterexample with total maximal length 8 increasing to 12. The repaired permutation and reduction arguments use one explicit order of segment starts, ... - HV-0984 OLP-0678 translations.tex:15: There is no calculus 2i; this is the cut-free G2i source translation named throughout the paragraph and section. - HV-0985 OLP-0678 translations.tex:18: The word for the left sides of sequents is antecedents; the current source transposes its middle letters. - HV-0987 OLP-0678 translations.tex:28: The corollary leaves its conclusion formula C unrelated to the source succedent. Under a universal reading this would assert a proof of arbitrary Q from a context corresponding to P when the source is P=>P. The cited ... - HV-0988 OLP-0678 translations.tex:37: An introduction can occur above an elimination in a minor-premise subtree without a cut. Normality concerns introduction/FalseInt conclusions on the major-premise chain, including intervening case-elimination segments. ... - HV-0989 OLP-0678 translations.tex:44: G2i is the cut-free rule system; the intermediate source proof explicitly ending in Cut belongs to G2i+Cut. The reverse translation also introduces cuts until normality is used. Name the extended calculus in both descriptions ... - HV-0990 OLP-0678 translations.tex:58: The conditional lacks its predicate. The following proposition and branch argument use normality to construct a cut-free target, so is normal is the missing hypothesis. - HV-0991 OLP-0678 translations.tex:61: The formal list condition does not prevent early stopping or arbitrary continuation after a minor premise, while the explanatory prose and main-branch proof require maximal contiguous paths. Make adjacency and the allowed ... - HV-0992 OLP-0678 translations.tex:72: The main-branch induction uses the fact that only disjunction/existential elimination can discharge along relevant branches; FalseCl invalidates this for N2c and has no case in the proof. Preserve the true classical ... - HV-0993 OLP-0678 translations.tex:82: A globally open label can occur in the chosen main branch and another minor branch. Replacing only its main-branch formula then makes one label denote two formulas; deleting the implication-prefix context can likewise erase ... - HV-0994 OLP-0678 translations.tex:89: The predicate proceeds is singular and describes the translation of this final-rule case; translations is the erroneous plural. - HV-0995 OLP-0678 translations.tex:93: The elimination discussion is the alternative to the preceding introduction/FalseInt case, but lacks its enumerate item marker and is typeset as part of that first case. - HV-0996 OLP-0678 translations.tex:110: Implication and negation elimination form the union of major- and minor-premise contexts. They can add formulas without discharging any. The intended and subsequently used property is that the major context is not reduced, not ... - HV-0997 OLP-0678 translations.tex:121: Distinguish is misspelled in this transition to constructor cases. - HV-0998 OLP-0678 translations.tex:158: The constructed smaller proof is named delta1 immediately above. Delta-prime is not defined in this argument. - HV-0999 OLP-0678 translations.tex:161: The G2i induction result strips assumption labels and translates the context to its multiset Gamma1-prime. Its succedent is Delta, empty when A is bottom. The adjacent left-rule construction must use that same unlabelled target. - HV-1000 OLP-0678 translations.tex:162: The proposition maps final bottom to empty succedent, but all three displayed special cases weaken it back to bottom. Use Delta uniformly in G2 conclusions and preserve emptiness. For implication-left the first active premise ... - HV-1001 OLP-0678 translations.tex:275: Delta1 is the independent proof of the implication antecedent and may have arbitrary length. Delta2 is the continuation below the first implication elimination; that fragment is empty exactly when the elimination is also the ... - HV-1002 OLP-0678 translations.tex:279: The two induction inputs are delta1 from Gamma1 and delta2-prime from E,Gamma2. Their unlabelled contexts therefore have distinct primes and indices. The second target is Delta, and the first is empty only for D=bottom, as ... - HV-1005 OLP-0678 translations.tex:315: A normal proof of P from open P conjunction Q contains that compound assumption; normal forall-elimination contains P(c), a matrix instance rather than a literal subformula; and a normal proof of P -> not-not-P uses primitive ... - HV-1006 OLP-0678 translations.tex:323: The translation deliberately replaces bottom conclusions by empty succedents. For example negation elimination from P and not-P has an N2 bottom conclusion but translates to an empty-succedent G2 proof with no bottom formula. ... Co-Authored-By: Claude Opus 5.5 (cherry picked from commit b50ee4ad07a702596db93442066a9e5b88393299) --- .../normalization/introduction.tex | 15 +- .../normalization/normalization-thm.tex | 8 +- .../normalization/permutations.tex | 78 +++++--- .../proof-theory/normalization/reductions.tex | 84 +++++---- .../proof-theory/normalization/segments.tex | 17 +- .../normalization/translations.tex | 172 ++++++++---------- 6 files changed, 196 insertions(+), 178 deletions(-) diff --git a/content/proof-theory/normalization/introduction.tex b/content/proof-theory/normalization/introduction.tex index 75534800..657efc23 100644 --- a/content/proof-theory/normalization/introduction.tex +++ b/content/proof-theory/normalization/introduction.tex @@ -13,7 +13,7 @@ If you have !!{prove}d a conditional~$!A \lif !B$, you might be in a position to use it in !!a{proof} of~$!B$ by using~\Elim{\lif}. This would of course also require !!a{proof}~$\delta_1$ of~$!A$. Your -!!{proof}~$\delta_1$ of~$!A \lif !B$, more likely than not, ends +!!{proof} of~$!A \lif !B$, more likely than not, ends in~\Intro{\lif}, which turns !!a{proof}~$\delta_2$ of~$!B$ from the open assumption~$!A$ into one of~$!A \lif !B$. If it does, your final !!{proof} has the form @@ -24,7 +24,7 @@ \DischargeRule{\Intro{\lif}}{x} \UnaryInfC{$!A \lif !B$} \AxiomC{} -\RightLabel{$\delta_2$} +\RightLabel{$\delta_1$} \DeduceC{$!A$} \RightLabel{\Elim{\lif}} \BinaryInfC{$!B$} @@ -51,10 +51,11 @@ than you can while avoiding them. There are other similarities: normal !!{proof} can be much longer than the shortest !!{proof} with detours of the same result, just like !!{proof}s in the sequent calculus can -be much shorter with cuts than the shortest cut-free !!{proof}. The -sub-!!{formula} property, that you can always !!{prove} a result using -only sub-!!{formula}s of the result in your !!{proof}, follows from -normalization for natural deduction just as it follows from -cut-elimination for the sequent calculus. +be much shorter with cuts than the shortest cut-free !!{proof}. Normalization also yields a sub-!!{formula} property. For +intuitionistic natural deduction, a result can be !!{prove}d using +sub-!!{formula}s of its conclusion and open assumptions, allowing +substitution instances of quantified sub-!!{formula}s and the logical +constant~$\lfalse$. The classical version requires a corresponding +qualification for the negated assumptions used by classical reductio. \end{document} diff --git a/content/proof-theory/normalization/normalization-thm.tex b/content/proof-theory/normalization/normalization-thm.tex index 0096d7fa..880c44b1 100644 --- a/content/proof-theory/normalization/normalization-thm.tex +++ b/content/proof-theory/normalization/normalization-thm.tex @@ -29,7 +29,9 @@ If the cut length is~$0$, there are no cuts, $\delta$ is already normal. So assume that cut rank and cut length of~$\delta$ are~$> - 0$. Pick a topmost, rightmost maximal cut segment. If the cut + 0$. Pick a maximal cut segment whose first occurrence is earliest in + the postorder defined for permutation conversions, with all minor + premises visited before the major premise at each elimination. If the cut segment has length $>1$, apply a permutation conversion. If the cut segment has length~$1$, apply the corresponding reduction conversion. This results in a new !!{proof} which either has the @@ -37,8 +39,8 @@ inductive hypothesis applies. \end{proof} -The strategy used in the above proof (always deal with a -topmost rightmost maximal cut) suggests a specific order in which +The strategy used in the above proof (always deal with the maximal +cut whose first occurrence is earliest in the specified postorder) suggests a specific order in which conversions must be applied to !!a{proof} in order to result in a normal !!{proof}. Surprisingly enough, the order actually does not matter. Applying permutation and reduction conversions in any order diff --git a/content/proof-theory/normalization/permutations.tex b/content/proof-theory/normalization/permutations.tex index 08f90082..5b0e72c0 100644 --- a/content/proof-theory/normalization/permutations.tex +++ b/content/proof-theory/normalization/permutations.tex @@ -19,7 +19,7 @@ !!{elimination} inference it is the major premise of. For instance, if the inferences involved are \Elim{\lor} and -\Elim{\land}, $!A \ident !B \lor !C$ and there is a +\Elim{\land}, $!A \ident !B \land !C$ and there is a sub-!!{proof}~$\delta_1$ that ends in: \[ \AxiomC{} @@ -65,24 +65,25 @@ \] The cuts that ended in the premise of \Elim{\land} below \Elim{\lor} now end in the premise of one of the \Elim{\land} inferences above the -minor premises of \Elim{\lor}, i.e., the length of each has decreased -by~$1$. +minor premises of \Elim{\lor}, i.e., each corresponding segment has shortened by~$1$. +A segment that becomes a singleton assumption may cease to be a cut. Moreover, any cut that lies entirely within $\delta_2$, $\delta_3$, or $\delta_4$, or entirely outside~$\delta_1$ in~$\delta$ is unchanged: it still involves the same !!{formula}s, goes through the same inferences, so in particular has the same rank and length as the -corresponding cut in~$\delta$. So the cut rank of the new !!{proof} has -not increased, and the cut length of the new !!{proof} is less than that -of the old !!{proof}. +corresponding cut in~$\delta$. Thus the cut rank does not increase. If the converted cut is +maximal, either the cut rank decreases or it stays the same and the +cut length decreases. \begin{prob} -After a permutation conversion, the length of at least one cut is -reduced by~$1$. If we permute \Elim{\land} across an~\Elim{\lor}, -there are actually two cut segments the length of which decrease, so -in this case the cut length of the !!{proof} decreases by at -least~$2$. Can the cut length of !!a{proof} decrease by more than~$2$ -by a single such permutation? Can the cut \emph{rank} decrease? +After a permutation conversion, at least one segment shortens +by~$1$ and may cease to be a cut. Suppose we permute \Elim{\land} +across an~\Elim{\lor} on a maximal cut, and the cut rank stays the +same. At least two maximal segments shorten or disappear, so the cut +length decreases by at least~$2$. Can it decrease by more than~$2$ +in this situation? Can such a permutation instead decrease the +cut \emph{rank}? \end{prob} The process of moving !!a{elimination} rule above an \Elim{\lor} or @@ -317,7 +318,7 @@ \begin{prob} Give the permutation conversions for \Elim{\lexists} followed by \Elim{\exists}. Explain why no eigenvariable condition is violated in -the latter. +this case. \end{prob} We should convince ourselves that when applying a permutation @@ -342,7 +343,8 @@ \BinaryInfC{$!C$} \DisplayProof \] -If we replace this by +Before the move, rename discharged-assumption labels away from +all open labels that will be moved into their scopes. Replace this by \[ \AxiomC{} \RightLabel{$\delta_2$} @@ -350,23 +352,27 @@ \AxiomC{$\Discharge{!D}{x}$} \RightLabel{$\delta_3$} \DeduceC{$\lexists[x][!B(x)]$} -\AxiomC{$\Discharge{!B(c)}{z}$} -\RightLabel{$\delta_5$} +\AxiomC{$\Discharge{!B(c_1)}{z_1}$} +\RightLabel{$\delta_5^{(1)}$} \DeduceC{$!C$} -\DischargeRule{\Elim{\lexists}}{z} +\DischargeRule{\Elim{\lexists}}{z_1} \BinaryInfC{$!C$} \AxiomC{$\Discharge{!E}{y}$} \RightLabel{$\delta_4$} \DeduceC{$\lexists[x][!B(x)]$} -\AxiomC{$\Discharge{!B(c)}{z}$} -\RightLabel{$\delta_5$} +\AxiomC{$\Discharge{!B(c_2)}{z_2}$} +\RightLabel{$\delta_5^{(2)}$} \DeduceC{$!C$} -\DischargeRule{\Elim{\lexists}}{z} +\DischargeRule{\Elim{\lexists}}{z_2} \BinaryInfC{$!C$} \DischargeRule{\Elim{\lor}}{x\,y} \TrinaryInfC{$!C$} \DisplayProof \] +Here $\delta_5^{(1)}$ and $\delta_5^{(2)}$ are independently freshened +copies: replace $c$ by distinct fresh constants $c_1,c_2$, and rename +all internal discharged labels and eigenvariables consistently, +while preserving the labels of open assumptions. we might worry that the eigenvariable~$c$ might occur in, say,~$!D$. After all, the assumption $!D$ is discharged above the original~$\Elim{\lexists}$ and so in the original !!{proof} it does not @@ -380,15 +386,27 @@ in the !!{proof}. In particular, $c$~cannot occur in $\delta_3$ or~$\delta_4$. -This example shows something else: Note that the new !!{proof} has two -copies of~$\delta_5$. This means that if $\delta_5$ contains a maximal -cut, we have \emph{not} reduced the cut length! Thus we must take care -that we apply a permutation conversion only when we know that there is -no maximal cut in $\delta_5$. We will ensure this by always selecting -a \emph{topmost} maximal cut, that is a maximal cut such that the -sub-!!{proof} (in this case,~$\delta_1$) contains no maximal cut that -ends above the last inference in the sub-!!{proof}. This rules out the -possibility that there are other maximal cuts in~$\delta_5$ (or indeed -in $\delta_2$, $\delta_3$, or~$\delta_4$). +The new !!{proof} has two copies of~$\delta_5$. If a maximal cut +starts in that sub-!!{proof}, even if it ends below it, duplication +can prevent the cut length from decreasing. We therefore select cuts +by their first occurrences, not only by their endpoints. + +Order formula occurrences by the following postorder traversal of the +proof tree: visit every immediate sub-!!{proof} before its conclusion; +at an !!{elimination} inference visit all minor-premise sub-!!{proof}s +before the major-premise sub-!!{proof}; use a fixed order for other +premises. Among maximal cuts choose one whose first occurrence comes +earliest in this order. + +Every side sub-!!{proof} copied in the permutation is visited before +the selected first occurrence. It therefore contains no first +occurrence of a maximal cut, including a cut that continues outside +that sub-!!{proof}. The selected segments shorten or disappear. A new +segment along the conclusion of the moved elimination either has +smaller rank (a component or matrix instance of the eliminated +formula), or, for \Elim{\lor} and \Elim{\lexists}, starts in a copied +minor sub-!!{proof} and so cannot have maximal rank. Thus cut rank +decreases, or remains unchanged while cut length decreases. The same +selection order will be used for reduction conversions. \end{document} diff --git a/content/proof-theory/normalization/reductions.tex b/content/proof-theory/normalization/reductions.tex index 06f1c0e4..a9c1eb89 100644 --- a/content/proof-theory/normalization/reductions.tex +++ b/content/proof-theory/normalization/reductions.tex @@ -12,8 +12,9 @@ If a cut in !!a{proof} in \Log{N1i} has length~$1$, it is a segment consisting of a single !!{formula} occurrence, and that !!{formula} is -both the conclusion of !!a{introduction} inference and the major -premise of !!a{elimination} inference. In the normalization proof, +both the conclusion of an !!{introduction} inference or of~\FalseInt, +and the major premise of an !!{elimination} inference. We first +consider the introduction case. In the normalization proof, such cuts are ``reduced'' by replacing the sub-!!{proof} ending in such an !!{introduction}/!!{elimination} pair by a new !!{proof} in which the pair of inferences has been eliminated. Such a replacement @@ -50,26 +51,30 @@ \DisplayProof \] By $\Subst{\delta_2}{\delta_3}{!B^x}$ we mean the !!{proof} that -results from~$\delta_2$ by replacing every assumption~$!B$ that's -labelled~$x$ with the entire !!{proof}~$\delta_3$. This !!{proof} no -longer has open assumptions of the form~$!B$ with label~$x$. It has no -other assumptions labelled~$x$, since we assume, as usual, that no two -!!{formula}s occur as assumptions with the same label. Hence, the new -!!{proof} has the same open assumptions as~$\delta_1$, every inference -in~$\delta_2$ that discharges assumptions discharges the same -assumptions in~$\Subst{\delta_2}{\delta_3}{!B^x}$, and every inference -in~$\delta_3$ that discharges assumptions results in possibly multiple -copies, which discharge the corresponding assumptions -in~$\Subst{\delta_2}{\delta_3}{!B^x}$. +results from~$\delta_2$ by replacing each open assumption~$!B^x$ +that the displayed introduction discharges with the entire +!!{proof}~$\delta_3$. First rename discharged-assumption labels in +the receiving proof to avoid capturing open labels of~$\delta_3$, +and rename its eigenvariables away from those open assumptions. +Freshen internal bound labels and eigenvariables independently in +inserted copies while preserving their open-assumption labels. -Any cut that lies entirely within $\delta_2$, $\delta_3$, or -$\delta_4$, or entirely outside~$\delta_1$ in~$\delta$ is unchanged: -it still involves the same !!{formula}s, goes through the same -inferences, so in particular has the same rank and length as the -corresponding cut in~$\delta$. We have removed a maximal cut of -length~$1$ and so either have reduced the cut length, or reduced the -cut rank (if the cut length of~$\delta$ was~$1$ and this was the only -maximal cut). +The new !!{proof} has the same conclusion as~$\delta_1$ and only +open assumptions already present in~$\delta_1$. Its open-assumption +set can be smaller: if the displayed introduction discharges no +assumption, no copy of~$\delta_3$ is inserted. With the stated +freshening, surviving discharge inferences close exactly their +intended assumptions. In particular, assumptions supplied by the +inserted proof are not accidentally discharged merely because a +label was reused. + +A surviving copy of a cut lying wholly inside $\delta_2$ or +$\delta_3$ and disjoint from the grafting boundaries has the same +rank and length as the original. Cuts wholly outside~$\delta_1$ are +unchanged. However, copies may be duplicated or discarded, and +segments meeting grafting boundaries may change. Removing the +selected maximal cut therefore gives the required decrease only +after the following duplication and boundary checks. However, two things may happen: \begin{enumerate} @@ -77,24 +82,28 @@ multiplied all the cuts in~$\delta_3$. If some of those were maximal cuts, the cut length of the new !!{proof} may be greater than the cut length of the old !!{proof}. We have to guarantee that this does not - happen. We do so by applying reduction conversions only to - \emph{rightmost} maximal cuts, that is, to cuts which are such that - no maximal cut lies on a branch through~$\delta$ to the right of the - cut being reduced. If there were a cut in~$\delta_3$ it would be to - the right of the cut being reduced here, and so we wouldn't be - working on a rightmost cut. By always selecting rightmost cuts, we - guarantee that either we decrease the cut length of the !!{proof}, - or even reduce the cut rank. + happen. Use the same selection order as for permutations: among + maximal cuts, choose the one whose first occurrence is earliest + in postorder, visiting minor-premise sub-!!{proof}s before the + major-premise sub-!!{proof} at every elimination. + In this implication example, all of~$\delta_3$ is visited before + the selected introduction conclusion. More generally, every + sub-!!{proof} copied by a reduction is either above that introduction + conclusion or in a minor premise visited first. Thus no maximal cut + starts in any copied sub-!!{proof}, even if it would end outside it. + This excludes duplication of maximal cuts uniformly for all rule + shapes; the new boundary cuts considered next have lower rank. \item If an assumption $!B^x$ in $\delta_2$ is the major premise of !!a{elimination} inference, and the last inference of~$\delta_3$ is - \Elim{\lor}, \Elim{\lexists}, or !!a{introduction} inference, we + \Elim{\lor}, \Elim{\lexists}, an !!{introduction} inference, or + \FalseInt, we have generated a new cut by grafting~$\delta_3$ onto $\delta_2$ at such an assumption. What was just an assumption in~$\delta_2$ is now - a cut of length~$1$ (the conclusion of !!a{introduction} inference - and major premise of !!a{elimination} inference) or the last + a cut of length~$1$ (the conclusion of an !!{introduction} inference + or of~\FalseInt, and major premise of !!a{elimination} inference) or the last !!{formula} occurrence of a cut segment (major premise of !!a{elimination} inference and conclusion of~\Elim{\lor} or - \Elim{\lexists}). If $B^x$ was a minor premise of \Elim{\lor} or + \Elim{\lexists}). If $!B^x$ was a minor premise of \Elim{\lor} or \Elim{\lexists}, it already was the first !!{formula} occurrence of a segment, and possibly of a cut segment. In the new !!{proof} that segment may now be longer. However, observe that the !!{formula} @@ -110,7 +119,10 @@ conversion} (or \emph{detour conversion}). The patterns for some of the rule pairs is given in \olref{tab:reduction-conversions}. (The remaining are left as -exercises.) +exercises.) Before a displayed quantifier substitution, rename all +internal eigenvariables away from the closed witness term~$t$. +Apply the capture-avoiding grafting conventions above to the resulting +proofs and to every inserted copy. \begin{table} \begin{multline*} @@ -301,10 +313,10 @@ \AxiomC{$\Discharge{!B}{x}$} \RightLabel{$\delta_3$} \DeduceC{$!D$} -\AxiomC{$\Discharge{!C}{x}$} +\AxiomC{$\Discharge{!C}{y}$} \RightLabel{$\delta_4$} \DeduceC{$!D$} -\RightLabel{\Elim{\lor}} +\DischargeRule{\Elim{\lor}}{x\,y} \TrinaryInfC{$!D$} \DisplayProof \quad\text{by}\quad diff --git a/content/proof-theory/normalization/segments.tex b/content/proof-theory/normalization/segments.tex index 7cfb717c..75652047 100644 --- a/content/proof-theory/normalization/segments.tex +++ b/content/proof-theory/normalization/segments.tex @@ -1,6 +1,6 @@ % Part: proof-theory % Chapter: normalization -% Section: introduction +% Section: segments \documentclass[../../../include/open-logic-section]{subfiles} @@ -63,8 +63,8 @@ account for all these possibilities, we define detours using certain kinds of sequences of !!{formula} occurrences in an \Log{N1i}-proof called \emph{segments}. In our example, it's a sequence of occurrences -of~$!A \lif !B$, where a minor premise of $\Elim{\lor}$ or -$\Elim{\lexists}$ follows its conclusion. In the example, there are +of~$!A \lif !B$, where the conclusion of $\Elim{\lor}$ or +$\Elim{\lexists}$ follows its minor premise. In the example, there are two such segments, each containing three occurrences of~$!A \lif !B$. Here is the official definition. @@ -75,14 +75,14 @@ \item $!A_1$ is not the conclusion of \Elim{\lor} or \Elim{\lexists}; \item $!A_n$ is not a minor premise of \Elim{\lor} or \Elim{\lexists}; \item For $i = 1$, \dots,~$n-1$, $!A_i$ is a minor premise of - \Elim{\lor} or \Elim{\lexists} and $A_{i+1}$ is the conclusion of + \Elim{\lor} or \Elim{\lexists} and $!A_{i+1}$ is the conclusion of that inference. \end{enumerate} The \emph{length} of that segment is~$n$. \end{defn} -Not every segment is a target for elimination (a detour). The ones that -are called \emph{cuts}. +Not every segment is a target for elimination (a detour). Those that +are targets for elimination are called \emph{cuts}. \begin{defn} A \emph{cut} is a segment in which $!A_n$ is the major premise of @@ -93,8 +93,8 @@ Note that a cut segment need not begin with the conclusion of !!a{introduction} rule. All that's required is that it ends with the major premise of !!a{elimination} rule. However, a segment of -length~$1$ does have to be the conclusions of !!{introduction} rules -to count as a cut. +length~$1$ does have to be the conclusion of an !!{introduction} +rule or of~\FalseInt{} to count as a cut. \begin{defn} The \emph{rank} of a cut is~$\depth{!A}$. The \emph{cut @@ -102,6 +102,7 @@ cuts in~$\delta$. A cut is \emph{maximal} in~$\delta$ if its rank is~$\cutrank{\delta}$, i.e., it has maximal rank. The \emph{cut length} of~$\delta$ is the sum of the lengths of all its maximal cuts. +If there are no cuts, both cut rank and cut length are defined to be~$0$. \end{defn} \end{document} diff --git a/content/proof-theory/normalization/translations.tex b/content/proof-theory/normalization/translations.tex index f713459e..dc7619d9 100644 --- a/content/proof-theory/normalization/translations.tex +++ b/content/proof-theory/normalization/translations.tex @@ -12,10 +12,10 @@ !!^{proof}s in \Log{N2i} can be translated to !!{proof}s in \Log{G2i} and vice versa. First of all, the result of translating cut-free -\Log{2i} !!{proof}s results in normal \Log{N2i}-!!{proof}s. +\Log{G2i} !!{proof}s results in normal \Log{N2i}-!!{proof}s. To state the result we need a bit of terminology to let us relate -antecendents of sequents in~\Log{N2i} and in~\Log{G2i} more easily: a +antecedents of sequents in~\Log{N2i} and in~\Log{G2i} more easily: a set~$\Gamma'$ of labelled !!{formula}s \emph{corresponds to} the multiset~$\Gamma$ of unlabelled !!{formula}s if, for every !!{formula}~$!A$, the number of !!{element}s of~$\Gamma'$ of the form @@ -25,8 +25,9 @@ \begin{cor} If $\Log{G2i} \Proves \Gamma \Sequent \Delta$ then there is a normal \Log{N2c}-!!{proof}~$\delta$ of $\Gamma' \Sequent !C$, where the -set~$\Gamma'$ of labelled !!{formula}s corresponds to the -multiset~$\Gamma$, i.e., for every !!{formula}~$!A$, the number of +formula $!C$ is $\lfalse$ when $\Delta$ is empty and is the sole +formula in~$\Delta$ otherwise, and the set~$\Gamma'$ of labelled +!!{formula}s corresponds to the multiset~$\Gamma$, i.e., for every !!{formula}~$!A$, the number of !!{element}s of~$\Gamma'$ of the form $x : !A$ is less than or equal to the multiplicity of~$!A$ (i.e., the number of copies of~$!A$) in~$\Gamma$. @@ -34,14 +35,18 @@ \begin{proof} By inspection of the proof of \olref[nat][tgi]{prop:G2i-to-N2i}: we -add !!{introduction} rules to the end of !!{proof}s, and -!!{elimination} rules only at the top of !!{proof}s, so never -introduce an !!{introduction} rule above !!a{elimination} rule. +add !!{introduction} rules at the ends of the translated proofs. +The elimination rules introduced by left-rule translations have a +fresh assumption as major premise, and any translated proofs combined +with them occur in minor-premise positions. Consequently no +introduction or \FalseInt conclusion is placed on an elimination +major-premise chain, and no case-elimination segment is made into a +cut. The resulting proof is normal. \end{proof} The translation of the \Cut{} rule given in \olref[nat][tgi]{prop:G2i-to-N2i}, however, can introduce cuts in the -\Log{N2i}-!!{proof}~$\delta$. If a \Log{G2i} !!{proof} ends in~\Cut{} +\Log{N2i}-!!{proof}~$\delta$. If a $\Log{G2i}+\Cut$ !!{proof} ends in~\Cut{} with immediate sub-!!{proof}s $\pi_1$ and $\pi_2$ of $\Gamma_1 \Sequent !A$ and $!A, \Gamma_2 \Sequent \Delta_2$, respectively, we graft the translation $\delta_1$ of~$\pi_1$ onto the axioms $x:!A @@ -55,13 +60,14 @@ in~\Log{G2i}. In the proof of \olref[nat][tni]{prop:N2-to-G2}, the translation of \Elim{\land}, \Elim{\lif}, \Elim{\lnot}, \Elim{\lforall} results in~\Cut{} inferences in the resulting -\Log{G2i} !!{proof}. If the \Log{N2i}-!!{proof} we start from, this +$\Log{G2i}+\Cut$ !!{proof}. If the \Log{N2i}-!!{proof} we start from is normal, this can, however, be avoided. -Let's call a list $S_1$, \dots,~$S_n$ of occurrences of sequents in a -\Log{N2i}-!!{proof}~$\delta$ a \emph{branch} if $S_1$ is an axiom, and -whenever $S_i$ is a major premise of an inference, $S_{i+1}$ is its -conclusion. In other words, a branch traces sequents downwards +Let's call a maximal list $S_1$, \dots,~$S_n$ of sequent occurrences +in a \Log{N2i}-!!{proof}~$\delta$ a \emph{branch} if $S_1$ is an +axiom and, for every $i Date: Sun, 29 Nov 2026 10:30:45 +0100 Subject: [PATCH 07/19] proof-theory/propositions-as-types: fix typing rules, proof terms and reduction claims Found in the translations' records of errors of the English (the errata harvest of 28-29 November 2026: GPT-6 Astra, OpenAI, ChatGPT Pro mode, classified every record against 2e19d095 and made this patch; applied here by Claude Opus 5.5, Anthropic, effort max). Each issue with its sources is in ENGLISH_ERRATA_CONSOLIDATED.tsv: - HV-1044 OLP-0690 propositions-as-types.tex:14: The imported proofs-to-terms section explicitly gives the conjunction/product swap proof and its pair of projections; terms-to-proofs also reconstructs that example. The editorial note that no product examples exist is stale. - HV-1045 OLP-0690 propositions-as-types.tex:15: The imported reduction.tex expressly introduces permutation conversions and displays a projection/case commuting conversion as both proof trees and a term equation. Thus an absolute claim that permutations are not covered is ... - HV-1046 OLP-0686 introduction.tex:16: An occurrence already bound by an inner lambda-x keeps its nearer binder. Only occurrences free in the body N become bound by the newly added outer abstraction. - HV-1047 OLP-0686 introduction.tex:20: For (lambda x.lambda y.x)y, naive replacement produces lambda y.y and captures the argument's free y. The correct beta contractum is lambda z.y for fresh z. Explicit capture avoidance is necessary for the stated lambda calculus. - HV-1049 OLP-0686 introduction.tex:39: A type A->B specifies B as codomain, not necessarily the image. A constant function into a two-element B is not onto B but has that function type. Correct both uses of range in this explanation. - HV-1050 OLP-0686 introduction.tex:57: An arbitrary proof of an implication may be the single assumption f:A->B, whose term is f rather than an abstraction. The displayed empty-conclusion-context rule specifically describes implication introduction with no other ... - HV-1051 OLP-0686 introduction.tex:75: The constructor M1 M2 applies a term of type A->B to one of type A. It is not composition of two functions, which requires an additional function type and yields a function. - HV-1052 OLP-0694 sequent-natural-deduction.tex:20: The following purported restatement and both projection trees concern arbitrary A conjunction B. The opening accidentally specializes both occurrences to A conjunction A; restoring B makes the explanation describe its actual ... - HV-1054 OLP-0694 sequent-natural-deduction.tex:115: With D=A or (A->bottom) and B=D->bottom, assume B and A, introduce D, use B to obtain bottom, discharge A, introduce D again, use B again and discharge B. Remove the stray implication and four unmatched parentheses. The two ... - HV-1055 OLP-0688 proof-terms.tex:1: The current chapter lives under proof-theory and is imported by that part driver. This claimed source-header repair updates the stale part-name comment, while retaining the historical int/pty/ter protected identifier used by ... - HV-1056 OLP-0688 proof-terms.tex:13: The supplied grammar and both rule tables have constructors only for implication, product, sum, and bottom. There are no quantified or primitive-negation term constructors, so a correspondence theorem over all first-order N2i ... - HV-1057 OLP-0688 proof-terms.tex:15: N2i contexts are sets of labelled formulas, and the same section explicitly says so a few lines later. The product example shares x across two premises and takes set union, rather than retaining ordered duplicate entries. - HV-1058 OLP-0688 proof-terms.tex:41: The second premise has proof term capital M. The constructor must retain that argument, not an unrelated lowercase m. - HV-1060 OLP-0688 proof-terms.tex:78: The injection constructor is unary and must encode the premise proof N. Omitting its argument loses that proof and contradicts the declared constructor arity. - HV-1061 OLP-0688 proof-terms.tex:113: This grammar clause assumes proof term N but uses an undeclared M with a formula marker. Its injection payload must be that declared N. - HV-1062 OLP-0692 rules-tN2.tex:2: Both term-labelled rule fragments copy Chapter: natural-deduction and Section: rules-N2 from another file. Their actual importing chapter, filenames and captions are propositions-as-types/rules-tN2 and rules-tN3. Correct this ... - HV-1064 OLP-0689 proofs-to-terms.tex:25: A vacuous implication introduction has no discharged occurrence determining its binder name, so lambda x:A.y and lambda z:A.y encode the same sequent derivation. Alpha-equivalence, or an explicit convention fixing every ... - HV-1069 OLP-0697 types.tex:25: This is a sentence adverb introducing an example of the preceding context definition. The source has the demonstrative This where the inferential adverb Thus is required. - HV-1076 OLP-0697 types.tex:70: The noun denotes the family of terms built from the listed constructors and requires the plural terms; singular term lacks a determiner in this sentence. - HV-1078 OLP-0697 types.tex:107: Somethign is a letter-transposition misspelling of something in the explanation of a product type. - HV-1080 OLP-0691 reduction.tex:13: An introduced formula used only as a minor premise of an unrelated elimination is not an introduction/elimination redex. The cancellation argument requires it to be the major premise of the elimination for its introduced ... - HV-1081 OLP-0691 reduction.tex:50: open-logic-config.sty:753 declares pair with two mandatory arguments. The one-group comma form consumes a later token as its missing second argument, rather than producing the intended pair. - HV-1082 OLP-0691 reduction.tex:56: Folloed is a misspelling of followed in the introduction/elimination description. - HV-1083 OLP-0691 reduction.tex:62: The inj macro has one optional type annotation and then two mandatory arguments, index and payload (open-logic-config.sty:756). The source supplies three mandatory groups and consequently misassigns the arguments. - HV-1084 OLP-0691 reduction.tex:63: The three displayed principal beta rules do not include root abort contraction or case permutations. A projection of a neutral case with pair branches can be beta-normal while still admitting the displayed permutation. Define ... - HV-1085 OLP-0691 reduction.tex:94: The payload M has type A_i, while the injection annotation records the other summand. To obtain A1 or A2, that annotation must be A_(3-i), as the preceding typing rules specify. - HV-1086 OLP-0691 reduction.tex:97: The adjacent prepositions of for have no grammatical construction here. Removing of gives the stated beta-reduction rule for sum types. - HV-1088 OLP-0691 reduction.tex:175: In the displayed permutation delta alone proves A_i, before the injection. The case scrutinee M instead needs type A1-or-A2. Assign M to that entire disjunction-introduction proof, leaving the displayed proof trees and valid ... - HV-1089 OLP-0691 reduction.tex:189: The schematic third term repeats M2, inadvertently inserting an identity step into the one-step chain. It should be the next indexed term M3. - HV-1092 OLP-0696 type-preservation.tex:90: Carefuly is a misspelling of carefully in the expressly assigned induction verification. - HV-1093 OLP-0696 type-preservation.tex:91: An occurrence of x may be below additional binders, so its axiom context Gamma-prime can strictly contain Gamma,x:B1. Literal replacement by the bare Gamma proof leaves the tN3 shared-context rules unmatched. Specify local ... - HV-1095 OLP-0696 type-preservation.tex:106: The preceding reduction section includes a projection/case permutation. A projection over a neutral case term with pair-valued branches is beta-normal but still has that permutation step, so failure of full normality does not ... - HV-1096 OLP-0687 normalization.tex:13: The grammar deliberately permits raw terms, and the annotated raw term (lambda x:A.xx)(lambda x:A.xx) has a beta self-loop. The normalization claims require well-typed terms. The chapter concerns the propositional fragment. ... - HV-1097 OLP-0687 normalization.tex:23: The grammar includes primitive bottom as well as propositional variables. Its structural length needs the base case len(bottom)=0; otherwise formulas containing bottom have undefined rank. - HV-1098 OLP-0687 normalization.tex:35: The payload has type A_i and the injection annotation supplies the other summand, A_(3-i). The eliminated sum is A_1 or A_2, so its length is len(A_1)+len(A_2)+1. The source A,B are not bound by this display. - HV-1099 OLP-0687 normalization.tex:40: The preceding prose already defines the zero value for a normal term, so an empty-maximum objection is withdrawn. The actual defect is the scope of the rank: only the three principal beta contractions have been assigned ranks, ... - HV-1101 OLP-0687 normalization.tex:54: Substitution creates a case redex only when the variable being replaced is its scrutinee, so the source index i must be x. The inserted abstraction need not bind x; use an arbitrary fresh binder y. Remove the unmatched closing ... - HV-1102 OLP-0687 normalization.tex:85: A variable is not a redex, and the source only defines cutrank on redexes. The newly exposed projection of a pair has the rank of its product type, namely len(A), with no intermediate cutrank(x). - HV-1105 OLP-0687 normalization.tex:107: A substitution contractum contains redexes inherited from the receiving body, copied wholly from the inserted argument or payload, and newly created at a substitution boundary. Both old sources are proper subterms of the ... - HV-1106 OLP-0687 normalization.tex:127: The source global rank induction is false: the independently typed case/application example in check_beta_rank_context.py has maximum principal-beta rank 1 and exposes a rank-3 application after one case contraction. Replace ... - HV-1107 OLP-0687 normalization.tex:163: The original this means inference moves from existence of a normal form to termination of every strategy. State the existential execution consequence of weak beta normalization and preserve the following separate true ... - HV-1108 OLP-0687 normalization.tex:164: The coordinated predicates halts and produces require the conjunction and; an is an accidental truncation. - HV-1109 OLP-0687 normalization.tex:174: Subtems is a misspelling of subterms in the separate strong-beta-normalization statement. - HV-1111 OLP-0687 normalization.tex:181: The multistep relation includes identity and therefore is not terminating as a binary step relation; SN must refer to one-step beta reduction. The full transported relation cannot support the unqualified confluence claim: ... - HV-1113 OLP-0687 normalization.tex:222: The first projection of pair(O1-prime,O2) selects O1-prime, so the printed endpoint O2 is wrong. Keep the original deliberately illustrative proof (it explicitly says E.g.) and correct this endpoint. The proposition is ... - HV-1114 OLP-0687 normalization.tex:226: Newman requires termination of the generating one-step relation. The source red is explicitly reflexive, so it permits constant infinite chains. State the correct hypothesis for redone_beta and confluence of its reflexive ... - HV-1115 OLP-0687 normalization.tex:230: The source equates both alleged first successors with N, so its descent argument does not descend. Its common descendant also need not be normal, so comparing it directly with normal endpoints cannot establish distinct normal ... Co-Authored-By: Claude Opus 5.5 (cherry picked from commit 39b4ab18206e2e2fd333333940ac19310a5a4bce) --- .../propositions-as-types/introduction.tex | 17 +- .../propositions-as-types/normalization.tex | 171 ++++++++---------- .../propositions-as-types/proof-terms.tex | 17 +- .../propositions-as-types/proofs-to-terms.tex | 7 +- .../propositions-as-types.tex | 3 +- .../propositions-as-types/reduction.tex | 48 +++-- .../propositions-as-types/rules-tN2.tex | 4 +- .../propositions-as-types/rules-tN3.tex | 4 +- .../sequent-natural-deduction.tex | 18 +- .../type-preservation.tex | 27 +-- .../propositions-as-types/types.tex | 6 +- 11 files changed, 162 insertions(+), 160 deletions(-) diff --git a/content/proof-theory/propositions-as-types/introduction.tex b/content/proof-theory/propositions-as-types/introduction.tex index d89080e2..094adb16 100644 --- a/content/proof-theory/propositions-as-types/introduction.tex +++ b/content/proof-theory/propositions-as-types/introduction.tex @@ -13,11 +13,13 @@ The lambda calculus is a simple model of computation. It operates on terms built from variables. If $N$ and $M$ are terms, then $(NM)$ is also a term (``$N$ applied to~$M$''). If $N$ is a term, then -$\lambd[x][N]$ is a term. If $N$ contains the variable~$x$, then the -corresponding occurrences of~$x$ in $\lambd[x][N]$ are bound by the +$\lambd[x][N]$ is a term. If $N$ contains free occurrences of the variable~$x$, then those +occurrences of~$x$ become bound in $\lambd[x][N]$ by the outer $\lambd[x]$ operator, and so are no longer free. A term of the form $(\lambd[x][N]M)$ is said to $\beta$-contract to $\Subst{N}{M}{x}$ -(the result of replacing every free occurrence of $x$ in~$N$ by $M$). +(the result of capture-avoiding replacement of every free occurrence +of $x$ in~$N$ by $M$, first renaming bound variables of~$N$ when +necessary). A term $N$ $\beta$-converts to~$N'$ if $N'$ results from $N$ by $\beta$-contracting a subterm, and we write $N \redone N'$. A computation in the $\lambd$-calculus is a sequence $N \redone N_1 @@ -36,8 +38,8 @@ $(\lambd[x][N]M)$ then is applying the function $\lambd[x][N]$ to an argument~$M$, and $\beta$-contraction tells us how to evaluate it: replace $x$ in $N$ by~$M$ (and keep evaluating the resulting term). -Now think of these as functions with a fixed domain and range. If the -domain of $\lambd[x][N]$ is $A$ and its range~$B$, then we should +Now think of these as functions with a fixed domain and codomain. If the +domain of $\lambd[x][N]$ is $A$ and its codomain~$B$, then we should think of the variable~$x$ as only taking arguments from~$A$ and $N$ as producing values from~$B$. Consequently, $(\lambd[x][N]M)$ only should make sense if $\lambd[x][N]$ is a function $A \to B$, and $M \in A$. @@ -54,7 +56,8 @@ These typing rules now clearly correspond to !!{derivation}s in natural deduction, where the types are represented by !!{formula}s, and the !!{derivation}s themselves to $\lambd$-terms. For instance, -!!a{derivation} of $!A \lif !B$ corresponds to a term +!!a{derivation} of $!A \lif !B$ ending in \Intro{\lif}, with no +remaining open assumptions, corresponds to a term $\lambd[\typeof{x}{!A}][N]$, which has the function type $!A \lif !B$. The inference rules of natural deduction correspond to typing rules in the typed lambda calculus, e.g., @@ -72,7 +75,7 @@ is of type~$!B$, then $\lambd[\typeof{x}{!A}][N]$ is of type~$!A \lif !B$. -The $\Elim\lif$ rule corresponds to the typing rule for composition +The $\Elim\lif$ rule corresponds to the typing rule for application terms, i.e., \[ \AxiomC{$!A \lif !B$} diff --git a/content/proof-theory/propositions-as-types/normalization.tex b/content/proof-theory/propositions-as-types/normalization.tex index d4bb162a..0e11b8ec 100644 --- a/content/proof-theory/propositions-as-types/normalization.tex +++ b/content/proof-theory/propositions-as-types/normalization.tex @@ -10,17 +10,20 @@ \olsection{Normalization} -In this section we prove that, via some reduction order, any deduction -can be reduced to a normal deduction, which is called the -\emph{normalization property}. We will make use of the -propositions-as-types correspondence: we show that every proof term -can be reduced to a normal form; normalization for natural deduction -!!{derivation}s then follows. +This section concerns well-typed terms in the propositional +fragment with $\land$, $\lor$, $\lif$, and $\lfalse$. We distinguish +the principal beta relation $\redone[\beta]$ from the full term +conversion relation $\redone$, which also represents proof +permutations and falsity conversions. First we examine local beta +redex ranks. Full weak normalization follows from the earlier +natural-deduction normalization theorem and the propositions-as-types +correspondence. The standard strong beta normalization property is stated separately +when we discuss computation and confluence. Firstly we define some functions that measure the complexity of terms. The \emph{length}~$\len{!A}$ of !!a{formula}s is defined by \begin{align*} - \len{p} &= 0\\ + \len{p} &= 0,\qquad \len{\lfalse}=0\\ \len{!A \land !B} &= \len{!A} + \len{!B} + 1\\ \len{!A \lor !B} &= \len{!A} + \len{!B} + 1 \\ \len{!A \lif !B} &= \len{!A} + \len{!B} + 1. @@ -32,16 +35,16 @@ \len{!A} + \len{!B} + 1 \\ \cutrank{\ande{i}{\andi{\typeof{M}{!A}}{\typeof{N}{!B}}}} &= \len{!A} + \len{!B} + 1 \\ - \cutrank{\ore{\ori{i}{!A_{i}}{\typeof{M}{!A_i}}} + \cutrank{\ore{\ori{i}{!A_{3-i}}{\typeof{M}{!A_i}}} {\typeof{x_1}{!A_1}}{\typeof{N_1}{!C}} {\typeof{x_2}{!A_2}}{\typeof{N_2}{!C}}} &= - \len{!A} + \len{!B} + 1 + \len{!A_1} + \len{!A_2} + 1 \end{align*} The complexity of a proof term is measured by the most complex -redex in it, and $0$ if it is normal: +principal beta redex in it, and $0$ if it is beta-normal: \[ \maxrank{M} = \max \{\cutrank{N} | N \text{ is a sub term of } M \text{ - and is redex}\} + and is a principal beta redex}\} \] \begin{lem}\ollabel{lem:subst} @@ -51,13 +54,13 @@ \item $M$ is itself a redex, or \item $M$ is of the form $\ande{i}{x}$, and $N$ is of the form $\andi{P_1}{P_2}$ - \item $M$ is of the form $\ore{i}{x_1}{P_1}{x_2}{P_2}$, and $N$ is + \item $M$ is of the form $\ore{x}{x_1}{P_1}{x_2}{P_2}$, and $N$ is of the form $\ori{i}{}{Q}$ \item $M$ is of the form $x Q$, and $N$ is of the form - $\lambd[x][P]$ + $\lambd[y][P]$, after choosing its binder fresh as necessary \end{enumerate} In the first case, $\cutrank{\Subst{M}{N}{x}} = \cutrank{M}$; in the - other cases, $\cutrank{\Subst{M}{N}{x}} = \len{!A})$. + other cases, $\cutrank{\Subst{M}{N}{x}} = \len{!A}$. \end{lem} \begin{proof} Proof by induction on~$M$. @@ -82,8 +85,8 @@ \[ \Subst{M}{N}{x} \ident \Subst{\ande{i}{x}}{\andi{P_1}{P_2}}{x}, \] - which is $\ande{i}{\andi{P_1}{P_2}}$. Its cut rank is equal to - $\cutrank{x}$, which is $\len{!A}$. + which is $\ande{i}{\andi{P_1}{P_2}}$. Its cut rank is the length $\len{!A}$ of the product type + of~$x$. \end{enumerate} \end{enumerate} The cases of $\ore{N}{x_1}{N_1}{x_2}{N_2}$ and $P Q$ are similar. @@ -104,8 +107,9 @@ \item If $M$ is of the form $(\lambd[\typeof{x}{!A}][N])\typeof{Q}{!A}$, then $M'$ is $\Subst{N}{\typeof{Q}{!A}}{\typeof{x}{!A}}$. Consider a redex in - $M'$. Either there is corresponding redex in $N$ with equal cut - rank, which is less than $\cutrank{M}$ by assumption, or the cut + $M'$. Either there is a corresponding redex in $N$ or a copied + redex from $Q$, with equal cut rank, which is less than + $\cutrank{M}$ by assumption; or the cut rank equals $\len{!A}$, which by definition is less than $\cutrank{(\lambd[x^{!A}][N])Q}$. \item If $M$ is of the form @@ -115,8 +119,9 @@ {\typeof{x_2}{!A_2}}{\typeof{N_2}{!C}}, \] then $M' \ident \Subst{N_i}{N}{\typeof{x_i}{!A_i}}$. Consider a - redex in~$M'$. Either there is corresponding redex in $N_i$ with - equal cut rank, which is less than $\cutrank{M}$ by assumption; or + redex in~$M'$. Either there is a corresponding redex in $N_i$ or a copied + redex from $N$, with equal cut rank, which is less than + $\cutrank{M}$ by assumption; or the cut rank equals $\len{!A_i}$, which by definition is less than $\cutrank{\ore{\ori{i}{}{\typeof{N}{!A_i}}} {\typeof{x_1}{!A_1}}{\typeof{N_1}{!C}} @@ -124,44 +129,26 @@ \end{enumerate} \end{proof} -\begin{thm} - All proof terms reduce to normal form; all !!{derivation}s reduce to - normal !!{derivation}s. +\begin{thm}[Full weak normalization] +Every well-typed proof term in the stated propositional fragment has +a full normal form. Every corresponding intuitionistic deduction has +a normal form under the full proof conversions. \end{thm} - \begin{proof} - The second follows from the first. We prove the first by complete - induction on $m=\maxrank{M}$, where $M$ is a proof term. - \begin{enumerate} - - \item If $m=0$, $M$ is already normal. - \item - Otherwise, we proceed by induction on~$n$, the number of - redexes in $M$ with cut rank equal to~$m$. - \begin{enumerate} - \item If $n=1$, select any redex $N$ such that $m = \cutrank{N} > - \cutrank{P}$ for any proper sub-term $P$ which is also a redex - of course. Such a redex must exist, since any term only has - finitely many subterms. - - Let $N'$ denote the reductum of $N$. Now by the lemma - $\maxrank{N'} < \maxrank{N}$, thus we can see that $n$, the - number of redexes with $\cutrank=m$ is decreased. So $m$ is - decreased (by $1$ or more), and we can apply the inductive - hypothesis for~$m$. - \item For the induction step, assume $n>1$. the process is - similar, except that $n$ is only decreased to a positive number - and thus $m$ does not change. We simply apply the induction - hypothesis for~$n$. - \end{enumerate} -\end{enumerate} +Reconstruct the term's natural deduction using its free-variable +context. Apply the earlier normalization theorem for $\Log{N2i}$, +and assign terms to the resulting deductions. By the definition of +the full term conversions, each proof conversion is represented by +the corresponding term conversion. The final deduction and its term +are fully normal. Conversions may discard unused assumptions; +weakening restores any larger ambient typing context. This uses the +previous proof normalization theorem, not the local rank lemma. \end{proof} -The fact that typed $\lambd$-terms normalize means that every such -term \emph{has a normal form}. If we think of $\beta$-reducing -$\lambd$-terms to their normal form as executing a computation and the -normal form as the value of the computation, this means that every -computation in the typed $\lambd$-calculus eventually halts an +A typed $\lambd$-term beta-normalizes if it \emph{has a beta-normal form}. If we think of $\beta$-reducing +$\lambd$-terms to a beta-normal form as executing a computation and the +normal form as the value of the computation, weak beta normalization means that every +computation in the typed $\lambd$-calculus has an execution that halts and produces a value. Moreover, type preservation ensures that the value has the right type. E.g., if $N$ has type $!A \lif !B$ (i.e., it is a function that is supposed to work for arguments of type~$!A$ and @@ -171,36 +158,31 @@ In fact, terms in the typed $\lambd$-calculus don't just reduce to normal forms for one way of applying $\beta$-reductions to subterms, -but \emph{any} way of applying $\beta$-reductions to subtems +but \emph{any} way of applying $\beta$-reductions to subterms eventually terminates in a normal form. This property is called \emph{strong normalization}. It means that not only is there a way to guarantee that a computation eventually halts and produces a value, but \emph{any} way to execute the computation eventually produces a value. -How do we know that different ways of executing a computation produce -the \emph{same} value? So far we just know (from type preservation) -that all values it produces are of the same type. The typed -$\lambd$-calculus has another important property: it is -\emph{confluent} or \emph{Church-Rosser}. If $N \red N_1$ and $N \red -N_2$ then there is some term~$N'$ such that $N_1 \red N'$ and $N_2 \red -N'$. Recall that $N \red N'$ means: $N'$ results from zero or more -$\redone$-reduction steps. If $N_1$ is in normal form then the only -term $N'$ such that $N_1 \red N'$ is $N_1$ itself (via zero -$\redone$-reduction steps). It follows that if $N_1$ and $N_2$ are -both in normal form, then $N_1 = N' = N_2$. In other words, since -$\red$ is strongly normalizing, every way of reducing a term -eventually results in a normal form. Since $\red$ is Church-Rosser, -any two normal forms are equal. Hence, computation in the typed -$\lambd$-calculus always terminates and the value (normal form) is the -same regardless of how the computation proceeds. +Different beta computations of the same well-typed term produce +the same normal form, up to renaming bound variables. The one-step +relation $\redone[\beta]$ is strongly normalizing, and its reflexive +transitive closure $\red[\beta]$ is confluent: if +$N\red[\beta]N_1$ and $N\red[\beta]N_2$, there is an $N'$ with +$N_1\red[\beta]N'$ and $N_2\red[\beta]N'$. If both descendants +are beta-normal, these last reductions take zero steps, so the two +normal forms are equal up to bound-variable renaming. Termination +concerns one-step reduction, not its reflexive closure. We prove +confluence below for beta reduction only; no confluence assertion for +the larger full proof-conversion relation is needed. Proving that a relation is confluent is typically difficult. However, we can easily establish the following weaker condition: -\begin{prop}[Weak Church-Rosser Property] -If $N \redone N_1$ and $N \redone N_2$ then there is a term $N'$ such -that $N_1 \red N'$ and $N_2 \red N'$. +\begin{prop}[Weak Church-Rosser Property for beta reduction] +If $N \redone[\beta] N_1$ and $N \redone[\beta] N_2$ then there is a term $N'$ such +that $N_1 \red[\beta] N'$ and $N_2 \red[\beta] N'$. \end{prop} \begin{proof} @@ -219,36 +201,29 @@ subterm of $O_1$, then converting $M_2$ results in $O_1'$. So converting $M_1$ first and then $M_2$ results in $O_1'$. But converting $M_2$ first results in $\proj{1}{\pair{O_1'}{O_2}}$ and - this reduces also to~$O_2$. + this reduces also to~$O_1'$. \end{proof} \begin{lem}[Newman's Lemma] -If $\red$ is strongly normalizing and has the weak Church-Rosser -property, it is confluent. +If a one-step relation $\redone[\beta]$ is strongly normalizing +and has the weak Church-Rosser property, its reflexive transitive +closure $\red[\beta]$ is confluent. \end{lem} \begin{proof} - Since $\red$ is strongly normalizing, any reduction sequence results - in a normal form. Normal forms are unique iff $\red$ is confluent. - So suppose some term $N$ has two distinct normal forms $N'$ and - $N''$, the result of reduction sequences - \begin{align*} - N & = N_1' \redone N_2' \redone \dots \redone N_k' = N' \text{ and}\\ - N & = N_1'' \redone N_2'' \redone \dots \redone N_l'' = N'' - \end{align*} - (The reduction sequence must have length $>0$ since otherwise $N$ - would already be in normal form.) - - If $N_1' = N_1''$ then it has two distinct normal forms ($N'$ and - $N''$). If $N_1' \neq N_1''$ then by weak Church-Rosser there is - some $N'''$ such that $N_1' \red N'''$ and $N_1'' \red N'''$. Since - $N' \neq N''$, either $N''' \neq N'$ or $N''' \neq N''$. - Consequently, either $N_1'$ or $N_1''$ has two distinct normal - forms. We've shown that if $N$ has two distinct normal forms, there - is an $N_1$ such that $N \redone N_1$ and $N_1$ has two distinct - normal forms. Obviously we can keep going and produce $N \redone N_1 - \redone N_2 \redone \dots$, but this is impossible because $\redone$ - is strongly normalizing. +Strong normalization guarantees that every term has a normal form. +We prove uniqueness of normal forms by well-founded induction on the +one-step descendants of~$N$. Suppose $N$ reduces to normal forms +$U$ and $V$. If $N$ is already normal, both equal $N$. Otherwise +the two reductions begin with actual steps +$N\redone[\beta]N_1$ and $N\redone[\beta]N_2$. +Weak Church-Rosser gives a common descendant $Q$ of $N_1$ and $N_2$. +By strong normalization reduce $Q$ to a normal form $W$. +The induction hypothesis at the proper descendants $N_1$ and $N_2$ +gives $U=W$ and $V=W$, respectively. This proves uniqueness. +Finally any two descendants of $N$ can themselves be reduced to +normal forms. Their normal forms are also normal forms of $N$, so +they agree and give the required common descendant. \end{proof} diff --git a/content/proof-theory/propositions-as-types/proof-terms.tex b/content/proof-theory/propositions-as-types/proof-terms.tex index ce6f1314..e77228bf 100644 --- a/content/proof-theory/propositions-as-types/proof-terms.tex +++ b/content/proof-theory/propositions-as-types/proof-terms.tex @@ -1,4 +1,4 @@ -% part: intuitionistic-logic +% part: proof-theory % chapter: propositions-as-types % section: proof-terms @@ -10,9 +10,16 @@ \olsection{Proof Terms} +In this chapter the proof-term correspondence is restricted to the +propositional fragment with $\lif$, $\land$, $\lor$, and $\lfalse$; +negation is treated as the abbreviation $\lnot !A\equiv(!A\lif\lfalse)$. +The term-labelled propositional systems in the tables are +\Log{tN2ip} and \Log{tN3ip}; we abbreviate these names as +\Log{tN2i} and \Log{tN3i} in the prose. + We label assumptions in \Log{N1i} with variables (e.g., $!A^x$) as discharge labels. In \Log{N2i}, every sequent $\Gamma \Sequent !A$ -has a list of variable--!!{formula} pairs in the context~$\Gamma$ on +has a compatible set of variable--!!{formula} pairs in the context~$\Gamma$ on the left. Thus, in \Log{N2i}, every sequent in !!a{proof} carries not only the information what the !!{proof} so far has !!{prove}d (i.e., $!A$), but also which assumptions are open at each point (i.e., @@ -38,7 +45,7 @@ \Axiom$\Gamma_1 \fCenter N: !A$ \Axiom$\Gamma_2 \fCenter M: !B$ \RightLabel{\Intro{\land}} -\BinaryInf$\Gamma_1, \Gamma_2 \fCenter c^\land(N, m) : !A \land !B $ +\BinaryInf$\Gamma_1, \Gamma_2 \fCenter c^\land(N, M) : !A \land !B $ \DisplayProof \quad \Axiom$\Gamma \fCenter N: !A \land !B$ @@ -75,7 +82,7 @@ \[ \Axiom$\Gamma \fCenter N:!A$ \RightLabel{\Intro{\lor}[1]} -\UnaryInf$\Gamma \fCenter c^{\lor{!B}}_1:!A \lor !B$ +\UnaryInf$\Gamma \fCenter c^{\lor{!B}}_1(N):!A \lor !B$ \DisplayProof \quad \Axiom$\Gamma \fCenter N:\lfalse$ @@ -110,7 +117,7 @@ \item If $N$ is a proof term, then $\proj{i}{N}$ is also a proof term, where $i$ is $1$ or~$2$~(\Elim\land[i]). \item If $N$ is a proof term, and $!A$ is a formula, then - $\inj[!A]{i}{!M}$ is a proof term, where $i$ is $1$ or~$2$~(\Intro\lor[i]). + $\inj[!A]{i}{N}$ is a proof term, where $i$ is $1$ or~$2$~(\Intro\lor[i]). \item If $M$, $N_1$, $N_2$ are proof terms, and $x_1$, $x_2$ are variables, then $\dcase{M}{x_1}{N_1}{x_2}{N_2}$ is a proof term~(\Elim\lor). diff --git a/content/proof-theory/propositions-as-types/proofs-to-terms.tex b/content/proof-theory/propositions-as-types/proofs-to-terms.tex index ff5d4775..32ff51ab 100644 --- a/content/proof-theory/propositions-as-types/proofs-to-terms.tex +++ b/content/proof-theory/propositions-as-types/proofs-to-terms.tex @@ -20,9 +20,12 @@ the rules of \Log{tN2i}. \begin{prop} -Every !!{proof}~$\delta$ of $\Gamma \Sequent !A$ in \Log{N2i} +Every !!{proof}~$\delta$ of $\Gamma \Sequent !A$ in the stated +propositional fragment of \Log{N2i} corresponds to !!a{proof}~$\delta'$ of $\Gamma \Sequent N : !A$ in -\Log{tN2i}. The proof term $N$ is uniquely determined by~$\delta$. +\Log{tN2i}. The proof term $N$ is determined by~$\delta$ up to consistent +renaming of bound variables; fixing all discharge labels, including +vacuous ones, fixes a representative. \end{prop} \begin{proof} diff --git a/content/proof-theory/propositions-as-types/propositions-as-types.tex b/content/proof-theory/propositions-as-types/propositions-as-types.tex index 9948d01b..7c8a967d 100644 --- a/content/proof-theory/propositions-as-types/propositions-as-types.tex +++ b/content/proof-theory/propositions-as-types/propositions-as-types.tex @@ -11,8 +11,7 @@ This is a \emph{very experimental} draft of a chapter on the Curry--Howard correspondence. It needs more explanation and motivation, and there are probably errors and omissions. The proof - of normalization should be reviewed and expanded. There are no - examples for the product type. Permutation and simplification + of normalization should be reviewed and expanded. More examples for the product type would be useful. Permutation conversions have only one example, and simplification conversions are not covered. It will make a lot more sense once there is also material on the (typed) lambda calculus which is basically presupposed here. Use with extreme caution. diff --git a/content/proof-theory/propositions-as-types/reduction.tex b/content/proof-theory/propositions-as-types/reduction.tex index 27836b02..b4aa59c1 100644 --- a/content/proof-theory/propositions-as-types/reduction.tex +++ b/content/proof-theory/propositions-as-types/reduction.tex @@ -10,8 +10,8 @@ \olsection{Reduction} -In natural deduction !!{derivation}s, !!a{introduction} rule that is -followed by !!a{elimination} rule is a detour that can be ``reduced''. +In natural deduction !!{derivation}s, an !!{introduction} rule whose conclusion is immediately used as +the major premise of the corresponding !!{elimination} rule is a detour that can be ``reduced''. For instance, an $\Intro{\land}$ followed by $\Elim{\land}$ ``cancel out,'' since the conclusion of $\Elim{\land}$ is always one of the conjuncts of the conjunction that \Intro{\land} produces, and the @@ -47,20 +47,31 @@ the proof term for the proof on the left reduces (in one step) to the proof term for the proof on the right: \[ - \proj{i}{\pair{N_1, N_2}} \redone N_i + \proj{i}{\pair{N_1}{N_2}} \redone[\beta] N_i \] In the typed lambda calculus, this is the \emph{beta reduction} rule for the product type. In natural deduction, a pair of inferences such as a \Intro{\land} -folloed by \Elim{\land}, i.e., a pair that is subject to reduction, is +followed by \Elim{\land}, i.e., a pair that is subject to reduction, is called a \emph{cut}. In the typed lambda calculus the term on the left of $\redone$ is called a \emph{redex}, and the term to the right is called the \emph{reductum}. Unlike untyped lambda calculus, where only $(\lambd[x][N])Q$ is considered to be redex, in the typed lambda calculus the syntax is extended to terms involving $\pair{N}{M}$, -$\proj{i}{N}$, $\inj{i}{!A}{N}$, $\dcase{N}{x_1}{M_1}{x_2}{M_2}$, and -$\abort{!A}{N}$, with corresponding redexes. +$\proj{i}{N}$, $\inj[!A]{i}{N}$, $\dcase{N}{x_1}{M_1}{x_2}{M_2}$, and +$\abort{!A}{N}$. +We write $\redone[\beta]$ for the compatible closure of the three +principal beta contractions: application of an abstraction, projection +of a pair, and case analysis of an injection. The abort constructor +has no root beta contraction. + +The undecorated relation $\redone$ will denote the larger relation +transported from the propositional \Log{N2i} proof conversions, +including their permutation and falsity conversions. Thus every beta +step is a step of~$\redone$, but the converse need not hold. All +substitutions and conversions avoid capture, with bound variables +renamed as needed. Similarly we have reduction for disjunction: \begin{gather*} @@ -91,10 +102,10 @@ \end{gather*} This corresponds to a reduction on proof terms: \begin{gather*} - \dcase{\inj[!A_i]{i}{M}}{x_1}{N_1}{x_2}{N_2} \redone \Subst{N_i}{M}{x_i} + \dcase{\inj[!A_{3-i}]{i}{M}}{x_1}{N_1}{x_2}{N_2} \redone[\beta] \Subst{N_i}{M}{x_i} \end{gather*} where $M$ is the proof term of~$\delta$, and $N_i$ is the proof term -of~$\delta_i$. This is the beta reduction rule of for sum types. +of~$\delta_i$. This is the beta reduction rule for sum types. Here, $\Subst{M}{N_i}{x}$ means replacing all free occurrences of the variable~$x$ in $M$ by~$N_i$. @@ -126,7 +137,7 @@ For proof terms, this amounts to ordinary beta reduction: \begin{gather*} (\lambd[\typeof{x}{!A}][N]M) - \redone \Subst{N}{M}{x} + \redone[\beta] \Subst{N}{M}{x} \end{gather*} In addition to reduction conversions on !!{proof}s, we can consider @@ -172,7 +183,8 @@ \TrinaryInfC{$!C_i$} \DisplayProof \end{multline*} -If the proof terms of $\delta$, $\delta_1$, and $\delta_2$ are $M$, +If the proof terms of the entire disjunction-introduction proof, +$\delta_1$, and $\delta_2$ are $M$, $N_1$, and $N_2$, respectively, the corresponding reduction rule for proof terms, i.e., $\lambd$ terms, is: \[ @@ -182,16 +194,18 @@ Of course we can eliminate detours not just at the ends of !!{proof}s, but also within !!{proof}s, by applying the reduction conversion to a -sub-!!{proof} ending in a detour. Similarly, $\beta$-reduction applies -to subterms of $\lambd$-terms. If $N$ is a subterm of $M$, $N \redone +sub-!!{proof} ending in a detour. Each declared term-conversion relation is closed under +replacement of subterms. If $N$ is a subterm of $M$, $N \redone N'$, we can replace the subterm $N$ in~$M$ by $N'$ to obtain $M'$. In that case we also write $M \redone M'$. If there is a sequence $M = M_1 -\redone M_2 \redone M_2 \redone \dots \redone M_k = M'$ (including +\redone M_2 \redone M_3 \redone \dots \redone M_k = M'$ (including where $k=1$, i.e., $M = M'$) we write $M \red M'$. -A !!{proof} where no conversion can be applied to any sub-!!{proof} -is called \emph{normal}. Similarly, a $\lambd$-term where no -conversion can be applied (to any sub-term) is called \emph{normal}. A -normal $\lambd$-term is also called a \emph{normal form}. +Write $\red[\beta]$ for zero or more beta steps. A term is +\emph{beta-normal} if no $\redone[\beta]$ step applies. A proof, or +its corresponding term, is \emph{fully normal} if none of the full +proof conversions applies; for terms this means no $\redone$ step. +These notions differ in the presence of permutations or falsity +conversions. \end{document} diff --git a/content/proof-theory/propositions-as-types/rules-tN2.tex b/content/proof-theory/propositions-as-types/rules-tN2.tex index da36716f..7add0d27 100644 --- a/content/proof-theory/propositions-as-types/rules-tN2.tex +++ b/content/proof-theory/propositions-as-types/rules-tN2.tex @@ -1,6 +1,6 @@ % Part: proof-theory -% Chapter: natural-deduction -% Section: rules-N2 +% Chapter: propositions-as-types +% Section: rules-tN2 \documentclass[../../../include/open-logic-section]{subfiles} diff --git a/content/proof-theory/propositions-as-types/rules-tN3.tex b/content/proof-theory/propositions-as-types/rules-tN3.tex index e7b48d15..4079f32b 100644 --- a/content/proof-theory/propositions-as-types/rules-tN3.tex +++ b/content/proof-theory/propositions-as-types/rules-tN3.tex @@ -1,6 +1,6 @@ % Part: proof-theory -% Chapter: natural-deduction -% Section: rules-N2 +% Chapter: propositions-as-types +% Section: rules-tN3 \documentclass[../../../include/open-logic-section]{subfiles} diff --git a/content/proof-theory/propositions-as-types/sequent-natural-deduction.tex b/content/proof-theory/propositions-as-types/sequent-natural-deduction.tex index 54f1aa36..4d4abb00 100644 --- a/content/proof-theory/propositions-as-types/sequent-natural-deduction.tex +++ b/content/proof-theory/propositions-as-types/sequent-natural-deduction.tex @@ -17,9 +17,9 @@ We write $\Gamma, !A_1, \dots, !A_n$ for $\Gamma \cup \{!A_1, \dots, !A_n\}$, and $\Gamma, \Delta$ for $\Gamma \cup \Delta$. -Observe that when we have $\Gamma \Sequent !A \land !A$, meaning we +Observe that when we have $\Gamma \Sequent !A \land !B$, meaning we have !!a{derivation} with $\Gamma$ as !!{undischarged} assumptions and -$!A \land !A$ as end-!!{formula}, then by applying $\Elim{\land}$ at +$!A \land !B$ as end-!!{formula}, then by applying $\Elim{\land}$ at the bottom, we can get !!a{derivation} with the same !!{undischarged} assumptions and $!A$ as conclusion. In other words, if $\Gamma \Sequent !A \land !B$, then $\Gamma \Sequent !A$. @@ -113,14 +113,14 @@ assumptions from which it was !!{derive}d. \begin{prooftree} + \Axiom$!B \fCenter !B$ + \Axiom$!B \fCenter !B$ \Axiom$!A \fCenter !A$ - \UnaryInf $!A \fCenter !A \lor (!A \lif \lfalse)$ - \Axiom $!B \fCenter !B$ - \BinaryInf$!A, !B\lif \fCenter \lfalse$ - \UnaryInf$(!B \fCenter !A \lif \lfalse$ - \UnaryInf$( !B \fCenter !A \lor (!A \lif \lfalse)$ - \Axiom$(!B \fCenter !B$ - \BinaryInf$(!B \fCenter \lfalse$ + \UnaryInf$!A \fCenter !A \lor (!A \lif \lfalse)$ + \BinaryInf$!A, !B \fCenter \lfalse$ + \UnaryInf$!B \fCenter !A \lif \lfalse$ + \UnaryInf$!B \fCenter !A \lor (!A \lif \lfalse)$ + \BinaryInf$!B \fCenter \lfalse$ \UnaryInf$\fCenter !B \lif \lfalse$ \end{prooftree} where $!B$ is short for $(!A \lor (!A \lif \lfalse))\lif \lfalse$. diff --git a/content/proof-theory/propositions-as-types/type-preservation.tex b/content/proof-theory/propositions-as-types/type-preservation.tex index 2e0eca06..71b1d2b8 100644 --- a/content/proof-theory/propositions-as-types/type-preservation.tex +++ b/content/proof-theory/propositions-as-types/type-preservation.tex @@ -14,11 +14,10 @@ defined directly for the systems \Log{tN2i} and \Log{tN3i}. The system \Log{tN3i} defines the type of a $\lambd$-term~$N$ relative to the context~$\Gamma$ as the !!{formula}~$!A$ such that $\Gamma \Sequent N -: !A$ has !!a{proof} in \Log{tN3i}. The fact that the -$\beta$-reduction rules for $\lambd$-terms exactly mirror the -reduction and permutation conversions of !!{proof}s has an important -consequence: the type of a $\lambd$-term relative to a -context~$\Gamma$ remains the same after $\beta$-conversion. This +: !A$ has !!a{proof} in \Log{tN3i}. The declared term-conversion relation mirrors the corresponding +proof conversions. Consequently the type of a term relative to +$\Gamma$ is preserved by those conversions, and in particular by its +beta-reduction subrelation. This property is called \emph{type preservation}. \begin{prop} @@ -87,10 +86,12 @@ \end{multline*} Again the proof term of the !!{proof} on the right is exactly the result of $\beta$-reducing the proof term of the !!{proof} on the - left. Of course one would have to carefuly verify (by induction on - the height of~$\delta_2$) that if we replace all axioms of the form - $\Gamma' \Sequent x:!B_1$ in~$\delta_2$ by the !!{proof}~$\delta_3$ - of $\Gamma \Sequent M:!B_1$ actually results in !!a{proof} + left. Of course one would have to carefully verify (by induction on + the height of~$\delta_2$) that, after renaming the abstraction's bound variable~$x$ and + the intervening binders fresh for~$\Gamma$ and~$M$, replacing each + axiom $\Gamma'\Sequent x:!B_1$ by a copy of~$\delta_3$ weakened + from~$\Gamma$ to $\Gamma'\setminus\{x:!B_1\}$, and deleting + $x:!B_1$ from every affected context, results in !!a{proof} $\Subst{\delta_2}{\delta_3}{x:!B_1}$ of $\Gamma \Sequent \Subst{N}{M}{x} : !B_2$. \end{proof} @@ -103,11 +104,11 @@ \Sequent M: !B$) to which a conversion can be applied. If $N \redone N'$ by replacing $M$ by its reductum, the corresponding result of applying the reduction to~$\delta$ is !!a{proof} of $\Gamma \Sequent -N' : !A$. Hence every $\lambd$-term not in normal form $\beta$-reduces -to another. This property is called \emph{progress}. +N' : !A$. Hence every $\lambd$-term not in normal form has a term-conversion +step. This property is called \emph{progress}. -Progress together with type preservation ensure that $\beta$-reduction -of $\lambd$-terms never ``gets stuck'': if a term is well-typed and +Progress together with type preservation ensure that the declared +conversions of $\lambd$-terms never ``gets stuck'': if a term is well-typed and isn't in normal form, it reduces to another well-typed term (and that term is of the same type). diff --git a/content/proof-theory/propositions-as-types/types.tex b/content/proof-theory/propositions-as-types/types.tex index 519d0df7..0cdd2e96 100644 --- a/content/proof-theory/propositions-as-types/types.tex +++ b/content/proof-theory/propositions-as-types/types.tex @@ -22,7 +22,7 @@ \end{defn} Note that the definition does not require that $\Gamma$ contains -$x:!A$ \emph{only} for free variables of~$N$. This, e.g., $\Gamma = +$x:!A$ \emph{only} for free variables of~$N$. Thus, e.g., $\Gamma = \{x:!A, y:!B, z:!C\}$ is a context for $\pair{x}{y}$. \begin{defn}\ollabel{defn:type} @@ -67,7 +67,7 @@ Proof terms are terms in a version of the $\lambd$-calculus, the \emph{typed $\lambd$-calculus with products, sums, and empty type}. The -classical $\lambd$-calculus only has term built from variables, +classical $\lambd$-calculus only has terms built from variables, \emph{$\lambd$-abstracts}~$\lambd[x][N]$ and application $(MN)$, and it lacks the annotation by~$!A$ of the typed $\lambd$-abstract $\lambd[\typeof{x}{!A}][N]$. The $\lambd$-calculus is a model of @@ -104,7 +104,7 @@ intuitively name the right sort of thing, provided the terms it is applied to name certain things. E.g., ``if $N_1 : !A$ and $N_2 : !B$, then $\pair{N_1}{N_2} : !A \land !B$'' says that if $N_1$ names -somethign of type~$!A$ and $N_2$ names something of type~$!B$, then +something of type~$!A$ and $N_2$ names something of type~$!B$, then $\pair{N_1}{N_2}$ names something of type $!A \land !B$. \end{document} From 24bfa8724ec976ba0a565da34351e659ce38f869 Mon Sep 17 00:00:00 2001 From: KokunoYumeto <208192274+KokunoYumeto@users.noreply.github.com> Date: Sun, 29 Nov 2026 10:30:48 +0100 Subject: [PATCH 08/19] lambda-calculus/introduction: fix substitution and combinator computations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found in the translations' records of errors of the English (the errata harvest of 28-29 November 2026: GPT-6 Astra, OpenAI, ChatGPT Pro mode, classified every record against 2e19d095 and made this patch; applied here by Claude Opus 5.5, Anthropic, effort max). Each issue with its sources is in ENGLISH_ERRATA_CONSOLIDATED.tsv: - HV-1837 OLP-0344 syntax.tex:39: minor prose typo: here the illustration is introduced by For example. - HV-1838 OLP-0344 syntax.tex:64: An occurrence is bound only by a lambda binding that same variable; another variable can occur freely within the scope. The source own following example has y inside lambda z yet free. / कोणत्याही lambda च्या व्याप्तीत असणे ... - HV-1840 OLP-0345 reduction.tex:61: Both occurrences contain an extra closing parenthesis inside the abstraction body, so the displayed lambda expression is not well formed. - HV-1842 OLP-0347 currying.tex:13: Singular count noun function needs an article here. - HV-1843 OLP-0347 currying.tex:44: The shown intermediate lambda y.M captures a free y of M unless the binder is renamed. For M=y and N=z the displayed intermediate reduces to z, whereas capture-avoiding K y z reduces to y. The general sequence also needs the ... - HV-1844 OLP-0347 currying.tex:56: Multline breakच्या दोन्ही बाजूला one-step arrow आहे; मधे कोणतेही पद नाही. config651–661 confirms each bredone renders a beta one-step arrow. / Consecutive arrows lack an intervening term; P is undefined although the declared ... - HV-1845 OLP-0347 currying.tex:63: The body introduced throughout this derivation is N; P is unintroduced. Input already has N. / या construction मध्ये body N आहे; P अनपेक्षित व अपरिभाषित. / Consecutive arrows lack an intervening term; P is undefined although ... - HV-1846 OLP-0348 lambda-definability.tex:21: The whole lambda expression also includes the binding occurrence of x; n counts occurrences in the body, not the entire written term. / पूर्ण lambda termमध्ये binderचा x सुद्धा येतो; intended count हा bodyमध्ये n occurrences ... - HV-1847 OLP-0348 lambda-definability.tex:30: The arguments and all subsequent clauses have arity k, not the otherwise unrelated n. Input already has k. / दाखवलेली सर्व आदाने व पुढील निर्देशांक k संख्या दर्शवतात; n स्वतंत्र arity अनपेक्षित. / The displayed k arguments ... - HV-1848 OLP-0348 lambda-definability.tex:37: A comma separates F from its first argument where the term application is required. Input already has application spacing. / स्वल्पविरामाने termsची सूची तयार होते; defined-case प्रमाणे F ला तीच आदाने उपयोजलेले पद आवश्यक. / The ... - HV-1849 OLP-0349 lambda-computable.tex:21: The one-argument num macro receives m alone, leaving the subscript outside the numeral overline; this differs from the correctly grouped term later in the same proof. - HV-1850 OLP-0349 lambda-computable.tex:31: minor prose typo: of omitted after sequence. - HV-1851 OLP-0351 basic-pr-lambda.tex:17: The zero function is unary (explicitly Zero(x)=0 in OLP0294). The proposed term is the numeral zero itself; applied to any argument it reduces to lambda y.y, not to numeral zero. / The earlier Zero is unary, whereas the ... - HV-1852 OLP-0351 basic-pr-lambda.tex:20: Delete the comma separating the subject from its verb. - HV-1853 OLP-0352 composition.tex:27: This roadmap leaves unspecified how partiality is preserved; the later literal-composition construction can erase divergence. Applying a total output decoder to an undefined search is not automatically strict, so the chapter ... - HV-1854 OLP-0353 primitive-recursion.tex:14: The requested term must be F; the step index is x, not z; the initial parameterized equations need the original representing terms G′/H′, while the later absorbed G/H are different terms; v already represents the previous ... - HV-1855 OLP-0353 primitive-recursion.tex:98: S was not defined as the successor term. - HV-1856 OLP-0353 primitive-recursion.tex:129: The induction hypothesis identifies the nth iterate with its pair in the transition to the third displayed line; the second-to-last line instead unfolds T and pairing. / The induction hypothesis is used on displayed line 3, ... - HV-1857 OLP-0354 fixed-point-combinator.tex:13: Literal construction requires x not free in g. Otherwise the abstraction captures occurrences belonging to the given term. - HV-1858 OLP-0355 minimization.tex:33: Only lambda-definability is assumed in the lemma; primitive recursiveness is unsupported. / The lemma assumes lambda-definability, not primitive recursiveness. - HV-1859 OLP-0355 minimization.tex:39: The earlier base-functions unit defines the successor term as Succ; identify S as that term rather than silently treating a new symbol as defined. / S is undefined in the chapter. Co-Authored-By: Claude Opus 5.5 (cherry picked from commit 7bea7b5832502eff10230e2a8fa56227175cbe48) --- .../introduction/basic-pr-lambda.tex | 6 +- .../introduction/composition.tex | 8 ++- .../introduction/computable-lambda.tex | 25 ++++---- .../lambda-calculus/introduction/currying.tex | 12 ++-- .../introduction/fixed-point-combinator.tex | 3 +- .../introduction/lambda-computable.tex | 5 +- .../introduction/lambda-definability.tex | 6 +- .../introduction/minimization.tex | 57 +++++++++++++++---- .../introduction/primitive-recursion.tex | 40 +++++++------ .../introduction/reduction.tex | 4 +- .../lambda-calculus/introduction/syntax.tex | 6 +- 11 files changed, 113 insertions(+), 59 deletions(-) diff --git a/content/lambda-calculus/introduction/basic-pr-lambda.tex b/content/lambda-calculus/introduction/basic-pr-lambda.tex index c07ae88f..48038f36 100644 --- a/content/lambda-calculus/introduction/basic-pr-lambda.tex +++ b/content/lambda-calculus/introduction/basic-pr-lambda.tex @@ -14,10 +14,10 @@ \end{lem} \begin{proof} -$\Zero$ is just -$\lambd[x][\lambd[y][y]]$. +$\Zero$ is !!{lambda defined} by +$\lambd[z][\lambd[x][\lambd[y][y]]]$. -The successor function~$\Succ$, is +The successor function~$\Succ$ is defined by $\fn{Succ}(u) = \lambd[x][\lambd[y][x(uxy)]]$. You should think about why this works; for each numeral $\num{n}$, thought of as an iterator, and each function~$f$, $\fn{Succ}(\num{n},f)$ is a function that, diff --git a/content/lambda-calculus/introduction/composition.tex b/content/lambda-calculus/introduction/composition.tex index f150e14d..b5754bcc 100644 --- a/content/lambda-calculus/introduction/composition.tex +++ b/content/lambda-calculus/introduction/composition.tex @@ -14,6 +14,9 @@ \end{lem} \begin{proof} +We first prove this for total component functions. The general +partial case follows from the independent computability equivalence +completed in \olref[min]{sec}. Suppose $f$ is defined by composition from $h$, $g_0,$ \dots,~$g_{k-1}$. Assuming $h$, $g_0$, \dots,~$g_{k-1}$ are !!{lambda defined} by $H$, $G_0$, \dots,~$G_{k-1}$, @@ -24,7 +27,10 @@ \dots, G_{k-1}(x_0, \dots, x_{l-1})). \] In other words, the language of the lambda calculus is well suited to -represent composition. +represent composition for total components. For partial components +this term alone need not work: a constant-zero outer term can erase +a nonnormalizing inner term, although strict numeric composition is +then undefined. \end{proof} \end{document} diff --git a/content/lambda-calculus/introduction/computable-lambda.tex b/content/lambda-calculus/introduction/computable-lambda.tex index c99cdf1c..36089b2a 100644 --- a/content/lambda-calculus/introduction/computable-lambda.tex +++ b/content/lambda-calculus/introduction/computable-lambda.tex @@ -15,16 +15,21 @@ \end{thm} \begin{proof} -We need to show that every partial computable function~$f$ is -!!{lambda defined} by a lambda term~$F$. By Kleene's normal form -theorem, it suffices to show that every primitive recursive function -is !!{lambda defined} by a lambda term, and then that the functions -!!{lambda definable} are closed under suitable compositions and -unbounded search. To show that every primitive recursive function is -!!{lambda defined} by a lambda term, it suffices to show that the -initial functions are !!{lambda definable}, and that the partial -functions that are !!{lambda definable} are closed under -composition, primitive recursion, and unbounded search. +By Kleene's normal form theorem, for every partial computable +function~$f$ there are primitive recursive functions $r$ and $u$ such +that $f(\vec x)\simeq u(\umin{t}{r(\vec x,t)})$. First we represent +the initial functions and prove closure under composition and +primitive recursion for \emph{total} functions. This supplies terms +for $r$ and $u$. We then implement a search that returns the decoded +value $u(t)$ only in its successful branch; the construction at the +end of \olref[min]{sec} also proves that an unsuccessful search has +no normal form. This proves the theorem without assuming that +ordinary lambda application preserves undefinedness. + +After this construction, the general partial closure results follow +from the computability of lambda-definable functions +(\olref[cmp]{thm:lambda-computable}) and the corresponding strict +closure operations on partial computable functions. \end{proof} We will use a more conventional notation to make the rest of the proof diff --git a/content/lambda-calculus/introduction/currying.tex b/content/lambda-calculus/introduction/currying.tex index 2c1422c0..ecf49b9c 100644 --- a/content/lambda-calculus/introduction/currying.tex +++ b/content/lambda-calculus/introduction/currying.tex @@ -10,7 +10,7 @@ \olsection{Currying} A $\lambd$-abstract $\lambd[x][M]$ represents a function of one -argument, which is quite a limitation when we want to define function +argument, which is quite a limitation when we want to define a function accepting multiple arguments. One way to do this would be by extending the $\lambd$-calculus to allow the formation of pairs, triples, etc., in which case, say, a three-place function @@ -41,7 +41,8 @@ accepts an argument~$x$ and returns the function~$\lambd[y][x]$. The function $\lambd[y][x]$ accepts another argument~$y$, but drops it, and always returns~$x$. Let's see what happens when we apply -$\lambd[x][\lambd[y][x]]$ to two arguments: +$\lambd[x][\lambd[y][x]]$ to two arguments, choosing $y$ not free +in $M$ by renaming the bound variable first if necessary: \begin{align*} (\lambd[x][\lambd[y][x]])MN \bredone & (\lambd[y][M])N \\ @@ -51,16 +52,17 @@ In general, to write a function with parameters $x_1$, \dots,~$x_n$ defined by some term~$N$, we can write $\lambd[x_1][\lambd[x_2][\ldots\lambd[x_n][N]]]$. If we apply $n$ arguments -to it we get: +to it, first choose the $x_i$ pairwise distinct and not free in any +$M_j$, renaming bound variables as necessary. Then we get: \begin{multline*} - (\lambd[x_1][\lambd[x_2][\ldots\lambd[x_n][N]]]) M_1 \dots M_n \bredone\\ + (\lambd[x_1][\lambd[x_2][\ldots\lambd[x_n][N]]]) M_1 \dots M_n\\ \begin{aligned} \bredone {} & (\Subst{(\lambd[x_2][\ldots\lambd[x_n][N]])}{M_1}{x_1}) M_2 \dots M_n\\ \eqs {} & (\lambd[x_2][\ldots\lambd[x_n][\Subst{N}{M_1}{x_1}]]) M_2 \dots M_n \\ \vdots & \\ - \bredone {} &\Subst{\Subst{P}{M_1}{x_1}\ldots}{M_n}{x_n} + \bredone {} &\Subst{\Subst{N}{M_1}{x_1}\ldots}{M_n}{x_n} \end{aligned} \end{multline*} The last line literally means substituting $M_i$ for $x_i$ in the body diff --git a/content/lambda-calculus/introduction/fixed-point-combinator.tex b/content/lambda-calculus/introduction/fixed-point-combinator.tex index dff80dcf..65f9ebfe 100644 --- a/content/lambda-calculus/introduction/fixed-point-combinator.tex +++ b/content/lambda-calculus/introduction/fixed-point-combinator.tex @@ -10,7 +10,8 @@ \olsection{Fixed-Point Combinators} Suppose you have a lambda term $g$, and you want another term $k$ with -the property that $k$ is $\beta$-equivalent to $gk$. Define terms +the property that $k$ is $\beta$-equivalent to $gk$. Choose $x$ not free in +$g$, and define terms \[ \fn{diag}(x) = xx \] diff --git a/content/lambda-calculus/introduction/lambda-computable.tex b/content/lambda-calculus/introduction/lambda-computable.tex index 30021023..6f654adf 100644 --- a/content/lambda-calculus/introduction/lambda-computable.tex +++ b/content/lambda-calculus/introduction/lambda-computable.tex @@ -18,8 +18,7 @@ \begin{proof} Suppose a function~$f$ is !!{lambda defined} by a lambda term~$X$. Let us describe an informal procedure to compute~$f$. On input $m_0$, -\dots,~$m_{n-1}$, write down the term $X \num m_0 \ldots \num -m_{n-1}$. Build a tree, first writing down all the one-step reductions +\dots,~$m_{n-1}$, write down the term $X \num{m_0} \ldots \num{m_{n-1}}$. Build a tree, first writing down all the one-step reductions of the original term; below that, write all the one-step reductions of those (i.e., the two-step reductions of the original term); and keep going. If you ever reach a numeral, return that as the answer; @@ -28,7 +27,7 @@ An appeal to Church's thesis tells us that this function is computable. A better way to prove the theorem would be to give a recursive description of this search procedure. For example, one -could define a sequence primitive recursive functions and relations, +could define a sequence of primitive recursive functions and relations, ``$\fn{IsASubterm}$,'' ``$\fn{Substitute}$,'' ``$\fn{ReducesToInOneStep}$,'' ``$\fn{ReductionSequence}$,'' ``$\fn{Numeral}$,'' etc. The partial recursive procedure for computing diff --git a/content/lambda-calculus/introduction/lambda-definability.tex b/content/lambda-calculus/introduction/lambda-definability.tex index da245a8d..10265fee 100644 --- a/content/lambda-calculus/introduction/lambda-definability.tex +++ b/content/lambda-calculus/introduction/lambda-definability.tex @@ -18,7 +18,7 @@ \begin{defn} For each natural number~$n$, define the \emph{Church numeral} $\num{n}$ to be the lambda term $\lambd[x][\lambd[y][(x(x(x(\dots -x(y)))))]]$, where there are $n$ $x$'s in all. +x(y)))))]]$, where the body contains $n$ occurrences of $x$. \end{defn} The terms $\num{n}$ are ``iterators'': on input $f$, $\num{n}$ returns @@ -27,14 +27,14 @@ a function on the natural numbers. \begin{defn} -Let $f(x_0, \dots, x_{k-1})$ be an $n$-ary partial function from $\Nat$ +Let $f(x_0, \dots, x_{k-1})$ be a $k$-ary partial function from $\Nat^k$ to $\Nat$. We say a $\lambd$-term~$F$ \emph{!!{lambda define}s}~$f$ iff for every sequence of natural numbers $n_0$, \dots,~$n_{k-1}$, \[ F\, \num{n_0}\, \num{n_1} \dots \num{n_{k-1}} \red \num{f(n_0, n_1, \dots, n_{k-1})} \] -if $f(n_0, \dots, n_{k-1})$ is defined, and $F, \num{n_0}\, \num{n_1} +if $f(n_0, \dots, n_{k-1})$ is defined, and $F\, \num{n_0}\, \num{n_1} \dots \num{n_{k-1}}$ has no normal form otherwise. \end{defn} diff --git a/content/lambda-calculus/introduction/minimization.tex b/content/lambda-calculus/introduction/minimization.tex index e3651e71..2a4b7601 100644 --- a/content/lambda-calculus/introduction/minimization.tex +++ b/content/lambda-calculus/introduction/minimization.tex @@ -18,6 +18,10 @@ \end{lem} \begin{proof} +First assume that $f$ is total; the arbitrary partial case is proved +at the end. Choose its representative closed, replacing any free +variables by closed terms; since every numeric input reduces to a +closed numeral, this preserves all required values. The idea is roughly as follows. Given $x$, we will use the fixed-point lambda term $Y$ to define a function $h_x(n)$ which searches for a~$y$ starting at~$n$; then $g(x)$ is just $h_x(0)$. The function~$h_x$ can @@ -30,18 +34,19 @@ \end{cases} \] -Here are the details. Since $f$ is primitive recursive, it is +Here are the details. By hypothesis, $f$ is !!{lambda defined} by some term $F$. Remember that we also have a lambda term~$D$, such that $D(M, N, \bar{0}) \red M$ and $D(M, N, \bar{1}) \red N$. Fixing $x$ for the moment, to !!{lambda define} $h_x$ we want to find a term~$H$ (depending on~$x$) satisfying \[ -H(\num{n}) \equiv D(\num{n}, H(S(\num{n})), F(x, \num{n})). +H(\num{n}) \equiv D(\num{n}, H(\fn{Succ}(\num{n})), F(x, \num{n})). \] -We can do this using the fixed-point term~$Y$. First, let $U$ be the +Use Turing's fixed-point term~$Y$ from \olref[fix]{sec}, so that +$YU\red U(YU)$. First, let $U$ be the term \[ -\lambd[h][\lambd[z][D(z,(h(Sz)),F(x,z))]], +\lambd[h][\lambd[z][D(z,(h(\fn{Succ}(z))),F(x,z))]], \] and then let $H$ be the term~$YU$. Notice that the only free variable in~$H$ is~$x$. Let us show that $H$ satisfies the equation above. @@ -53,17 +58,49 @@ In particular, for each natural number~$n$, we have \begin{align*} H(\num{n}) & \equiv U(H, \num{n}) \\ -& \red D(\num{n}, H(S(\num{n})), F(x, \num{n})), +& \red D(\num{n}, H(\fn{Succ}(\num{n})), F(x, \num{n})), \end{align*} as required. Notice that if you substitute a numeral $\num{m}$ for~$x$ in the last line, the expression reduces to $\num{n}$ if $F(\num{m}, -\num{n})$ reduces to $\num{0}$, and it reduces to $H(S(\num{n}))$ if +\num{n})$ reduces to $\num{0}$, and it reduces to $H(\fn{Succ}(\num{n}))$ if $F(\num{m}, \num{n})$ reduces to any other numeral. -To finish off the proof, let $G$ be $\lambd[x][H(\num 0)]$. Then $G$ -!!{lambda define}s~$g$; in other words, for every~$m$, $G(\num m)$ -reduces to~$\overline {g(m)}$, if $g(m)$ is defined, and has no normal -form otherwise. +To finish the total-input case, let $G$ be $\lambd[x][H(\num 0)]$. +If the search first succeeds at $n$, finitely many unfoldings give +$G(\num m)\red\num n$. If no candidate succeeds, leftmost-outermost +reduction continually evaluates the next test and returns to the +recursive call in head position. It never reaches a normal form. +Here we use the normalization theorem: leftmost-outermost reduction +reaches a $\beta$-normal form whenever one exists.\footnote{For a +proof, see Andrew D. Ker, \emph{Lambda Calculus and Types} (2009), +Theorem 3.2.3, pp.~35--36.} Thus an unsuccessful search has no normal +form. Merely exhibiting some infinite reduction sequence would not +suffice. + +We can now complete \olref[lrp]{thm:computable-lambda}, without using +closure under arbitrary partial composition. Let the total +primitive recursive $r$ and $u$ be as in its proof outline, and let +closed terms $R$ and $U_0$ represent them. With fresh variables, put +\[ + Q=\lambd[h][\lambd[n][\lambd[\vec x][ + D(U_0(n),h(\fn{Succ}(n),\vec x),R(\vec x,n))]]], + \qquad L=YQ. +\] +Then $\lambd[\vec x][L(\num 0,\vec x)]$ represents $f$. If the least +successful test is $n$, the search selects $U_0(\num n)$, which +reduces to the numeral for $u(n)$. If no test succeeds, the same +leftmost-outermost argument gives no normal form. The decoder is +inside the successful branch, so it cannot erase a failed search. + +Finally, for arbitrary partial lambda-definable component functions, +\olref[cmp]{thm:lambda-computable} makes them partial computable. +Strict composition computes every inner value before applying the +outer function; strict primitive recursion computes the base and +all earlier values; strict minimization tests candidates in order +and is undefined if a required test is undefined. These are partial +computable procedures, so the theorem just completed supplies +lambda representatives. This proves the general partial versions +of all three closure lemmas. \end{proof} \end{document} diff --git a/content/lambda-calculus/introduction/primitive-recursion.tex b/content/lambda-calculus/introduction/primitive-recursion.tex index 1aee7eca..e5aae62a 100644 --- a/content/lambda-calculus/introduction/primitive-recursion.tex +++ b/content/lambda-calculus/introduction/primitive-recursion.tex @@ -10,24 +10,24 @@ \olsection{\usetoken{S}{lambda definable} Functions are Closed under Primitive Recursion} When it comes to primitive recursion, we finally need to do some -work. We will have to proceed in stages. As before, on the assumption -that we already have terms $G$ and $H$ that !!{lambda define} functions -$g$ and~$h$, respectively, we want a term $H$ that !!{lambda define}s the +work. We first prove the direct construction for total component +functions; the general partial case follows at the end of +\olref[min]{sec}. We will proceed in stages. As before, on the assumption +that we already have terms $G'$ and $H'$ that !!{lambda define} functions +$g$ and~$h$, respectively, we want a term $F'$ that !!{lambda define}s the function~$f$ defined by \begin{align*} f(0, \vec z) & = g(\vec z) \\ -f(x+1, \vec z) & = h(z, f(x,\vec z), \vec z). +f(x+1, \vec z) & = h(x, f(x,\vec z), \vec z). \end{align*} -So, in general, given lambda terms $G'$ and~$H'$, it suffices to find -a term~$F$ such that +Given these lambda terms $G'$ and~$H'$, we seek a term~$F'$ such that \begin{align*} -F(\num{0}, \vec z) & \equiv G(\vec z) \\ -F(\overline{n+1}, \vec z) & \equiv H(\num{n}, F(\num{n}, \vec z), \vec z) +F'(\num{0}, \vec z) & \equiv G'(\vec z) \\ +F'(\overline{n+1}, \vec z) & \equiv H'(\num{n}, F'(\num{n}, \vec z), \vec z). \end{align*} -for every natural number~$n$; the fact that $G'$ and~$H'$ !!{lambda define} -$g$ and~$h$ means that whenever we plug in numerals $\num{\vec m}$ -for $\vec z$, $F(\num{n+1}, \num{\vec m})$ will normalize to the -right answer. +For total $g$ and $h$, induction on $n$ then shows that substituting +numerals $\num{\vec m}$ for $\vec z$ makes +$F'(\num{n},\num{\vec m})$ normalize to the right answer. But for this, it suffices to find a term~$F$ satisfying \begin{align*} @@ -35,9 +35,9 @@ F(\overline {n+1}) & \equiv H(\num{n},F(\num{n})) \intertext{for every natural number $n$, where} G & = \lambd[\vec z][G'(\vec z)] \text{ and}\\ -H(u,v) & = \lambd[\vec z][H'(u,v(u,\vec z),\vec z)]. +H(u,v) & = \lambd[\vec z][H'(u,v(\vec z),\vec z)]. \end{align*} -In other words, with lambda trickery, we can avoid having to worry +Set $F'(u,\vec z)=F(u)(\vec z)$. In other words, with lambda trickery, we can avoid having to worry about the extra parameters $\vec z$---they just get absorbed in the lambda notation. @@ -76,7 +76,11 @@ \end{lem} \begin{proof} -We need to show that given any terms, $G$ and $H$, we can find a term +For the total component functions under consideration, it suffices +to construct the following iterator. Its equations hold for any +terms $G$ and $H$, but by themselves do not enforce strict +undefinedness: a step that ignores its previous value can erase an +undefined base. We can find a term $F$ such that \begin{align*} F(\num{0}) & \equiv G \\ @@ -95,7 +99,7 @@ The details are as follows. Define $T(u)$ by \[ -T(u) = \tuple{S((u)_0), H((u)_0,(u)_1)}. +T(u) = \tuple{\fn{Succ}((u)_0), H((u)_0,(u)_1)}. \] Now it is easy to verify that for any number~$n$, \[ @@ -126,8 +130,8 @@ & \equiv (\tuple{\num{n+1}, H(\num{n}, F(\num{n}))})_1 \\ & \equiv H(\num{n}, F(\num{n})). \end{align*} -Here we have used the induction hypothesis on the second-to-last -line. For the first clause, we have +Here we have used the induction hypothesis in the transition to the +third line. For the first clause, we have \begin{align*} \num{n+1} (T, \tuple{\num 0, G}) & \equiv T(\num{n} (T, \tuple{\num 0, G})) \\ diff --git a/content/lambda-calculus/introduction/reduction.tex b/content/lambda-calculus/introduction/reduction.tex index b4dfd6d0..121ac6eb 100644 --- a/content/lambda-calculus/introduction/reduction.tex +++ b/content/lambda-calculus/introduction/reduction.tex @@ -58,11 +58,11 @@ \item Also, some terms can be reduced in more than one way; for example, \[ -(\lambd[x][(\lambd[y][yx]) z)] v \redone (\lambd[y][yv]) z +(\lambd[x][(\lambd[y][yx]) z]) v \redone (\lambd[y][yv]) z \] by contracting the outermost application; and \[ -(\lambd[x][(\lambd[y][yx]) z)] v \redone (\lambd[x][zx]) v +(\lambd[x][(\lambd[y][yx]) z]) v \redone (\lambd[x][zx]) v \] by contracting the innermost one. Note, in this case, however, that both terms further reduce to the same term, $zv$. diff --git a/content/lambda-calculus/introduction/syntax.tex b/content/lambda-calculus/introduction/syntax.tex index 0fbb2bcb..7ba28eea 100644 --- a/content/lambda-calculus/introduction/syntax.tex +++ b/content/lambda-calculus/introduction/syntax.tex @@ -36,7 +36,7 @@ to right. For example, if $M$, $N$, $P$, and $Q$ are terms, then $MNPQ$ abbreviates $(((MN)P)Q)$. \item Again, when parentheses are left out, lambda abstraction is to - be given the widest scope possible. From example, $\lambd[x][MNP]$ is + be given the widest scope possible. For example, $\lambd[x][MNP]$ is read $(\lambd[x][((MN)P)])$. \item A lambda can be used to abstract multiple variables. For example, $\lambd[xyz][M]$ is short for @@ -61,8 +61,8 @@ $\lambd[y][y]$. It will be convenient to think of these as being the ``same'' term; in other words, when we say that $M$ and $N$ are the same, we also mean ``up to renamings of the bound variables.'' -Variables that are in the scope of a $\lambd$ are called ``bound'', -while others are called ``free.'' There are no free variables in the +A variable occurrence is called ``bound'' when it is in the scope of +an abstraction binding that same variable, and ``free'' otherwise.'' There are no free variables in the previous example; but in \[ (\lambd[z][yz])x From 62f97acd2419e59a85af88f9d3a27511900caaa6 Mon Sep 17 00:00:00 2001 From: KokunoYumeto <208192274+KokunoYumeto@users.noreply.github.com> Date: Sun, 29 Nov 2026 10:30:48 +0100 Subject: [PATCH 09/19] lambda-calculus/syntax: fix binding, substitution and conversion notation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found in the translations' records of errors of the English (the errata harvest of 28-29 November 2026: GPT-6 Astra, OpenAI, ChatGPT Pro mode, classified every record against 2e19d095 and made this patch; applied here by Claude Opus 5.5, Anthropic, effort max). Each issue with its sources is in ENGLISH_ERRATA_CONSOLIDATED.tsv: - HV-1863 OLP-0358 unique-readability.tex:2: The descriptive header disagrees with the actual syntax driver import and existing lam/syn/unq file-id; correct only that comment. - HV-1864 OLP-0358 unique-readability.tex:72: English grammatical number errors; no mathematical change. - HV-1866 OLP-0359 abbreviated-syntax.tex:23: Typographical error in the introductory phrase. / Minor prose typo. / Local preposition typo. - HV-1867 OLP-0360 free-variables.tex:2: The descriptive chapter comment is obsolete: syntax.tex imports this free-variable section and its actual file-id already identifies lam/syn/fv. Correct only the literal header comment. - HV-1869 OLP-0360 free-variables.tex:24: The scope is the occurrence of the body M, not the containing whole term N. Input Persian already has M and is correct. / Scope is the body occurrence M, not the enclosing entire term N. / The binder scope is its own body M, ... - HV-1872 OLP-0361 substitution.tex:49: The singular subject requires drops in the coordinated verb phrase. - HV-1873 OLP-0361 substitution.tex:76: The abstraction case uses the body P, not an unrelated Q. The input already gives x notin FV(P) and the relevant freshness condition. / Q is not the body of the active abstraction. / Q is not the body in this proof; the ... - HV-1874 OLP-0361 substitution.tex:78: Duplicate equality signs print A = = B across consecutive rows. / The display has two relation signs with no intervening expression. - HV-1875 OLP-0361 substitution.tex:96: An unmatched closing parenthesis appears inside the inline formula; input already removes it. / One stray closing parenthesis in theorem hypothesis. / An unmatched parenthesis occurs in the theorem hypothesis. - HV-1876 OLP-0361 substitution.tex:105: The substituted variable changes from y to x between premise and expansion. The theorem and intended application clause use x throughout; input already corrects it. / The theorem substitutes for x, not y. / The theorem ... - HV-1877 OLP-0361 substitution.tex:106: The quantifier both applies to the two substitution operations and requires the plural noun. This is independent of the earlier drop/drops agreement typo, now retained alone in CHK0262. - HV-1878 OLP-0361 substitution.tex:112: The theorem hypothesis in this case is x in FV(lambda y.P). The source interchanges x and y; the input already uses the correct hypothesis and conclusion. / Wrong active binder and substituted variable; the branch is λy.P and ... - HV-1879 OLP-0361 substitution.tex:119: The induction-hypothesis expression removes the wrong variables, loses the outer removal of y, and has unbalanced parentheses; the next annotation claims x notin FV(N), which is not assumed. Input already has the correct ... - HV-1882 OLP-0362 alpha.tex:19: The first definition permits a vacuous self-step (lambda x.z renamed x to x), whereas the later supposedly equivalent inductive definition requires different names. The reflexive-transitive closure would be unchanged, but the ... - HV-1883 OLP-0362 alpha.tex:31: The specified immediately following conditions require the definite article in this phrase. - HV-1884 OLP-0362 alpha.tex:42: The specified generator condition requires the definite article. - HV-1885 OLP-0362 alpha.tex:73: English spelling/grammar errors. - HV-1886 OLP-0362 alpha.tex:78: This paraphrase omits reflexivity, which is included in both formal definitions. / Reflexivity omitted; variable term has no one-step change, so its identity pair is absent from that description. - HV-1889 OLP-0362 alpha.tex:128: Several free-variable expressions use literal FV instead of the established macro. Input already consistently uses the FV macro. / Inconsistent math typography, including an unparenthesized operand when TeX grouping braces ... - HV-1890 OLP-0362 alpha.tex:161: The cleared variable is x, not the replacement variable y. For N=x the substitution is y, which has y free. / Replacement can introduce y; clearing theorem removes x. N=x is immediate counterexample. / Substitution eliminates ... - HV-1891 OLP-0362 alpha.tex:232: Outer freshness alone does not ensure the nested body substitution is defined. The subsequent chain also writes literal equalities where its cited lemma gives only alpha-equivalence, and considers a special common-binder ... - HV-1893 OLP-0362 alpha.tex:251: The first displayed substitution already ends with an equals sign and the continuation begins with another equals sign, producing a duplicated relation before the first right-hand term. This is independent of the later ... - HV-1894 OLP-0362 alpha.tex:273: The second pair needs Rdoubleprime alpha R, and definedness must concern its own substitution. The input already fixes the latter but still lacked the former. / Without replacement equivalence, take M=M′=M″=y, R=R′=u, R″=v ... - HV-1895 OLP-0363 de-bruijn.tex:24: English prose grammar defects. / Garbled binder prose and ambiguous adjacent index numerals. - HV-1897 OLP-0363 de-bruijn.tex:49: The recursive context may repeat a variable under nested binders; the lookup must choose its first occurrence to express nearest binding. / Repeated bound names make position ambiguous: translating λx.λx.x pushes x twice; ... - HV-1900 OLP-0364 term-revisited.tex:2: The descriptive header disagrees with the actual syntax driver import and existing lam/syn/tr file-id; correct only that comment. - HV-1901 OLP-0364 term-revisited.tex:13: English spelling/agreement errors. - HV-1902 OLP-0364 term-revisited.tex:13: The following relative clause it is in requires the class it is in, not the duplicated possessive construction its class it is in. The separate equivalance spelling change remains0278. - HV-1903 OLP-0364 term-revisited.tex:24: The ordinary prose abbreviation etc. is typeset as mathematical letters instead of text. / Ordinary-language etc. is set as mathematical letters. - HV-1904 OLP-0364 term-revisited.tex:28: Insert the article before the specified immediately following definition. - HV-1906 OLP-0364 term-revisited.tex:51: The displayed right side is a representative term, whereas the operation on classes must return its alpha-equivalence class. Input Persian already supplies the missing class-containing wording. / Its codomain must be an alpha ... - HV-1907 OLP-0364 term-revisited.tex:60: Repeated = at end of first line and start of next leaves a blank equality side. / Repeated equality at a line break is malformed notation. - HV-1910 OLP-0365 beta.tex:2: The explicit descriptive Chapter comment disagrees with the actual syntax.tex import and section location. Correct this prose metadata only; the separate opaque lam/int/bet label namespace is not constrained to mirror the ... - HV-1913 OLP-0365 beta.tex:97: English spelling typo. - HV-1914 OLP-0366 eta.tex:15: The macro prints an unparenthesized abstraction: widest scope places N inside the body, contrary to the intended application. - HV-1917 OLP-0366 eta.tex:30: English grammatical forms. - HV-1918 OLP-0366 eta.tex:42: The full extensionality theorem uses the general capture-safe eta schema. An unrestricted schema when x is free in M is invalid. / As a general schema it omits x not free in f; without it eta conversion can change free variables. - HV-1922 OLP-0651 conversion.tex:12: English grammar/spelling. - HV-1923 OLP-0651 conversion.tex:18: The English file ends with a promise of a definition and supplies no following content. The Persian input already completes the sentence with a short accurate alpha-renaming description. / Promised formalization and remaining ... Co-Authored-By: Claude Opus 5.5 (cherry picked from commit 53b5e815d9490be10328b7d59814cc4d9cfdbd13) --- .../syntax/abbreviated-syntax.tex | 2 +- content/lambda-calculus/syntax/alpha.tex | 85 +++++++++---------- content/lambda-calculus/syntax/beta.tex | 4 +- content/lambda-calculus/syntax/conversion.tex | 7 +- content/lambda-calculus/syntax/de-bruijn.tex | 18 ++-- content/lambda-calculus/syntax/eta.tex | 8 +- .../lambda-calculus/syntax/free-variables.tex | 4 +- .../lambda-calculus/syntax/substitution.tex | 22 ++--- .../lambda-calculus/syntax/term-revisited.tex | 19 +++-- .../syntax/unique-readability.tex | 8 +- 10 files changed, 90 insertions(+), 87 deletions(-) diff --git a/content/lambda-calculus/syntax/abbreviated-syntax.tex b/content/lambda-calculus/syntax/abbreviated-syntax.tex index 468c6ca9..a13a3753 100644 --- a/content/lambda-calculus/syntax/abbreviated-syntax.tex +++ b/content/lambda-calculus/syntax/abbreviated-syntax.tex @@ -20,7 +20,7 @@ to right. For example, if $M$, $N$, $P$, and~$Q$ are terms, then $MNPQ$ abbreviates $(((MN)P)Q)$. \item Again, when parentheses are left out, lambda abstraction is - given the widest scope possible. From example, $\lambd[x][MNP]$ is + given the widest scope possible. For example, $\lambd[x][MNP]$ is read as $(\lambd[x][MNP])$. \item A lambda can be used to abstract multiple variables. For example, $\lambd[xyz][M]$ is short for diff --git a/content/lambda-calculus/syntax/alpha.tex b/content/lambda-calculus/syntax/alpha.tex index 7deabbc6..b40e21be 100644 --- a/content/lambda-calculus/syntax/alpha.tex +++ b/content/lambda-calculus/syntax/alpha.tex @@ -16,7 +16,7 @@ variable in the other. This is called \emph{$\alpha$-conversion}. \begin{defn}[Change of bound variable, $\aconvone$] - If a term $M$ contains an occurrence of $\lambd[x][N]$, $y \notin + If a term $M$ contains an occurrence of $\lambd[x][N]$, $x\ne y$, $y \notin \FV{N}$, and $\Subst{N}{y}{x}$ is defined, then replacing this occurrence by \begin{equation*} @@ -28,7 +28,7 @@ \begin{defn}[Compatibility of relation] A relation $R$ on terms is said to be \emph{compatible} - if it satisfies following conditions: + if it satisfies the following conditions: \begin{enumerate} \item If $R N N'$ then $R \lambd[x][N] \lambd[x][N']$ \item If $R P P'$ then $R (PQ) (P'Q)$ @@ -39,7 +39,7 @@ Thus let's rephrase the definition: \begin{defn}[Change of bound variable, $\aconvone$] \emph{Change of bound variable} ($\redone[\alpha]$) is - the smallest compatible relation on terms satisfying following + the smallest compatible relation on terms satisfying the following condition: \begin{align*} &\lambd[x][N] \redone[\alpha] \lambd[y][\Subst{N}{y}{x}] && \text{if @@ -70,12 +70,12 @@ exercise. From now on we will use the inductive definition. \begin{defn}[$\alpha$-conversion, $\aconv$] - \emph{$\alpha$-conversion} ($\aconv$) is the smallest reflexitive + \emph{$\alpha$-conversion} ($\aconv$) is the smallest reflexive and transitive relation on terms containing $\aconvone$. \end{defn} As above, ``smallest'' means the relation only contains pairs required -by transitivity, and $\aconvone$, which leads to the following +by reflexivity, transitivity, and $\aconvone$, which leads to the following equivalent definition: \begin{defn}[$\alpha$-conversion, $\aconv$] \ollabel{defn:aconv} @@ -92,7 +92,7 @@ $\lambd[x][f x]$ $\alpha$-converts to $\lambd[y][f y]$, and conversely. Informally speaking, they are both functions that accept an argument and - return $f$ of that argument, refering to the environment variable~$f$. + return $f$ of that argument, referring to the environment variable~$f$. $\lambd[x][f x]$ does not $\alpha$-convert to $\lambd[x][g x]$. Informally speaking, they refer to the environment variables @@ -134,7 +134,7 @@ \item If $x \notin FV(N)$, then: \begin{align*} \FV{\lambd[y][\Subst{N}{y}{x}]} - & = FV{\Subst{N}{y}{x}} \setminus \{y\} \\ + & = \FV{\Subst{N}{y}{x}} \setminus \{y\} \\ & = \FV{N} \setminus \{x\} && \text{by \olref[sub]{thm:notinfv}} \\ & = \FV{\lambd[x][N]}. @@ -158,7 +158,7 @@ \item If the last rule is \olref{defn:aconvone4}, then $P$ is of the form $\lambd[x][N]$ and $Q$ of the form $\lambd[y][\Subst{N}{y}{x}]$, where $x \neq y$, $y \notin \FV{N}$ - and $\Subst{N}{y}{x}$ defined. First, we have $y \notin + and $\Subst{N}{y}{x}$ defined. First, we have $x \notin \FV{\Subst{N}{y}{x}}$ by \olref[sub]{thm:clr}. By \olref[sub]{thm:inv} we have that $\Subst{\Subst{N}{y}{x}}{x}{y}$ is not only defined, but also equal to~$N$. Then by @@ -181,8 +181,8 @@ \begin{enumerate} \item For each term $M$, $M$ can be changed to $M$ by \emph{zero} changes of bound variables. - \item If $P$ is $\alpha$-converts to $Q$ by a series of changes - of bound variables, then from $Q$ we can just inverse these + \item If $P$ $\alpha$-converts to $Q$ by a series of changes + of bound variables, then from $Q$ we can just reverse these changes (by \olref{lem:inv}) in opposite order to obtain~$P$. \item If $P$ $\alpha$-converts to $Q$ by a series of changes of @@ -230,37 +230,36 @@ \end{thm} \begin{proof} - By induction on the formation of $M$: - \begin{enumerate} - \item $M$ is a variable~$z$: Exercise. - \item Suppose $M$ is of the form $\lambd[x][N]$. Select a variable - $z$ other than $x$ and $y$ and such that $z \notin \FV{N}$ and $z - \notin \FV{R}$. By inductive hypothesis, we there is $N'$ such - that $N' \aeq N$ and $\Subst{N'}{z}{x}$ is defined. Then - $\lambd[x][N] \aeq \lambd[x][N']$ too, by - \olref{defn:aconvone}\olref{defn:aconvone1}. Now $\lambd[x][N'] - \aeq \lambd[z][\Subst{N'}{z}{x}]$ by - \olref{defn:aconvone}\olref{defn:aconvone4}. We can do this - because $z \ne x$, $z \notin FV(N')$ and $\Subst{N'}{z}{x}$ is - defined. Finally, $\Subst{\lambd[z][\Subst{N'}{z}{x}]}{R}{y}$ is - defined, because $z \neq y$ and $z \notin FV(R)$. - - Moreover, if there is another $N''$ and $R''$ satisfying the same - conditions, - \begin{multline*} - \Subst{(\lambd[z][\Subst{N''}{z}{x}])}{R''}{y} =\\ - \begin{aligned} - &= \lambd[z][\Subst{\Subst{N''}{z}{x}}{R''}{y}] \\ - &= \lambd[z][\Subst{\Subst{N''}{z}{x}}{R}{y}] && \text{by - \olref{lem:sub:R}}\\ - &=\lambd[z][\Subst{\Subst{N'}{z}{x}}{R}{y}] - && \text{by inductive - hypothesis}\\ - &=\Subst{(\lambd[z][\Subst{N'}{z}{x}])}{R}{y} - \end{aligned} - \end{multline*} - \item $M$ is of the form $(PQ)$: Exercise. - \end{enumerate} +Represent a term by its binding tree: application and abstraction +nodes retain their positions; each variable leaf is labelled either +by its free variable name or by a pointer to the nearest abstraction +that binds it. Each allowed change of bound variable preserves this +tree, as follows directly from its freshness and definedness +conditions. + +Conversely, terms with the same binding tree are $\alpha$-equivalent. +For all their abstraction positions choose pairwise distinct fresh +names, avoiding every name in either original term. In each term +rename the binders from innermost to outermost, using the same fresh +name at corresponding positions. Each change is allowed: inner +binders already have distinct fresh names, so the required partial +substitution is defined, and the new name occurs nowhere in the +body. The resulting terms are literally identical. Reversibility +and transitivity of $\alpha$-conversion give the claim. + +For existence, apply this freshening procedure to $M$, also avoiding +$y$ and all names in $R$. Every binder of the resulting $M'$ differs +from $y$ and is absent from $\FV{R}$. Induction on $M'$ using the +substitution clauses now gives that $\Subst{M'}{R}{y}$ is defined. + +For uniqueness, defined substitution replaces exactly the free-$y$ +leaves of a binding tree by copies of the replacement's binding +tree. Internal binding pointers remain internal, and the +definedness conditions prevent capture of free replacement names. +If $M''\aeq M$ and $R''\aeq R$, their respective binding trees agree. +Thus the two defined substitutions in the theorem have the same +binding tree. The converse characterization just proved gives +$\Subst{M'}{R}{y}\aeq\Subst{M''}{R''}{y}$. \end{proof} \begin{prob} @@ -270,8 +269,8 @@ \begin{cor}\ollabel{cor:sub} For any $M$, $R$, and~$y$, there exists a pair of $M'$ and $R'$ such that $M' \aeq M$, $R \aeq R'$ and $\Subst{M'}{R'}{y}$ is - defined. Moreover, if there is another pair $M'' \aeq M$ and $R''$ - with $\Subst{M'}{R'}{y}$ defined, then $\Subst{M'}{R'}{y} \aeq + defined. Moreover, if there is another pair $M'' \aeq M$ and $R''\aeq R$ + with $\Subst{M''}{R''}{y}$ defined, then $\Subst{M'}{R'}{y} \aeq \Subst{M''}{R''}{y}$. \end{cor} diff --git a/content/lambda-calculus/syntax/beta.tex b/content/lambda-calculus/syntax/beta.tex index dc997729..2920e7d7 100644 --- a/content/lambda-calculus/syntax/beta.tex +++ b/content/lambda-calculus/syntax/beta.tex @@ -1,5 +1,5 @@ % Part: lambda-calculus -% Chapter: introduction +% Chapter: syntax % Section: beta \documentclass[../../../include/open-logic-section]{subfiles} @@ -94,7 +94,7 @@ strategy has the useful property that a term can be reduced to a normal form by some strategy iff it can be reduced to normal form using the natural strategy. In what follows we will use the natural - stratuegy unless otherwise specified. + strategy unless otherwise specified. \end{digress} \begin{defn}[$\beta$-equivalence, $\equal$] diff --git a/content/lambda-calculus/syntax/conversion.tex b/content/lambda-calculus/syntax/conversion.tex index 88201c36..3afff77d 100644 --- a/content/lambda-calculus/syntax/conversion.tex +++ b/content/lambda-calculus/syntax/conversion.tex @@ -9,13 +9,16 @@ \olfileid{lam}{int}{con} \olsection{Conversion and Reduction} -There three type of conversions or reductions in lambda calculus. The +There are three types of conversions or reductions in lambda calculus. The difference between conversion and reduction is whether the ``transformation'' is unidirectional or bidirectional, as we will see. The $\alpha$-conversion is about variable renaming. It is natural to consider $\lambda x. x$ and $\lambda y.y$ representing the same -function (the identity function), we formallize this idea as follows: +function (the identity function). This is formalized by changes of +bound variable in \olref[alp]{sec}. The other two notions, +$\beta$- and $\eta$-reduction, are defined in \olref[bet]{sec} and +\olref[eta]{sec}, respectively. \end{document} diff --git a/content/lambda-calculus/syntax/de-bruijn.tex b/content/lambda-calculus/syntax/de-bruijn.tex index dd06656e..49d2ca7c 100644 --- a/content/lambda-calculus/syntax/de-bruijn.tex +++ b/content/lambda-calculus/syntax/de-bruijn.tex @@ -21,15 +21,15 @@ this parameter. In the de Bruijn index, however, parameters have no name and reference to them in the function body is denoted by a number denoting the levels of abstraction between them. For example, consider -the example of $\lambd[x][\lambd[y][y x]]$: the outer abstraction is on +the example of $\lambd[x][\lambd[y][y x]]$: the outer abstraction binds the variable~$x$; the inner abstraction binds the variable -is~$y$; the sub-term $y x$ lies in the scope of the inner abstraction: +$y$; the sub-term $y x$ lies in the scope of the inner abstraction: there is no abstraction between $y$ and its abstract~$\lambd[y]$, but one abstract between $x$ and its abstract~$\lambd[x]$. Thus we write -$0\, 1$ for $y x$, and $\lambd[][\lambd[][01]]$ for the entire term. +$0\, 1$ for $y x$, and $\lambd[][\lambd[][0\,1]]$ for the entire term. \begin{defn} - De Bruijn terms are inductively defines as follows: + De Bruijn terms are inductively defined as follows: \begin{enumerate} \item $n$, where $n$ is any natural number. \item $PQ$, where $P$ and $Q$ are both De Bruijn terms. @@ -46,12 +46,12 @@ F_\Gamma(\lambd[x][N]) &= \lambd[][F_{x,\Gamma}(N)] \end{align*} where $\Gamma$ is a list of variables indexed from zero, and - $\Gamma(x)$ denotes the position of the variable $x$ in $\Gamma$. + $\Gamma(x)$ denotes the position of the first occurrence of the variable $x$ in $\Gamma$. For example, if $\Gamma$ is $x,y,z$, then $\Gamma(x)$ is $0$ and $\Gamma(z)$ is $2$. - $x,\Gamma$ denotes the list resulted from pushing $x$ to the head of - $\Gamma$; for instance, continuing the $\Gamma$ in last example, + $x,\Gamma$ denotes the list resulting from pushing $x$ to the head of + $\Gamma$; for instance, continuing the $\Gamma$ in the last example, $w,\Gamma$ is $w,x,y,z$. \end{defn} @@ -68,8 +68,8 @@ $\Gamma[n]$ denotes the variable in position~$n$. For example, if $\Gamma$ is $x,y,z$, then $\Gamma[1]$ is $y$. - The variable $x$ in last equation is chosen to be any variable that - not in $\Gamma$. + The variable $x$ in the last equation is chosen to be any variable that + is not in $\Gamma$. \end{defn} Here we give some results without proving them: diff --git a/content/lambda-calculus/syntax/eta.tex b/content/lambda-calculus/syntax/eta.tex index 5c6cc407..6e7af89b 100644 --- a/content/lambda-calculus/syntax/eta.tex +++ b/content/lambda-calculus/syntax/eta.tex @@ -12,7 +12,7 @@ There is another relation on $\lambda$ terms. In \olref[fv]{sec} we used the example $\lambd[x][(fx)]$, which accepts an argument and applies $f$ to it. In other words, it is the same function as~$f$: -$\lambd[x][(fx)]N$ and $fN$ both reduce to~$fN$. We use +$(\lambd[x][(fx)])N$ and $fN$ both reduce to~$fN$. We use $\eta$-reduction (and $\eta$-extension) to capture this idea. \begin{defn}[$\eta$-contraction, $\eredone$] @@ -27,7 +27,7 @@ \begin{defn}[$\beta\eta$-reduction, $\bered$] \ollabel{defn:bered} \emph{$\beta\eta$-reduction} ($\bered$) is the smallest reflexive, transitive relation on terms containing $\bredone$ and $\eredone$, - i.e., the rules of reflexivity and transitive plus the following two + i.e., the rules of reflexivity and transitivity plus the following two rules: \begin{enumerate} \item If $M \bredone N$ then $M \bered N$. \ollabel{defn:bered3} @@ -39,7 +39,7 @@ \begin{defn} We extend the equivalence relation $\equal$ with the $\eta$-conversion rule: \[ - \lambd[x][f x] \equal f + \lambd[x][M x] \equal M \qquad\text{provided }x\notin\FV{M} \] and denote the extended relation as $\equal[\eta]$. \end{defn} @@ -76,7 +76,7 @@ \equal N$ derived by the \ext{} rule, we have $Mx \equal[\eta] Nx$ as premise. Then we have $\lambd[x][Mx] \equal[\eta] \lambd[x][Nx]$ by a rule of $\equal$, applying $\eta$ - on both side gives us $M \equal[\eta] N$. + on both sides gives us $M \equal[\eta] N$. Similarly we prove that the $\eta$ rule is contained in $\equal[ext]$. For any $\lambd[x][Mx]$ and $M$ with $x \notin diff --git a/content/lambda-calculus/syntax/free-variables.tex b/content/lambda-calculus/syntax/free-variables.tex index 166c3898..299006cf 100644 --- a/content/lambda-calculus/syntax/free-variables.tex +++ b/content/lambda-calculus/syntax/free-variables.tex @@ -1,5 +1,5 @@ % Part: lambda-calculus -% Chapter: introduction +% Chapter: syntax % Section: free-variables \documentclass[../../../include/open-logic-section]{subfiles} @@ -21,7 +21,7 @@ \begin{defn}[Scope] If $\lambd[x][M]$ occurs inside a term~$N$, then the corresponding -occurrence of~$N$ is the \emph{scope} of the~$\lambd[x]$. +occurrence of~$M$ is the \emph{scope} of the~$\lambd[x]$. \end{defn} diff --git a/content/lambda-calculus/syntax/substitution.tex b/content/lambda-calculus/syntax/substitution.tex index fc9f1fee..8bf1d196 100644 --- a/content/lambda-calculus/syntax/substitution.tex +++ b/content/lambda-calculus/syntax/substitution.tex @@ -46,7 +46,7 @@ accepts an argument and returns it directly. But the term $\lambd[y][x]$ stands for a function that always returns the term~$x$ (or whatever $x$ refers to). So the result we actually want is a -function that accepts an argument, drop it, and returns the +function that accepts an argument, drops it, and returns the environment variable~$y$. To do this properly, we would first have to ``rename'' the bound variable~$y$. \end{explain} @@ -73,9 +73,9 @@ \item $M$ is of the form $\lambd[y][P]$, and since $\Subst{\lambd[y][P]}{N}{x}$ is defined, it has to be $\lambd[y][\Subst{P}{N}{x}]$. Then $\Subst{P}{N}{x}$ has to be - defined; also, $x \neq y$ and $x \notin \FV{Q}$. Then: + defined; also, $x \neq y$ and $x \notin \FV{P}$. Then: \begin{multline*} - \FV{\Subst{\lambd[y][P]}{N}{x}} = \\ + \FV{\Subst{\lambd[y][P]}{N}{x}} \\ \begin{aligned} & = \FV{\lambd[y][\Subst{P}{N}{x}]} && \text{by \olref{defn:substitution-4}}\\ @@ -93,7 +93,7 @@ \end{prob} \begin{thm} \ollabel{thm:infv} - If $x \in \FV{M})$, then $\FV{\Subst{M}{N}{x}} = (\FV{M} \setminus + If $x \in \FV{M}$, then $\FV{\Subst{M}{N}{x}} = (\FV{M} \setminus \{x\}) \cup \FV{N}$, provided the left hand is defined. \end{thm} @@ -102,24 +102,24 @@ \begin{enumerate} \item $M$ is a variable: exercise. \item $M$ is of the form $PQ$: Since - $\Subst{(PQ)}{N}{y}$ is defined, it has to be - $(\Subst{P}{N}{x})(\Subst{Q}{N}{x})$ with both substitution + $\Subst{(PQ)}{N}{x}$ is defined, it has to be + $(\Subst{P}{N}{x})(\Subst{Q}{N}{x})$ with both substitutions defined. Also, since $x \in \FV{PQ}$, either $x \in \FV{P}$ or $x \in \FV{Q}$ or both. The rest is left as an exercise. \item $M$ is of the form $\lambd[y][P]$. Since $\Subst{\lambd[y][P]}{N}{x}$ is defined, it has to be $\lambd[y][\Subst{P}{N}{x}]$, with $\Subst{P}{N}{x}$ - defined, $x \neq y$ and $y \notin \FV{N}$; also, since $y \in - \FV{\lambd[x][P]}$, we have $y \in \FV{P}$ too. Now: + defined, $x \neq y$ and $y \notin \FV{N}$; also, since $x \in + \FV{\lambd[y][P]}$, we have $x \in \FV{P}$ too. Now: \begin{multline*} - \FV{\Subst{(\lambd[y][P])}{N}{x}} = \\ + \FV{\Subst{(\lambd[y][P])}{N}{x}} \\ \begin{aligned} & = \FV{\lambd[y][\Subst{P}{N}{x}]} \\ & = \FV{\Subst{P}{N}{x}} \setminus \{y\} \\ - & = ((\FV{P} \setminus \{y\}) \cup (\FV{N} \setminus \{x\}) + & = ((\FV{P} \setminus \{x\}) \cup \FV{N}) \setminus \{y\} && \text{by inductive hypothesis} \\ & = (\FV{P} \setminus \{x, y\}) \cup \FV{N} - && x \notin \FV{N} \\ + && y \notin \FV{N} \\ & = (\FV{\lambd[y][P]} \setminus \{x\}) \cup \FV{N} \end{aligned} \end{multline*} diff --git a/content/lambda-calculus/syntax/term-revisited.tex b/content/lambda-calculus/syntax/term-revisited.tex index b80c9368..6579ea05 100644 --- a/content/lambda-calculus/syntax/term-revisited.tex +++ b/content/lambda-calculus/syntax/term-revisited.tex @@ -1,5 +1,5 @@ % Part: lambda-calculus -% Chapter: introduction +% Chapter: syntax % Section: term-revisited \documentclass[../../../include/open-logic-section]{subfiles} @@ -10,7 +10,7 @@ \olsection{Terms as $\alpha$-Equivalence Classes} From now on, we will consider terms up to $\alpha$-equivalence. That -means when we write a term, we mean its $\alpha$-equivalance class it +means when we write a term, we mean the $\alpha$-equivalence class it is in. For example, we write $\lambd[a][\lambd[b][a c]]$ for the set of all terms $\alpha$-equivalent to it, such as $\lambd[a][\lambd[b][a c]]$, $\lambd[b][\lambd[a][b c]]$, etc. @@ -18,14 +18,14 @@ Also, while in previous sections letters such as $N, Q$ are used to denote a term, from now on we use them to denote a class, and it is these classes instead of terms that will be our subjects of study in -what follows. Letters such as $x, y$ continues to denote a variable. +what follows. Letters such as $x, y$ continue to denote a variable. We also adopt the notation $\rep{M}$ to denote an arbitrary -!!{element} of the class~$M$, and $\rep{M}[0], \rep{M}[1], etc. $ if +!!{element} of the class~$M$, and $\rep{M}[0]$, $\rep{M}[1]$, etc. if we need more than one. We reuse the notations from terms to simplify our wording. We -have following definition on classes: +have the following definition on classes: \begin{defn} \begin{enumerate} \item $\lambd[x][N]$ is defined as the class containing @@ -45,11 +45,12 @@ This is well defined since $FV(\rep{M}[0]) = FV(\rep{M}[1])$, as shown in \olref[alp]{thm:fv}. -We also reuse the notation for substition into classes: +We also reuse the notation for substitution into classes: \begin{defn} \ollabel{def:sub} The \emph{substitution} of $R$ for $y$ in $M$, or $\Subst{M}{R}{y}$, is - defined to be $\Subst{\rep{M}}{\rep{R}}{y}$, for any $\rep{M}$ and - $\rep{R}$ making the substition defined. + defined to be the $\alpha$-equivalence class containing + $\Subst{\rep{M}}{\rep{R}}{y}$, for any $\rep{M}$ and + $\rep{R}$ making the substitution defined. \end{defn} This is also well defined as shown in \olref[alp]{cor:sub}. @@ -57,7 +58,7 @@ Note how this definition significantly simplifies our reasoning. For example: \begin{align} - \Subst{\lambd[x][x]}{y}{x} & =\ollabel{eq:1}\\ + \Subst{\lambd[x][x]}{y}{x} & \ollabel{eq:1}\\ &= \Subst{\lambd[z][z]}{y}{x} \ollabel{eq:2}\\ &= \lambd[z][\Subst{z}{y}{x}] \\ &= \lambd[z][z] diff --git a/content/lambda-calculus/syntax/unique-readability.tex b/content/lambda-calculus/syntax/unique-readability.tex index cc6a18fc..a20b804e 100644 --- a/content/lambda-calculus/syntax/unique-readability.tex +++ b/content/lambda-calculus/syntax/unique-readability.tex @@ -1,5 +1,5 @@ % Part: lambda-calculus -% Chapter: introduction +% Chapter: syntax % Section: unique-readability \documentclass[../../../include/open-logic-section]{subfiles} @@ -69,7 +69,7 @@ result of an abstraction on~$N$. By inductive hypothesis we know that formation of $N$ is itself unique. \item $M$ is of the form $(PQ)$, where $P$ and $Q$ are terms. - Since it starts with a parentheses, it cannot also be + Since it starts with a parenthesis, it cannot also be constructed by \olref[trm]{defn:term}\olref[trm]{defn:term-var}. By \olref{lem:term-start}, $P$ cannot begin with $\lambd$, so @@ -79,7 +79,7 @@ segment of $P'$ (or vice versa), and this is impossible by \olref{lem:initial}. So $P$ and $Q$ are uniquely determined, and by inductive hypothesis we know that formations - of $P$ and $Q$ is unique. + of $P$ and $Q$ are unique. \end{enumerate} \end{proof} @@ -89,7 +89,7 @@ \begin{enumerate} \item $x$, where $x$ is a variable uniquely determined by $M$. \item $(\lambd[x][N])$, where $x$ is a variable and $N$ is - another term, both of which is uniquely determined by $M$. + another term, both of which are uniquely determined by $M$. \item $(PQ)$, where $P$ and $Q$ are two terms uniquely determined by $M$. \end{enumerate} From 9d468b1cf37d9a0ed0a77312bf38ee3763fd80a5 Mon Sep 17 00:00:00 2001 From: KokunoYumeto <208192274+KokunoYumeto@users.noreply.github.com> Date: Sun, 29 Nov 2026 10:30:48 +0100 Subject: [PATCH 10/19] lambda-calculus/church-rosser: fix parallel-reduction arguments and references MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found in the translations' records of errors of the English (the errata harvest of 28-29 November 2026: GPT-6 Astra, OpenAI, ChatGPT Pro mode, classified every record against 2e19d095 and made this patch; applied here by Claude Opus 5.5, Anthropic, effort max). Each issue with its sources is in ENGLISH_ERRATA_CONSOLIDATED.tsv: - HV-1924 OLP-0368 definitions-and-properties.tex:24: English agreement/extra-verb typos. - HV-1927 OLP-0369 parallel-beta-reduction.tex:14: English typo. - HV-1928 OLP-0369 parallel-beta-reduction.tex:20: Uses ordinary beta step instead of parallel reduction. A variable has no ordinary contraction, so literal rule cannot prove lambda abstraction reflexivity. / The premise must be parallel reduction, as used by the subsequent ... - HV-1930 OLP-0369 parallel-beta-reduction.tex:89: The original target substitutes Rprime, so the i.e. paraphrase changes its right-hand term to one with R. Input already correctly uses Rprime. / Right-side replacement should be R′, matching statement and immediately preceding ... - HV-1932 OLP-0370 beta-reduction.tex:16: One-step beta contraction is compatible and can occur inside an abstraction or application; the proof only treats a root redex. / A compatible one-step contraction may occur inside abstraction or either application argument; M ... - HV-1933 OLP-0370 beta-reduction.tex:43: The data needed for the redex case include Nprime, while Mprime is already the whole target. Input already has Nprime. / M′ is already conclusion and N′ is used but not introduced. / N-prime is needed as witness; M-prime is ... - HV-1935 OLP-0370 beta-reduction.tex:61: English extra verb. - HV-1936 OLP-0371 parallel-beta-eta-reduction.tex:22: The premise must use parallel beta-eta reduction. A beta-only relation cannot lift an eta change in the body. Input already correctly has beredpar. / Cannot yield abstraction reflexivity or parallel eta reductions inside ... - HV-1939 OLP-0371 parallel-beta-eta-reduction.tex:50: The two clauses overlap and may give different alpha-classes, so they do not define a function without priority. Input already restricts the ordinary abstraction case to non-eta-redexes. / For λx.fx with x≠f, clauses give ... - HV-1941 OLP-0371 parallel-beta-eta-reduction.tex:70: The component list omits the body N used in the source term, side condition and premise; include it alongside the binder and reduced body. This is a local metavariable-list omission, not a failure of the eta rule. - HV-1942 OLP-0371 parallel-beta-eta-reduction.tex:82: Eta contraction can turn an abstraction into a non-abstraction, invalidating the beta proof shape assumption. Also the outer eta-redex and a beta contraction in its body require an additional overlap argument. The theorem ... - HV-1943 OLP-0372 beta-eta-reduction.tex:14: The preceding syntax section defined beta-eta closure but not this one-step notation. - HV-1944 OLP-0372 beta-eta-reduction.tex:21: The proof is about beta-eta one-step contraction; a pure beta-contraction symbol is incorrect in the eta case. Input already uses beredone and cites the parallel-eta rule. / Eta branch must use eta-contraction symbol, not ... - HV-1947 OLP-0372 beta-eta-reduction.tex:52: The named singular property requires the definite article. Co-Authored-By: Claude Opus 5.5 (cherry picked from commit a1346695bcc645c479696e3557ed85512672e615) --- .../church-rosser/beta-eta-reduction.tex | 16 +++-- .../church-rosser/beta-reduction.tex | 13 +++- .../definitions-and-properties.tex | 6 +- .../parallel-beta-eta-reduction.tex | 62 +++++++++++++++---- .../church-rosser/parallel-beta-reduction.tex | 6 +- 5 files changed, 77 insertions(+), 26 deletions(-) diff --git a/content/lambda-calculus/church-rosser/beta-eta-reduction.tex b/content/lambda-calculus/church-rosser/beta-eta-reduction.tex index b4015862..fc477c0a 100644 --- a/content/lambda-calculus/church-rosser/beta-eta-reduction.tex +++ b/content/lambda-calculus/church-rosser/beta-eta-reduction.tex @@ -11,17 +11,21 @@ \olsection{$\beta\eta$-reduction} The Church--Rosser property holds for -$\beta\eta$-reduction ($\bered$). +$\beta\eta$-reduction ($\bered$). Write $M\beredone N$ when either +$M\bredone N$ or $M\eredone N$; thus $\beredone$ is the union of the +two compatible one-step contraction relations. \begin{lem}\ollabel{lem:one-par} If $M \beredone M'$, then $M \beredpar M'$. \end{lem} \begin{proof} - By induction on the !!{derivation} of $M \beredone M'$. If $M \bredone - M'$ by $\eta$-conversion (i.e., \olref[syn][eta]{defn:beredone}), we - use \olref[pbe]{thm:refl}. The other cases are as in - \olref[b]{lem:one-par}. + Induct on the compatible one-step contraction derivation. For a + root $\eta$-contraction, $M=\lambd[x][Nx]$, $M'=N$, and + $x\notin\FV{N}$. Use $N\beredpar N$ from + \olref[pbe]{thm:refl}, followed by \olref[pbe]{defn:beredpar5}. + The root $\beta$ case and the abstraction and application contexts + are as in \olref[b]{lem:one-par}. \end{proof} @@ -49,7 +53,7 @@ \end{proof} \begin{thm}\ollabel{thm:cr} - $\bered$ satisfies Church--Rosser property. + $\bered$ satisfies the Church--Rosser property. \end{thm} \begin{proof} diff --git a/content/lambda-calculus/church-rosser/beta-reduction.tex b/content/lambda-calculus/church-rosser/beta-reduction.tex index 00b305a4..8c032824 100644 --- a/content/lambda-calculus/church-rosser/beta-reduction.tex +++ b/content/lambda-calculus/church-rosser/beta-reduction.tex @@ -13,11 +13,18 @@ \begin{lem}\ollabel{lem:one-par} If $M \bredone M'$, then $M \bredpar M'$. \end{lem} -\begin{proof} If $M \bredone M'$, then $M$ is +\begin{proof} +Induct on the compatible one-step contraction derivation. In the +root-redex case, $M$ is $(\lambd[x][N])Q$, $M'$ is $\Subst{N}{Q}{x}$, for some $x$, $N$, and~$Q$. Since $N \bredpar N$ and $Q \bredpar Q$ by \olref[pb]{thm:refl}, we immediately have $(\lambd[x][N])Q \bredpar \Subst{N}{Q}{x}$ by \olref[pb]{defn:bredpar}\olref[pb]{defn:bredpar4}. +For a contraction inside an abstraction, lift the induction +hypothesis by \olref[pb]{defn:bredpar2}. For a contraction in either +child of an application, combine the induction hypothesis with +\olref[pb]{thm:refl} on the unchanged child and use +\olref[pb]{defn:bredpar3}. \end{proof} \begin{lem}\ollabel{lem:par-red} @@ -40,7 +47,7 @@ by the reduction $Q \bred Q'$. \item The last rule is \olref[pb]{defn:bredpar4}: $M$ is $(\lambd[x][N])Q$ and $M'$ is $\Subst{N'}{Q'}{x}$ for some $x$, - $N$, $M'$, $Q$, $Q'$, where $N \bredpar N'$ and $Q \bredpar Q'$. + $N$, $N'$, $Q$, $Q'$, where $N \bredpar N'$ and $Q \bredpar Q'$. By induction hypothesis we get $Q \bred Q'$ and $N \bred N'$. So $(\lambd[x][N])Q \bred \Subst{N'}{Q'}{x}$ by $N \bred N'$ followed by $Q \bred Q'$ and finally contraction of $(\lambd[x][N'])Q'$ to @@ -58,7 +65,7 @@ $\bred \subseteq \xred$: Suppose $M \bred M'$, i.e., $M \ident M_1 \bredone \dots \bredone M_k \ident M'$. By \olref{lem:one-par}, $M - \ident M_1 \bredpar \dots \bredpar M_k \ident M'$. Since is $\xred$ + \ident M_1 \bredpar \dots \bredpar M_k \ident M'$. Since $\xred$ contains $\bredpar$ and is transitive, $M \xred M'$. $\xred \subseteq \bred$: Suppose $M \xred M'$, i.e., $M diff --git a/content/lambda-calculus/church-rosser/definitions-and-properties.tex b/content/lambda-calculus/church-rosser/definitions-and-properties.tex index 8e494072..3342ed7b 100644 --- a/content/lambda-calculus/church-rosser/definitions-and-properties.tex +++ b/content/lambda-calculus/church-rosser/definitions-and-properties.tex @@ -21,8 +21,8 @@ We can view the lambda calculus as a model of computation in which terms in normal form are ``values'' and a reducibility relation on -terms are the ``calculation rules.'' The Church--Rosser property states -is that when there is more than one way to proceed with a calculation, +terms supplies the ``calculation rules.'' The Church--Rosser property states +that when there is more than one way to proceed with a calculation, there is still only a single value of the expression. To take an example from elementary algebra, there's more than one way @@ -61,7 +61,7 @@ M & \xredone Q_1 \xredone \dots \xredone Q_n. \end{align*} We will prove the theorem by constructing a grid $N$ of terms of - height is $m + 1$ and width $n + 1$. We use $N_{i,j}$ to denote the + height $m + 1$ and width $n + 1$. We use $N_{i,j}$ to denote the term in the $i$-th row and $j$-th column. We construct $N$ in such a way that $N_{i,j} \xredone N_{i+1,j}$ and diff --git a/content/lambda-calculus/church-rosser/parallel-beta-eta-reduction.tex b/content/lambda-calculus/church-rosser/parallel-beta-eta-reduction.tex index 7d7f66f3..debb93a4 100644 --- a/content/lambda-calculus/church-rosser/parallel-beta-eta-reduction.tex +++ b/content/lambda-calculus/church-rosser/parallel-beta-eta-reduction.tex @@ -19,7 +19,7 @@ inductively defined as follows: \begin{enumerate} \item \ollabel{defn:beredpar1} $x \beredpar x$. - \item \ollabel{defn:beredpar2} If $N \xrightarrow{\beta} N'$ then $\lambd[x][N] \beredpar + \item \ollabel{defn:beredpar2} If $N \beredpar N'$ then $\lambd[x][N] \beredpar \lambd[x][N']$. \item \ollabel{defn:beredpar3} If $P \beredpar P'$ and $Q \beredpar Q'$ then $PQ \beredpar P'Q'$. @@ -47,7 +47,9 @@ as follows: \begin{align} \becd{x} &= x \ollabel{defn:becd1} \\ - \becd{(\lambd[x][N])} &= \lambd[x][\becd{N}] \ollabel{defn:becd2}\\ + \becd{(\lambd[x][N])} &= \lambd[x][\becd{N}] + &&\text{if $\lambd[x][N]$ is not an $\eta$-redex} + \ollabel{defn:becd2}\\ \becd{(PQ)} &= \becd{P}\becd{Q} && \text{if $P$ is not a $\lambd$-abstract} \ollabel{defn:becd3} \\ \becd{((\lambd[x][N])Q)} &= \Subst{\becd{N}}{\becd{Q}}{x} @@ -67,7 +69,7 @@ The first four cases are exactly like those in \olref[pb]{lem:comp}. If the last rule is \olref{defn:beredpar5}, then $M$ is - $\lambd[x][Nx]$, $M'$ is $N'$ for some $x$ and~$N'$ where $x \notin + $\lambd[x][Nx]$, $M'$ is $N'$ for some $x$, $N$, and~$N'$ where $x \notin FV(N)$, and $N \beredpar N'$. We want to show that $\Subst{(\lambd[x][Nx])}{R}{y} \beredpar \Subst{N'}{R'}{y}$, i.e., $\lambd[x][\Subst{N}{R}{y} x] \beredpar \Subst{N'}{R'}{y}$. It @@ -80,14 +82,52 @@ \end{lem} \begin{proof} - By induction on the !!{derivation} of $M \beredpar M'$. - - The first four cases are like those in \olref[pb]{lem:cont}. If the - last rule is \olref{defn:beredpar5}, then $M$ is $\lambd[x][Nx]$ and - $M'$ is $N'$ for some $x$, $N$, $N'$ where $x \notin FV(N)$ and $N - \beredpar N'$. We want to show that $N' \beredpar - \becd{(\lambd[x][Nx])}$, i.e., $N' \beredpar \becd{N}$, which is - immediate by induction hypothesis. +Use strong induction on the size of $M$, with representatives chosen +fresh whenever needed. Induction on parallel-reduction derivations +first gives $\FV{A'}\subseteq\FV{A}$ whenever $A\beredpar A'$. +Also $A\beredpar\becd{A}$ follows from the development clauses by +structural induction. These facts preserve every freshness +condition used below. + +The variable case is immediate. Suppose $M=\lambd[x][N]$ is not an +$\eta$-redex. Its parallel reduct is $\lambd[x][N']$, where +$N\beredpar N'$. The induction hypothesis and the abstraction rule +give $\lambd[x][N']\beredpar\lambd[x][\becd{N}]=\becd{M}$. + +Now suppose $M=\lambd[x][Px]$ with $x\notin\FV{P}$, so that +$\becd{M}=\becd{P}$. An outer $\eta$ step gives a reduct $P'$ of $P$, +and induction gives $P'\beredpar\becd{P}$. An abstraction step gives +$\lambd[x][N']$ where $Px\beredpar N'$. If this body step uses the +application rule, $N'=P'x$, and induction followed by the $\eta$ +rule gives $\lambd[x][P'x]\beredpar\becd{P}$. If it uses the +$\beta$ rule, write $P=\lambd[y][T]$ and +$N'=\Subst{T'}{x}{y}$, where $T\beredpar T'$. Since $x$ is fresh, +$\lambd[x][\Subst{T'}{x}{y}]\aeq\lambd[y][T']$. +The latter is a parallel reduct of the smaller term $P$, so induction +again gives a parallel reduction to $\becd{P}$. + +Suppose next that $M=PQ$ and $P$ is not an abstraction. Only the +application rule can be last, and induction gives +$P'Q'\beredpar\becd{P}\becd{Q}=\becd{M}$. + +Finally let $M=(\lambd[x][N])Q$. If the last rule is the $\beta$ +rule, induction and \olref{lem:comp} give +$\Subst{N'}{Q'}{x}\beredpar\Subst{\becd{N}}{\becd{Q}}{x} +=\becd{M}$. If the last rule is application, the reduct is $P'Q'$ +with $\lambd[x][N]\beredpar P'$ and $Q\beredpar Q'$. +When the function reduction uses abstraction, $P'=\lambd[x][N']$; +induction and the $\beta$ rule give the same target. + +The remaining function reduction uses $\eta$: then $N=Sx$, +$x\notin\FV{S}$, and $S\beredpar P'$. If $S$ is not an abstraction, +the target is $\becd{S}\becd{Q}$, reached from $P'Q'$ by induction +and application. If $S=\lambd[y][T]$, the target is +$\Subst{\becd{T}}{\becd{Q}}{y}$, by the capture-free substitution +identity and freshness of $x$. But $P'Q'$ is a parallel reduct of +$SQ$, a term strictly smaller than the original +$(\lambd[x][Sx])Q$. The strong induction hypothesis for $SQ$ gives +exactly that target. This covers both overlaps between $\beta$ and +$\eta$. \end{proof} \begin{thm}\ollabel{thm:cr} diff --git a/content/lambda-calculus/church-rosser/parallel-beta-reduction.tex b/content/lambda-calculus/church-rosser/parallel-beta-reduction.tex index 86c8f55d..d268e10f 100644 --- a/content/lambda-calculus/church-rosser/parallel-beta-reduction.tex +++ b/content/lambda-calculus/church-rosser/parallel-beta-reduction.tex @@ -11,13 +11,13 @@ \olsection{Parallel $\beta$-reduction} We introduce the notion of \emph{parallel $\beta$-reduction}, and -prove the it has the Church--Rosser property. +prove that it has the Church--Rosser property. \begin{defn}[parallel $\beta$-reduction, $\bredpar$] \ollabel{defn:bredpar} Parallel reduction ($\bredpar$) of terms is inductively defined as follows: \begin{enumerate} \item \ollabel{defn:bredpar1} $x \bredpar x$. - \item \ollabel{defn:bredpar2} If $N \xrightarrow{\beta} N'$ then $\lambd[x][N] \bredpar + \item \ollabel{defn:bredpar2} If $N \bredpar N'$ then $\lambd[x][N] \bredpar \lambd[x][N']$. \item \ollabel{defn:bredpar3} If $P \bredpar P'$ and $Q \bredpar Q'$ then $PQ \bredpar P'Q'$. @@ -86,7 +86,7 @@ $\Subst{(\lambd[x][N])}{R}{y} \bredpar \Subst{(\lambd[x][N'])}{R'}{y}$, i.e., $\lambd[x][\Subst{N}{R}{y}] \bredpar - \lambd[x][\Subst{N'}{R}{y}]$. This follows immediately by + \lambd[x][\Subst{N'}{R'}{y}]$. This follows immediately by \olref{defn:bredpar2} and the induction hypothesis. \item The last step is \olref{defn:bredpar3}: Exercise. \item The last step is \olref{defn:bredpar4}: $M$ is From 873d593153fdbd97656859b5ce3681b13ea39f87 Mon Sep 17 00:00:00 2001 From: KokunoYumeto <208192274+KokunoYumeto@users.noreply.github.com> Date: Sun, 29 Nov 2026 10:30:49 +0100 Subject: [PATCH 11/19] lambda-calculus/lambda-definability: fix numeral, pair, list and recursion encodings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found in the translations' records of errors of the English (the errata harvest of 28-29 November 2026: GPT-6 Astra, OpenAI, ChatGPT Pro mode, classified every record against 2e19d095 and made this patch; applied here by Claude Opus 5.5, Anthropic, effort max). Each issue with its sources is in ENGLISH_ERRATA_CONSOLIDATED.tsv: - HV-1951 OLP-0374 introduction.tex:73: English number agreement. - HV-1952 OLP-0374 introduction.tex:75: The displayed function name loses its subscript. Input already correctly has c_k(n)=k. This is an identifier typo, not a refutation of the constant-function construction. / Index k dropped from named constant function. / The ... - HV-1953 OLP-0375 arithmetical-functions.tex:2: The repository comment drops the second i in definability. The task covers the whole repository, including misspelled words in source metadata; this does not authorize otherwise harmless namespace renaming. - HV-1955 OLP-0375 arithmetical-functions.tex:29: The fully curried term contains the redex (num(n) f); its root is an application whose function is itself an application. Reaching f^n x requires contracting both leading abstractions, not one. Input already changes the arrow ... - HV-1956 OLP-0375 arithmetical-functions.tex:68: English agreement typo. - HV-1957 OLP-0375 arithmetical-functions.tex:72: These lines each combine multiple curried beta contractions. Input already consistently uses the multi-step arrow in these chains. / Each abbreviated displayed transition takes at least two beta contractions. / Each displayed ... - HV-1961 OLP-0375 arithmetical-functions.tex:144: The plural coordinated subject already has are in current upstream, fixing the older is error. The remaining generic count noun Church numeral must be plural here. - HV-1962 OLP-0376 pairs.tex:15: Literal insertion can capture a free f in a component; the fresh-binder condition is not explicitly part of the abbreviation. - HV-1966 OLP-0650 lists.tex:14: Without binder freshness, an open component containing s or z is captured; alpha-renaming after insertion cannot restore its free variable. - HV-1968 OLP-0650 lists.tex:37: Church is the mathematician’s proper name and is correctly capitalized in the definition and surrounding chapters. - HV-1969 OLP-0377 truth-values.tex:19: Grammatical coordination mixes a finite verb and participle. - HV-1976 OLP-0378 primitive-recursive-functions.tex:73: Plural agreement and article are incorrect. - HV-1980 OLP-0378 primitive-recursive-functions.tex:126: The lambda macro emits no enclosing parentheses; widest scope places those arguments inside the abstraction rather than applying the abstraction. - HV-1981 OLP-0379 fixpoints.tex:24: The displayed pure lambda-term abbreviation uses bare 0 instead of the Church-zero term used in the arithmetic construction. / The bare zero is not the encoded Church-zero term used by the numeric iteration. - HV-1984 OLP-0379 fixpoints.tex:55: The preceding argument establishes agreement on Church-numeral inputs, which does not imply beta-equivalence of arbitrary representing terms. The fixed-point construction later supplies a particular representative with the ... - HV-1985 OLP-0379 fixpoints.tex:89: With Y=UU, Yg=(UU)g has a redex UU as a proper subterm; it is not itself a root redex of the form (lambda x.M)N. / With Y defined as UU, the outer term (UU)g is not itself an abstraction application; it contains the redex UU. ... - HV-1986 OLP-0379 fixpoints.tex:96: The displayed expansion is g(Yg), g(g(Yg)), and so on. That is iteration/nesting around the fixed point, not repeated self-application gg. State the actual displayed operation without suggesting the wrong lambda application shape. - HV-1988 OLP-0379 fixpoints.tex:148: Missing parentheses around the first abstraction change the scope of the intended application. - HV-1989 OLP-0379 fixpoints.tex:158: The exact displayed lambda term is standardly identified as Curry’s paradoxical combinator. Ker (2009), p. 11 §1.9 and Seldin (n.d.), p. 8 explicitly give the same term; the Church attribution is unsupported. Source metadata, ... - HV-1995 OLP-0380 minimization.tex:34: The new English Search formula has an unclosed recursive-call parenthesis and an extra lambda-argument closing bracket. Input Persian already has the balanced expression. / The recursive-call parenthesis remains open and there ... - HV-1997 OLP-0380 minimization.tex:37: The subsequent displayed one-directional unfolding preserves Y Search literally at the recursive call and uses the stronger reducing-combinator property. An arbitrary fixed-point combinator guarantees beta conversion, not that ... - HV-1998 OLP-0380 minimization.tex:38: The displayed Search functional calls its parameter g; recursive self-reference belongs to its fixed point Y Search. / Search itself contains no reference to its own name; recursion is supplied by the fixed point of the step ... - HV-1999 OLP-0381 partial-recursive-functions.tex:14: The subject compares two classes of functions. The singular count noun function has neither determiner nor an individual referent; use the plural class name. - HV-2000 OLP-0381 partial-recursive-functions.tex:25: The When-clause and participial meaning phrase have no finite main clause. Removing meaning makes Gx has no normal form the required main clause and preserves the definedness statement. - HV-2001 OLP-0381 partial-recursive-functions.tex:28: The example illustrates argument erasure but does not satisfy the numerical-function representation hypothesis: lambda y.y is not a Church numeral under the chapter beta-normal-form definition. A constant Church-zero function ... - HV-2005 OLP-0382 lambda-definable-recursive.tex:23: Typographical misspelling. / Spelling and plural subject–verb agreement. Co-Authored-By: Claude Opus 5.5 (cherry picked from commit be0b895acd8b6efa662607c5ae0732b2d6273392) --- .../arithmetical-functions.tex | 18 ++++++------- .../lambda-definability/fixpoints.tex | 26 ++++++++++--------- .../lambda-definability/introduction.tex | 4 +-- .../lambda-definable-recursive.tex | 4 +-- .../lambda-definability/lists.tex | 3 ++- .../lambda-definability/minimization.tex | 11 ++++---- .../lambda-definability/pairs.tex | 2 +- .../partial-recursive-functions.tex | 8 +++--- .../primitive-recursive-functions.tex | 6 ++--- .../lambda-definability/truth-values.tex | 2 +- 10 files changed, 44 insertions(+), 40 deletions(-) diff --git a/content/lambda-calculus/lambda-definability/arithmetical-functions.tex b/content/lambda-calculus/lambda-definability/arithmetical-functions.tex index c8e01618..e92acab5 100644 --- a/content/lambda-calculus/lambda-definability/arithmetical-functions.tex +++ b/content/lambda-calculus/lambda-definability/arithmetical-functions.tex @@ -1,5 +1,5 @@ % Part: lambda-calculus -% Chapter: lambda-definablity +% Chapter: lambda-definability % Section: arithmetical-functions \documentclass[../../../include/open-logic-section]{subfiles} @@ -26,8 +26,8 @@ if the argument $a$ is a Church numeral, it reduces to one. Consider:} (\lambd[a][\lambd[fx][f ({a} f x)]])\,\num{n} & \redone \lambd[fx][f ({\num{n}} f x)]. - \intertext{The embedded term $\num{n}fx$ is a redex, since - $\num{n}$ is $\lambd[fx][f^nx]$. So $\num{n}fx \redone f^nx$ and + \intertext{The embedded term $\num{n}fx$ contains a redex, since + $\num{n}$ is $\lambd[fx][f^nx]$. Thus $\num{n}fx \red f^nx$ and so, for the entire term we have} \fn{Succ}\, \num n & \red \lambd[fx][f(f^n(x))], \end{align*} @@ -65,19 +65,19 @@ \intertext{or, alternatively,} \fn{Add}' & \ident \lambd[{a}{b}][{a}\, \fn{Succ} \, {b}]. \intertext{The first addition works as follows: $\fn{Add}$ first - accept two numbers ${a}$ and ${b}$. The result is a function that + accepts two numbers ${a}$ and ${b}$. The result is a function that accepts $f$ and $x$ and returns $af(bfx)$. If $a$ and $b$ are Church numerals $\num{n}$ and $\num{m}$, this reduces to $f^{n+m}(x)$, which is identical to $f^{n}(f^{m}(x))$. Or, slowly:} - (\lambd[{a}{b}][\lambd[fx][{a} f ({b} f x)]])\num n\,\num m & \redone + (\lambd[{a}{b}][\lambd[fx][{a} f ({b} f x)]])\num n\,\num m & \red \lambd[fx][\num{n}\, f (\num {m}\, f x)] \\ - & \redone \lambd[fx][\num{n}\, f (f^m x)] \\ - & \redone \lambd[fx][f^n (f^m x)] \ident \num {n+m}. + & \red \lambd[fx][\num{n}\, f (f^m x)] \\ + & \red \lambd[fx][f^n (f^m x)] \ident \num {n+m}. \intertext{The second representation of addition $\fn{Add'}$ works differently: Applied to two Church numerals $\num{n}$ and $\num{m}$,} \fn{Add}' \num n \,\num m -& \redone \num{n}\, \fn{Succ}\, \num{m}. +& \red \num{n}\, \fn{Succ}\, \num{m}. \intertext{But $\num{n} f x$ always reduces to $f^n(x)$. So,} \num{n}\, \fn{Succ}\, \num{m} & \red \fn{Succ}^n(\num{m}). \end{align*} @@ -141,7 +141,7 @@ $\eta$-reduction, this does not work for exponent~$0$ however. \end{editorial} -Predecessor and subtraction on Church numeral are not as easy to +Predecessor and subtraction on Church numerals are not as easy to define as we might think: it requires encoding of pairs. \end{document} diff --git a/content/lambda-calculus/lambda-definability/fixpoints.tex b/content/lambda-calculus/lambda-definability/fixpoints.tex index da4852d1..c620a0c5 100644 --- a/content/lambda-calculus/lambda-definability/fixpoints.tex +++ b/content/lambda-calculus/lambda-definability/fixpoints.tex @@ -21,7 +21,7 @@ side. Such recursive definitions involving self-reference are not part of the lambda calculus. Defining a term, e.g., by \[ -\fn{Mult} \ident \lambd[ab][a (\fn{Add}\, b) 0] +\fn{Mult} \ident \lambd[ab][a (\fn{Add}\, b) \num{0}] \] only involves previously defined terms on the right-hand side, such as $\fn{Add}$. We can always remove $\fn{Add}$ by replacing it with its @@ -52,11 +52,13 @@ \] applied to the term $f$, i.e., $\fn{Fac}'\,f$, also represents the factorial function. That is, if we regard $\fn{Fac}'$ as a function -accepting a function and returning a function, the value of -$\fn{Fac'}\, f$ is just~$f$, provided $f$ is the factorial. A -function~$f$ with the property that $\fn{Fac}' \, f \equal[\beta] f$ is called -a \emph{fixpoint} of $\fn{Fac}'$. So, the factorial is a fixpoint of -$\fn{Fac}'$. +accepting a numerical-function representative and returning another +one, $\fn{Fac'}\,f$ agrees with $f$ on Church-numeral inputs whenever +$f$ represents factorial. This numerical agreement does not by itself +imply $\beta$-equivalence of the terms. A term~$f$ satisfying the +stronger equation $\fn{Fac}'\,f\equal[\beta]f$ is called a +\emph{fixpoint} of $\fn{Fac}'$. The construction below supplies such +a fixpoint and proves that it represents factorial. There are terms in the lambda calculus that compute the fixpoints of a given term, and these terms can then be used to turn a term like @@ -86,15 +88,15 @@ Yg$, so $Yg$ is a fixpoint of~$g$. \end{proof} -Of course, since $Yg$ is a redex, the reduction can continue indefinitely: +Of course, since $Yg$ contains a redex, the reduction can continue indefinitely: \begin{align*} Y g &\red g (Y g) \\ &\red g (g (Y g)) \\ &\red g(g (g (Y g)))\\ &\ldots \end{align*} -So we can think of $Yg$ as $g$ applied to itself infinitely many -times. If we apply~$g$ to it one additional time, we---so to +So we can think of $Yg$ as an indefinitely repeated nesting of +applications of~$g$. If we apply~$g$ to it one additional time, we---so to speak---aren't doing anything extra; $g$~applied to~$g$ applied infinitely many times to~$Yg$ is still $g$~applied to~$Yg$ infinitely many times. @@ -145,7 +147,7 @@ that} G\,x_1 \dots x_n & \equal[\beta] \Subst{N}{G}{g}. \intertext{For by the fixpoint theorem,} -G \ident (Y \lambd[g][\lambd[x_1\dots x_n][N]]) & \red \lambd[g][\lambd[x_1\dots x_n][N]](Y \lambd[g][\lambd[x_1\dots x_n][N]])\\ +G \ident (Y \lambd[g][\lambd[x_1\dots x_n][N]]) & \red (\lambd[g][\lambd[x_1\dots x_n][N]])(Y \lambd[g][\lambd[x_1\dots x_n][N]])\\ & \ident (\lambd[g][\lambd[x_1\dots x_n][N]])\,G \intertext{and consequently} G\,x_1 \dots x_n @@ -155,12 +157,12 @@ \end{align*} The $Y$ combinator of \olref{defn:Turing-Y} is due to Alan -Turing. Alonzo Church had proposed a different version which we'll +Turing. Curry's paradoxical combinator is a different version which we'll call~$Y_C$: \[ Y_C \ident \lambd[g][(\lambd[x][g(xx)])(\lambd[x][g(xx)])]. \] -Church's combinator is a bit weaker than Turing's in that $Y_C g +Curry's combinator is a bit weaker than Turing's in that $Y_C g \equal[\beta] g(Y_C g)$ but not $Y_C g \bred g(Y_C g)$. Let $V$ be the term $\lambd[x][g(xx)]$, so that $Y_C \ident \lambd[g][VV]$. Then \begin{align*} diff --git a/content/lambda-calculus/lambda-definability/introduction.tex b/content/lambda-calculus/lambda-definability/introduction.tex index 219b597a..e5e13c45 100644 --- a/content/lambda-calculus/lambda-definability/introduction.tex +++ b/content/lambda-calculus/lambda-definability/introduction.tex @@ -70,9 +70,9 @@ \num{n_1} \dots \num{n_{k-1}}$ has no normal form otherwise. \end{defn} -A very simple example are the constant functions. The term $C_k \ident +Very simple examples are the constant functions. The term $C_k \ident \lambd[x][\num{k}]$ !!{lambda define}s the function $c_k\colon \Nat \to -\Nat$ such that $c(n) = k$. For $C_k \, \num n \ident +\Nat$ such that $c_k(n) = k$. For $C_k \, \num n \ident (\lambd[x][\num{k}])\num n \redone \num{k}$ for any~$n$. The identity function is !!{lambda defined} by $\lambd[x][x]$. More complex functions are of course harder to define, and often require a lot of diff --git a/content/lambda-calculus/lambda-definability/lambda-definable-recursive.tex b/content/lambda-calculus/lambda-definability/lambda-definable-recursive.tex index 6073d375..25caff6e 100644 --- a/content/lambda-calculus/lambda-definability/lambda-definable-recursive.tex +++ b/content/lambda-calculus/lambda-definability/lambda-definable-recursive.tex @@ -20,13 +20,13 @@ \begin{proof} We only sketch the proof. First, we arithmetize $\lambd$-terms, - i.e., systematially assign G\"odel numbers to $\lambd$-terms, using + i.e., systematically assign G\"odel numbers to $\lambd$-terms, using the usual power-of-primes coding of sequences. Then we define a partial recursive function $\fn{normalize}(t)$ operating on the G\"odel number~$t$ of a lambda term as argument, and which returns the G\"odel number of the normal form if it has one, or is undefined otherwise. Then define two partial recursive functions - $\fn{toChurch}$ and $\fn{fromChurch}$ that maps natural numbers to + $\fn{toChurch}$ and $\fn{fromChurch}$ that map natural numbers to and from the G\"odel numbers of the corresponding Church numeral. Using these recursive functions, we can define the function~$f$ as a diff --git a/content/lambda-calculus/lambda-definability/lists.tex b/content/lambda-calculus/lambda-definability/lists.tex index b153162a..72960e81 100644 --- a/content/lambda-calculus/lambda-definability/lists.tex +++ b/content/lambda-calculus/lambda-definability/lists.tex @@ -13,6 +13,7 @@ \[ [M_1, M_2, \ldots, M_n] \ident \lambd[sz][s M_1 (s M_2 (\ldots (s M_n z)))] \] +Choose distinct $s,z$ that are free in none of $M_1,\dots,M_n$. Informally speaking, the term representing a list is the ``accumulator'' function of the list: a function that accepts two terms; the first is a function that receives accumulated value along @@ -34,7 +35,7 @@ \lambd[l][l \, (\lambd[xa][\fn{Add} \, a \, \num{1}]) \num{0}] \end{align*} -$\fn{Sum}$ calculates the sum of a list of church numerals. It works +$\fn{Sum}$ calculates the sum of a list of Church numerals. It works by doing an accumulation on the list, where the initial value is $\num{0}$ and for each element, return $\fn{Add} \, x\, a$ as the new value (where $x$ is the current element and $a$ is the accumulated diff --git a/content/lambda-calculus/lambda-definability/minimization.tex b/content/lambda-calculus/lambda-definability/minimization.tex index 7093464a..9d909f23 100644 --- a/content/lambda-calculus/lambda-definability/minimization.tex +++ b/content/lambda-calculus/lambda-definability/minimization.tex @@ -31,13 +31,14 @@ function and a fixpoint combinator: \begin{align*} \fn{Search} & \ident \lambd[g][\lambd[f\,\vec{x}\,y][ - \fn{IsZero} (f\, \vec{x}\, y)\, y\, (g\, f\, \vec{x} (\fn{Succ}\, y)]]]\\ + \fn{IsZero} (f\, \vec{x}\, y)\, y\, (g\, f\, \vec{x} (\fn{Succ}\, y))]]\\ H & \ident \lambd[\vec x][(Y \, \fn{Search}) F\, \vec{x}\, \num{0}], \end{align*} - where $Y$ is any fixpoint combinator. Informally speaking, - $\fn{Search}$ is a self-referencing function: starting with~$y$, - test whether $f\, \vec x\, y$ is zero: if so, return~$y$, otherwise call - itself with $\fn{Succ}\, y$. Thus $(Y \, \fn{Search}) F + where $Y$ is the Turing fixpoint combinator of \olref[fp]{defn:Turing-Y}. Informally speaking, + $\fn{Search}$ describes one search step: starting with~$y$, + test whether $f\,\vec x\,y$ is zero; if so, return~$y$, otherwise + call its parameter $g$ with $f$, $\vec x$, and $\fn{Succ}\,y$. + The fixed point $Y\,\fn{Search}$ supplies the recursive search. Thus $(Y \, \fn{Search}) F \num{n_1}\dots\num{n_k}\,\num{0}$ returns the least~$m$ for which $f(n_1, \dots, n_k, m) = 0$. diff --git a/content/lambda-calculus/lambda-definability/pairs.tex b/content/lambda-calculus/lambda-definability/pairs.tex index 54317d9f..cdddb25a 100644 --- a/content/lambda-calculus/lambda-definability/pairs.tex +++ b/content/lambda-calculus/lambda-definability/pairs.tex @@ -12,7 +12,7 @@ \begin{defn} The pair of $M$ and $N$ (written $\tuple{M,N}$) is defined as follows: \[ -\tuple{M,N} \ident \lambd[f][fMN]. +\tuple{M,N} \ident \lambd[f][fMN],\qquad f\notin\FV{M}\cup\FV{N}. \] \end{defn} diff --git a/content/lambda-calculus/lambda-definability/partial-recursive-functions.tex b/content/lambda-calculus/lambda-definability/partial-recursive-functions.tex index d6422a27..9d93cfb1 100644 --- a/content/lambda-calculus/lambda-definability/partial-recursive-functions.tex +++ b/content/lambda-calculus/lambda-definability/partial-recursive-functions.tex @@ -11,7 +11,7 @@ Partial recursive functions are those obtained from the basic functions by composition, primitive recursion, and unbounded -minimization. They differ from general recursive function in that the +minimization. They differ from general recursive functions in that the functions used in unbounded search are not required to be regular. Not requiring regularity means that functions defined by minimization may sometimes not be defined. @@ -23,10 +23,10 @@ !!{lambda define}d by $\lambd[x][F (G x)]$ if $f$ and $g$ are !!{lambda define}d by terms $F$ and~$G$, respectively. However, when the functions are partial, this is problematic. When $g(x)$ is undefined, -meaning $G x$ has no normal form. In most cases this means that $F (G +$G x$ has no normal form. In most cases this means that $F (G x)$ has no normal forms either, which is what we want. But consider -when $F$ is $\lambd[x][\lambd[y][y]]$, in which case $F (G x)$ does -have a normal form ($\lambd[y][y]$). +when $F$ is $\lambd[x][\num{0}]$, in which case $F (G x)$ does +have the normal form $\num{0}$. This problem is not insurmountable, and there are ways to !!{lambda define} all partial recursive functions in such a way that diff --git a/content/lambda-calculus/lambda-definability/primitive-recursive-functions.tex b/content/lambda-calculus/lambda-definability/primitive-recursive-functions.tex index 0fd5bed1..401afa4e 100644 --- a/content/lambda-calculus/lambda-definability/primitive-recursive-functions.tex +++ b/content/lambda-calculus/lambda-definability/primitive-recursive-functions.tex @@ -70,7 +70,7 @@ Informally speaking, the primitive recursive definition iterates the application of the function $g$ $y$ times and applies it to $f(x_1, \dots, x_n)$. This is reminiscent of the definition of Church - numerals, which is also defined as a iterator. + numerals, which are also defined as iterators. For simplicity, we give the definition and proof for a single additional argument~$x$. The function $h$ is !!{lambda define}d by: @@ -123,9 +123,9 @@ Finally, consider \begin{align*} - H\,\num n\,\num m &\ident \lambd[x][\lambd[y][\fn{Snd} (y + H\,\num n\,\num m &\ident (\lambd[x][\lambd[y][\fn{Snd} (y (\lambd[p].\tuple{\fn{Succ} (\fn{Fst}\, p), (G\, x\, - (\fn{Fst}\, p)\, (\fn{Snd}\, p))}) \tuple{\num{0}, F x})]]\\ + (\fn{Fst}\, p)\, (\fn{Snd}\, p))}) \tuple{\num{0}, F x})]])\\ & \qquad\,\num n\, \num m\\ & \red \fn{Snd} (\num m \, \underbrace{(\lambd[p].\tuple{\fn{Succ} (\fn{Fst}\, p), (G \,\num n\, diff --git a/content/lambda-calculus/lambda-definability/truth-values.tex b/content/lambda-calculus/lambda-definability/truth-values.tex index dc05b169..74a2c4c6 100644 --- a/content/lambda-calculus/lambda-definability/truth-values.tex +++ b/content/lambda-calculus/lambda-definability/truth-values.tex @@ -16,7 +16,7 @@ \end{align*} Truth values are represented as \emph{selectors}, i.e., functions that -accept two arguments and returning one of them. The truth value +accept two arguments and return one of them. The truth value $\fn{true}$ selects its first argument, and $\fn{false}$ its second. For example, $\fn{true}\, M N$ always reduces to $M$, while $\fn{false}\, M N$ always reduces to~$N$. From 99e89bc68bab7649b8f479f82b2c81b82d67bf67 Mon Sep 17 00:00:00 2001 From: KokunoYumeto <208192274+KokunoYumeto@users.noreply.github.com> Date: Sun, 29 Nov 2026 17:00:13 +0100 Subject: [PATCH 12/19] lambda calculus, proof theory: line breaks for formulas the corrections lengthened A full build of open-logic-complete.tex after the corrections above set these wider than the page; nothing they say is changed unless noted: - computable-lambda.tex: Kleene's normal form inline at the line end, 17.8 pt; set as a display. - translation-N2i.tex: \FalseCl written as text, which ran into the next word, 10.5 pt; written $\FalseCl$ as in the rest of the book. - translations.tex: "N2i-derivation" tied to its letter, 12.4 pt; tie removed. Co-Authored-By: Claude Opus 5.5 (cherry picked from commit 866004636ecaf06f17c56faf99d6c27f5709af91) --- content/lambda-calculus/introduction/computable-lambda.tex | 6 +++++- content/proof-theory/natural-deduction/translation-N2i.tex | 2 +- content/proof-theory/normalization/translations.tex | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/content/lambda-calculus/introduction/computable-lambda.tex b/content/lambda-calculus/introduction/computable-lambda.tex index 36089b2a..99818c1a 100644 --- a/content/lambda-calculus/introduction/computable-lambda.tex +++ b/content/lambda-calculus/introduction/computable-lambda.tex @@ -17,7 +17,11 @@ \begin{proof} By Kleene's normal form theorem, for every partial computable function~$f$ there are primitive recursive functions $r$ and $u$ such -that $f(\vec x)\simeq u(\umin{t}{r(\vec x,t)})$. First we represent +that +\[ +f(\vec x)\simeq u(\umin{t}{r(\vec x,t)}). +\] +First we represent the initial functions and prove closure under composition and primitive recursion for \emph{total} functions. This supplies terms for $r$ and $u$. We then implement a search that returns the decoded diff --git a/content/proof-theory/natural-deduction/translation-N2i.tex b/content/proof-theory/natural-deduction/translation-N2i.tex index 1d5d45f5..4c420b36 100644 --- a/content/proof-theory/natural-deduction/translation-N2i.tex +++ b/content/proof-theory/natural-deduction/translation-N2i.tex @@ -129,7 +129,7 @@ \] If $!A\ident\lfalse$, append a cut with the axiom $\lfalse\Sequent\ $ to obtain the required empty succedent. - If the \FalseCl inference discharges no assumption, its premise + If the $\FalseCl$ inference discharges no assumption, its premise lacks $x:\lnot !A$. The induction hypothesis then already supplies $\Gamma'\Sequent\ $; retain that proof when $!A\ident\lfalse$, and otherwise apply \RightR{\Weakening} with~$!A$. diff --git a/content/proof-theory/normalization/translations.tex b/content/proof-theory/normalization/translations.tex index dc7619d9..3a0dd5c8 100644 --- a/content/proof-theory/normalization/translations.tex +++ b/content/proof-theory/normalization/translations.tex @@ -64,7 +64,7 @@ can, however, be avoided. Let's call a maximal list $S_1$, \dots,~$S_n$ of sequent occurrences -in a \Log{N2i}-!!{proof}~$\delta$ a \emph{branch} if $S_1$ is an +in a \Log{N2i}-!!{proof} $\delta$ a \emph{branch} if $S_1$ is an axiom and, for every $i Date: Mon, 30 Nov 2026 04:16:59 +0100 Subject: [PATCH 13/19] lambda-calculus/syntax: cite the alpha and eta sections in their chapter Correction 53b5e81 wrote \olref[alp]{sec} and \olref[eta]{sec} in conversion.tex, whose file id is {lam}{int}{con}: they resolved to lam:int:alp:sec and lam:int:eta:sec, which do not exist, since alpha.tex and eta.tex are {lam}{syn}{alp} and {lam}{syn}{eta}. Now \olref[syn][alp]{sec} and \olref[syn][eta]{sec}; \olref[bet]{sec} was right (beta.tex is {lam}{int}{bet}). Found when the translations were rebuilt with the corrections (the Hindi reader reported both as undefined). Co-Authored-By: Claude Opus 5.5 (cherry picked from commit f5b94d5a360467a465a2d1b2475fb827dec0f416) --- content/lambda-calculus/syntax/conversion.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/lambda-calculus/syntax/conversion.tex b/content/lambda-calculus/syntax/conversion.tex index 3afff77d..49720771 100644 --- a/content/lambda-calculus/syntax/conversion.tex +++ b/content/lambda-calculus/syntax/conversion.tex @@ -16,9 +16,9 @@ The $\alpha$-conversion is about variable renaming. It is natural to consider $\lambda x. x$ and $\lambda y.y$ representing the same function (the identity function). This is formalized by changes of -bound variable in \olref[alp]{sec}. The other two notions, +bound variable in \olref[syn][alp]{sec}. The other two notions, $\beta$- and $\eta$-reduction, are defined in \olref[bet]{sec} and -\olref[eta]{sec}, respectively. +\olref[syn][eta]{sec}, respectively. \end{document} From 6e737c06266d6398920febe38cae08dc211cb8e5 Mon Sep 17 00:00:00 2001 From: KokunoYumeto <208192274+KokunoYumeto@users.noreply.github.com> Date: Mon, 30 Nov 2026 09:24:35 +0100 Subject: [PATCH 14/19] lambda-calculus/introduction: drop a stray closing quotation mark Correction 7bea7b5 (C110) added the binder qualification but left a closing '' after "otherwise." that matches no opening quotation mark. Found by the sync of the translations (EN-005). Co-Authored-By: Claude Opus 5.5 --- content/lambda-calculus/introduction/syntax.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/lambda-calculus/introduction/syntax.tex b/content/lambda-calculus/introduction/syntax.tex index 7ba28eea..b1752ea6 100644 --- a/content/lambda-calculus/introduction/syntax.tex +++ b/content/lambda-calculus/introduction/syntax.tex @@ -62,7 +62,7 @@ ``same'' term; in other words, when we say that $M$ and $N$ are the same, we also mean ``up to renamings of the bound variables.'' A variable occurrence is called ``bound'' when it is in the scope of -an abstraction binding that same variable, and ``free'' otherwise.'' There are no free variables in the +an abstraction binding that same variable, and ``free'' otherwise. There are no free variables in the previous example; but in \[ (\lambd[z][yz])x From aae34514e0ebad84940172d9d53a9fbdef2cfc08 Mon Sep 17 00:00:00 2001 From: KokunoYumeto <208192274+KokunoYumeto@users.noreply.github.com> Date: Mon, 30 Nov 2026 09:24:36 +0100 Subject: [PATCH 15/19] proof-theory/propositions-as-types: verb agreement after the correction Correction 39b4ab1 (C91) made the subject plural ("the declared conversions") but kept "gets stuck"; and "Progress together with type preservation ensure" had a singular head. Found by the sync of the translations (EN-004). Co-Authored-By: Claude Opus 5.5 --- .../proof-theory/propositions-as-types/type-preservation.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/proof-theory/propositions-as-types/type-preservation.tex b/content/proof-theory/propositions-as-types/type-preservation.tex index 71b1d2b8..c6ac5c28 100644 --- a/content/proof-theory/propositions-as-types/type-preservation.tex +++ b/content/proof-theory/propositions-as-types/type-preservation.tex @@ -107,8 +107,8 @@ N' : !A$. Hence every $\lambd$-term not in normal form has a term-conversion step. This property is called \emph{progress}. -Progress together with type preservation ensure that the declared -conversions of $\lambd$-terms never ``gets stuck'': if a term is well-typed and +Progress and type preservation ensure that the declared +conversions of $\lambd$-terms never ``get stuck'': if a term is well-typed and isn't in normal form, it reduces to another well-typed term (and that term is of the same type). From cd9f6fa9421a468ea9618719d9f26319c93335ac Mon Sep 17 00:00:00 2001 From: KokunoYumeto <208192274+KokunoYumeto@users.noreply.github.com> Date: Mon, 30 Nov 2026 09:26:35 +0100 Subject: [PATCH 16/19] proof-theory/sequent-calculus: G3c also has the axioms with falsum on the left The sentence described the G3c axioms as the atomic identity sequents only; the rules of G3c (rules-G3c.tex) also give the axioms $\lfalse, \Gamma \Sequent \Delta$. Found by the sync of the translations of 30 Nov 2026 (GPT-6.0 Astra, OpenAI, ChatGPT Pro mode; its English errata EN-002) and checked here by Claude Opus 5.5, Anthropic, effort max. Co-Authored-By: Claude Opus 5.5 --- content/proof-theory/sequent-calculus/proof-examples.tex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/proof-theory/sequent-calculus/proof-examples.tex b/content/proof-theory/sequent-calculus/proof-examples.tex index 81501100..39afa052 100644 --- a/content/proof-theory/sequent-calculus/proof-examples.tex +++ b/content/proof-theory/sequent-calculus/proof-examples.tex @@ -122,8 +122,9 @@ result will still be a !!{proof} in~\Log{G1c}. The proof in \Log{G1c} is \emph{schematic}. -In \Log{G3c}, axioms are sequents of the form $!A, \Gamma \Sequent -\Delta, !A$ where $!A$ must be atomic. So although $!D, !C \Sequent +In \Log{G3c}, the identity axioms are sequents of the form $!A, \Gamma \Sequent +\Delta, !A$ where $!A$ must be atomic (the other axioms are the sequents +$\lfalse, \Gamma \Sequent \Delta$). So although $!D, !C \Sequent !E, !C$ looks like an axiom of \Log{G3c} ($\Gamma = \{!D\}$; $\Delta = \{!E\}$), it is certainly an axiom if $!C$ in fact is atomic. Our proof fragment is a complete proof in \Log{G3c} if $!C$, From b572f1c66500cde5e57ab41e60f717c90bece003 Mon Sep 17 00:00:00 2001 From: KokunoYumeto <208192274+KokunoYumeto@users.noreply.github.com> Date: Mon, 30 Nov 2026 09:26:35 +0100 Subject: [PATCH 17/19] proof-theory/cut-elimination: the conclusion is about Gamma_2 The argument has just shown $\Gamma_2 \Entails !A$; what contradicts the assumption $\Gamma_2 \Entails \lnot !A$ is $\Gamma_2 \Entails/ \lnot !A$, not the weaker statement about $\Gamma$. Found by the sync of the translations of 30 Nov 2026 (GPT-6.0 Astra, OpenAI, ChatGPT Pro mode; its English errata EN-003) and checked here by Claude Opus 5.5, Anthropic, effort max. Co-Authored-By: Claude Opus 5.5 --- content/proof-theory/cut-elimination/interpolation.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/proof-theory/cut-elimination/interpolation.tex b/content/proof-theory/cut-elimination/interpolation.tex index a7caf715..1e944406 100644 --- a/content/proof-theory/cut-elimination/interpolation.tex +++ b/content/proof-theory/cut-elimination/interpolation.tex @@ -573,7 +573,7 @@ completeness of~$\Gamma$, $\Gamma \Entails \lnot !A$, and since $\Gamma \subseteq \Gamma_1$, $\Gamma_1 \Entails \lnot !A$, making $\Gamma_1$ inconsistent. So $\Gamma \Entails !A$ and since $\Gamma -\subseteq \Gamma_2$, $\Gamma_2 \Entails !A$. So $\Gamma \Entails/ +\subseteq \Gamma_2$, $\Gamma_2 \Entails !A$. So $\Gamma_2 \Entails/ \lnot !A$, or $\Gamma_2$ would be inconsistent. The non-existence of !!a{sentence}~$!A$ in the joint From bfe85d77f1b1139d1a4f78311fd8f66838d27ed4 Mon Sep 17 00:00:00 2001 From: KokunoYumeto <208192274+KokunoYumeto@users.noreply.github.com> Date: Mon, 30 Nov 2026 09:26:35 +0100 Subject: [PATCH 18/19] proof-theory/normalization: the end-sequent of the main branch is no premise "Every S_i in the main branch is major premise of an elimination rule" also covered the last sequent of the branch, the end-sequent, which is the premise of no rule; the argument needs it only for the first sequent. Found by the sync of the translations of 30 Nov 2026 (GPT-6.0 Astra, OpenAI, ChatGPT Pro mode; its English errata EN-007) and checked here by Claude Opus 5.5, Anthropic, effort max. Co-Authored-By: Claude Opus 5.5 --- content/proof-theory/normalization/translations.tex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/proof-theory/normalization/translations.tex b/content/proof-theory/normalization/translations.tex index 3a0dd5c8..30e52668 100644 --- a/content/proof-theory/normalization/translations.tex +++ b/content/proof-theory/normalization/translations.tex @@ -139,8 +139,9 @@ sequent~$S_1$ in the main branch, $x:!C \in \Gamma$. \end{enumerate} We now distinguish cases according to the form of~$!C$. Since every - $S_i$ in the main branch is major premise of !!a{elimination} rule, - this also applies to $x:!C \Sequent !C$. + sequent $S_i$ of the main branch other than its last, the end-sequent, + is the major premise of !!a{elimination} rule, this applies in + particular to its first sequent $x:!C \Sequent !C$. \item $!C \ident !D \land !E$. Then $\delta$ has the form \[ From c37e6cccd46aa19496264cecf1c96638cde6b8c5 Mon Sep 17 00:00:00 2001 From: KokunoYumeto <208192274+KokunoYumeto@users.noreply.github.com> Date: Mon, 30 Nov 2026 09:26:35 +0100 Subject: [PATCH 19/19] proof-theory/normalization: repair a run-on sentence in the conjunction case The sentence had two finite verbs ("includes ... contains") and a comma splice. Found by the sync of the translations of 30 Nov 2026 (GPT-6.0 Astra, OpenAI, ChatGPT Pro mode; its English errata EN-008) and checked here by Claude Opus 5.5, Anthropic, effort max. Co-Authored-By: Claude Opus 5.5 --- content/proof-theory/normalization/translations.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/proof-theory/normalization/translations.tex b/content/proof-theory/normalization/translations.tex index 30e52668..abccca66 100644 --- a/content/proof-theory/normalization/translations.tex +++ b/content/proof-theory/normalization/translations.tex @@ -151,10 +151,10 @@ \Deduce$x:!D \land !E, \Gamma_1 \fCenter !A$ \DisplayProof \] - The main branch includes $x:!D \land !E \Sequent !D$ contains no + Since the main branch, which includes $x:!D \land !E \Sequent !D$, contains no major premise of \Intro{\lif}, \Intro{\lnot} nor a minor premise of - \Elim{\lor} or \Elim{\lexists}, the context !!{formula}s in $x:!D - \land !E$ remain unchanged along the main branch. This explains why + \Elim{\lor} or \Elim{\lexists}, the context !!{formula}~$x:!D + \land !E$ remains unchanged along the main branch. This explains why the context of the end-sequent must contain~$x:!D \land !E$. Moreover, we can turn the !!{proof} $\delta$ into a !!{proof}~$\delta_1$ by replacing the sub-!!{proof} ending in