├── .github
├── ISSUE_TEMPLATE
│ └── typo.md
└── workflows
│ └── build.yml
├── .gitignore
├── .gitmodules
├── LICENSE.md
├── Makefile
├── README.md
├── assets
├── diagrams
│ ├── bijective.tikz
│ ├── composition.tikz
│ ├── difference.tikz
│ ├── function.tikz
│ ├── injective.tikz
│ ├── intersection.tikz
│ ├── surjective.tikz
│ ├── turing-machine.tikz
│ └── union.tikz
└── logos
│ ├── aboer-print.png
│ ├── aboer-screen.png
│ ├── by.eps
│ ├── by.pdf
│ ├── cc.eps
│ ├── cc.pdf
│ ├── openlogic-logo-bw.eps
│ ├── openlogic-logo-bw.pdf
│ ├── openlogic-logo-color.eps
│ ├── openlogic-logo-color.pdf
│ ├── openlogic-wm-bw.eps
│ ├── openlogic-wm-bw.pdf
│ ├── openlogic-wm-color.eps
│ ├── openlogic-wm-color.pdf
│ ├── remix.eps
│ ├── remix.pdf
│ ├── ti-print.pdf
│ └── ti-screen.pdf
├── bib
├── natbib-oup.bst
└── open-logic.bib
├── content
├── computability
│ ├── computability-theory
│ │ ├── application-fixed-point.tex
│ │ ├── ce-closed-cup-cap.tex
│ │ ├── ce-sets.tex
│ │ ├── coding-computations.tex
│ │ ├── complement-ce.tex
│ │ ├── complete-ce-sets.tex
│ │ ├── computability-theory.tex
│ │ ├── computable-sets.tex
│ │ ├── def-functions-self-reference.tex
│ │ ├── equiv-ce-defs.tex
│ │ ├── fixed-point-thm.tex
│ │ ├── halting-problem.tex
│ │ ├── introduction.tex
│ │ ├── k-1.tex
│ │ ├── no-universal-function.tex
│ │ ├── non-comp-set.tex
│ │ ├── normal-form.tex
│ │ ├── prop-reduce.tex
│ │ ├── reducibility.tex
│ │ ├── rice-theorem.tex
│ │ ├── russells-paradox.tex
│ │ ├── s-m-n.tex
│ │ ├── total.tex
│ │ └── universal-part-function.tex
│ ├── computability.tex
│ └── recursive-functions
│ │ ├── bounded-minimization.tex
│ │ ├── composition.tex
│ │ ├── examples.tex
│ │ ├── general-recursive-functions.tex
│ │ ├── halting-problem.tex
│ │ ├── introduction.tex
│ │ ├── non-pr-functions.tex
│ │ ├── normal-form.tex
│ │ ├── notation-pr-functions.tex
│ │ ├── other-recursions.tex
│ │ ├── partial-functions.tex
│ │ ├── pr-functions-computable.tex
│ │ ├── pr-functions.tex
│ │ ├── pr-relations.tex
│ │ ├── primes.tex
│ │ ├── primitive-recursion.tex
│ │ ├── recursive-functions.tex
│ │ ├── sequences.tex
│ │ └── trees.tex
├── content.tex
├── counterfactuals
│ ├── counterfactuals.tex
│ ├── introduction
│ │ ├── counterfactuals.tex
│ │ ├── introduction.tex
│ │ ├── material-conditional.tex
│ │ ├── paradoxes-material.tex
│ │ └── strict-conditional.tex
│ └── minimal-change-semantics
│ │ ├── antecedent-strengthening.tex
│ │ ├── contraposition.tex
│ │ ├── introduction.tex
│ │ ├── minimal-change-semantics.tex
│ │ ├── sphere-models.tex
│ │ ├── transitivity.tex
│ │ └── true-false.tex
├── first-order-logic
│ ├── axiomatic-deduction
│ │ ├── axiomatic-deduction.tex
│ │ ├── axioms-rules-propositional.tex
│ │ ├── axioms-rules-quantifiers.tex
│ │ ├── deduction-theorem-quantifiers.tex
│ │ ├── deduction-theorem.tex
│ │ ├── identity.tex
│ │ ├── proof-theoretic-notions.tex
│ │ ├── provability-consistency.tex
│ │ ├── provability-propositional.tex
│ │ ├── provability-quantifiers.tex
│ │ ├── provability.tex
│ │ ├── proving-things-quant.tex
│ │ ├── proving-things.tex
│ │ ├── rules-and-proofs.tex
│ │ └── soundness.tex
│ ├── beyond
│ │ ├── beyond.tex
│ │ ├── higher-order-logic.tex
│ │ ├── introduction.tex
│ │ ├── intuitionistic-logic.tex
│ │ ├── many-sorted-logic.tex
│ │ ├── modal-logics.tex
│ │ ├── other-logics.tex
│ │ └── second-order-logic.tex
│ ├── completeness
│ │ ├── compactness-direct.tex
│ │ ├── compactness.tex
│ │ ├── complete-consistent-sets.tex
│ │ ├── completeness-thm.tex
│ │ ├── completeness.tex
│ │ ├── construction-of-model.tex
│ │ ├── downward-ls.tex
│ │ ├── henkin-expansions.tex
│ │ ├── identity.tex
│ │ ├── introduction.tex
│ │ ├── lindenbaums-lemma.tex
│ │ ├── maximally-consistent-sets.tex
│ │ └── outline.tex
│ ├── first-order-logic.tex
│ ├── introduction
│ │ ├── first-order-logic.tex
│ │ ├── formulas.tex
│ │ ├── introduction.tex
│ │ ├── models-theories.tex
│ │ ├── satisfaction.tex
│ │ ├── semantic-notions.tex
│ │ ├── sentences.tex
│ │ ├── soundness-completeness.tex
│ │ ├── substitution.tex
│ │ └── syntax.tex
│ ├── models-theories
│ │ ├── expressing-props-of-structures.tex
│ │ ├── expressing-relations.tex
│ │ ├── introduction.tex
│ │ ├── models-theories.tex
│ │ ├── set-theory.tex
│ │ ├── size-of-structures.tex
│ │ └── theories.tex
│ ├── natural-deduction
│ │ ├── derivations.tex
│ │ ├── identity.tex
│ │ ├── natural-deduction.tex
│ │ ├── proof-theoretic-notions.tex
│ │ ├── propositional-rules.tex
│ │ ├── provability-consistency.tex
│ │ ├── provability-propositional.tex
│ │ ├── provability-quantifiers.tex
│ │ ├── proving-things-quant.tex
│ │ ├── proving-things.tex
│ │ ├── quantifier-rules.tex
│ │ ├── rules-and-proofs.tex
│ │ ├── soundness-identity.tex
│ │ └── soundness.tex
│ ├── proof-systems
│ │ ├── axiomatic-deduction.tex
│ │ ├── introduction.tex
│ │ ├── natural-deduction.tex
│ │ ├── proof-systems.tex
│ │ ├── sequent-calculus.tex
│ │ └── tableaux.tex
│ ├── sequent-calculus
│ │ ├── derivations.tex
│ │ ├── identity.tex
│ │ ├── proof-theoretic-notions.tex
│ │ ├── propositional-rules.tex
│ │ ├── provability-consistency.tex
│ │ ├── provability-propositional.tex
│ │ ├── provability-quantifiers.tex
│ │ ├── proving-things-quant.tex
│ │ ├── proving-things.tex
│ │ ├── quantifier-rules.tex
│ │ ├── rules-and-proofs.tex
│ │ ├── sequent-calculus.tex
│ │ ├── soundness-identity.tex
│ │ ├── soundness.tex
│ │ └── structural-rules.tex
│ ├── syntax-and-semantics
│ │ ├── assignments.tex
│ │ ├── covered-structures.tex
│ │ ├── extensionality.tex
│ │ ├── first-order-languages.tex
│ │ ├── formation-sequences.tex
│ │ ├── free-vars-sentences.tex
│ │ ├── intro-semantics.tex
│ │ ├── intro-syntax.tex
│ │ ├── introduction.tex
│ │ ├── main-operator.tex
│ │ ├── satisfaction.tex
│ │ ├── semantic-notions.tex
│ │ ├── semantics.tex
│ │ ├── structures.tex
│ │ ├── subformulas.tex
│ │ ├── substitution.tex
│ │ ├── syntax-and-semantics.tex
│ │ ├── syntax.tex
│ │ ├── terms-formulas.tex
│ │ └── unique-readability.tex
│ └── tableaux
│ │ ├── derivations.tex
│ │ ├── identity.tex
│ │ ├── proof-theoretic-notions.tex
│ │ ├── propositional-rules.tex
│ │ ├── provability-consistency.tex
│ │ ├── provability-propositional.tex
│ │ ├── provability-quantifiers.tex
│ │ ├── proving-things-quant.tex
│ │ ├── proving-things.tex
│ │ ├── quantifier-rules.tex
│ │ ├── rules-and-proofs.tex
│ │ ├── soundness-identity.tex
│ │ ├── soundness.tex
│ │ └── tableaux.tex
├── history
│ ├── biographies
│ │ ├── alan-turing.tex
│ │ ├── alfred-tarski.tex
│ │ ├── alonzo-church.tex
│ │ ├── bertrand-russell.tex
│ │ ├── biographies.tex
│ │ ├── emmy-noether.tex
│ │ ├── ernst-zermelo.tex
│ │ ├── georg-cantor.tex
│ │ ├── gerhard-gentzen.tex
│ │ ├── julia-robinson.tex
│ │ ├── kurt-goedel.tex
│ │ └── rozsa-peter.tex
│ ├── history.tex
│ └── set-theory
│ │ ├── cantor-plane.tex
│ │ ├── hilbert-curve.tex
│ │ ├── infinitesimals.tex
│ │ ├── limits.tex
│ │ ├── mythology.tex
│ │ ├── pathologies.tex
│ │ └── set-theory.tex
├── incompleteness
│ ├── arithmetization-syntax
│ │ ├── arithmetization-syntax.tex
│ │ ├── coding-formulas.tex
│ │ ├── coding-symbols.tex
│ │ ├── coding-terms.tex
│ │ ├── introduction.tex
│ │ ├── proofs-in-ax.tex
│ │ ├── proofs-in-lk.tex
│ │ ├── proofs-in-nd.tex
│ │ └── substitution.tex
│ ├── incompleteness-provability
│ │ ├── first-incompleteness-thm.tex
│ │ ├── fixed-point-lemma.tex
│ │ ├── godels-paper.tex
│ │ ├── incompleteness-provability.tex
│ │ ├── introduction.tex
│ │ ├── lob-thm.tex
│ │ ├── provability-conditions.tex
│ │ ├── rosser-thm.tex
│ │ ├── second-incompleteness-thm.tex
│ │ └── tarski-thm.tex
│ ├── incompleteness.tex
│ ├── introduction
│ │ ├── definitions.tex
│ │ ├── historical-background.tex
│ │ ├── introduction.tex
│ │ ├── overview.tex
│ │ └── undecidability.tex
│ ├── representability-in-q
│ │ ├── basic-representable.tex
│ │ ├── beta-function.tex
│ │ ├── c-representable.tex
│ │ ├── c.tex
│ │ ├── comp-representable.tex
│ │ ├── composition-representable.tex
│ │ ├── introduction.tex
│ │ ├── minimization-representable.tex
│ │ ├── prim-rec.tex
│ │ ├── representability-in-q.tex
│ │ ├── representable-comp.tex
│ │ ├── representing-relations.tex
│ │ └── undecidability.tex
│ └── theories-computability
│ │ ├── complete-decidable.tex
│ │ ├── computably-axiomatizable.tex
│ │ ├── consis-with-q.tex
│ │ ├── extensions-of-q-not-decidable.tex
│ │ ├── first-incompleteness.tex
│ │ ├── inseparability.tex
│ │ ├── interpretability.tex
│ │ ├── introduction.tex
│ │ ├── oconsis-ext-of-q-undec.tex
│ │ ├── q-is-ce.tex
│ │ └── theories-computability.tex
├── intuitionistic-logic
│ ├── introduction
│ │ ├── axiomatic-derivations.tex
│ │ ├── bhk-interpretation.tex
│ │ ├── constructive-reasoning.tex
│ │ ├── introduction.tex
│ │ ├── natural-deduction.tex
│ │ └── syntax.tex
│ ├── intuitionistic-logic.tex
│ ├── propositions-as-types
│ │ ├── introduction.tex
│ │ ├── normalization.tex
│ │ ├── proof-terms.tex
│ │ ├── proofs-to-terms.tex
│ │ ├── propositions-as-types.tex
│ │ ├── reduction.tex
│ │ ├── sequent-natural-deduction.tex
│ │ └── terms-to-proofs.tex
│ ├── semantics
│ │ ├── introduction.tex
│ │ ├── propositions.tex
│ │ ├── relational-models.tex
│ │ ├── semantic-notions.tex
│ │ ├── semantics.tex
│ │ └── topological-semantics.tex
│ └── soundness-completeness
│ │ ├── canonical-model.tex
│ │ ├── completeness-thm.tex
│ │ ├── decidability.tex
│ │ ├── lindenbaum.tex
│ │ ├── soundness-axd.tex
│ │ ├── soundness-completeness.tex
│ │ ├── soundness-nd.tex
│ │ └── truth-lemma.tex
├── lambda-calculus
│ ├── church-rosser
│ │ ├── beta-eta-reduction.tex
│ │ ├── beta-reduction.tex
│ │ ├── church-rosser.tex
│ │ ├── definitions-and-properties.tex
│ │ ├── parallel-beta-eta-reduction.tex
│ │ └── parallel-beta-reduction.tex
│ ├── introduction
│ │ ├── basic-pr-lambda.tex
│ │ ├── church-rosser.tex
│ │ ├── composition.tex
│ │ ├── computable-lambda.tex
│ │ ├── currying.tex
│ │ ├── fixed-point-combinator.tex
│ │ ├── introduction.tex
│ │ ├── lambda-computable.tex
│ │ ├── lambda-definability.tex
│ │ ├── minimization.tex
│ │ ├── overview.tex
│ │ ├── primitive-recursion.tex
│ │ ├── reduction.tex
│ │ └── syntax.tex
│ ├── lambda-calculus.tex
│ ├── lambda-definability
│ │ ├── arithmetical-functions.tex
│ │ ├── fixpoints.tex
│ │ ├── introduction.tex
│ │ ├── lambda-definability.tex
│ │ ├── lambda-definable-recursive.tex
│ │ ├── lists.tex
│ │ ├── minimization.tex
│ │ ├── pairs.tex
│ │ ├── partial-recursive-functions.tex
│ │ ├── primitive-recursive-functions.tex
│ │ └── truth-values.tex
│ └── syntax
│ │ ├── abbreviated-syntax.tex
│ │ ├── alpha.tex
│ │ ├── beta.tex
│ │ ├── conversion.tex
│ │ ├── de-bruijn.tex
│ │ ├── eta.tex
│ │ ├── free-variables.tex
│ │ ├── substitution.tex
│ │ ├── syntax.tex
│ │ ├── term-revisited.tex
│ │ ├── terms.tex
│ │ └── unique-readability.tex
├── many-valued-logic
│ ├── infinite-valued-logics
│ │ ├── goedel.tex
│ │ ├── infinite-valued-logics.tex
│ │ ├── introduction.tex
│ │ └── lukasiewicz.tex
│ ├── many-valued-logic.tex
│ ├── sequent-calculus
│ │ ├── introduction.tex
│ │ ├── proof-theoretic-notions.tex
│ │ ├── propositional-rules.tex
│ │ ├── rules-and-proofs.tex
│ │ ├── sequent-calculus.tex
│ │ └── structural-rules.tex
│ ├── syntax-and-semantics
│ │ ├── connectives.tex
│ │ ├── formulas.tex
│ │ ├── introduction.tex
│ │ ├── matrices.tex
│ │ ├── semantic-notions.tex
│ │ ├── sublogics.tex
│ │ ├── syntax-and-semantics.tex
│ │ └── valuations-sat.tex
│ └── three-valued-logics
│ │ ├── goedel.tex
│ │ ├── introduction.tex
│ │ ├── kleene.tex
│ │ ├── lukasiewicz.tex
│ │ ├── multiple-designation.tex
│ │ └── three-valued-logics.tex
├── methods
│ ├── induction
│ │ ├── induction-on-N.tex
│ │ ├── induction.tex
│ │ ├── inductive-definitions.tex
│ │ ├── introduction.tex
│ │ ├── relations.tex
│ │ ├── strong-induction.tex
│ │ └── structural-induction.tex
│ ├── methods.pcr
│ ├── methods.tex
│ └── proofs
│ │ ├── cant-do-it.tex
│ │ ├── example-1.tex
│ │ ├── example-2.tex
│ │ ├── inference-patterns.tex
│ │ ├── introduction.tex
│ │ ├── proof-by-contradiction.tex
│ │ ├── proofs.tex
│ │ ├── reading-proofs.tex
│ │ ├── resources.tex
│ │ ├── starting-proofs.tex
│ │ └── using-definitions.tex
├── model-theory
│ ├── basics
│ │ ├── basics.tex
│ │ ├── dlo.tex
│ │ ├── isomorphism.tex
│ │ ├── nonstandard-arithmetic.tex
│ │ ├── overspill.tex
│ │ ├── partial-iso.tex
│ │ ├── reducts-and-expansions.tex
│ │ ├── substructures.tex
│ │ └── theory-of-m.tex
│ ├── interpolation
│ │ ├── definability.tex
│ │ ├── interpolation-proof.tex
│ │ ├── interpolation.tex
│ │ ├── introduction.tex
│ │ └── separation.tex
│ ├── lindstrom
│ │ ├── abstract-logics.tex
│ │ ├── introduction.tex
│ │ ├── lindstrom-proof.tex
│ │ ├── lindstrom.tex
│ │ └── ls-property.tex
│ ├── model-theory.tex
│ └── models-of-arithmetic
│ │ ├── computable-models.tex
│ │ ├── introduction.tex
│ │ ├── models-of-arithmetic.tex
│ │ ├── models-of-pa.tex
│ │ ├── models-of-q.tex
│ │ ├── non-standard-models.tex
│ │ └── standard-models.tex
├── normal-modal-logic
│ ├── axioms-systems
│ │ ├── axioms-systems.tex
│ │ ├── consistency.tex
│ │ ├── derived-rules.tex
│ │ ├── duals.tex
│ │ ├── introduction.tex
│ │ ├── logics-proofs.tex
│ │ ├── more-proofs-in-K.tex
│ │ ├── normal-logics.tex
│ │ ├── proofs-in-K.tex
│ │ ├── proofs-modal-systems.tex
│ │ ├── provability-from-set.tex
│ │ ├── provability-properties.tex
│ │ ├── soundness.tex
│ │ └── systems-distinct.tex
│ ├── completeness
│ │ ├── canonical-models.tex
│ │ ├── complete-consistent-sets.tex
│ │ ├── completeness-K.tex
│ │ ├── completeness.tex
│ │ ├── frame-completeness.tex
│ │ ├── introduction.tex
│ │ ├── lindenbaums-lemma.tex
│ │ ├── modalities-ccs.tex
│ │ └── truth-lemma.tex
│ ├── filtrations
│ │ ├── S5-decidable.tex
│ │ ├── S5-fmp.tex
│ │ ├── euclidean-filtrations.tex
│ │ ├── examples-of-filtrations.tex
│ │ ├── filtrations-def.tex
│ │ ├── filtrations.tex
│ │ ├── finite.tex
│ │ ├── introduction.tex
│ │ ├── more-filtrations.tex
│ │ └── preliminaries.tex
│ ├── frame-definability
│ │ ├── definability.tex
│ │ ├── equivalence-S5.tex
│ │ ├── first-order-definability.tex
│ │ ├── frame-definability.tex
│ │ ├── frames.tex
│ │ ├── introduction.tex
│ │ ├── properties-accessibility.tex
│ │ └── second-order-definability.tex
│ ├── normal-modal-logic.tex
│ ├── sequent-calculus
│ │ ├── introduction.tex
│ │ ├── more-rules.tex
│ │ ├── proofs-in-K.tex
│ │ ├── rules-for-K.tex
│ │ └── sequent-calculus.tex
│ ├── syntax-and-semantics
│ │ ├── entailment.tex
│ │ ├── introduction.tex
│ │ ├── language-modal-logic.tex
│ │ ├── modal-validity.tex
│ │ ├── normal-modal-logics.tex
│ │ ├── relational-models.tex
│ │ ├── schemas.tex
│ │ ├── substitution.tex
│ │ ├── syntax-and-semantics.tex
│ │ ├── tautological-instances.tex
│ │ ├── truth-at-w.tex
│ │ └── truth-in-model.tex
│ └── tableaux
│ │ ├── completeness.tex
│ │ ├── countermodels.tex
│ │ ├── introduction.tex
│ │ ├── more-rules.tex
│ │ ├── more-soundness.tex
│ │ ├── proofs-in-K.tex
│ │ ├── rules-for-K.tex
│ │ ├── simple-S5.tex
│ │ ├── soundness.tex
│ │ └── tableaux.tex
├── open-logic-about.tex
├── propositional-logic
│ ├── propositional-logic.tex
│ └── syntax-and-semantics
│ │ ├── completeness.tex
│ │ ├── formation-sequences.tex
│ │ ├── formulas.tex
│ │ ├── introduction.tex
│ │ ├── preliminaries.tex
│ │ ├── semantic-notions.tex
│ │ ├── soundness.tex
│ │ ├── syntax-and-semantics.tex
│ │ └── valuations-sat.tex
├── reference
│ ├── fraktur-alphabet
│ │ └── fraktur-alphabet.tex
│ ├── greek-alphabet
│ │ └── greek-alphabet.tex
│ └── reference.tex
├── second-order-logic
│ ├── metatheory
│ │ ├── compactness.tex
│ │ ├── introduction.tex
│ │ ├── loewenheim-skolem.tex
│ │ ├── metatheory.tex
│ │ ├── second-order-arithmetic.tex
│ │ └── undecidability-and-axiomatizability.tex
│ ├── second-order-logic.tex
│ ├── sol-and-set-theory
│ │ ├── cardinalities.tex
│ │ ├── comparing-sets.tex
│ │ ├── introduction.tex
│ │ ├── power-of-continuum.tex
│ │ └── sol-and-set-theory.tex
│ └── syntax-and-semantics
│ │ ├── expressive-power.tex
│ │ ├── inf-count.tex
│ │ ├── introduction.tex
│ │ ├── language-of-sol.tex
│ │ ├── satisfaction.tex
│ │ ├── semantic-notions.tex
│ │ ├── syntax-and-semantics.tex
│ │ └── terms-formulas.tex
├── set-theory
│ ├── card-arithmetic
│ │ ├── card-arithmetic.tex
│ │ ├── ch.tex
│ │ ├── expotough.tex
│ │ ├── fix.tex
│ │ ├── opps.tex
│ │ └── simp.tex
│ ├── cardinals
│ │ ├── cardinals.tex
│ │ ├── cardsasords.tex
│ │ ├── classing.tex
│ │ ├── cp.tex
│ │ ├── hp.tex
│ │ └── milestone.tex
│ ├── choice
│ │ ├── banach.tex
│ │ ├── choice.tex
│ │ ├── countablechoice.tex
│ │ ├── hartogs.tex
│ │ ├── introduction.tex
│ │ ├── justifications.tex
│ │ ├── tarskiscott.tex
│ │ ├── vitali.tex
│ │ └── wellorderingproblem.tex
│ ├── ord-arithmetic
│ │ ├── addition.tex
│ │ ├── exponentiation.tex
│ │ ├── introduction.tex
│ │ ├── multiplication.tex
│ │ ├── ord-arithmetic.tex
│ │ └── using-addition.tex
│ ├── ordinals
│ │ ├── basic.tex
│ │ ├── idea.tex
│ │ ├── introduction.tex
│ │ ├── iso.tex
│ │ ├── milestone.tex
│ │ ├── opps.tex
│ │ ├── ordinals.tex
│ │ ├── ordtype.tex
│ │ ├── replacement.tex
│ │ ├── vn.tex
│ │ └── wo.tex
│ ├── replacement
│ │ ├── absinf.tex
│ │ ├── extrinsic.tex
│ │ ├── finiteaxiomatizability.tex
│ │ ├── introduction.tex
│ │ ├── limofsize.tex
│ │ ├── ref.tex
│ │ ├── refproofs.tex
│ │ ├── replacement.tex
│ │ └── strength.tex
│ ├── set-theory.tex
│ ├── spine
│ │ ├── foundation.tex
│ │ ├── idea.tex
│ │ ├── rank.tex
│ │ ├── recursion.tex
│ │ ├── spine.tex
│ │ ├── stagesbasics.tex
│ │ └── zf.tex
│ ├── story
│ │ ├── cumulative-approach.tex
│ │ ├── extensionality.tex
│ │ ├── grundgesetze.tex
│ │ ├── predicativity.tex
│ │ ├── russells-paradox-again.tex
│ │ ├── story.tex
│ │ └── urelements.tex
│ └── z
│ │ ├── arbintersections.tex
│ │ ├── infinity-again.tex
│ │ ├── milestone.tex
│ │ ├── nat.tex
│ │ ├── pairs.tex
│ │ ├── powerset.tex
│ │ ├── separation.tex
│ │ ├── story.tex
│ │ ├── union.tex
│ │ └── z.tex
├── sets-functions-relations
│ ├── arithmetization
│ │ ├── arithmetization.tex
│ │ ├── cauchy.tex
│ │ ├── checking-details.tex
│ │ ├── cuts.tex
│ │ ├── integers.tex
│ │ ├── rationals.tex
│ │ ├── reals.tex
│ │ └── reflections.tex
│ ├── functions
│ │ ├── composition.tex
│ │ ├── function-basics.tex
│ │ ├── function-kinds.tex
│ │ ├── functions-relations.tex
│ │ ├── functions.tex
│ │ ├── inverses.tex
│ │ ├── isomorphic-functions.tex
│ │ └── partial-functions.tex
│ ├── inductive-defs-proofs
│ │ └── introduction.tex
│ ├── infinite
│ │ ├── card-sb.tex
│ │ ├── dedekind-algebra.tex
│ │ ├── dedekind-induction.tex
│ │ ├── dedekinds-proof.tex
│ │ ├── hilberts-hotel.tex
│ │ └── infinite.tex
│ ├── relations
│ │ ├── equivalence-relations.tex
│ │ ├── graphs.tex
│ │ ├── operations.tex
│ │ ├── orders.tex
│ │ ├── reflections.tex
│ │ ├── relations-as-sets.tex
│ │ ├── relations-complete.tex
│ │ ├── relations.tex
│ │ └── special-properties.tex
│ ├── sets-functions-relations-complete.tex
│ ├── sets-functions-relations.tex
│ ├── sets
│ │ ├── basics.tex
│ │ ├── important-sets.tex
│ │ ├── pairs-and-products.tex
│ │ ├── proofs-about-sets.tex
│ │ ├── russells-paradox.tex
│ │ ├── sets.tex
│ │ ├── subsets.tex
│ │ └── unions-and-intersections.tex
│ └── size-of-sets
│ │ ├── comparing-size.tex
│ │ ├── enumerability-alt.tex
│ │ ├── enumerability.tex
│ │ ├── equinumerous-sets.tex
│ │ ├── introduction.tex
│ │ ├── non-enumerability-alt.tex
│ │ ├── non-enumerability.tex
│ │ ├── pairing-alt.tex
│ │ ├── pairing.tex
│ │ ├── reduction-alt.tex
│ │ ├── reduction.tex
│ │ ├── schroder-bernstein.tex
│ │ ├── size-of-sets-complete.tex
│ │ ├── size-of-sets.tex
│ │ └── zig-zag.tex
└── turing-machines
│ ├── machines-computations
│ ├── church-turing-thesis.tex
│ ├── combining-machines.tex
│ ├── configuration.tex
│ ├── disciplined-machines.tex
│ ├── halting-states.tex
│ ├── introduction.tex
│ ├── machines-computations.tex
│ ├── representing-tms.tex
│ ├── turing-machines.tex
│ ├── unary-numbers.tex
│ └── variants.tex
│ ├── turing-machines.tex
│ └── undecidability
│ ├── decision-problem.tex
│ ├── enumerating-tms.tex
│ ├── halting-problem.tex
│ ├── introduction.tex
│ ├── representing-tms.tex
│ ├── trakhtenbrot.tex
│ ├── undecidability.tex
│ ├── universal-tm.tex
│ ├── unsolvability-decision-problem.tex
│ └── verification.tex
├── courses
├── README.md
├── enderton
│ ├── Makefile
│ ├── open-logic-enderton-config.sty
│ ├── open-logic-enderton-envs.sty
│ └── open-logic-enderton.tex
└── sample
│ ├── Makefile
│ ├── open-logic-sample-config.sty
│ └── open-logic-sample.tex
├── include
├── open-logic-chapter.tex
├── open-logic-part.tex
└── open-logic-section.tex
├── misc
├── htmltoc
├── index.start.html
└── makeolprevision
├── open-logic-complete-config.sty
├── open-logic-complete.tex
├── open-logic-config.sty
├── open-logic-debug.tex
├── open-logic-envs.sty
└── sty
├── bpextra.sty
├── bussproofs-extra.sty
├── open-logic-book-envs.sty
├── open-logic-book.cls
├── open-logic-debug.sty
├── open-logic-defer.sty
├── open-logic-formulas.sty
├── open-logic-referencing.sty
├── open-logic-selective.sty
├── open-logic-tokenize.sty
├── open-logic.sty
└── ptolemaicastronomy.sty
/.github/ISSUE_TEMPLATE/typo.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: typo
3 | about: Report a typo
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | The most convenient way to report a typo should reference the file and line number where the typo occurs:
11 |
12 | - Find the file in the content tree: https://github.com/OpenLogicProject/OpenLogic/tree/master/content
13 | - Click on the line number; then on the menu indicated by three horizontal dots
14 | - Select "Copy permalink" and paste that link below.
15 |
16 | Alternatively describe the location of the typo (page #, "after Theorem 5.1", etc., and *mention which PDF you are referencing*)
17 |
18 | Typo location:
19 |
20 | What is the typo:
21 |
22 | Proposed correction:
23 |
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: Build LaTeX document
2 | on:
3 | push:
4 | pull_request:
5 |
6 | jobs:
7 | build_latex:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - name: Set up Git repository
11 | uses: actions/checkout@v2
12 | - name: Compile LaTeX document
13 | uses: xu-cheng/latex-action@v2
14 | with:
15 | root_file: open-logic-debug.tex
16 | - name: Upload open-logic-debug.pdf
17 | uses: actions/upload-artifact@master
18 | with:
19 | name: open-logic-debug.pdf
20 | path: open-logic-debug.pdf
21 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "doc"]
2 | path = doc
3 | url = https://github.com/OpenLogicProject/OpenLogic.wiki.git
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | The Open Logic Project
2 | ======================
3 |
4 | [](https://github.com/OpenLogicProject/OpenLogic/actions/workflows/build.yml)
6 |
7 | The Open Logic Project is an open source, open access collection of
8 | materials on advanced logic, aimed mainly at philosophers, but also
9 | suitable for computer scientists and mathematicians. The text can be
10 | rearranged and remixed. You can produce custom textbooks from it, so
11 | they take the aim of the course and the preferences of the instructor
12 | into account. It is written in LaTeX.
13 |
14 | For more information, see the project website and Open Logic
17 | wiki.
18 |
19 | This repository contains LaTeX source files only. Head to the builds site to download PDFs.
21 |
22 | Author(s): The Open Logic Project
23 |
24 | 
The Open Logic Text by The Open Logic Project is licensed under a Creative Commons Attribution 4.0 International License.
Permissions beyond the scope of this license may be available at https://openlogicproject.org/.
25 |
--------------------------------------------------------------------------------
/assets/logos/aboer-print.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenLogicProject/OpenLogic/383e20581effa123fb6b10252eb28e55b7a45058/assets/logos/aboer-print.png
--------------------------------------------------------------------------------
/assets/logos/aboer-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenLogicProject/OpenLogic/383e20581effa123fb6b10252eb28e55b7a45058/assets/logos/aboer-screen.png
--------------------------------------------------------------------------------
/assets/logos/by.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenLogicProject/OpenLogic/383e20581effa123fb6b10252eb28e55b7a45058/assets/logos/by.pdf
--------------------------------------------------------------------------------
/assets/logos/cc.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenLogicProject/OpenLogic/383e20581effa123fb6b10252eb28e55b7a45058/assets/logos/cc.pdf
--------------------------------------------------------------------------------
/assets/logos/openlogic-logo-bw.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenLogicProject/OpenLogic/383e20581effa123fb6b10252eb28e55b7a45058/assets/logos/openlogic-logo-bw.pdf
--------------------------------------------------------------------------------
/assets/logos/openlogic-logo-color.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenLogicProject/OpenLogic/383e20581effa123fb6b10252eb28e55b7a45058/assets/logos/openlogic-logo-color.pdf
--------------------------------------------------------------------------------
/assets/logos/openlogic-wm-bw.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenLogicProject/OpenLogic/383e20581effa123fb6b10252eb28e55b7a45058/assets/logos/openlogic-wm-bw.pdf
--------------------------------------------------------------------------------
/assets/logos/openlogic-wm-color.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenLogicProject/OpenLogic/383e20581effa123fb6b10252eb28e55b7a45058/assets/logos/openlogic-wm-color.pdf
--------------------------------------------------------------------------------
/assets/logos/remix.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenLogicProject/OpenLogic/383e20581effa123fb6b10252eb28e55b7a45058/assets/logos/remix.pdf
--------------------------------------------------------------------------------
/assets/logos/ti-print.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenLogicProject/OpenLogic/383e20581effa123fb6b10252eb28e55b7a45058/assets/logos/ti-print.pdf
--------------------------------------------------------------------------------
/assets/logos/ti-screen.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenLogicProject/OpenLogic/383e20581effa123fb6b10252eb28e55b7a45058/assets/logos/ti-screen.pdf
--------------------------------------------------------------------------------
/content/computability/computability-theory/ce-sets.tex:
--------------------------------------------------------------------------------
1 | % Part: computability
2 | % Chapter: computability-theory
3 | % Section: ce-sets
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{cmp}{thy}{ces}
10 | \olsection{Computably Enumerable Sets}
11 |
12 | \begin{defn}
13 | A set is \emph{computably enumerable} if it is empty or the range of a
14 | computable function.
15 | \end{defn}
16 |
17 | \begin{history}
18 | Computably enumerable sets are also called \emph{recursively
19 | enumerable} instead. This is the original terminology, and today
20 | both are commonly used, as well as the abbreviations ``c.e.'' and
21 | ``r.e.''
22 | \end{history}
23 |
24 | \begin{explain}
25 | You should think about what the definition means, and why the
26 | terminology is appropriate. The idea is that if $S$ is the range of
27 | the computable function~$f$, then
28 | \[
29 | S = \{ f(0), f(1), f(2), \dots \},
30 | \]
31 | and so $f$ can be seen as ``enumerating'' the elements of~$S$. Note
32 | that according to the definition, $f$~need not be an increasing
33 | function, i.e., the enumeration need not be in increasing order. In
34 | fact, $f$ need not even be injective, i.e., repetitions in the
35 | enumeration $f(0)$, $f(1)$, $f(2)$, \dots{} of~$S$ are allowed. For
36 | instance, the constant function $f(x) = 0$ enumerates the set $\{ 0
37 | \}$.
38 | \end{explain}
39 |
40 | Any computable set is computably enumerable. To see this, suppose
41 | $S$~is computable. If $S$ is empty, then by definition it is
42 | computably enumerable. Otherwise, let $a$ be any element of
43 | $S$. Define $f$ by
44 | \[
45 | f(x) =
46 | \begin{cases}
47 | x & \text{if $\Char{S}(x) = 1$} \\
48 | a & \text{otherwise.}
49 | \end{cases}
50 | \]
51 | Then $f$ is a computable function, and $S$ is the range of~$f$.
52 |
53 | \end{document}
54 |
--------------------------------------------------------------------------------
/content/computability/computability-theory/computability-theory.tex:
--------------------------------------------------------------------------------
1 | % Part: computability
2 | % Chapter: computability-theory
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{cmp}{thy}{Computability Theory}
9 |
10 | \begin{editorial}
11 | Material in this chapter should be reviewed and expanded. In
12 | particular, there are no exercises yet.
13 | \end{editorial}
14 |
15 | \olimport{introduction}
16 |
17 | \olimport{coding-computations}
18 |
19 | \olimport{normal-form}
20 |
21 | \olimport{s-m-n}
22 |
23 | \olimport{universal-part-function}
24 |
25 | \olimport{no-universal-function}
26 |
27 | \olimport{halting-problem}
28 |
29 | \olimport{russells-paradox}
30 |
31 | \olimport{computable-sets}
32 |
33 | \olimport{ce-sets}
34 |
35 | \olimport{equiv-ce-defs}
36 |
37 | \olimport{non-comp-set}
38 |
39 | \olimport{ce-closed-cup-cap}
40 |
41 | \olimport{complement-ce}
42 |
43 | \olimport{reducibility}
44 |
45 | \olimport{prop-reduce}
46 |
47 | \olimport{complete-ce-sets}
48 |
49 | \olimport{k-1}
50 |
51 | \olimport{total}
52 |
53 | \olimport{rice-theorem}
54 |
55 | \olimport{fixed-point-thm}
56 |
57 | \olimport{application-fixed-point}
58 |
59 | \olimport{def-functions-self-reference}
60 |
61 | \OLEndChapterHook
62 |
63 | \end{document}
64 |
--------------------------------------------------------------------------------
/content/computability/computability-theory/computable-sets.tex:
--------------------------------------------------------------------------------
1 | % Part: computability
2 | % Chapter: computability-theory
3 | % Section: computable-sets
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{cmp}{thy}{cps}
10 | \olsection{Computable Sets}
11 |
12 | We can extend the notion of computability from computable functions to
13 | computable sets:
14 |
15 | \begin{defn}
16 | Let $S$ be a set of natural numbers. Then $S$ is \emph{computable}
17 | iff its characteristic function~$\Char{S}$ is. In other words,
18 | $S$~is computable iff the function
19 | \[
20 | \Char{S}(x) =
21 | \begin{cases}
22 | 1 & \text{if $x \in S$} \\
23 | 0 & \text{otherwise}
24 | \end{cases}
25 | \]
26 | is computable. Similarly, a relation $R(x_0, \dots, x_{k-1})$ is
27 | computable if and only if its characteristic function is.
28 |
29 | Computable sets and relations are also called \emph{decidable}.
30 | \end{defn}
31 |
32 | \begin{explain}
33 | Notice that we now have a number of notions of computability: for
34 | partial functions, for functions, and for sets. Do not get them
35 | confused!{} \iftag{TMs}{The Turing machine computing a partial function
36 | returns the output of the function, for input values at which the
37 | function is defined; the Turing machine computing a set returns
38 | either 1 or 0, after deciding whether or not the input value is in
39 | the set or not.}{}
40 | \end{explain}
41 |
42 | \end{document}
43 |
--------------------------------------------------------------------------------
/content/computability/computability-theory/s-m-n.tex:
--------------------------------------------------------------------------------
1 | % Part: computability
2 | % Chapter: computability-theory
3 | % Section: s-m-n
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{cmp}{thy}{smn}
10 | \olsection{The $s$-$m$-$n$ Theorem}
11 |
12 | \begin{explain}
13 | The next theorem is known as the ``$s$-$m$-$n$ theorem,'' for a reason
14 | that will be clear in a moment. The hard part is understanding just
15 | what the theorem says; once you understand the statement, it will seem
16 | fairly obvious.
17 | \end{explain}
18 |
19 | \begin{thm}
20 | \ollabel{thm:s-m-n}
21 | For each pair of natural numbers $n$ and~$m$, there is a primitive
22 | recursive function~$s^m_n$ such that for every sequence
23 | $e$, $a_0$, \dots, $a_{m-1}$, $y_0$ ,\dots, $y_{n-1}$, we have
24 | \[
25 | \cfind{s^m_n(e, a_0, \dots, a_{m-1})}[n](y_0, \dots, y_{n-1}) \simeq
26 | \cfind{e}[m+n](a_0, \dots, a_{m-1}, y_0, \dots, y_{n-1}).
27 | \]
28 | \end{thm}
29 |
30 | \begin{explain}
31 | It is helpful to think of $s^m_n$ as acting on \emph{programs}. That
32 | is, $s^m_n$ takes a program~$e$ for an $(m+n)$-ary function, as well
33 | as fixed inputs $a_0$, \dots, $a_{m-1}$; and it returns a program
34 | $s^m_n(x, a_0, \dots, a_{m-1})$ for the $n$-ary function of the
35 | remaining arguments. \iftag{TMs}{It you think of $x$ as the description of a
36 | Turing machine, then $s^m_n(e, a_0, \dots, a_{m-1})$ is the Turing
37 | machine that, on input $y_0$, \dots,~$y_{n-1}$, prepends
38 | $a_0$, \dots,~$a_{m-1}$ to the input string, and runs~$e$. Each $s^m_n$
39 | is then just a primitive recursive function that finds a code for the
40 | appropriate Turing machine.}{}
41 | \end{explain}
42 |
43 | \end{document}
44 |
45 |
--------------------------------------------------------------------------------
/content/computability/computability-theory/total.tex:
--------------------------------------------------------------------------------
1 | % Part: computability
2 | % Chapter: computability-theory
3 | % Section: total
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{cmp}{thy}{tot}
10 | \olsection{Totality is Undecidable}
11 |
12 | Let us consider one more example of using the $s$-$m$-$n$ theorem to show
13 | that something is noncomputable. Let $\fn{Tot}$ be the set of indices
14 | of total computable functions, i.e.
15 | \[
16 | \fn{Tot} = \Setabs{x}{\text{for every $y$, $\cfind{x}(y)\fdefined$}}.
17 | \]
18 |
19 | \begin{prop}
20 | \ollabel{prop:total}
21 | $\fn{Tot}$ is not computable.
22 | \end{prop}
23 |
24 | \begin{proof}
25 | To see that $\fn{Tot}$ is not computable, it suffices to show that $K$
26 | is reducible to it. Let $h(x,y)$ be defined by
27 | \[
28 | h(x,y) \simeq
29 | \begin{cases}
30 | 0 & \text{if $x \in K$} \\
31 | \fundefined & \text{otherwise}
32 | \end{cases}
33 | \]
34 | Note that $h(x,y)$ does not depend on $y$ at all. It should
35 | not be hard to see that $h$~is partial computable: on input $x, y$, the
36 | we compute~$h$ by first simulating the function~$\cfind{x}$ on input~$x$; if
37 | this computation halts, $h(x,y)$ outputs $0$ and halts. So
38 | $h(x,y)$ is just $\Zero(\umin{s}{T(x,x,s)})$, where $\Zero$ is the constant zero
39 | function.
40 |
41 | Using the $s$-$m$-$n$ theorem, there is a primitive recursive
42 | function~$k(x)$ such that for every $x$ and~$y$,
43 | \[
44 | \cfind{k(x)}(y) =
45 | \begin{cases}
46 | 0 & \text{if $x \in K$} \\
47 | \fundefined & \text{otherwise}
48 | \end{cases}
49 | \]
50 | So $\cfind{k(x)}$ is total if $x \in K$, and undefined otherwise. Thus,
51 | $k$ is a reduction of $K$ to~$\fn{Tot}$.
52 | \end{proof}
53 |
54 | \begin{digress}
55 | It turns out that $\fn{Tot}$ is not even computably enumerable---its
56 | complexity lies further up on the ``arithmetical hierarchy.'' But we
57 | will not worry about this strengthening here.
58 | \end{digress}
59 |
60 | \end{document}
61 |
62 |
--------------------------------------------------------------------------------
/content/computability/computability-theory/universal-part-function.tex:
--------------------------------------------------------------------------------
1 | % Part: computability
2 | % Chapter: computability-theory
3 | % Section: universal-part-function
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{cmp}{thy}{uni}
10 | \olsection{The Universal Partial Computable Function}
11 |
12 | \begin{thm}
13 | \ollabel{thm:univ-comp}
14 | There is a universal partial computable function~$\fn{Un}(e,x)$. In other
15 | words, there is a function $\fn{Un}(e,x)$ such that:
16 | \begin{enumerate}
17 | \item $\fn{Un}(e,x)$ is partial computable.
18 | \item If $f(x)$ is any partial computable function, then there is a
19 | natural number $e$ such that $f(x) \simeq \fn{Un}(e,x)$ for every~$x$.
20 | \end{enumerate}
21 | \end{thm}
22 |
23 | \begin{proof}
24 | Let $\fn{Un}(e,x) \simeq U(\umin{s}{T(e,x,s)})$, where $U$ and $T$ are
25 | as in Kleene's normal form theorem (\olref[nfm]{thm:normal-form}).
26 | \end{proof}
27 |
28 | \begin{explain}
29 | This is just a precise way of saying that we have an effective
30 | enumeration of the partial computable functions; the idea is that if
31 | we write $f_e$ for the function defined by $f_e(x) = \fn{Un}(e,x)$,
32 | then the sequence $f_0$, $f_1$, $f_2$, \dots includes all the partial
33 | computable functions, with the property that $f_e(x)$ can be computed
34 | ``uniformly'' in $e$ and~$x$. For simplicity, we are using a binary
35 | function that is universal for unary functions, but by coding
36 | sequences of numbers we can easily generalize this to more arguments.
37 | For example, note that if $f(x,y,z)$ is a $3$-place partial recursive
38 | function, then the function $g(x) \simeq f((x)_0, (x)_1, (x)_2)$ is a
39 | unary recursive function.
40 | \end{explain}
41 |
42 | \end{document}
43 |
--------------------------------------------------------------------------------
/content/computability/computability.tex:
--------------------------------------------------------------------------------
1 | % Part: computability
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{cmp}{Computability}
8 |
9 | \begin{editorial}
10 | This part is based on Jeremy Avigad's notes on computability
11 | theory. Only the chapter on recursive functions contains exercises
12 | yet, and everything could stand to be expanded with motivation,
13 | examples, details, and exercises.
14 | \end{editorial}
15 |
16 | \olimport[recursive-functions]{recursive-functions}
17 |
18 | \olimport[computability-theory]{computability-theory}
19 |
20 | \OLEndPartHook
21 |
22 | \end{document}
23 |
--------------------------------------------------------------------------------
/content/computability/recursive-functions/general-recursive-functions.tex:
--------------------------------------------------------------------------------
1 | % Part: computability
2 | % Chapter: recursive-functions
3 | % Section: general-recursive-functions
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{cmp}{rec}{gen}
10 | \olsection{General Recursive Functions}
11 |
12 | There is another way to obtain a set of total functions. Say a total
13 | function $f(x,\vec z)$ is \emph{regular} if for every sequence of
14 | natural numbers $\vec z$, there is an $x$ such that $f(x,\vec z) = 0$.
15 | In other words, the regular functions are exactly those functions to
16 | which one can apply unbounded search, and end up with a total
17 | function. One can, conservatively, restrict unbounded search to
18 | regular functions:
19 |
20 | \begin{defn}
21 | \ollabel{defn:general-recursive}
22 | The set of \emph{general recursive functions} is the smallest set of
23 | functions from the natural numbers to the natural numbers (of various
24 | arities) containing zero, successor, and projections, and closed under
25 | composition, primitive recursion, and unbounded search applied to
26 | \emph{regular} functions.
27 | \end{defn}
28 |
29 | Clearly every general recursive function is total. The difference
30 | between \olref{defn:general-recursive} and
31 | \olref[par]{defn:recursive-fn} is that in the latter one is allowed to
32 | use partial recursive functions along the way; the only requirement is
33 | that the function you end up with at the end is total. So the word
34 | ``general,'' a historic relic, is a misnomer; on the surface,
35 | \olref{defn:general-recursive} is \emph{less} general than
36 | \olref[par]{defn:recursive-fn}. But, fortunately, the difference is
37 | illusory; though the definitions are different, the set of general
38 | recursive functions and the set of recursive functions are one and the
39 | same.
40 |
41 | \end{document}
42 |
43 |
--------------------------------------------------------------------------------
/content/computability/recursive-functions/pr-functions-computable.tex:
--------------------------------------------------------------------------------
1 | % Part: computability
2 | % Chapter: recursive-functions
3 | % Section: pr-functions-computable
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{cmp}{rec}{cmp}
10 | \olsection{Primitive Recursive Functions are Computable}
11 |
12 | Suppose a function $h$ is defined by primitive recursion
13 | \begin{eqnarray*}
14 | h(\vec x, 0) & = & f(\vec x) \\
15 | h(\vec x, y + 1) & = & g(\vec x, y, h(\vec x, y))
16 | \end{eqnarray*}
17 | and suppose the functions $f$ and $g$ are computable. (We use $\vec x$ to abbreviate $x_0$, \dots, $x_{k-1}$.) Then $h(\vec
18 | x, 0)$ can obviously be computed, since it is just $f(\vec x)$ which we
19 | assume is computable. $h(\vec x, 1)$ can then also be computed, since
20 | $1 = 0 + 1$ and so $h(\vec x, 1)$ is just
21 | \begin{align*}
22 | h(\vec x, 1) & = g(\vec x, 0, h(\vec x, 0)) = g(\vec x, 0, f(\vec x)).
23 | \intertext{We can go on in this way and compute}
24 | h(\vec x, 2) & = g(\vec x, 1, h(\vec x, 1)) = g(\vec x, 1, g(\vec x, 0, f(\vec x)))\\
25 | h(\vec x, 3) & = g(\vec x, 2, h(\vec x, 2)) = g(\vec x, 2, g(\vec x, 1, g(\vec x, 0, f(\vec x))))\\
26 | h(\vec x, 4) & = g(\vec x, 3, h(\vec x, 3)) = g(\vec x, 3, g(\vec x, 2, g(\vec x, 1, g(\vec x, 0, f(\vec x)))))\\
27 | & \vdots
28 | \end{align*}
29 | Thus, to compute $h(\vec x, y)$ in general, successively compute
30 | $h(\vec x, 0)$, $h(\vec x, 1)$, \dots, until we reach $h(\vec x, y)$.
31 |
32 | Thus, a primitive recursive definition yields a new computable
33 | function if the functions $f$ and $g$ are computable. Composition of
34 | functions also results in a computable function if the functions $f$
35 | and $g_i$ are computable.
36 |
37 | Since the basic functions $\Zero$, $\Succ$, and $\Proj{n}{i}$ are
38 | computable, and composition and primitive recursion yield computable
39 | functions from computable functions, this means that every primitive
40 | recursive function is computable.
41 |
42 | \end{document}
43 |
--------------------------------------------------------------------------------
/content/computability/recursive-functions/recursive-functions.tex:
--------------------------------------------------------------------------------
1 | % Part: computability
2 | % Chapter: recursive-functions
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{cmp}{rec}{Recursive Functions}
9 |
10 | \begin{editorial}
11 | These are Jeremy Avigad's notes on recursive functions, revised and
12 | expanded by Richard Zach. This chapter does contain some exercises,
13 | and can be included independently to provide the basis for a
14 | discussion of arithmetization of syntax.
15 | \end{editorial}
16 |
17 |
18 |
19 | \olimport{introduction}
20 |
21 | \olimport{primitive-recursion}
22 |
23 | \olimport{composition}
24 |
25 | \olimport{pr-functions}
26 |
27 | \olimport{notation-pr-functions}
28 |
29 | \olimport{pr-functions-computable}
30 |
31 | \olimport{examples}
32 |
33 | \olimport{pr-relations}
34 |
35 | \olimport{bounded-minimization}
36 |
37 | \olimport{primes}
38 |
39 | \olimport{sequences}
40 |
41 | \olimport{trees}
42 |
43 | \olimport{other-recursions}
44 |
45 | \olimport{non-pr-functions}
46 |
47 | \olimport{partial-functions}
48 |
49 | \olimport{normal-form}
50 |
51 | \olimport{halting-problem}
52 |
53 | \olimport{general-recursive-functions}
54 |
55 | \OLEndChapterHook
56 |
57 | \end{document}
58 |
--------------------------------------------------------------------------------
/content/counterfactuals/counterfactuals.tex:
--------------------------------------------------------------------------------
1 | % Part: counterfactuals
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{cnt}{Counter\-factuals}
8 |
9 | \olimport[introduction]{introduction}
10 |
11 | \olimport[minimal-change-semantics]{minimal-change-semantics}
12 |
13 | \OLEndPartHook
14 |
15 | \end{document}
16 |
--------------------------------------------------------------------------------
/content/counterfactuals/introduction/introduction.tex:
--------------------------------------------------------------------------------
1 | % Part: counterfactuals
2 | % Chapter: introduction
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{cnt}{int}{Introduction}
9 |
10 | \olimport{material-conditional}
11 |
12 | \olimport{paradoxes-material}
13 |
14 | \olimport{strict-conditional}
15 |
16 | \olimport{counterfactuals}
17 |
18 | \OLEndChapterHook
19 |
20 | \end{document}
21 |
22 |
--------------------------------------------------------------------------------
/content/counterfactuals/minimal-change-semantics/minimal-change-semantics.tex:
--------------------------------------------------------------------------------
1 | % Part: counterfactuals
2 | % Chapter: minimal-change-semantics
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{cnt}{min}{Minimal Change Semantics}
9 |
10 | \olimport{introduction}
11 |
12 | \olimport{sphere-models}
13 |
14 | \olimport{true-false}
15 |
16 | \olimport{antecedent-strengthening}
17 |
18 | \olimport{transitivity}
19 |
20 | \olimport{contraposition}
21 |
22 | \OLEndChapterHook
23 |
24 | \end{document}
25 |
26 |
--------------------------------------------------------------------------------
/content/first-order-logic/axiomatic-deduction/axiomatic-deduction.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: axiomatic-deduction
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \iftag{FOL}
9 | {\olchapter{fol}{axd}{Axiomatic \usetoken{P}{derivation}}}
10 | {\olchapter{pl}{axd}{Axiomatic \usetoken{P}{derivation}}}
11 |
12 | \begin{editorial}
13 | No effort has been made yet to ensure that the material in this
14 | chapter respects various tags indicating which connectives and
15 | quantifiers are primitive or defined: all are assumed to be
16 | primitive, except $\liff$ which is assumed to be defined. If the FOL
17 | tag is true, we produce a version with quantifiers, otherwise
18 | without.
19 | \end{editorial}
20 |
21 | \olimport{rules-and-proofs}
22 |
23 | \olimport{axioms-rules-propositional}
24 |
25 | \iftag{FOL}{%
26 | \olimport{axioms-rules-quantifiers}
27 | }{}
28 |
29 | \olimport{proving-things}
30 |
31 | \iftag{FOL}{%
32 | \olimport{proving-things-quant}
33 | }{}
34 |
35 | \olimport{proof-theoretic-notions}
36 |
37 | \olimport{deduction-theorem}
38 |
39 | \iftag{FOL}{%
40 | \olimport{deduction-theorem-quantifiers}
41 | }{}
42 |
43 | \olimport{provability-consistency}
44 |
45 | \olimport{provability-propositional}
46 |
47 | \iftag{FOL}{%
48 | \olimport{provability-quantifiers}
49 | }{}
50 |
51 | \olimport{soundness}
52 |
53 | \iftag{FOL}{
54 | \olimport{identity}
55 | }{}
56 |
57 | \OLEndChapterHook
58 |
59 | \end{document}
60 |
--------------------------------------------------------------------------------
/content/first-order-logic/axiomatic-deduction/axioms-rules-propositional.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: axiomatic-deduction
3 | % Section: axioms-rules-propositional
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \iftag{FOL}
10 | {\olfileid{fol}{axd}{prp}}
11 | {\olfileid{pl}{axd}{prp}}
12 |
13 | \olsection{Axiom and Rules for the Propositional Connectives}
14 |
15 | \begin{defn}[Axioms]
16 | The set of $\PAx$ of \emph{axioms} for the propositional connectives comprises
17 | all !!{formula}s of the following forms:
18 | \begin{align}
19 | & (!A \land !B) \lif !A \ollabel{ax:land1}\\
20 | & (!A \land !B) \lif !B \ollabel{ax:land2}\\
21 | & !A \lif (!B \lif (!A \land !B)) \ollabel{ax:land3}\\
22 | & !A \lif (!A \lor !B) \ollabel{ax:lor1}\\
23 | & !A \lif (!B \lor !A) \ollabel{ax:lor2}\\
24 | & (!A \lif !C) \lif ((!B \lif !C) \lif ((!A \lor !B) \lif !C)) \ollabel{ax:lor3}\\
25 | & !A \lif (!B \lif !A) \ollabel{ax:lif1}\\
26 | & (!A \lif (!B \lif !C)) \lif ((!A \lif !B) \lif (!A \lif !C)) \ollabel{ax:lif2}\\
27 | & (!A \lif !B) \lif ((!A \lif \lnot !B) \lif \lnot !A) \ollabel{ax:lnot1}\\
28 | & \lnot !A \lif (!A \lif !B) \ollabel{ax:lnot2}\\
29 | & \ltrue \ollabel{ax:ltrue}\\
30 | & \lfalse \lif !A \ollabel{ax:lfalse1}\\
31 | & (!A \lif \lfalse) \lif \lnot !A \ollabel{ax:lfalse2}\\
32 | & \lnot\lnot !A \lif !A \ollabel{ax:dne}
33 | \end{align}
34 | \end{defn}
35 |
36 | \begin{defn}[Modus ponens]
37 | If $!B$ and $!B \lif !A$ already occur in a derivation, then $!A$ is
38 | a correct inference step.
39 | \end{defn}
40 |
41 | We'll abbreviate the rule modus ponens as ``\MP.''
42 |
43 | \end{document}
44 |
--------------------------------------------------------------------------------
/content/first-order-logic/axiomatic-deduction/axioms-rules-quantifiers.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: axiomatic-deduction
3 | % Section: axioms-rules-quantifiers
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{fol}{axd}{qua}
10 |
11 | \olsection{Axioms and Rules for Quantifiers}
12 |
13 | \begin{defn}[Axioms for quantifiers]
14 | The \emph{axioms} governing quantifiers are
15 | all instances of the following:
16 | \begin{align}
17 | \ollabel{ax:q1} & \lforall[x][!B] \lif !B(t), \\
18 | \ollabel{ax:q2} & !B(t) \lif \lexists[x][!B].
19 | \end{align}
20 | for any closed term~$t$.
21 | \end{defn}
22 |
23 | \begin{defn}[Rules for quantifiers]
24 | \item If $!B \lif !A(a)$ already occurs in the !!{derivation} and $a$
25 | does not occur in~$\Gamma$ or~$!B$, then $!B \lif
26 | \lforall[x][!A(x)]$ is a correct inference step.
27 | \item If $!A(a) \lif !B$ already occurs in the !!{derivation} and $a$
28 | does not occur in~$\Gamma$ or~$!B$, then $\lexists[x][!A(x)] \lif
29 | !B$ is a correct inference step.
30 | \end{defn}
31 |
32 | We'll abbreviate either of these by ``\QR.''
33 |
34 | \end{document}
35 |
--------------------------------------------------------------------------------
/content/first-order-logic/axiomatic-deduction/identity.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: axiomatic-proofs
3 | % Section: identity
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{fol}{axd}{ide}
10 |
11 | \olsection{\usetoken{P}{derivation} with \usetoken{S}{identity}}
12 |
13 | In order to accommodate $\eq$ in !!{derivation}s, we simply add new
14 | axiom schemas. The definition of !!{derivation} and $\Proves$ remains
15 | the same, we just also allow the new axioms.
16 |
17 | \begin{defn}[Axioms for !!{identity}]
18 | \begin{align}
19 | \ollabel{ax:id1} & \eq[t][t], \\
20 | \ollabel{ax:id2} & \eq[t_1][t_2] \lif (!B(t_1) \lif
21 | !B(t_2)),
22 | \end{align}
23 | for any closed terms $t$, $t_1$, $t_2$.
24 | \end{defn}
25 |
26 | \begin{prop}\ollabel{prop:sound}
27 | The axioms \olref{ax:id1} and \olref{ax:id2} are valid.
28 | \end{prop}
29 |
30 | \begin{proof}
31 | Exercise.
32 | \end{proof}
33 |
34 | \begin{prob}
35 | Prove \olref[fol][axd][ide]{prop:sound}.
36 | \end{prob}
37 |
38 | \begin{prop}\ollabel{prop:iden1}
39 | $\Gamma \Proves \eq[t][t]$, for any term $t$ and set~$\Gamma$.
40 | \end{prop}
41 |
42 | \begin{prop}\ollabel{prop:iden2}
43 | If $\Gamma \Proves !A(t_1)$ and $\Gamma \Proves
44 | \eq[t_1][t_2]$, then $\Gamma \Proves !A(t_2)$.
45 | \end{prop}
46 |
47 | \begin{proof}
48 | The !!{formula}
49 | \[
50 | (\eq[t_1][t_2] \lif (!A(t_1) \lif !A(t_2)))
51 | \]
52 | is an instance of~\olref{ax:id2}. The conclusion follows by two applications
53 | of~\MP.
54 | \end{proof}
55 |
56 | \end{document}
57 |
--------------------------------------------------------------------------------
/content/first-order-logic/axiomatic-deduction/provability-quantifiers.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: axiomatic-deduction
3 | % Section: provability-quantifiers
4 |
5 | % verification of properties of provability needed for maximally
6 | % consistent sets in the completeness chapter.
7 |
8 | \documentclass[../../../include/open-logic-section]{subfiles}
9 |
10 | \begin{document}
11 |
12 | \olfileid{fol}{axd}{qpr}
13 |
14 | \olsection{\usetoken{S}{derivability} and the Quantifiers}
15 |
16 | \begin{explain}
17 | The completeness theorem also requires that axiomatic deductions
18 | yield the facts about~$\Proves$ established in this section.
19 | \end{explain}
20 |
21 | \begin{thm}
22 | \ollabel{thm:strong-generalization} If $c$ is !!a{constant} not occurring
23 | in $\Gamma$ or $!A(x)$ and $\Gamma \Proves !A(c)$, then $\Gamma
24 | \Proves \lforall[x][!A(x)]$.
25 | \end{thm}
26 |
27 | \begin{proof}
28 | By the deduction theorem, $\Gamma \Proves \ltrue \lif !A(c)$. Since
29 | $c$ does not occur in $\Gamma$ or~$\top$, we get $\Gamma \Proves
30 | \ltrue \lif !A(c)$. By the deduction theorem again, $\Gamma \Proves
31 | \lforall[x][!A(x)]$.
32 | \end{proof}
33 |
34 | \begin{prop}
35 | \ollabel{prop:provability-quantifiers}
36 | \begin{tagenumerate}{prvEx,prvAll}
37 | \tagitem{prvEx}{$!A(t) \Proves \lexists[x][!A(x)]$.}{}
38 |
39 | \tagitem{prvAll}{$\lforall[x][!A(x)] \Proves !A(t)$.}{}
40 | \end{tagenumerate}
41 | \end{prop}
42 |
43 | \begin{proof}
44 | \begin{tagenumerate}{prvEx,prvAll}
45 | \tagitem{prvEx}{By \olref[qua]{ax:q2} and the deduction theorem.}{}
46 | \tagitem{prvAll}{By \olref[qua]{ax:q1} and the deduction theorem.}{}
47 | \end{tagenumerate}
48 | \end{proof}
49 |
50 | \end{document}
51 |
--------------------------------------------------------------------------------
/content/first-order-logic/axiomatic-deduction/proving-things-quant.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: axiomatic-deduction
3 | % Section: proving-things-quant
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{fol}{axd}{prq}
10 |
11 | \olsection{\usetoken{P}{derivation} with Quantifiers}
12 |
13 | \begin{ex}
14 | Let us give a derivation of $(\lforall[x][!A(x)] \land
15 | \lforall[y][!B(y)]) \lif \lforall[x][(!A(x) \land !B(x))]$.
16 |
17 | First, note that
18 | \begin{align*}
19 | (\lforall[x][!A(x)] \land \lforall[y][!B(y)]) & \lif \lforall[x][!A(x)]\\
20 | \intertext{is an instance of \olref[prp]{ax:land1}, and}
21 | \lforall[x][!A(x)] & \lif !A(a) \\
22 | \intertext{of \olref[qua]{ax:q1}. So, by \olref[pro]{prop:chain}, we know that}
23 | (\lforall[x][!A(x)] \land \lforall[y][!B(y)]) & \lif !A(a) \\
24 | \intertext{is !!{derivable}. Likewise, since}
25 | (\lforall[x][!A(x)] \land \lforall[y][!B(y)]) & \lif \lforall[y][!B(y)] \qquad\text{and}\\
26 | \lforall[y][!B(y)] & \lif !B(a)\\
27 | \intertext{are instances of \olref[prp]{ax:land2} and \olref[qua]{ax:q1}, respectively,}
28 | (\lforall[x][!A(x)] \land \lforall[y][!B(y)]) & \lif !B(a)\\
29 | \intertext{is derivable by \olref[pro]{prop:chain}. Using an appropriate instance of \olref[prp]{ax:land3} and two applications of~\MP, we see that}
30 | (\lforall[x][!A(x)] \land \lforall[y][!B(y)]) & \lif (!A(a) \land !B(a))\\
31 | \intertext{is derivable. We can now apply \QR{} to obtain}
32 | (\lforall[x][!A(x)] \land \lforall[y][!B(y)]) & \lif \lforall[x][(!A(x) \land !B(x))].
33 | \end{align*}
34 | \end{ex}
35 |
36 | \end{document}
37 |
--------------------------------------------------------------------------------
/content/first-order-logic/beyond/beyond.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: beyond
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{fol}{byd}{Beyond First-order Logic}
9 |
10 | \begin{editorial}
11 | This chapter, adapted from Jeremy Avigad's logic notes, gives the
12 | briefest of glimpses into which other logical systems there are. It
13 | is intended as a chapter suggesting further topics for study in a
14 | course that does not cover them. Each one of the topics mentioned
15 | here will---hopefully---eventually receive its own part-level
16 | treatment in the Open Logic Project.
17 | \end{editorial}
18 |
19 | \olimport{introduction}
20 |
21 | \olimport{many-sorted-logic}
22 |
23 | \olimport{second-order-logic}
24 |
25 | \olimport{higher-order-logic}
26 |
27 | \olimport{intuitionistic-logic}
28 |
29 | \olimport{modal-logics}
30 |
31 | \olimport{other-logics}
32 |
33 | \OLEndChapterHook
34 |
35 | \end{document}
36 |
--------------------------------------------------------------------------------
/content/first-order-logic/beyond/other-logics.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: beyond
3 | % Section: other-logics
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{fol}{byd}{oth}
10 |
11 | \olsection{Other Logics}
12 |
13 | As you may have gathered by now, it is not hard to design a new logic.
14 | You too can create your own a syntax, make up a deductive system, and
15 | fashion a semantics to go with it. You might have to be a bit clever
16 | if you want the !!{derivation} system to be complete for the semantics, and it
17 | might take some effort to convince the world at large that your logic
18 | is truly interesting. But, in return, you can enjoy hours of good,
19 | clean fun, exploring your logic's mathematical and computational
20 | properties.
21 |
22 | Recent decades have witnessed a veritable explosion of formal logics.
23 | Fuzzy logic is designed to model reasoning about vague
24 | properties. Probabilistic logic is designed to model
25 | reasoning about uncertainty. Default logics and nonmonotonic logics
26 | are designed to model defeasible forms of reasoning, which is
27 | to say, ``reasonable'' inferences that can later be overturned in the
28 | face of new information. There are epistemic logics, designed to
29 | model reasoning about knowledge; causal logics, designed to
30 | model reasoning about causal relationships; and even
31 | ``deontic'' logics, which are designed to model reasoning
32 | about moral and ethical obligations. Depending on whether the primary
33 | motivation for introducing these systems is philosophical,
34 | mathematical, or computational, you may find such creatures studies
35 | under the rubric of mathematical logic, philosophical logic,
36 | artificial intelligence, cognitive science, or elsewhere.
37 |
38 | The list goes on and on, and the possibilities seem endless. We
39 | may never attain Leibniz' dream of reducing all of human reason to
40 | calculation---but that can't stop us from trying.
41 |
42 | \end{document}
43 |
--------------------------------------------------------------------------------
/content/first-order-logic/completeness/completeness.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: completeness
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \iftag{FOL}
9 | {\olchapter{fol}{com}{The Completeness Theorem}}
10 | {\olchapter{pl}{com}{The Completeness Theorem}}
11 |
12 | \olimport{introduction}
13 |
14 | \olimport{outline}
15 |
16 | \olimport{complete-consistent-sets}
17 |
18 | \iftag{FOL}{%
19 | \olimport{henkin-expansions}
20 | }{}
21 |
22 | \olimport{lindenbaums-lemma}
23 |
24 | \olimport{construction-of-model}
25 |
26 | \iftag{FOL}{%
27 | \olimport{identity}
28 | }{}
29 |
30 | \olimport{completeness-thm}
31 |
32 | \olimport{compactness}
33 |
34 | \olimport{compactness-direct}
35 |
36 | \iftag{FOL}{%
37 | \olimport{downward-ls}
38 | }{}
39 |
40 | \OLEndChapterHook
41 |
42 | \end{document}
43 |
--------------------------------------------------------------------------------
/content/first-order-logic/first-order-logic.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order logic
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{fol}{First-order Logic}
8 |
9 | \begin{editorial}
10 | This part covers the metatheory of first-order logic through
11 | completeness. Currently it does not rely on a separate treatment of
12 | propositional logic; everything is proved. The source files will
13 | exclude the material on quantifiers (and replace ``!!{structure}''
14 | with ``!!{valuation}'', $\Struct{M}$ with $\pAssign{v}$, etc.) if
15 | the ``FOL'' tag is false. In fact, most of the material in the part
16 | on propositional logic is simply the first-order material with the
17 | ``FOL'' tag turned off.
18 |
19 | If the part on propositional logic is included, this results in a
20 | lot of repetition. It is planned, however, to make it possible to
21 | let this part take into account the material on propositional logic
22 | (and exclude the material already covered, as well as shorten proofs
23 | with references to the respective places in the propositional
24 | part).
25 | \end{editorial}
26 |
27 | \olimport[introduction]{introduction}
28 |
29 | \olimport[syntax-and-semantics]{syntax}
30 |
31 | \olimport[syntax-and-semantics]{semantics}
32 |
33 | \olimport[models-theories]{models-theories}
34 |
35 | \olimport[proof-systems]{proof-systems}
36 |
37 | \iftag{prfSC}{%
38 | \olimport[sequent-calculus]{sequent-calculus}
39 | }{}
40 |
41 | \iftag{prfND}{%
42 | \olimport[natural-deduction]{natural-deduction}
43 | }{}
44 |
45 | \iftag{prfTab}{%
46 | \olimport[tableaux]{tableaux}
47 | }{}
48 |
49 | \iftag{prfAX}{%
50 | \olimport[axiomatic-deduction]{axiomatic-deduction}
51 | }{}
52 |
53 | \olimport[completeness]{completeness}
54 |
55 | \olimport[beyond]{beyond}
56 |
57 | \OLEndPartHook
58 |
59 | \end{document}
60 |
--------------------------------------------------------------------------------
/content/first-order-logic/introduction/introduction.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: introduction
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{fol}{int}{Introduction to First-Order Logic}
9 |
10 | \olimport{first-order-logic}
11 |
12 | \olimport{syntax}
13 |
14 | \olimport{formulas}
15 |
16 | \olimport{satisfaction}
17 |
18 | \olimport{sentences}
19 |
20 | \olimport{semantic-notions}
21 |
22 | \olimport{substitution}
23 |
24 | \olimport{models-theories}
25 |
26 | \olimport{soundness-completeness}
27 |
28 | \OLEndChapterHook
29 |
30 | \end{document}
31 |
--------------------------------------------------------------------------------
/content/first-order-logic/models-theories/models-theories.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: models-theories
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{fol}{mat}{Theories and Their Models}
9 |
10 | \olimport{introduction}
11 |
12 | \olimport{expressing-props-of-structures}
13 |
14 | \olimport{theories}
15 |
16 | \olimport{expressing-relations}
17 |
18 | \olimport{set-theory}
19 |
20 | \olimport{size-of-structures}
21 |
22 | \OLEndChapterHook
23 |
24 | \end{document}
25 |
--------------------------------------------------------------------------------
/content/first-order-logic/natural-deduction/natural-deduction.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: natural-deduction
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \iftag{FOL}
9 | {\olchapter{fol}{ntd}{Natural Deduction}}
10 | {\olchapter{pl}{ntd}{Natural Deduction}}
11 |
12 | \begin{editorial}
13 | This chapter presents a natural deduction system in the style of
14 | Gentzen/Prawitz.
15 |
16 | To include or exclude material relevant to natural deduction as a
17 | proof system, use the ``prfND'' tag.
18 | \end{editorial}
19 |
20 | \olimport{rules-and-proofs}
21 |
22 | \olimport{propositional-rules}
23 |
24 | \iftag{FOL}{%
25 | \olimport{quantifier-rules}
26 | }{}
27 |
28 | \olimport{derivations}
29 |
30 | \olimport{proving-things}
31 |
32 | \iftag{FOL}{%
33 | \olimport{proving-things-quant}
34 | }{}
35 |
36 | \olimport{proof-theoretic-notions}
37 |
38 | \olimport{provability-consistency}
39 |
40 | \olimport{provability-propositional}
41 |
42 | \iftag{FOL}{%
43 | \olimport{provability-quantifiers}
44 | }{}
45 |
46 | \olimport{soundness}
47 |
48 | \iftag{FOL}{%
49 | \olimport{identity}
50 | \olimport{soundness-identity}
51 | }{}
52 |
53 | \OLEndChapterHook
54 |
55 | \end{document}
56 |
--------------------------------------------------------------------------------
/content/first-order-logic/natural-deduction/soundness-identity.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: natural-deduction
3 | % Section: soundness-identity
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{fol}{ntd}{sid}
10 |
11 | \olsection{Soundness with \usetoken{S}{identity}}
12 |
13 | \begin{prop}
14 | Natural deduction with rules for $\eq$ is sound.
15 | \end{prop}
16 |
17 | \begin{proof}
18 | Any !!{formula} of the form $\eq[t][t]$ is valid, since
19 | for every !!{structure}~$\Struct M$, $\Sat{M}{\eq[t][t]}$. (Note that
20 | we assume the term $t$ to be closed, i.e., it contains no variables,
21 | so variable assignments are irrelevant).
22 |
23 | Suppose the last inference in !!a{derivation} is \Elim{\eq}, i.e., the
24 | derivation has the following form:
25 | \begin{prooftree}
26 | \AxiomC{$\Gamma_1$}
27 | \RightLabel{$\delta_1$}
28 | \DeduceC{$\eq[t_1][t_2]$}
29 | \AxiomC{$\Gamma_2$}
30 | \RightLabel{$\delta_2$}
31 | \DeduceC{$!A(t_1)$}
32 | \RightLabel{\Elim{\eq}}
33 | \BinaryInfC{$!A(t_2)$}
34 | \end{prooftree}
35 | The premises $\eq[t_1][t_2]$ and $!A(t_1)$ are !!{derive}d from
36 | !!{undischarged} assumptions~$\Gamma_1$ and $\Gamma_2$, respectively.
37 | We want to show that $!A(t_2)$ follows from $\Gamma_1 \cup \Gamma_2$.
38 | Consider !!a{structure}~$\Struct{M}$ with $\Sat{M}{\Gamma_1 \cup
39 | \Gamma_2}$. By induction hypothesis, $\Sat{M}{!A(t_1)}$ and
40 | $\Sat{M}{\eq[t_1][t_2]}$. Therefore, $\Value{t_1}{M} = \Value{t_2}{M}$. Let
41 | $s$ be any variable assignment, and $m = \Value{t_1}{M} = \Value{t_2}{M}$. By
42 | \olref[fol][syn][ext]{prop:ext-formulas}, $\Sat{M}{!A(t_1)}[s]$ iff
43 | $\Sat{M}{!A(x)}[\Subst{s}{m}{x}]$ iff $\Sat{M}{!A(t_2)}[s]$. Since
44 | $\Sat{M}{!A(t_1)}$, we have $\Sat{M}{!A(t_2)}$.
45 | \end{proof}
46 |
47 | \end{document}
48 |
--------------------------------------------------------------------------------
/content/first-order-logic/proof-systems/proof-systems.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: proof-systems
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \iftag{FOL}
9 | {\olchapter{fol}{prf}{\usetoken{S}{derivation} Systems}}
10 | {\olchapter{pl}{prf}{\usetoken{S}{derivation} Systems}}
11 |
12 | \begin{editorial}
13 | This chapter collects general material on !!{derivation} systems. A
14 | textbook using a specific system can insert the introduction section
15 | plus the relevant survey section at the beginning of the chapter
16 | introducing that system.
17 | \end{editorial}
18 |
19 | \olimport{introduction}
20 |
21 | \olimport{sequent-calculus}
22 |
23 | \olimport{natural-deduction}
24 |
25 | \olimport{tableaux}
26 |
27 | \olimport{axiomatic-deduction}
28 |
29 | \OLEndChapterHook
30 |
31 | \end{document}
32 |
--------------------------------------------------------------------------------
/content/first-order-logic/sequent-calculus/sequent-calculus.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: sequent-calculus
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \iftag{FOL}
9 | {\olchapter{fol}{seq}{The Sequent Calculus}}
10 | {\olchapter{pl}{seq}{The Sequent Calculus}}
11 |
12 | \begin{editorial}
13 | This chapter presents Gentzen's standard sequent calculus LK for
14 | classical first-order logic. It could use more examples and
15 | exercises. To include or exclude material relevant to the sequent
16 | calculus as a proof system, use the ``prfLK'' tag.
17 | \end{editorial}
18 |
19 | \olimport{rules-and-proofs}
20 |
21 | \olimport{propositional-rules}
22 |
23 | \iftag{FOL}{%
24 | \olimport{quantifier-rules}
25 | }{}
26 |
27 | \olimport{structural-rules}
28 |
29 | \olimport{derivations}
30 |
31 | \olimport{proving-things}
32 |
33 | \iftag{FOL}{%
34 | \olimport{proving-things-quant}
35 | }{}
36 |
37 | \olimport{proof-theoretic-notions}
38 |
39 | \olimport{provability-consistency}
40 |
41 | \olimport{provability-propositional}
42 |
43 | \iftag{FOL}{%
44 | \olimport{provability-quantifiers}
45 | }{}
46 |
47 | \olimport{soundness}
48 |
49 | \iftag{FOL}{%
50 | \olimport{identity}
51 | \olimport{soundness-identity}
52 | }{}
53 |
54 | \OLEndChapterHook
55 |
56 | \end{document}
57 |
--------------------------------------------------------------------------------
/content/first-order-logic/sequent-calculus/soundness-identity.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: sequent-calculus
3 | % Section: soundness-identity
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{fol}{seq}{sid}
10 |
11 | \olsection{Soundness with \usetoken{S}{identity}}
12 |
13 | \begin{prop}
14 | $\Log{LK}$ with initial sequents and rules for identity is sound.
15 | \end{prop}
16 |
17 | \begin{proof}
18 | Initial sequents of the form ${} \Sequent \eq[t][t]$ are valid, since
19 | for every !!{structure}~$\Struct M$, $\Sat{M}{\eq[t][t]}$. (Note that
20 | we assume the term $t$ to be closed, i.e., it contains no variables,
21 | so variable assignments are irrelevant).
22 |
23 | Suppose the last inference in !!a{derivation} is $=$. Then the premise
24 | is $\eq[t_1][t_2], \Gamma \Sequent \Delta, !A(t_1)$ and the conclusion
25 | is $\eq[t_1][t_2], \Gamma \Sequent \Delta, !A(t_2)$. Consider
26 | !!a{structure}~$\Struct M$. We need to show that the conclusion is
27 | valid, i.e., if $\Sat{M}{\eq[t_1][t_2]}$ and $\Sat{M}{\Gamma}$, then
28 | either $\Sat{M}{!C}$ for some $!C \in \Delta$ or $\Sat{M}{!A(t_2)}$.
29 |
30 | By induction hypothesis, the premise is valid. This means that if
31 | $\Sat{M}{\eq[t_1][t_2]}$ and $\Sat{M}{\Gamma}$ either (a) for some $!C
32 | \in \Delta$, $\Sat{M}{!C}$ or (b) $\Sat{M}{!A(t_1)}$. In case (a) we
33 | are done. Consider case (b). Let $s$ be a variable assignment with
34 | $s(x) = \Value{t_1}{M}$. By \olref[syn][ass]{prop:sentence-sat-true},
35 | $\Sat{M}{!A(t_1)}[s]$. Since $\varAssign{s}{s}{x}$, by
36 | \olref[syn][ext]{prop:ext-formulas}, $\Sat{M}{!A(x)}[s]$. since
37 | $\Sat{M}{\eq[t_1][t_2]}$, we have $\Value{t_1}{M} = \Value{t_2}{M}$,
38 | and hence $s(x) = \Value{t_2}{M}$. By applying
39 | \olref[syn][ext]{prop:ext-formulas} again, we also have
40 | $\Sat{M}{!A(t_2)}[s]$. By \olref[syn][ass]{prop:sentence-sat-true},
41 | $\Sat{M}{!A(t_2)}$.
42 | \end{proof}
43 |
44 | \end{document}
45 |
--------------------------------------------------------------------------------
/content/first-order-logic/syntax-and-semantics/intro-syntax.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: syntax
3 | % Section: intro-syntax
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{fol}{syn}{itx}
10 |
11 | \olsection{Introduction}
12 |
13 | In order to develop the theory and metatheory of first-order logic, we
14 | must first define the syntax and semantics of its expressions. The
15 | expressions of first-order logic are terms and !!{formula}s. Terms
16 | are formed from !!{variable}s, !!{constant}s, and !!{function}s.
17 | !!^{formula}s, in turn, are formed from !!{predicate}s together with
18 | terms (these form the smallest, ``atomic'' !!{formula}s), and then
19 | from atomic !!{formula}s we can form more complex ones using logical
20 | connectives and quantifiers. There are many different ways to set
21 | down the formation rules; we give just one possible one. Other systems
22 | will chose different symbols, will select different sets of
23 | connectives as primitive, will use parentheses differently (or even not
24 | at all, as in the case of so-called Polish notation). What all
25 | approaches have in common, though, is that the formation rules define
26 | the set of terms and !!{formula}s \emph{inductively}. If done
27 | properly, every expression can result essentially in only one way
28 | according to the formation rules. The inductive definition resulting
29 | in expressions that are \emph{uniquely readable} means we can give
30 | meanings to these expressions using the same method---inductive
31 | definition.
32 |
33 | \end{document}
34 |
--------------------------------------------------------------------------------
/content/first-order-logic/syntax-and-semantics/semantics.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: semantics
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{fol}{sem}{Semantics of First-Order Logic}
9 |
10 | \olimport{intro-semantics}
11 |
12 | \olimport{structures}
13 |
14 | \olimport{covered-structures}
15 |
16 | \olimport{satisfaction}
17 |
18 | \olimport{assignments}
19 |
20 | \olimport{extensionality}
21 |
22 | \olimport{semantic-notions}
23 |
24 | \OLEndChapterHook
25 |
26 | \end{document}
27 |
--------------------------------------------------------------------------------
/content/first-order-logic/syntax-and-semantics/syntax-and-semantics.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: syntax-and-semantics
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{fol}{syn}{Syntax and Semantics}
9 |
10 | \olimport{introduction}
11 |
12 | \olimport{first-order-languages}
13 |
14 | \olimport{terms-formulas}
15 |
16 | \olimport{unique-readability}
17 |
18 | \olimport{main-operator}
19 |
20 | \olimport{subformulas}
21 |
22 | \olimport{formation-sequences}
23 |
24 | \olimport{free-vars-sentences}
25 |
26 | \olimport{substitution}
27 |
28 | \olimport{structures}
29 |
30 | \olimport{covered-structures}
31 |
32 | \olimport{satisfaction}
33 |
34 | \olimport{assignments}
35 |
36 | \olimport{extensionality}
37 |
38 | \olimport{semantic-notions}
39 |
40 | \OLEndChapterHook
41 |
42 | \end{document}
43 |
--------------------------------------------------------------------------------
/content/first-order-logic/syntax-and-semantics/syntax.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: syntax
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{fol}{syn}{Syntax of First-Order Logic}
9 |
10 | \olimport{intro-syntax}
11 |
12 | \olimport{first-order-languages}
13 |
14 | \olimport{terms-formulas}
15 |
16 | \olimport{unique-readability}
17 |
18 | \olimport{main-operator}
19 |
20 | \olimport{subformulas}
21 |
22 | \olimport{formation-sequences}
23 |
24 | \olimport{free-vars-sentences}
25 |
26 | \olimport{substitution}
27 |
28 | \OLEndChapterHook
29 |
30 | \end{document}
31 |
--------------------------------------------------------------------------------
/content/first-order-logic/tableaux/soundness-identity.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: tableaux
3 | % Section: soundness-identity
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{fol}{tab}{sid}
10 |
11 | \olsection{Soundness with \usetoken{S}{identity}}
12 |
13 | \begin{prop}
14 | !!^{tableau}s with rules for identity are sound: no closed !!{tableau}
15 | is satisfiable.
16 | \end{prop}
17 |
18 | \begin{proof}
19 | We just have to show as before that if !!a{tableau} has a satisfiable
20 | branch, the branch resulting from applying one of the rules for~$\eq$
21 | to it is also satisfiable. Let $\Gamma$ be the set of signed
22 | !!{formula}s on the branch, and let $\Struct{M}$ be !!a{structure}
23 | satisfying~$\Gamma$.
24 |
25 | Suppose the branch is expanded using~$\eq$, i.e., by adding the signed
26 | !!{formula}~$\sFmla{\True}{\eq[t][t]}$. Trivially,
27 | $\Sat{M}{\eq[t][t]}$, so $\Struct{M}$ also satisfies $\Gamma \cup
28 | \{\sFmla{\True}{\eq[t][t]}\}$.
29 |
30 | If the branch is expanded using $\TRule{\True}{\eq}$, we add a signed
31 | !!{formula}~$\sFmla{S}{!A(t_2)}$, but $\Gamma$ contains
32 | both~$\sFmla{\True}{\eq[t_1][t_2]}$ and $\sFmla{\True}{!A(t_1)}$. Thus
33 | we have $\Sat{M}{\eq[t_1][t_2]}$ and $\Sat{M}{!A(t_1)}$. Let $s$ be a
34 | variable assignment with $s(x) = \Value{t_1}{M}$. By
35 | \olref[syn][ass]{prop:sentence-sat-true}, $\Sat{M}{!A(t_1)}[s]$. Since
36 | $\varAssign{s}{s}{x}$, by \olref[syn][ext]{prop:ext-formulas},
37 | $\Sat{M}{!A(x)}[s]$. since $\Sat{M}{\eq[t_1][t_2]}$, we have
38 | $\Value{t_1}{M} = \Value{t_2}{M}$, and hence $s(x) = \Value{t_2}{M}$.
39 | By applying \olref[syn][ext]{prop:ext-formulas} again, we also have
40 | $\Sat{M}{!A(t_2)}[s]$. By \olref[syn][ass]{prop:sentence-sat-true},
41 | $\Sat{M}{!A(t_2)}$. The case of $\TRule{\False}{\eq}$ is treated
42 | similarly.
43 | \end{proof}
44 |
45 | \end{document}
46 |
--------------------------------------------------------------------------------
/content/first-order-logic/tableaux/tableaux.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: tableaux
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \iftag{FOL}
9 | {\olchapter{fol}{tab}{Tableaux}}
10 | {\olchapter{pl}{tab}{Tableaux}}
11 |
12 | \begin{editorial}
13 | This chapter presents a signed analytic tableaux system.
14 |
15 | To include or exclude material relevant to natural deduction as a
16 | proof system, use the ``prfTab'' tag.
17 | \end{editorial}
18 |
19 | \olimport{rules-and-proofs}
20 |
21 | \olimport{propositional-rules}
22 |
23 | \iftag{FOL}{%
24 | \olimport{quantifier-rules}
25 | }{}
26 |
27 | \olimport{derivations}
28 |
29 | \olimport{proving-things}
30 |
31 | \iftag{FOL}{%
32 | \olimport{proving-things-quant}
33 | }{}
34 |
35 | \olimport{proof-theoretic-notions}
36 |
37 | \olimport{provability-consistency}
38 |
39 | \olimport{provability-propositional}
40 |
41 | \iftag{FOL}{%
42 | \olimport{provability-quantifiers}
43 | }{}
44 |
45 | \olimport{soundness}
46 |
47 | \iftag{FOL}{%
48 | \olimport{identity}
49 | \olimport{soundness-identity}
50 | }{}
51 |
52 | \OLEndChapterHook
53 |
54 | \end{document}
55 |
--------------------------------------------------------------------------------
/content/history/biographies/biographies.tex:
--------------------------------------------------------------------------------
1 | % Part: history
2 | % Chapter: biographies
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{his}{bio}{Biographies}
9 |
10 | \olimport{georg-cantor}
11 |
12 | \olimport{alonzo-church}
13 |
14 | \olimport{gerhard-gentzen}
15 |
16 | \olimport{kurt-goedel}
17 |
18 | \olimport{emmy-noether}
19 |
20 | \olimport{rozsa-peter}
21 |
22 | \olimport{julia-robinson}
23 |
24 | \olimport{bertrand-russell}
25 |
26 | \olimport{alfred-tarski}
27 |
28 | \olimport{alan-turing}
29 |
30 | \olimport{ernst-zermelo}
31 |
32 | \OLEndChapterHook
33 |
34 | \end{document}
35 |
--------------------------------------------------------------------------------
/content/history/history.tex:
--------------------------------------------------------------------------------
1 | % Part: history
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{his}{History}
8 |
9 | \olimport[biographies]{biographies}
10 |
11 | \olimport[set-theory]{set-theory}
12 |
13 | \OLEndPartHook
14 |
15 | \end{document}
16 |
--------------------------------------------------------------------------------
/content/history/set-theory/set-theory.tex:
--------------------------------------------------------------------------------
1 | % Part: history
2 | % Chapter: set-theory
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{his}{set}{History and Mythology of Set Theory}
9 |
10 | \begin{editorial}
11 | This chapter includes the historical prelude from Tim Button's Open
12 | Set Theory text.
13 | \end{editorial}
14 |
15 | \olimport{infinitesimals}
16 | \olimport{limits}
17 | \olimport{pathologies}
18 | \olimport{mythology}
19 | \olimport{cantor-plane}
20 | \olimport{hilbert-curve}
21 |
22 | \end{document}
23 |
--------------------------------------------------------------------------------
/content/incompleteness/arithmetization-syntax/arithmetization-syntax.tex:
--------------------------------------------------------------------------------
1 | % Part: incompleteness
2 | % Chapter: arithmetization-syntax
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{inc}{art}{Arithmetization of Syntax}
9 |
10 | \begin{editorial}
11 | Note that arithmetization for signed tableaux is not yet available.
12 | \end{editorial}
13 |
14 | \olimport{introduction}
15 |
16 | \olimport{coding-symbols}
17 |
18 | \olimport{coding-terms}
19 |
20 | \olimport{coding-formulas}
21 |
22 | \olimport{substitution}
23 |
24 | \iftag{prfSC}{%
25 | \olimport{proofs-in-lk}
26 | }{}
27 |
28 | \iftag{prfND}{%
29 | \olimport{proofs-in-nd}
30 | }{}
31 |
32 | \iftag{prfAX}{
33 | \olimport{proofs-in-ax}
34 | }{}
35 |
36 | \OLEndChapterHook
37 |
38 | \end{document}
39 |
--------------------------------------------------------------------------------
/content/incompleteness/arithmetization-syntax/substitution.tex:
--------------------------------------------------------------------------------
1 | % Part: incompleteness
2 | % Chapter: arithmetization-syntax
3 | % Section: substitution
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{inc}{art}{sub}
10 | \olsection{Substitution}
11 |
12 | Recall that substitution is the operation of replacing all free
13 | occurrences of !!a{variable}~$u$ in !!a{formula}~$!A$ by a term~$t$,
14 | written $\Subst{!A}{t}{u}$. This operation, when carried out on
15 | G\"odel numbers of !!{variable}s, !!{formula}s, and terms, is
16 | primitive recursive.
17 |
18 | \begin{prop}\ollabel{prop:subst-primrec}
19 | There is a primitive recursive function $\fn{Subst}(x, y, z)$ with the
20 | property that
21 | \[
22 | \fn{Subst}(\Gn{!A}, \Gn{t}, \Gn{u}) = \Gn{\Subst{!A}{t}{u}}.
23 | \]
24 | \end{prop}
25 |
26 | \begin{proof}
27 | We can then define a function $\fn{hSubst}$ by primitive recursion as
28 | follows:
29 | \begin{multline*}
30 | \begin{aligned}
31 | \fn{hSubst}(x, y, z, 0) & = \emptyseq \\
32 | \fn{hSubst}(x, y, z, i+1) & =
33 | \end{aligned}\\
34 | \begin{cases}
35 | \fn{hSubst}(x, y, z, i) \concat y & \text{if $\fn{FreeOcc}(x, z, i)$} \\
36 | \fn{append}(\fn{hSubst}(x, y, z, i), (x)_{i}) & \text{otherwise.}
37 | \end{cases}
38 | \end{multline*}
39 | $\fn{Subst}(x, y, z)$ can now be defined as $\fn{hSubst}(x, y, z, \len{x})$.
40 | \end{proof}
41 |
42 | \begin{prop}
43 | \ollabel{prop:free-for}
44 | The relation $\fn{FreeFor}(x, y, z)$, which holds iff the term with
45 | G\"odel number~$y$ is !!{free for} the variable with G\"odel
46 | number~$z$ in the formula with G\"odel number~$x$, is primitive
47 | recursive.
48 | \end{prop}
49 |
50 | \begin{proof} Exercise. \end{proof}
51 |
52 | \begin{prob}
53 | Prove \olref[inc][art][sub]{prop:free-for}
54 | \end{prob}
55 |
56 | \end{document}
57 |
--------------------------------------------------------------------------------
/content/incompleteness/incompleteness-provability/godels-paper.tex:
--------------------------------------------------------------------------------
1 | % Part: incompleteness
2 | % Chapter: incompleteness-provability
3 | % Section: godels-paper
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{inc}{inp}{gop}
10 |
11 | \olsection{Comparison with G\"odel's Original Paper}
12 |
13 | It is worthwhile to spend some time with G\"odel's 1931
14 | paper. The introduction sketches the ideas we have just discussed.
15 | Even if you just skim through the paper, it is easy to see what is
16 | going on at each stage: first G\"odel describes the formal system $P$
17 | (syntax, axioms, proof rules); then he defines the primitive recursive
18 | functions and relations; then he shows that $x B y$ is primitive
19 | recursive, and argues that the primitive recursive functions and
20 | relations are represented in $\Th{P}$. He then goes on to prove the
21 | incompleteness theorem, as above. In Section 3, he shows that one can
22 | take the unprovable assertion to be a sentence in the language of
23 | arithmetic. This is the origin of the $\beta$-lemma, which is what we
24 | also used to handle sequences in showing that the recursive functions
25 | are representable in $\Th{Q}$. G\"odel doesn't go so far to isolate a
26 | minimal set of axioms that suffice, but we now know that $\Th{Q}$ will do
27 | the trick. Finally, in Section 4, he sketches a proof of the second
28 | incompleteness theorem.
29 |
30 | \end{document}
31 |
--------------------------------------------------------------------------------
/content/incompleteness/incompleteness-provability/incompleteness-provability.tex:
--------------------------------------------------------------------------------
1 | % Part: incompleteness
2 | % Chapter: first-incompleteness
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{inc}{inp}{Incompleteness and Provability}
9 |
10 | \olimport{introduction}
11 |
12 | \olimport{fixed-point-lemma}
13 |
14 | \olimport{first-incompleteness-thm}
15 |
16 | \olimport{rosser-thm}
17 |
18 | \olimport{godels-paper}
19 |
20 | \olimport{provability-conditions}
21 |
22 | \olimport{second-incompleteness-thm}
23 |
24 | \olimport{lob-thm}
25 |
26 | \olimport{tarski-thm}
27 |
28 | \OLEndChapterHook
29 |
30 | \end{document}
31 |
--------------------------------------------------------------------------------
/content/incompleteness/incompleteness.tex:
--------------------------------------------------------------------------------
1 | % Part: incompleteness
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{inc}{Incompleteness}
8 |
9 | \begin{editorial}
10 | Material in this part covers the incompleteness theorems. It depends
11 | on material in the parts on first-order logic (esp., the proof
12 | system), the material on recursive functions (in the computability
13 | part). It is based on Jeremy Avigad's notes with revisions by Richard Zach.
14 | \end{editorial}
15 |
16 | \olimport[introduction]{introduction}
17 |
18 | \olimport[arithmetization-syntax]{arithmetization-syntax}
19 |
20 | \olimport[representability-in-q]{representability-in-q}
21 |
22 | \olimport[theories-computability]{theories-computability}
23 |
24 | \olimport[incompleteness-provability]{incompleteness-provability}
25 |
26 | \OLEndPartHook
27 |
28 | \end{document}
29 |
--------------------------------------------------------------------------------
/content/incompleteness/introduction/introduction.tex:
--------------------------------------------------------------------------------
1 | % Part: incompleteness
2 | % Chapter: first-incompleteness
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{inc}{int}{Introduction to Incompleteness}
9 |
10 | \olimport{historical-background}
11 |
12 | \olimport{definitions}
13 |
14 | \olimport{overview}
15 |
16 | \olimport{undecidability}
17 |
18 | \OLEndChapterHook
19 |
20 | \end{document}
21 |
--------------------------------------------------------------------------------
/content/incompleteness/representability-in-q/c.tex:
--------------------------------------------------------------------------------
1 | % Part: incompleteness
2 | % Chapter: representability-in-q
3 | % Section: c
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{inc}{req}{cee}
10 | \olsection{The Functions $C$}
11 |
12 | Let $C$ be the smallest set of functions containing
13 | \begin{enumerate}
14 | \item $0$,
15 | \item successor,
16 | \item addition,
17 | \item multiplication,
18 | \item projections, and
19 | \item the characteristic function for equality, $\Char{=}$;
20 | \end{enumerate}
21 | and closed under
22 | \begin{enumerate}
23 | \item composition, and
24 | \item unbounded search, applied to regular
25 | functions.
26 | \end{enumerate}
27 | Remember this last restriction means simply that you can only use the
28 | $\mu$ operation when the result is total. Compare this to the
29 | definition of the \emph{general recursive} functions: here we have
30 | added plus, times, and $\Char{=}$, but we have dropped primitive
31 | recursion.
32 |
33 | Clearly everything in $C$ is recursive, since plus, times,
34 | and $\Char{=}$ are. We will show that the converse is also true; this
35 | amounts to saying that with the other stuff in $C$ we can carry out
36 | primitive recursion.
37 |
38 | \end{document}
39 |
--------------------------------------------------------------------------------
/content/incompleteness/representability-in-q/representability-in-q.tex:
--------------------------------------------------------------------------------
1 | % Part: incompleteness
2 | % Chapter: representability-in-q
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{inc}{req}{Representability in $\Th{Q}$}
9 |
10 | \olimport{introduction}
11 |
12 | \olimport{representable-comp}
13 |
14 | \olimport{beta-function}
15 |
16 | \olimport{prim-rec}
17 |
18 | \olimport{basic-representable}
19 |
20 | \olimport{composition-representable}
21 |
22 | \olimport{minimization-representable}
23 |
24 | \olimport{comp-representable}
25 |
26 | \olimport{representing-relations}
27 |
28 | \olimport{undecidability}
29 |
30 | \OLEndChapterHook
31 |
32 | \end{document}
33 |
--------------------------------------------------------------------------------
/content/incompleteness/theories-computability/complete-decidable.tex:
--------------------------------------------------------------------------------
1 | % Part: incompleteness
2 | % Chapter: theories-computability
3 | % Section: complete-decidable
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{inc}{tcp}{cdc}
10 |
11 | \olsection{\printtoken{S}{axiomatizable} Complete Theories are Decidable}
12 |
13 | A theory is said to be {\em complete} if for every sentence $!A$,
14 | either $!A$ or $\lnot !A$ is provable.
15 |
16 | \begin{lem}
17 | Suppose a theory $\Th{T}$ is complete and !!{axiomatizable}. Then
18 | $\Th{T}$ is decidable.
19 | \end{lem}
20 |
21 | \begin{proof}
22 | Suppose $\Th{T}$ is complete and $A$ is a computable set of axioms.
23 | If $\Th{T}$ is inconsistent, it is clearly computable. (Algorithm: ``just
24 | say yes.'') So we can assume that $\Th{T}$ is also consistent.
25 |
26 | To decide whether or not a sentence $!A$ is in~$\Th{T}$,
27 | simultaneously search for !!a{derivation} of~$!A$ from~$\Th{T}$ and
28 | !!a{derivation} of~$\lnot !A$. Since $\Th{T}$ is complete, you are
29 | bound to find one or the other; and since $\Th{T}$ is consistent, if you
30 | find !!a{derivation} of~$\lnot !A$, there is no !!{derivation} of~$!A$.
31 |
32 | Put in different terms, we already know that $\Th{T}$ is !!{c.e.}; so
33 | by a theorem we proved before, it suffices to show that the complement
34 | of~$\Th{T}$ is !!{c.e.} also. But !!a{formula}~$!A$ is in~$\Th{\bar
35 | T}$ if and only if $\lnot !A$ is in~$\Th{T}$; so $\Th{\bar T} \leq_m
36 | \Th{T}$.
37 | \end{proof}
38 |
39 | \end{document}
40 |
--------------------------------------------------------------------------------
/content/incompleteness/theories-computability/computably-axiomatizable.tex:
--------------------------------------------------------------------------------
1 | % Part: incompleteness
2 | % Chapter: theories-computability
3 | % Section: computably-axiomatizable
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{inc}{tcp}{cax}
10 |
11 | \olsection{\printtoken{S}{axiomatizable} Theories}
12 |
13 | A theory $\Th{T}$ is said to be \emph{!!{axiomatizable}} if it has a
14 | computable set of axioms~$A$. (Saying that $A$ is a set of axioms for
15 | $\Th{T}$ means $T = \Setabs{!A}{A \Proves !A}$.) Any ``reasonable''
16 | axiomatization of the natural numbers will have this property. In
17 | particular, any theory with a finite set of axioms is
18 | !!{axiomatizable}.
19 |
20 | \begin{lem}
21 | Suppose $\Th{T}$ is !!{axiomatizable}. Then $\Th{T}$ is !!{computably
22 | enumerable}.
23 | \end{lem}
24 |
25 | \begin{proof}
26 | Suppose $A$ is a computable set of axioms for $\Th{T}$. To determine
27 | if $!A \in T$, just search for !!a{derivation} of $!A$ from the axioms.
28 |
29 | Put slightly differently, $!A$ is in $\Th{T}$ if and only if there is
30 | a finite list of axioms $!B_1$, \dots, $!B_k$ in $A$ and !!a{derivation} of
31 | $(!B_1 \land \dots \land !B_k) \lif !A$ in first-order logic. But
32 | we already know that any set with a definition of the form ``there
33 | exists \dots such that \dots'' is !!{c.e.}, provided the second ``\dots''
34 | is computable.
35 | \end{proof}
36 |
37 | \end{document}
38 |
--------------------------------------------------------------------------------
/content/incompleteness/theories-computability/first-incompleteness.tex:
--------------------------------------------------------------------------------
1 | % Part: incompleteness
2 | % Chapter: theories-computability
3 | % Section: first-incompleteness
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{inc}{tcp}{inc}
10 |
11 | \olsection{$\Th{Q}$ has no Complete, Consistent, !!^{axiomatizable}
12 | Extensions}
13 |
14 | \begin{thm}
15 | \ollabel{thm:first-incompleteness}
16 | There is no complete, consistent, !!{axiomatizable} extension of
17 | $\Th{Q}$.
18 | \end{thm}
19 |
20 | \begin{proof}
21 | We already know that there is no consistent, decidable extension of
22 | $\Th{Q}$. But if $\Th{T}$ is complete and !!{axiomatized}, then
23 | it is decidable.
24 | \end{proof}
25 |
26 | \begin{explain}
27 | This theorems is not that far from G\"odel's original 1931 formulation
28 | of the First Incompleteness Theorem. Aside from the more modern
29 | terminology, the key differences are this: G\"odel has
30 | ``$\omega$-consistent'' instead of ``consistent''; and he could not
31 | say ``!!{axiomatizable}'' in full generality, since the formal
32 | notion of computability was not in place yet. (The formal models of
33 | computability were developed over the following decade, including by
34 | G\"odel, and in large part to be able to characterize the kinds of
35 | theories that are susceptible to the G\"odel phenomenon.)
36 |
37 | The theorem says you can't have it all, namely, completeness,
38 | consistency, and !!{axiomatizability}. If you give up any one of
39 | these, though, you can have the other two: $\Th{Q}$ is consistent and
40 | computably axiomatized, but not complete; the inconsistent theory is
41 | complete, and computably axiomatized (say, by $\{ \eq/[0][0] \}$), but
42 | not consistent; and the set of true sentence of arithmetic is complete
43 | and consistent, but it is not computably axiomatized.
44 | \end{explain}
45 | \end{document}
46 |
--------------------------------------------------------------------------------
/content/incompleteness/theories-computability/inseparability.tex:
--------------------------------------------------------------------------------
1 | % Part: incompleteness
2 | % Chapter: theories-computability
3 | % Section: inseparability
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{inc}{tcp}{ins}
10 |
11 | \olsection{Sentences Provable and Refutable in $\Th{Q}$ are Computably
12 | Inseparable}
13 |
14 |
15 | Let $\Th{\bar Q}$ be the set of sentences whose {\em negations} are
16 | provable in $\Th{Q}$, i.e., $\Th{\bar Q} = \Setabs{!A}{\Th{Q} \Proves
17 | \lnot !A}$. Remember that disjoint sets $A$ and $B$ are said to be
18 | computably inseparable if there is no computable set $C$ such that $A
19 | \subseteq C$ and $B \subseteq \Complement{C}$.
20 |
21 | \begin{lem}
22 | $\Th{Q}$ and $\Th{\bar Q}$ are computably inseparable.
23 | \end{lem}
24 |
25 | \begin{proof}
26 | Suppose $C$ is a computable set such that $\Th{Q} \subseteq C$ and
27 | $\Th{\bar Q} \subseteq \Complement{C}$. Let $R(x,y)$ be the relation
28 | \begin{quote}
29 | $x$ codes a formula $!D(u)$ and $!D(\num y)$ is in $C$.
30 | \end{quote}
31 | We will show that $R(x,y)$ is a universal computable relation, yielding
32 | a contradiction.
33 |
34 | Suppose $S(y)$ is computable, represented by $!D_S(u)$ in $\Th{Q}$. Then
35 | \begin{eqnarray*}
36 | S(\num n) & \lif & \Th{Q} \Proves !D_S(\num n) \\
37 | & \lif & !D_S(\num n) \in C
38 | \end{eqnarray*}
39 | and
40 | \begin{eqnarray*}
41 | \lnot S(\num n) & \lif & \Th{Q} \Proves \lnot !D_S(\num n) \\
42 | & \lif & !D_S(\num n) \in \Th{\bar Q} \\
43 | & \lif & !D_S(\num n) \not\in C
44 | \end{eqnarray*}
45 | So $S(y)$ is equivalent to $R(\#(!D_S(\num u)),y)$.
46 | \end{proof}
47 |
48 | \end{document}
49 |
--------------------------------------------------------------------------------
/content/incompleteness/theories-computability/introduction.tex:
--------------------------------------------------------------------------------
1 | % Part: incompleteness
2 | % Chapter: theories-computability
3 | % Section: introduction
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{inc}{tcp}{int}
10 |
11 | \olsection{Introduction}
12 |
13 | \begin{editorial}
14 | This section should be rewritten.
15 | \end{editorial}
16 |
17 | We have the following:
18 | \begin{enumerate}
19 | \item A definition of what it means for a function to be representable
20 | in $\Th{Q}$ (\olref[req][int]{defn:representable-fn})
21 | \item a definition of what it means for a relation to be representable
22 | in $\Th{Q}$ (\olref[req][rel]{defn:representing-relations})
23 | \item a theorem asserting that the representable functions of $\Th{Q}$
24 | are exactly the computable ones
25 | (\olref[req][int]{thm:representable-iff-comp})
26 | \item a theorem asserting that the representable relations of $\Th{Q}$
27 | are exactly the computable ones
28 | \olref[req][rel]{thm:representing-rels})
29 | \end{enumerate}
30 |
31 | A {\em theory} is a set of sentences that is deductively closed, that
32 | is, with the property that whenever $T$ proves $!A$ then $!A$ is in
33 | $T$. It is probably best to think of a theory as being a collection of
34 | sentences, together with all the things that these sentences imply.
35 | From now on, we will use $\Th{Q}$ to refer to the {\em theory}
36 | consisting of the set of sentences derivable from the eight axioms in
37 | \olref[req][int]{sec}. Remember that we can code formula of $\Th{Q}$
38 | as numbers; if $!A$ is such a formula, let $\Gn{!A}$ denote the number
39 | coding $!A$. Modulo this coding, we can now ask whether various sets
40 | of formulas are computable or not.
41 |
42 | \end{document}
43 |
--------------------------------------------------------------------------------
/content/incompleteness/theories-computability/theories-computability.tex:
--------------------------------------------------------------------------------
1 | % Part: incompleteness
2 | % Chapter: theories-computability
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \begin{editorial}
9 | This chapter depends on material in the chapter on computability
10 | theory, but can be left out if that hasn't been covered. It's
11 | currently a basic conversion of Jeremy Avigad's notes, has not been
12 | revised, and is missing exercises.
13 | \end{editorial}
14 |
15 | \olchapter{inc}{tcp}{Theories and Computability}
16 |
17 | \olimport{introduction}
18 |
19 | \olimport{q-is-ce}
20 |
21 | \olimport{oconsis-ext-of-q-undec}
22 |
23 | \olimport{extensions-of-q-not-decidable}
24 |
25 | \olimport{computably-axiomatizable}
26 |
27 | \olimport{complete-decidable}
28 |
29 | \olimport{first-incompleteness}
30 |
31 | \olimport{inseparability}
32 |
33 | \olimport{consis-with-q}
34 |
35 | \olimport{interpretability}
36 |
37 | \OLEndChapterHook
38 |
39 | \end{document}
40 |
--------------------------------------------------------------------------------
/content/intuitionistic-logic/introduction/introduction.tex:
--------------------------------------------------------------------------------
1 | % part: intuitionistic-logic
2 | % chapter: introduction
3 |
4 |
5 | \documentclass[../../../include/open-logic-chapter]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olchapter{int}{int}{Introduction}
10 |
11 | \olimport{constructive-reasoning}
12 |
13 | \olimport{syntax}
14 |
15 | \olimport{bhk-interpretation}
16 |
17 | \olimport{natural-deduction}
18 |
19 | \olimport{axiomatic-derivations}
20 |
21 | \OLEndChapterHook
22 |
23 | \end{document}
24 |
--------------------------------------------------------------------------------
/content/intuitionistic-logic/intuitionistic-logic.tex:
--------------------------------------------------------------------------------
1 | % Part: intuitionistic-logic
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{int}{Intuitionistic Logic}
8 |
9 | \begin{editorial}
10 | This is a brief introduction to intuitionistic logic produced by
11 | Zesen Qian and revised by RZ. It is not yet well integrated with the
12 | rest of the text and needs examples and motivations.
13 | \end{editorial}
14 |
15 | \olimport[introduction]{introduction}
16 |
17 | \olimport[semantics]{semantics}
18 |
19 | \olimport[soundness-completeness]{soundness-completeness}
20 |
21 | \olimport[propositions-as-types]{propositions-as-types}
22 |
23 | \OLEndPartHook
24 |
25 | \end{document}
26 |
--------------------------------------------------------------------------------
/content/intuitionistic-logic/propositions-as-types/propositions-as-types.tex:
--------------------------------------------------------------------------------
1 | % part: intuitionistic-logic
2 | % chapter: propositions-as-types
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{int}{pty}{Propositions as Types}
9 |
10 | \begin{editorial}
11 | This is a \emph{very experimental} draft of a chapter on the
12 | Curry--Howard correspondence. It needs more explanation and
13 | motivation, and there are probably errors and omissions. The proof
14 | of normalization should be reviewed and expanded. There are no
15 | examples for the product type. Permutation and simplification
16 | conversions are not covered. It will make a lot more sense once
17 | there is also material on the (typed) lambda calculus which is
18 | basically presupposed here. Use with extreme caution.
19 | \end{editorial}
20 |
21 | \olimport{introduction}
22 | \olimport{sequent-natural-deduction}
23 | \olimport{proof-terms}
24 | \olimport{proofs-to-terms}
25 | \olimport{terms-to-proofs}
26 | \olimport{reduction}
27 | \olimport{normalization}
28 |
29 | \OLEndChapterHook
30 |
31 | \end{document}
32 |
--------------------------------------------------------------------------------
/content/intuitionistic-logic/semantics/propositions.tex:
--------------------------------------------------------------------------------
1 | % part: intuitionistic-logic
2 | % chapter: semantics
3 | % section: propositions
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{int}{sem}{pro}
10 |
11 | \olsection{Propositions}
12 |
13 | Sometimes it is useful to have a name for the set of worlds in
14 | !!a{relational model}~$\mModel{M}$ where !!a{formula}~$!A$ is true. We
15 | call it the \emph{proposition} defined by~$!A$, and write
16 | $\Prop{M}{!A}$.
17 |
18 | \begin{defn}
19 | We extend the function $V$ to a function $\Prop{M}{!A} \colon \Frm
20 | \to \Pow{W}$ inductively as follows:
21 | \begin{enumerate}
22 | \item $\Prop{M}{\lfalse} = \emptyset$
23 | \item $\Prop{M}{p} = V(p)$
24 | \item $\Prop{M}{\lnot !B} = {}$
25 | \[
26 | \Setabs{w \in W}{\text{for every $w'$ such that $Rww'$, $w'
27 | \notin \Prop{M}{!B}$}}.
28 | \]
29 | \item $\Prop{M}{!B \land !C} = \Prop{M}{!B} \cap \Prop{M}{!C}$.
30 | \item $\Prop{M}{!B \lor !C} = \Prop{M}{!B} \cup \Prop{M}{!C}$.
31 | \item $\Prop{M}{!B \lif !C} = {}$
32 | \[
33 | \Setabs{w \in W}{\text{for every $w'$ such that $Rww'$, if $w'
34 | \in \Prop{M}{!B}$ then $w' \in \Prop{M}{!C}$}}.
35 | \]
36 | \end{enumerate}
37 | \end{defn}
38 |
39 | \begin{prop}
40 | \ollabel{prop:propositions-true}
41 | $\mModel{M}{!A}[w]$ iff $w \in \Prop{M}{!A}$
42 | \end{prop}
43 |
44 | \begin{proof}
45 | Exercise.
46 | \end{proof}
47 |
48 | \begin{prob}
49 | Prove \olref[int][sem][pro]{prop:propositions-true}.
50 | \end{prob}
51 |
52 | \end{document}
53 |
--------------------------------------------------------------------------------
/content/intuitionistic-logic/semantics/semantics.tex:
--------------------------------------------------------------------------------
1 | % part: intuitionistic-logic
2 | % chapter: semantics
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{int}{sem}{Semantics}
9 |
10 | \begin{editorial}
11 | This chapter collects definitions for semantics for intuitionistic
12 | logic. So far only Kripke and topological semantics are
13 | covered. There are no examples yet, either of how models make
14 | formulas true or of proofs that formulas are valid.
15 | \end{editorial}
16 |
17 | \olimport{introduction}
18 | \olimport{relational-models}
19 | \olimport{semantic-notions}
20 | \olimport{topological-semantics}
21 |
22 | \OLEndChapterHook
23 |
24 | \end{document}
25 |
--------------------------------------------------------------------------------
/content/intuitionistic-logic/soundness-completeness/completeness-thm.tex:
--------------------------------------------------------------------------------
1 | % part: intuitionistic-logic
2 | % chapter: soundness-completeness
3 | % section: completeness-thm
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{int}{sc}{cpl}
10 |
11 | \olsection{The Completeness Theorem}
12 |
13 | \begin{thm}\ollabel{thm:completeness}
14 | If $\Gamma \Entails !A$ then $\Gamma \Proves !A$.
15 | \end{thm}
16 |
17 | \begin{proof}
18 | We prove the contrapositive: Suppose $\Gamma \Proves/ !A$. Then by
19 | \olref[lin]{lem:lindenbaum}, there is a prime set~$\Gamma^*
20 | \supseteq \Gamma$ such that $\Gamma^* \Proves/ !A$. Consider the
21 | canonical model~$\mModel{M(\Gamma^*)}$ for $\Gamma^*$ as defined in
22 | \olref[mod]{defn:canonical-model}. For any $!B \in \Gamma$, $\Gamma^*
23 | \Proves !B$. Note that $\Gamma^*(\emptyseq) = \Gamma^*$. By the Truth
24 | Lemma (\olref[tru]{lem:truth}), we have
25 | $\mSat{M(\Gamma^*)}{!B}[\emptyseq]$ for all $!B \in \Gamma$ and
26 | $\mSat/{M(\Gamma^*)}{!A}[\emptyseq]$. This shows that $\Gamma
27 | \Entails/ !A$.
28 | \end{proof}
29 |
30 | \begin{prob}
31 | Show that if $!A$ only contains !!{propositional variable}s, $\lor$,
32 | and~$\land$, then $\Entails/ !A$. Use this to conclude that $\lif$ is
33 | not definable in intuitionistic logic from $\lor$ and~$\land$.
34 | \end{prob}
35 |
36 | \begin{prob}
37 | By using the completeness theorem prove that if $\Proves !A \lor !B$ then
38 | $\Proves !A$ or $\Proves !B$. (Hint: Assume $\mSat/{M_1}{!A}$ and
39 | $\mSat/{M_2}{!B}$ and construct a new model $\mModel{M}$ such that
40 | $\mSat/{M}{!A \lor !B}$.)
41 | \end{prob}
42 |
43 | \begin{prob}
44 | Show that if $\mModel{M}$ is a relational model using a linear order then
45 | $\mSat{M}{(!A \lif !B)\lor(!B \lif !A)}$.
46 | \end{prob}
47 |
48 | \end{document}
49 |
--------------------------------------------------------------------------------
/content/intuitionistic-logic/soundness-completeness/decidability.tex:
--------------------------------------------------------------------------------
1 | % part: intuitionistic-logic
2 | % chapter: soundness-completeness
3 | % section: decidability
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{int}{sc}{dec}
10 |
11 | \olsection{Decidability}
12 | Observe that the proof of the completeness theorem gives us for every
13 | $\Gamma \Proves/ !A$ a model with an infinite number of worlds
14 | witnessing the fact that $\Gamma \Entails/ !A$. The following
15 | proposition shows that to prove $\Entails !A$ it is enough to prove
16 | that $\mSat{M}{!A}$ for all finite models (i.e., models with a finite
17 | set of worlds).
18 |
19 | \begin{thm}\ollabel{thm:decidability}
20 | If $\Entails/ !A$ then there is a finite model $\mSat/{M'}{!A}$.
21 | \end{thm}
22 |
23 | \begin{proof}
24 | Assume $\mModel{M}=\tuple{W, R, V}$ is such that $\mSat/{M}{!A}$ and $P$
25 | is the set of !!{propositional variable}s occurring in~$!A$. Define
26 | $\mModel{M'}=\tuple{W', R', V'}$ by letting $W' = \Setabs{[w]}{w \in W}$
27 | where $[w] = \Setabs{p \in P}{w \in V(p)}$, $R'$ be the subset relation,
28 | and $V'(p)=\Setabs{[w]}{p \in [w]}$. It should be clear that $W'$ is a
29 | finite set and that $\mModel{M'}$ is !!a{relational model}.
30 |
31 | It can be shown, by induction on~$!A$, that
32 | \[
33 | \mSat{M}{!A}[w] \text{ iff } \mSat{M'}{!A}[{[w]}]
34 | \]
35 | for all !!{formula}s $!A$ with only !!{propositional variable}s
36 | from~$P$. This is left as an exercise for the reader.
37 | \end{proof}
38 |
39 | \begin{prob}
40 | Finish the proof of \olref[int][sc][dec]{thm:decidability} by showing
41 | that $\mSat{M,w}{!A}$ iff $\mSat{M',[w]}{!A}$ for all !!{formula}s~$!A$
42 | with only propositional variables from~$P$.
43 | \end{prob}
44 |
45 | From \olref{thm:decidability} it follows that there is an algorithm to
46 | decide whether~$\Entails !A$.
47 |
48 |
49 | \end{document}
50 |
--------------------------------------------------------------------------------
/content/intuitionistic-logic/soundness-completeness/soundness-completeness.tex:
--------------------------------------------------------------------------------
1 | % part: intuitionistic-logic
2 | % chapter: soundness-completeness
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{int}{sc}{Soundness and Completeness}
9 |
10 | \begin{editorial}
11 | This chapter collects soundness and completeness results for
12 | propositional intuitionistic logic. It needs an introduction. The
13 | completeness proof makes use of facts about provability that should
14 | be stated and proved explicitly somewhere.
15 | \end{editorial}
16 |
17 | \olimport{soundness-axd}
18 | \olimport{soundness-nd}
19 | \olimport{lindenbaum}
20 | \olimport{canonical-model}
21 | \olimport{truth-lemma}
22 | \olimport{completeness-thm}
23 | \olimport{decidability}
24 |
25 | \OLEndChapterHook
26 |
27 | \end{document}
28 |
--------------------------------------------------------------------------------
/content/lambda-calculus/church-rosser/beta-eta-reduction.tex:
--------------------------------------------------------------------------------
1 | % Part: lambda-calculus
2 | % Chapter: church-rosser
3 | % Section: beta-eta-reduction
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{lam}{cr}{be}
10 |
11 | \olsection{$\beta\eta$-reduction}
12 |
13 | The Church--Rosser property holds for
14 | $\beta\eta$-reduction ($\bered$).
15 |
16 | \begin{lem}\ollabel{lem:one-par}
17 | If $M \beredone M'$, then $M \beredpar M'$.
18 | \end{lem}
19 |
20 | \begin{proof}
21 | By induction on the derivation of $M \beredone M'$. If $M \bredone
22 | M'$ by $\eta$-conversion (i.e., \olref[syn][eta]{defn:beredone}), we
23 | use \olref[pbe]{thm:refl}. The other cases are as in
24 | \olref[b]{lem:one-par}.
25 | \end{proof}
26 |
27 |
28 | \begin{lem}\ollabel{lem:par-red}
29 | If $M \beredpar M'$, then $M \bered M'$.
30 | \end{lem}
31 |
32 | \begin{proof} Induction on the derivation of $M \beredpar M'$.
33 |
34 | If the last rule is \olref[pbe]{defn:beredpar5}, then $M$ is
35 | $\lambd[x][Nx]$ and $M'$ is $N'$ for some $x$, $N$, $N'$ where $x
36 | \notin FV(N)$ and $N \beredpar N'$. Thus we can first reduce
37 | $\lambd[x][Nx]$ to $N$ by $\eta$-conversion, followed
38 | by the series of $\beredone$ steps that show that $N \bered N'$,
39 | which holds by induction hypothesis.
40 | \end{proof}
41 |
42 |
43 | \begin{lem}\ollabel{lem:str}
44 | $\bered$ is the smallest transitive relation containing $\beredpar$.
45 | \end{lem}
46 |
47 | \begin{proof}
48 | As in \olref[b]{lem:str}
49 | \end{proof}
50 |
51 | \begin{thm}\ollabel{thm:cr}
52 | $\bered$ satisfies Church--Rosser property.
53 | \end{thm}
54 |
55 | \begin{proof}
56 | By \olref[dap]{thm:str}, \olref[pbe]{thm:cr} and \olref{lem:str}.
57 | \end{proof}
58 | \end{document}
--------------------------------------------------------------------------------
/content/lambda-calculus/church-rosser/church-rosser.tex:
--------------------------------------------------------------------------------
1 | % Part: lambda-calculus
2 | % Chapter: church-rosser
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{lam}{cr}{The Church--Rosser Property}
9 |
10 | \olimport{definitions-and-properties}
11 | \olimport{parallel-beta-reduction}
12 | \olimport{beta-reduction}
13 | \olimport{parallel-beta-eta-reduction}
14 | \olimport{beta-eta-reduction}
15 |
16 | \OLEndChapterHook
17 |
18 | \end{document}
19 |
20 |
--------------------------------------------------------------------------------
/content/lambda-calculus/introduction/basic-pr-lambda.tex:
--------------------------------------------------------------------------------
1 | % Part: lambda-calculus
2 | % Chapter: introduction
3 | % Section: basic-pr-lambda
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{lam}{int}{bas}
10 | \olsection{The Basic Primitive Recursive Functions are \usetoken{S}{lambda definable}}
11 |
12 | \begin{lem}
13 | The functions $\Zero$, $\Succ$, and $\Proj{n}{i}$ are !!{lambda definable}.
14 | \end{lem}
15 |
16 | \begin{proof}
17 | $\Zero$ is just
18 | $\lambd[x][\lambd[y][y]]$.
19 |
20 | The successor function~$\Succ$, is
21 | defined by $\fn{Succ}(u) = \lambd[x][\lambd[y][x(uxy)]]$. You should
22 | think about why this works; for each numeral $\num{n}$, thought of as
23 | an iterator, and each function~$f$, $\fn{Succ}(\num{n},f)$ is a function that,
24 | on input~$y$, applies $f$ $n$ times starting with~$y$, and then
25 | applies it once more.
26 |
27 | There is nothing to say about projections: $\fn{Proj}^n_i(x_0, \dots,
28 | x_{n-1}) = x_i$. In other words, by our conventions, $\fn{Proj}^n_i$ is
29 | the lambda term $\lambd[x_0][\dots \lambd[x_{n-1}][x_i]]$.
30 | \end{proof}
31 |
32 | \end{document}
33 |
--------------------------------------------------------------------------------
/content/lambda-calculus/introduction/church-rosser.tex:
--------------------------------------------------------------------------------
1 | % Part: lambda-calculus
2 | % Chapter: introduction
3 | % Section: church-rosser
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{lam}{int}{cr}
10 | \olsection{The Church--Rosser Property}
11 |
12 | \begin{thm}
13 | \ollabel{thm:church-rosser}
14 | Let $M$, $N_1$, and $N_2$ be terms, such that $M \red N_1$ and $M \red
15 | N_2$. Then there is a term $P$ such that $N_1 \red P$ and $N_2 \red P$.
16 | \end{thm}
17 |
18 | \begin{cor}
19 | Suppose $M$ can be reduced to normal form. Then this normal form is
20 | unique.
21 | \end{cor}
22 |
23 | \begin{proof}
24 | If $M \red N_1$ and $M \red N_2$, by the previous theorem there is a
25 | term~$P$ such that $N_1$ and $N_2$ both reduce to~$P$. If $N_1$
26 | and~$N_2$ are both in normal form, this can only happen if $N_1 \ident P \ident
27 | N_2$.
28 | \end{proof}
29 |
30 | Finally, we will say that two terms $M$ and~$N$ are
31 | \emph{$\beta$-equivalent}, or just \emph{equivalent}, if they reduce
32 | to a common term; in other words, if there is some $P$ such that $M
33 | \red P$ and $N \red P$. This is written $M \equal[\beta] N$. Using
34 | \olref{thm:church-rosser}, you can check that $\equal[\beta]$ is an
35 | equivalence relation, with the additional property that for every $M$
36 | and~$N$, if $M \red N$ or $N \red M$, then $M \equal[\beta] N$. (In fact, one
37 | can show that $\equal[\beta]$ is the \emph{smallest} equivalence relation
38 | having this property.)
39 |
40 | \end{document}
41 |
42 |
--------------------------------------------------------------------------------
/content/lambda-calculus/introduction/composition.tex:
--------------------------------------------------------------------------------
1 | % Part: lambda-calculus
2 | % Chapter: introduction
3 | % Section: composition
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{lam}{int}{com}
10 | \olsection{The \usetoken{S}{lambda definable} Functions are Closed under Composition}
11 |
12 | \begin{lem}
13 | The !!{lambda definable} functions are closed under composition.
14 | \end{lem}
15 |
16 | \begin{proof}
17 | Suppose $f$ is defined by composition from $h$, $g_0,$
18 | \dots,~$g_{k-1}$. Assuming $h$, $g_0$, \dots,~$g_{k-1}$ are
19 | !!{lambda defined} by $H$, $G_0$, \dots,~$G_{k-1}$,
20 | respectively, we need to find a term~$F$ that !!{lambda define}s~$f$. But we
21 | can simply define~$F$ by
22 | \[
23 | F(x_0, \dots, x_{l-1}) = H(G_0(x_0, \dots, x_{l-1}),
24 | \dots, G_{k-1}(x_0, \dots, x_{l-1})).
25 | \]
26 | In other words, the language of the lambda calculus is well suited to
27 | represent composition.
28 | \end{proof}
29 |
30 | \end{document}
31 |
--------------------------------------------------------------------------------
/content/lambda-calculus/introduction/computable-lambda.tex:
--------------------------------------------------------------------------------
1 | % Part: lambda-calculus
2 | % Chapter: introduction
3 | % Section: computable-lambda
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{lam}{int}{lrp}
10 | \olsection{Computable Functions are \usetoken{S}{lambda definable}}
11 |
12 | \begin{thm}
13 | \ollabel{thm:computable-lambda}
14 | Every computable partial function is !!{lambda definable}.
15 | \end{thm}
16 |
17 | \begin{proof}
18 | We need to show that every partial computable function~$f$ is
19 | !!{lambda defined} by a lambda term~$F$. By Kleene's normal form
20 | theorem, it suffices to show that every primitive recursive function
21 | is !!{lambda defined} by a lambda term, and then that the functions
22 | !!{lambda definable} are closed under suitable compositions and
23 | unbounded search. To show that every primitive recursive function is
24 | !!{lambda defined} by a lambda term, it suffices to show that the
25 | initial functions are !!{lambda definable}, and that the partial
26 | functions that are !!{lambda definable} are closed under
27 | composition, primitive recursion, and unbounded search.
28 | \end{proof}
29 |
30 | We will use a more conventional notation to make the rest of the proof
31 | more readable. For example, we will write $M(x, y, z)$ instead of
32 | $Mxyz$. While this is suggestive, you should remember that terms in
33 | the untyped lambda calculus do not have associated arities; so, for
34 | the same term~$M$, it makes just as much sense to write $M(x,y)$ and
35 | $M(x,y,z,w)$. But using this notation indicates that we are treating
36 | $M$ as a function of three variables, and helps make the intentions
37 | behind the definitions clearer. In a similar way, we will say ``define
38 | $M$ by $M(x,y,z) = \dots$'' instead of ``define $M$ by $M =
39 | \lambd[x][\lambd[y][\lambd[z][\dots]]]$.''
40 |
41 | \end{document}
42 |
--------------------------------------------------------------------------------
/content/lambda-calculus/introduction/fixed-point-combinator.tex:
--------------------------------------------------------------------------------
1 | % Part: lambda-calculus
2 | % Chapter: introduction
3 | % Section: fixed-point-combinator
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{lam}{int}{fix}
10 | \olsection{Fixed-Point Combinators}
11 |
12 | Suppose you have a lambda term $g$, and you want another term $k$ with
13 | the property that $k$ is $\beta$-equivalent to $gk$. Define terms
14 | \[
15 | \fn{diag}(x) = xx
16 | \]
17 | and
18 | \[
19 | l(x) = g(\fn{diag}(x))
20 | \]
21 | using our notational conventions; in other words, $l$ is the term
22 | $\lambd[x][g(xx)]$. Let $k$ be the term $ll$. Then we have
23 | \begin{align*}
24 | k & = (\lambd[x][g(xx)])(\lambd[x][g(xx)]) \\
25 | & \red g((\lambd[x][g(xx)])(\lambd[x][g(xx)])) \\
26 | & = gk.
27 | \end{align*}
28 | If one takes
29 | \[
30 | Y = \lambd[g][((\lambd[x][g(xx)])(\lambd[x][g(xx)]))]
31 | \]
32 | then $Yg$ and $g(Yg)$ reduce to a common term; so $Yg \equiv_\beta
33 | g(Yg)$. This is known as ``Curry's combinator.'' If instead one takes
34 | \[
35 | Y = (\lambd[xg][g(xxg)])(\lambd[xg][g(xxg)])
36 | \]
37 | then in fact $Yg$ reduces to $g(Yg)$, which is a stronger statement.
38 | This latter version of $Y$ is known as ``Turing's combinator.''
39 |
40 | \end{document}
41 |
--------------------------------------------------------------------------------
/content/lambda-calculus/introduction/introduction.tex:
--------------------------------------------------------------------------------
1 | % Part: lambda-calculus
2 | % Chapter: introduction
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{lam}{int}{Introduction}
9 |
10 | \begin{editorial}
11 | This chapter consists of Jeremy's original concise notes on the lambda
12 | calculus. The sections need to be combined, and the material on lambda
13 | definability merged with the material in the separate, more detailed
14 | chapter on lambda definability.
15 | \end{editorial}
16 |
17 | \olimport{overview}
18 |
19 | \olimport{syntax}
20 |
21 | \olimport{reduction}
22 |
23 | \olimport{church-rosser}
24 |
25 | \olimport{currying}
26 |
27 | \olimport{lambda-definability}
28 |
29 | \olimport{lambda-computable}
30 |
31 | \olimport{computable-lambda}
32 |
33 | \olimport{basic-pr-lambda}
34 |
35 | \olimport{composition}
36 |
37 | \olimport{primitive-recursion}
38 |
39 | \olimport{fixed-point-combinator}
40 |
41 | \olimport{minimization}
42 |
43 | \OLEndChapterHook
44 |
45 | \end{document}
46 |
--------------------------------------------------------------------------------
/content/lambda-calculus/introduction/lambda-computable.tex:
--------------------------------------------------------------------------------
1 | % Part: lambda-calculus
2 | % Chapter: introduction
3 | % Section: lambda-computable
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{lam}{int}{cmp}
10 | \olsection{\usetoken{S}{lambda definable} Functions are Computable}
11 |
12 | \begin{thm}
13 | \ollabel{thm:lambda-computable}
14 | If a partial function $f$ is !!{lambda defined} by a lambda term, it is
15 | computable.
16 | \end{thm}
17 |
18 | \begin{proof}
19 | Suppose a function~$f$ is !!{lambda defined} by a lambda term~$X$. Let us
20 | describe an informal procedure to compute~$f$. On input $m_0$,
21 | \dots,~$m_{n-1}$, write down the term $X \num m_0 \ldots \num
22 | m_{n-1}$. Build a tree, first writing down all the one-step reductions
23 | of the original term; below that, write all the one-step reductions of
24 | those (i.e., the two-step reductions of the original term); and keep
25 | going. If you ever reach a numeral, return that as the answer;
26 | otherwise, the function is undefined.
27 |
28 | An appeal to Church's thesis tells us that this function is
29 | computable. A better way to prove the theorem would be to give a
30 | recursive description of this search procedure. For example, one
31 | could define a sequence primitive recursive functions and relations,
32 | ``$\fn{IsASubterm}$,'' ``$\fn{Substitute}$,''
33 | ``$\fn{ReducesToInOneStep}$,'' ``$\fn{ReductionSequence}$,''
34 | ``$\fn{Numeral}$,'' etc. The partial recursive procedure for computing
35 | $f(m_0, \dots, m_{n-1})$ is then to search for a sequence of one-step
36 | reductions starting with $X \num{m_0} \dots \num{m_{n-1}}$ and ending
37 | with a numeral, and return the number corresponding to that numeral.
38 | The details are long and tedious but otherwise routine.
39 | \end{proof}
40 |
41 | \end{document}
42 |
--------------------------------------------------------------------------------
/content/lambda-calculus/lambda-calculus.tex:
--------------------------------------------------------------------------------
1 | % Part: lambda-calculus
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{lam}{The Lambda Calculus}
8 |
9 | \begin{editorial}
10 | This part deals with the lambda calculus. The introduction chapter is
11 | based on Jeremy Avigad's notes; part of it is now redundant and covered in
12 | later chapters. The chapters on syntax, Church--Rosser property, and
13 | lambda definability were produced by Zesen Qian during his Mitacs summer
14 | internship. They still have to be reviewed and revised.
15 | \end{editorial}
16 |
17 | \olimport[introduction]{introduction}
18 |
19 | \olimport[syntax]{syntax}
20 |
21 | \olimport[church-rosser]{church-rosser}
22 |
23 | \olimport[lambda-definability]{lambda-definability}
24 |
25 | \OLEndPartHook
26 |
27 | \end{document}
28 |
--------------------------------------------------------------------------------
/content/lambda-calculus/lambda-definability/lambda-definability.tex:
--------------------------------------------------------------------------------
1 | % Part: lambda-calculus
2 | % Chapter: lambda-definability
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{lam}{rep}{Lambda Definability}
9 |
10 | \begin{editorial}
11 | This chapter is experimental. It needs more explanation, and the
12 | material should be structured better into definitions and
13 | propositions with proofs, and more examples.
14 | \end{editorial}
15 |
16 | \olimport{introduction}
17 | \olimport{arithmetical-functions}
18 | \olimport{pairs}
19 | \olimport{truth-values}
20 | %\olimport{lists}
21 | \olimport{primitive-recursive-functions}
22 | \olimport{fixpoints}
23 | \olimport{minimization}
24 | \olimport{partial-recursive-functions}
25 | \olimport{lambda-definable-recursive}
26 |
27 | \OLEndChapterHook
28 |
29 | \end{document}
30 |
--------------------------------------------------------------------------------
/content/lambda-calculus/lambda-definability/lists.tex:
--------------------------------------------------------------------------------
1 | % Part: lambda-calculus
2 | % Chapter: lambda-definability
3 | % Section: lists
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{lam}{ldf}{lst}
10 | \olsection{Lists}
11 |
12 | The list $[M_1, M_2, \ldots, M_n]$ can be defined to be:
13 | \[
14 | [M_1, M_2, \ldots, M_n] \ident \lambd[sz][s M_1 (s M_2 (\ldots (s M_n z)))]
15 | \]
16 | Informally speaking, the term representing a list is the
17 | ``accumulator'' function of the list: a function that accepts two
18 | terms; the first is a function that receives accumulated value along
19 | with a new element and returns the new accumulated value; the second
20 | is the initial accumulated value; it accumulates elements one by one
21 | and finally returns the result.
22 |
23 | \begin{digress}
24 | If you are familiar with functional programming you will find the
25 | definition similar to the \emph{right fold}: a list is defined as
26 | the right fold function of the elements it contains.
27 | \end{digress}
28 |
29 | We can easily define some useful functions based on this encoding;
30 | \begin{align*}
31 | \fn{Sum} & \ident
32 | \lambd[l][l \, (\lambd[xa][\fn{Add} \, x \, a])\, \num{0}]\\
33 | \fn{Len} & \ident
34 | \lambd[l][l \, (\lambd[xa][\fn{Add} \, a \, \num{1}]) \num{0}]
35 | \end{align*}
36 |
37 | $\fn{Sum}$ calculates the sum of a list of church numerals. It works
38 | by doing an accumulation on the list, where the initial value is
39 | $\num{0}$ and for each element, return $\fn{Add} \, x\, a$ as the new
40 | value (where $x$ is the current element and $a$ is the accumulated
41 | value). The result is the sum of all elements.
42 |
43 | \begin{prob}
44 | What does $\fn{Len}$ do? Explain.
45 | \end{prob}
46 |
47 | \begin{prob}
48 | Define a function that reverses a list.
49 | \end{prob}
50 | \end{document}
51 |
52 |
--------------------------------------------------------------------------------
/content/lambda-calculus/lambda-definability/pairs.tex:
--------------------------------------------------------------------------------
1 | % Part: lambda-calculus
2 | % Chapter: lambda-definability
3 | % Section: pairs
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{lam}{ldf}{pai}
10 | \olsection{Pairs and Predecessor}
11 |
12 | \begin{defn}
13 | The pair of $M$ and $N$ (written $\tuple{M,N}$) is defined as follows:
14 | \[
15 | \tuple{M,N} \ident \lambd[f][fMN].
16 | \]
17 | \end{defn}
18 |
19 | Intuitively it is a function that accepts a function, and applies that
20 | function to the two elements of the pair. Following this idea we have
21 | this constructor, which takes two terms and returns the pair containing
22 | them:
23 | \[
24 | \fn{Pair} \ident \lambd[mn][\lambd[f][fmn]]
25 | \]
26 | Given a pair, we also want to recover its elements.
27 | For this we need two access functions, which accept a pair as argument and
28 | return the first or second elements in it:
29 | \begin{align*}
30 | \fn{Fst} & \ident \lambd[p][p(\lambd[mn][m])]\\
31 | \fn{Snd} & \ident \lambd[p][p(\lambd[mn][n])]
32 | \end{align*}
33 |
34 | \begin{prob}
35 | Explain why the access functions $\fn{Fst}$ and $\fn{Snd}$ work.
36 | \end{prob}
37 |
38 | Now with pairs we can !!{lambda define} the predecessor function:
39 | \[
40 | \fn{Pred} \ident \lambd[n][\fn{Fst}(n (\lambd[p][\tuple{\fn{Snd}\, {p}, \fn{Succ}(\fn{Snd}\, {p})}]) \tuple{\num 0, \num 0})]
41 | \]
42 | Remember that $\num n\, f x$ reduces to $f^{n}(x)$; in this
43 | case $f$ is a function that accepts a pair $p$ and returns a new
44 | pair containing the second component of $p$ and the successor of the
45 | second component; $x$ is the pair $\tuple{0,0}$. Thus, the
46 | result is $\tuple{0,0}$ for $n=0$, and $\tuple{\num{n-1}, \num n}$
47 | otherwise. $\fn{Pred}$ then returns the first component of the result.
48 |
49 | Subtraction can be defined as $\fn{Pred}$ applied to $a$, $b$ times:
50 | \[
51 | \fn{Sub} \ident \lambd[ab][b \fn{Pred}\, a].
52 | \]
53 |
54 | \end{document}
55 |
--------------------------------------------------------------------------------
/content/lambda-calculus/syntax/abbreviated-syntax.tex:
--------------------------------------------------------------------------------
1 | % Part: lambda-calculus
2 | % Chapter: syntax
3 | % Section: abbreviated-syntax
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{lam}{syn}{abb}
10 | \olsection{Abbreviated Syntax}
11 |
12 | Terms as defined in \olref[trm]{defn:term} are sometimes cumbersome to
13 | write, so it is useful to introduce a more concise syntax. We must of
14 | course be careful to make sure that the terms in the concise notation
15 | also are uniquely readable. One widely used version called
16 | \emph{abbreviated terms} is as follows.
17 |
18 | \begin{enumerate}
19 | \item When parentheses are left out, application takes place from left
20 | to right. For example, if $M$, $N$, $P$, and~$Q$ are terms, then
21 | $MNPQ$ abbreviates $(((MN)P)Q)$.
22 | \item Again, when parentheses are left out, lambda abstraction is
23 | given the widest scope possible. From example, $\lambd[x][MNP]$ is
24 | read as $(\lambd[x][MNP])$.
25 | \item A lambda can be used to abstract multiple variables. For
26 | example, $\lambd[xyz][M]$ is short for
27 | $\lambd[x][\lambd[y][\lambd[z][M]]]$.
28 | \end{enumerate}
29 |
30 | For example,
31 | \[
32 | \lambd[xy][xxyx \lambd[z][xz]]
33 | \]
34 | abbreviates
35 | \[
36 | (\lambd[x][(\lambd[y][((((xx)y)x)(\lambd[z][(xz)]))])]).
37 | \]
38 |
39 | \begin{prob}
40 | Expand the abbreviated term $\lambd[g][(\lambd[x][g (x x)])
41 | \lambd[x][g (x x)]]$.
42 | \end{prob}
43 |
44 | \end{document}
45 |
--------------------------------------------------------------------------------
/content/lambda-calculus/syntax/conversion.tex:
--------------------------------------------------------------------------------
1 | % Part: lambda-calculus
2 | % Chapter: introduction
3 | % Section: conversion
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{lam}{int}{con}
10 | \olsection{Conversion and Reduction}
11 |
12 | There three type of conversions or reductions in lambda calculus. The
13 | difference between conversion and reduction is whether the
14 | ``transformation'' is unidirectional or bidirectional, as we will see.
15 |
16 | The $\alpha$-conversion is about variable renaming. It is natural to
17 | consider $\lambda x. x$ and $\lambda y.y$ representing the same
18 | function (the identity function), we formallize this idea as follows:
19 |
20 |
21 | \end{document}
22 |
23 |
--------------------------------------------------------------------------------
/content/lambda-calculus/syntax/syntax.tex:
--------------------------------------------------------------------------------
1 | % Part: lambda-calculus
2 | % Chapter: syntax
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{lam}{syn}{Syntax}
9 |
10 | \olimport{terms}
11 |
12 | \olimport{unique-readability}
13 |
14 | \olimport{abbreviated-syntax}
15 |
16 | \olimport{free-variables}
17 |
18 | \olimport{substitution}
19 |
20 | \olimport{alpha}
21 |
22 | \olimport{de-bruijn}
23 |
24 | \olimport{term-revisited}
25 |
26 | \olimport{beta}
27 |
28 | \olimport{eta}
29 |
30 | \OLEndChapterHook
31 |
32 | \end{document}
33 |
--------------------------------------------------------------------------------
/content/many-valued-logic/infinite-valued-logics/infinite-valued-logics.tex:
--------------------------------------------------------------------------------
1 | % Part: many-valued-logic
2 | % Chapter: three-valued-logics
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{mvl}{inf}{Infinite-valued Logics}
9 |
10 | \olimport{introduction}
11 |
12 | \olimport{lukasiewicz}
13 |
14 | \olimport{goedel}
15 |
16 | \OLEndChapterHook
17 |
18 | \end{document}
19 |
--------------------------------------------------------------------------------
/content/many-valued-logic/infinite-valued-logics/introduction.tex:
--------------------------------------------------------------------------------
1 | % Part: many-valued-logic
2 | % Chapter: infinite-valued-logics
3 | % Section: introduction
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{mvl}{inf}{int}
10 |
11 | \olsection{Introduction}
12 |
13 | The number of truth values of a matrix need not be finite. An obvious
14 | choice for a set of infinitely many truth values is the set of
15 | rational numbers between $0$ and~$1$, $V_\infty = [0,1] \cap \Rat$,
16 | i.e.,
17 | \begin{align*}
18 | V_\infty & = \Setabs{\frac{n}{m}}{n,m \in \Nat \text{ and } n\le m}.
19 | \intertext{When considering this infinite truth value set, it is often
20 | useful to also consider the subsets}
21 | V_m & = \Setabs{\frac{n}{m-1}}{n \in \Nat \text{ and } n\le m}
22 | \intertext{For instance, $V_5$ is the set with $5$ evenly spaced truth values,}
23 | V_5 & = \{0, \frac{1}{4}, \frac{1}{2}, \frac{3}{4}, 1\}.
24 | \end{align*}
25 | In logics based on these truth value sets, usually only $1$ is
26 | designated, i.e., $V^+ = \{1\}$. In other words, we let $1$ play the
27 | role of (absolute) truth, $0$ as absolute falsity, but !!{formula}s
28 | may take any intermediate value in~$V$.
29 |
30 | One can also consider the set $V_{[0,1]} = [0,1]$ of all
31 | \emph{real} numbers between $0$ and~$1$, or other infinite subsets of
32 | $[0,1]$, however. Logics with this truth value set are often called \emph{fuzzy}.
33 |
34 |
35 | \end{document}
36 |
--------------------------------------------------------------------------------
/content/many-valued-logic/many-valued-logic.tex:
--------------------------------------------------------------------------------
1 | % Part: many-valued-logic
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{mvl}{Many-valued Logic}
8 |
9 | \begin{editorial}
10 | This part contains draft material on propositional many-valued logics.
11 | \end{editorial}
12 |
13 | \olimport[syntax-and-semantics]{syntax-and-semantics}
14 |
15 | \olimport[three-valued-logics]{three-valued-logics}
16 |
17 | \olimport[infinite-valued-logics]{infinite-valued-logics}
18 |
19 | \olimport[sequent-calculus]{sequent-calculus}
20 |
21 | \OLEndPartHook
22 |
23 | \end{document}
24 |
--------------------------------------------------------------------------------
/content/many-valued-logic/sequent-calculus/sequent-calculus.tex:
--------------------------------------------------------------------------------
1 | % Part: many-valued-logic
2 | % Chapter: three-valued-logics
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{mvl}{seq}{Sequent Calculus}
9 |
10 | \olimport{introduction}
11 |
12 | \olimport{rules-and-proofs}
13 |
14 | \olimport{structural-rules}
15 |
16 | \olimport{propositional-rules}
17 |
18 | \OLEndChapterHook
19 |
20 | \end{document}
21 |
--------------------------------------------------------------------------------
/content/many-valued-logic/sequent-calculus/structural-rules.tex:
--------------------------------------------------------------------------------
1 | % Part: many-valued-logics
2 | % Chapter: sequent-calculus
3 | % Section: structural-rules
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{mvl}{seq}{str}
10 |
11 | \olsection{Structural Rules}
12 |
13 | The structural rules for $n$-sided sequent calculus operate as in the
14 | classical case, except for each position~$i$.
15 |
16 | \begin{defish}
17 | \begin{center}
18 | \AxiomC{$ \Gamma_1 \nSequent \dots \nSequent \phantom{!A,}\Gamma_i \nSequent \dots \nSequent \Gamma_n $}
19 | \RightLabel{$\iR{\Weakening}{i}$}
20 | \UnaryInfC{$\Gamma_1 \nSequent \dots \nSequent !A, \Gamma_i \nSequent \dots \nSequent \Gamma_n$}
21 | \DisplayProof
22 | \\[2ex]
23 | \AxiomC{$ \Gamma_1 \nSequent \dots \nSequent !A, !A, \Gamma_i \nSequent \dots \nSequent \Gamma_n $}
24 | \RightLabel{$\iR{\Contraction}{i}$}
25 | \UnaryInfC{$\Gamma_1 \nSequent \dots \nSequent \phantom{!A,}!A, \Gamma_i \nSequent
26 | \dots \nSequent \Gamma_n$}
27 | \DisplayProof
28 | \\[2ex]
29 | \AxiomC{$ \Gamma_1 \nSequent \dots \nSequent \Gamma_i, !A, !B, \Gamma_i' \nSequent \dots \nSequent \Gamma_n $}
30 | \RightLabel{$\iR{\Exchange}{i}$}
31 | \UnaryInfC{$\Gamma_1 \nSequent \dots \nSequent \Gamma_i, !B, !A, \Gamma_i' \nSequent \dots
32 | \nSequent \Gamma_n$}
33 | \DisplayProof
34 | \end{center}
35 | \end{defish}
36 |
37 | A series of weakening, contraction, and exchange inferences will often
38 | be indicated by double inference lines.
39 |
40 | The \Cut{} rule comes in several forms, one for every combination of
41 | distinct positions in the sequent $i \neq j$:
42 | \begin{defish}
43 | \[
44 | \AxiomC{$ \Gamma_1 \nSequent \dots \nSequent !A, \Gamma_i \nSequent \dots \nSequent \Gamma_n $}
45 | \AxiomC{$ \Delta_1 \nSequent \dots \nSequent !A, \Delta_j \nSequent \dots \nSequent \Delta_n $}
46 | \RightLabel{$\iR{\Cut}{i,j}$}
47 | \BinaryInfC{$\Gamma_1,\Delta_1 \nSequent \dots \nSequent \Gamma_n, \Delta_n$}
48 | \DisplayProof
49 | \]
50 | \end{defish}
51 |
52 | \end{document}
53 |
--------------------------------------------------------------------------------
/content/many-valued-logic/syntax-and-semantics/formulas.tex:
--------------------------------------------------------------------------------
1 | % Part: many-valued-logic
2 | % Chapter: syntax-and-semantics
3 | % Section: formulas
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{mvl}{syn}{fml}
10 |
11 | \olsection{\usetoken{P}{formula}}
12 |
13 | \begin{defn}[Formula]
14 | \ollabel{defn:formulas}
15 | The set~$\Frm[L]$ of \emph{!!{formula}s} of a propositional
16 | language~$\Lang L$ is defined inductively as follows:
17 | \begin{enumerate}
18 | \item Every !!{propositional variable}~$\Obj p_i$ is an atomic
19 | !!{formula}.
20 | \item Every $0$-place connective (propositional constant) of~$\Lang L$
21 | is an atomic !!{formula}.
22 | \item If $\star$ is an $n$-place connective of~$\Lang L$, and $!A_1$,
23 | \dots, $!A_n$ are !!{formula}s, then $\star(!A_1, \dots, !A_n)$ is
24 | !!a{formula}.
25 | \tagitem{limitClause}{Nothing else is !!a{formula}.}{}
26 | \end{enumerate}
27 | If $\star$ is $1$-place, then $\star(!A_1)$ will often be written
28 | simply as $\star !A_1$. If $\star$ is $2$-place $\star(!A_1,!A_2)$
29 | will often be written as $(!A_1 \star !A_2)$.
30 | \end{defn}
31 |
32 | As usual, we will often silently leave out the outermost parentheses.
33 |
34 | \begin{ex}
35 | In the standard language~$\Lang{L_0}$, $\Obj p_1 \lif (\Obj p_1
36 | \land \lnot \Obj p_2)$ is a formula. In the language of product
37 | logic, it would be written instead as $\Obj p_1 \lif (\Obj p_1 \odot
38 | \lnot \Obj p_2)$. If we add the $1$-place $\triangle$ to the
39 | language, we would also have formulas such as $\triangle (\Obj p_1
40 | \land \Obj p_2) \lif (\triangle \Obj p_1 \land \triangle \Obj p_2)$.
41 | \end{ex}
42 |
43 | \end{document}
44 |
--------------------------------------------------------------------------------
/content/many-valued-logic/syntax-and-semantics/syntax-and-semantics.tex:
--------------------------------------------------------------------------------
1 | % Part: many-valued-logic
2 | % Chapter: syntax-and-semantics
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{mvl}{syn}{Syntax and Semantics}
9 |
10 | \olimport{introduction}
11 |
12 | \olimport{connectives}
13 |
14 | \olimport{formulas}
15 |
16 | \olimport{matrices}
17 |
18 | \olimport{valuations-sat}
19 |
20 | \olimport{semantic-notions}
21 |
22 | \olimport{sublogics}
23 |
24 | \OLEndChapterHook
25 |
26 | \end{document}
27 |
--------------------------------------------------------------------------------
/content/many-valued-logic/syntax-and-semantics/valuations-sat.tex:
--------------------------------------------------------------------------------
1 | % Part: many-valued-logic
2 | % Chapter: syntax-and-semantics
3 | % Section: valuations-sat
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{mvl}{syn}{val}
10 |
11 | \olsection{\usetoken{P}{valuation} and Satisfaction}
12 |
13 | \begin{defn}[!!^{valuation}s]
14 | Let $V$ be a set of truth values. A \emph{!!{valuation}} for
15 | $\Lang{L}$ into~$V$ is a
16 | function~$\pAssign{v}$ assigning !!a{element} of~$V$ to the
17 | !!{propositional variable}s of the language, i.e., $\pAssign{v} \colon
18 | \PVar \to V$.
19 | \end{defn}
20 |
21 | \begin{defn}\ollabel{defn:pValue}
22 | Given !!a{valuation}~$\pAssign{v}$ into the set of truth values~$V$ of a
23 | many-valued logic~$\Log L$, define the evaluation function
24 | $\pValue{v} \colon \Frm[L] \to V$ inductively by:
25 | \begin{enumerate}
26 | \item $\pValue{v}(\Obj p_n) = \pAssign{v}(\Obj p_n)$;
27 | \item If $\star$ is a $0$-place connective, then $\pValue{v}(\star) = \tf{\star}[\Log L]$;
28 | \item If $\star$ is an $n$-place connective, then
29 | \[
30 | \pValue{v}(\star(!A_1, \dots, !A_n)) = \tf{\star}[\Log L]
31 | (\pValue{v}(!A_1), \dots, \pValue{v}(!A_n)).
32 | \]
33 | \end{enumerate}
34 | \end{defn}
35 |
36 | \begin{defn}[Satisfaction]
37 | \ollabel{defn:satisfaction} The !!{formula}~$!A$ is \emph{satisfied}
38 | by !!a{valuation}~$\pAssign{v}$, $\pSat{v}{!A}[\Log L]$, iff
39 | $\pValue{v}(!A)[\Log L] \in V^+$, where $V^+$ is the set of
40 | designated truth values of~$\Log L$.
41 |
42 | We write $\pSat/{v}{!A}[\Log L]$ to mean ``not $\pSat{v}{!A}[\Log
43 | L]$.'' If $\Gamma$ is a set of !!{formula}s, $\pSat{v}{\Gamma}[\Log
44 | L]$ iff $\pSat{v}{!A}[\Log L]$ for every~$!A \in \Gamma$.
45 | \end{defn}
46 |
47 | \end{document}
48 |
--------------------------------------------------------------------------------
/content/many-valued-logic/three-valued-logics/introduction.tex:
--------------------------------------------------------------------------------
1 | % Part: many-valued-logic
2 | % Chapter: three-valued-logics
3 | % Section: introduction
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{mvl}{thr}{int}
10 |
11 | \olsection{Introduction}
12 |
13 | If we just add one more value~$\Undef$ to $\True$ and $\False$, we get a
14 | three-valued logic. Even though there is only one more truth value,
15 | the possibilities for defining the truth-functions for $\lnot$,
16 | $\land$, $\lor$, and $\lif$ are quite numerous. Then a logic might use
17 | any combination of these truth functions, and you also have a choice
18 | of making only $\True$ designated, or both $\True$ and~$\Undef$.
19 |
20 | We present here a selection of the most well-known three-valued
21 | logics, their motivations, and some of their properties.
22 |
23 | \end{document}
24 |
--------------------------------------------------------------------------------
/content/many-valued-logic/three-valued-logics/three-valued-logics.tex:
--------------------------------------------------------------------------------
1 | % Part: many-valued-logic
2 | % Chapter: three-valued-logics
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{mvl}{thr}{Three-valued Logics}
9 |
10 | \olimport{introduction}
11 |
12 | \olimport{lukasiewicz}
13 |
14 | \olimport{kleene}
15 |
16 | \olimport{goedel}
17 |
18 | \olimport{multiple-designation}
19 |
20 | \OLEndChapterHook
21 |
22 | \end{document}
23 |
--------------------------------------------------------------------------------
/content/methods/induction/induction.tex:
--------------------------------------------------------------------------------
1 | % Part: methods
2 | % Chapter: induction
3 |
4 | \documentclass[../../../include/open-logic-section]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{mth}{ind}{Induction}
9 |
10 | \olimport{introduction}
11 |
12 | \olimport{induction-on-N}
13 |
14 | \olimport{strong-induction}
15 |
16 | \olimport{inductive-definitions}
17 |
18 | \olimport{structural-induction}
19 |
20 | \olimport{relations}
21 |
22 | \OLEndChapterHook
23 |
24 | \end{document}
25 |
--------------------------------------------------------------------------------
/content/methods/methods.pcr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenLogicProject/OpenLogic/383e20581effa123fb6b10252eb28e55b7a45058/content/methods/methods.pcr
--------------------------------------------------------------------------------
/content/methods/methods.tex:
--------------------------------------------------------------------------------
1 | % Part: methods
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{mth}{Methods}
8 |
9 | \begin{editorial}
10 | This part covers general and methodological material, especially
11 | explanations of various proof methods a non-mathematics student may
12 | be unfamiliar with. It currently contains a chapter on how to write
13 | proofs, and a chapter on induction, but additional sections for
14 | those, exercises, and a chapter on mathematical terminology is also
15 | planned.
16 | \end{editorial}
17 |
18 | \olimport[proofs]{proofs}
19 |
20 | \olimport[induction]{induction}
21 |
22 | \OLEndPartHook
23 |
24 | \end{document}
25 |
--------------------------------------------------------------------------------
/content/methods/proofs/proofs.tex:
--------------------------------------------------------------------------------
1 | % Part: methods
2 | % Chapter: proofs
3 |
4 | \documentclass[../../../include/open-logic-section]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{mth}{prf}{Proofs}
9 |
10 | \olimport{introduction}
11 |
12 | \olimport{starting-proofs}
13 |
14 | \olimport{using-definitions}
15 |
16 | \olimport{inference-patterns}
17 |
18 | \olimport{example-1}
19 |
20 | \olimport{example-2}
21 |
22 | \olimport{proof-by-contradiction}
23 |
24 | \olimport{reading-proofs}
25 |
26 | \olimport{cant-do-it}
27 |
28 | \olimport{resources}
29 |
30 | \OLEndChapterHook
31 |
32 | \end{document}
33 |
--------------------------------------------------------------------------------
/content/methods/proofs/resources.tex:
--------------------------------------------------------------------------------
1 | % Part: methods
2 | % Chapter: proofs
3 | % Section: resources
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{mth}{prf}{res}
10 |
11 | \section{Other Resources}
12 |
13 | There are many books on how to do proofs in mathematics which may be
14 | useful. Check out \emph{How to Read and do Proofs: An Introduction to
15 | Mathematical Thought Processes} \citep{Solow2013} and \emph{How to
16 | Prove It: A Structured Approach} \citep{Velleman2019} in particular.
17 | The
18 | \href{http://www.people.vcu.edu/~rhammack/BookOfProof/BookOfProof.pdf}{\emph{Book
19 | of Proof}} \citep{Hammack2013} and
20 | \href{https://scholarworks.gvsu.edu/books/7/}{\emph{Mathematical
21 | Reasoning}} \citep{Sandstrum2019} are books on proof that are freely
22 | available online. Philosophers might find
23 | \emph{More
24 | Precisely: The Math you need to do Philosophy} \citep{Steinhart2018} to
25 | be a good primer on mathematical reasoning.
26 |
27 | There are also various shorter guides to proofs available on the
28 | internet; e.g.,
29 | \href{https://math.berkeley.edu/~hutching/teach/proofs.pdf}{``Introduction
30 | to Mathematical Arguments''} \citep{Hutchings2003} and
31 | \href{https://eugeniacheng.com/wp-content/uploads/2017/02/cheng-proofguide.pdf}{``How to
32 | write proofs''} \citep{Cheng2004}.
33 |
34 | \subsection{Motivational Videos}
35 |
36 | Feel like you have no motivation to do your homework? Feeling down? These
37 | videos might help!
38 |
39 | \begin{itemize}
40 | \item \url{https://www.youtube.com/watch?v=ZXsQAXx_ao0}
41 | \item \url{https://www.youtube.com/watch?v=BQ4yd2W50No}
42 | \item \url{https://www.youtube.com/watch?v=StTqXEQ2l-Y}
43 | \end{itemize}
44 |
45 | \end{document}
46 |
--------------------------------------------------------------------------------
/content/methods/proofs/starting-proofs.tex:
--------------------------------------------------------------------------------
1 | % Part: methods
2 | % Chapter: proofs
3 | % Section: starting-proofs
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{mth}{prf}{str}
10 |
11 | \olsection{Starting a Proof}
12 |
13 | But where do you even start?
14 |
15 | You've been given something to prove, so this should be the last thing that
16 | is mentioned in the proof (you can, obviously, \emph{announce} that you're
17 | going to prove it at the beginning, but you don't want to use it as an
18 | assumption). Write what you are trying to prove at the bottom of a fresh
19 | sheet of paper---this way you don't lose sight of your goal.
20 |
21 | Next, you may have some assumptions that you are able to use (this
22 | will be made clearer when we talk about the \emph{type} of proof you
23 | are doing in the next section). Write these at the top of the page and
24 | make sure to flag that they are assumptions (i.e., if you are assuming
25 | $p$, write ``assume that $p$,'' or ``suppose that $p$''). Finally,
26 | there might be some definitions in the question that you need to know.
27 | You might be told to use a specific definition, or there might be
28 | various definitions in the assumptions or conclusion that you are
29 | working towards. \emph{Write these down and ensure that you understand
30 | what they mean.}
31 |
32 | How you set up your proof will also be dependent upon the form of the
33 | question. The next section provides details on how to set up your proof
34 | based on the type of sentence.
35 |
36 | \end{document}
37 |
--------------------------------------------------------------------------------
/content/model-theory/basics/basics.tex:
--------------------------------------------------------------------------------
1 | % Part: model-theory
2 | % Chapter: basics
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{mod}{bas}{Basics of Model Theory}
9 |
10 | \olimport{reducts-and-expansions}
11 |
12 | \olimport{substructures}
13 |
14 | \olimport{overspill}
15 |
16 | \olimport{isomorphism}
17 |
18 | \olimport{theory-of-m}
19 |
20 | \olimport{partial-iso}
21 |
22 | \olimport{dlo}
23 |
24 | %\olimport{nonstandard-arithmetic}
25 |
26 | \OLEndChapterHook
27 |
28 | \end{document}
29 |
--------------------------------------------------------------------------------
/content/model-theory/basics/overspill.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: model-theory
3 | % Section: overspill
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{mod}{bas}{ove}
10 | \olsection{Overspill}
11 |
12 | \begin{thm}
13 | \ollabel{overspill} If a set $\Gamma$ of sentences has arbitrarily
14 | large finite models, then it has an infinite model.
15 | \end{thm}
16 |
17 | \begin{proof}
18 | Expand the language of $\Gamma$ by adding countably many new constants
19 | $c_0$, $c_1$, \dots and consider the set $\Gamma \cup \{c_i \neq c_j :
20 | i \neq j\}$. To say that $\Gamma$ has arbitrarily large finite models
21 | means that for every $m >0$ there is $n\ge m$ such that $\Gamma$ has a
22 | model of cardinality~$n$. This implies that $\Gamma \cup \{c_i \neq
23 | c_j : i \neq j\}$ is finitely satisfiable. By compactness, $\Gamma
24 | \cup \{c_i \neq c_j : i \neq j\}$ has a model $\Struct M$ whose domain
25 | must be infinite, since it satisfies all inequalities $c_i \neq c_j$.
26 | \end{proof}
27 |
28 | \begin{prop}
29 | \ollabel{inf-not-fo}
30 | There is no sentence $!A$ of any first-order language that is true in
31 | !!a{structure}~$\Struct M$ if and only if the domain $\Domain{M}$ of
32 | the !!{structure} is infinite.
33 | \end{prop}
34 |
35 | \begin{proof}
36 | If there were such a $!A$, its negation $\lnot !A$ would be true in
37 | all and only the finite !!{structure}s, and it would therefore have
38 | arbitrarily large finite models but it would lack an infinite model,
39 | contradicting \olref{overspill}.
40 | \end{proof}
41 |
42 | \end{document}
43 |
--------------------------------------------------------------------------------
/content/model-theory/basics/substructures.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: model-theory
3 | % Section: substructures
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{mod}{bas}{sub}
10 | \olsection{Sub\printtoken{p}{structure}}
11 |
12 | The !!{domain} of !!a{structure}~$\Struct{M}$ may be a subset of
13 | another~$\Struct{M'}$. But we should obviously only consider
14 | $\Struct{M}$ a ``part'' of $\Struct{M'}$ if not only $\Domain{M}
15 | \subseteq \Domain{M'}$, but $\Struct{M}$ and $\Struct{M'}$ ``agree''
16 | in how they interpret the symbols of the language at least on the
17 | shared part~$\Domain{M}$.
18 |
19 | \begin{defn}
20 | \ollabel{defn:substructure}
21 | Given !!{structure}s $\Struct M$ and $\Struct M'$ for the same
22 | language~$\Lang L$, we say that $\Struct M$ is a \emph{sub!!{structure}}
23 | of $\Struct M'$, and $\Struct M'$ an \emph{extension} of $\Struct M$,
24 | written $\Struct M \substruct \Struct M'$, iff
25 | \begin{enumerate}
26 | \item $\Domain{M} \subseteq \Domain{M'}$,
27 | \item For each constant $c \in \Lang L$, $\Assign{c}{M} =
28 | \Assign{c}{M'}$;
29 | \item For each $n$-place !!{function} $f \in \Lang L$
30 | $\Assign{f}{M}(a_1, \dots, a_n) = \Assign{f}{M'}(a_1, \dots, a_n)$
31 | for all $a_1$, \dots, $a_n \in \Domain{M}$.
32 | \item For each $n$-place !!{predicate} $R \in \Lang L$, $\langle
33 | a_1, \dots, a_n\rangle \in \Assign{R}{M}$ iff $\langle a_1, \dots,
34 | a_n\rangle \in \Assign{R}{M'}$ for all $a_1$, \dots, $a_n \in
35 | \Domain{M}$.
36 | \end{enumerate}
37 | \end{defn}
38 |
39 | \begin{rem}
40 | \ollabel{rem:substructure}
41 | If the language contains no constant or !!{function}s, then any $N
42 | \subseteq \Domain{M}$ determines a sub!!{structure}~$\Struct{N}$ of
43 | $\Struct M$ with !!{domain}~$\Domain{N} = N$ by putting $\Assign{R}{N} =
44 | \Assign{R}{M} \cap N^n$.
45 | \end{rem}
46 |
47 | % prove something about this? Examples?
48 |
49 | \end{document}
50 |
--------------------------------------------------------------------------------
/content/model-theory/interpolation/interpolation.tex:
--------------------------------------------------------------------------------
1 | % Part: model-theory
2 | % Chapter: interpolation
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{mod}{int}{The Interpolation Theorem}
9 |
10 | \olimport{introduction}
11 |
12 | \olimport{separation}
13 |
14 | \olimport{interpolation-proof}
15 |
16 | \olimport{definability}
17 |
18 | \OLEndChapterHook
19 |
20 | \end{document}
21 |
--------------------------------------------------------------------------------
/content/model-theory/interpolation/introduction.tex:
--------------------------------------------------------------------------------
1 | % Part: model-theory
2 | % Chapter: interpolation
3 | % Section: introduction
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{mod}{int}{int}
10 |
11 | \olsection{Introduction}
12 |
13 | The interpolation theorem is the following result: Suppose
14 | $\Entails !A \lif !B$. Then there is !!a{sentence} $!C$ such that
15 | $\Entails !A \lif !C$ and $\Entails !C \lif !B$. Moreover, every
16 | !!{constant}, !!{function}, and !!{predicate} (other than $\eq$) in
17 | $!C$ occurs both in $!A$ and~$!B$. The !!{sentence} $!C$ is called an
18 | \emph{interpolant} of $!A$ and~$!B$.
19 |
20 | The interpolation theorem is interesting in its own right, but its
21 | main importance lies in the fact that it can be used to prove results
22 | about definability in a theory, and the conditions under which
23 | combining two consistent theories results in a consistent theory. The
24 | first result is known as the Beth definability theorem; the second,
25 | Robinson's joint consistency theorem.
26 |
27 | \end{document}
28 |
--------------------------------------------------------------------------------
/content/model-theory/lindstrom/introduction.tex:
--------------------------------------------------------------------------------
1 | % Part: first-order-logic
2 | % Chapter: lindstrom
3 | % Section: introduction
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{mod}{lin}{int}
10 | \section{Introduction}
11 |
12 | In this chapter we aim to prove Lindstr\"om's characterization of
13 | first-order logic as the maximal logic for which (given certain
14 | further constraints) the Compactness and the Downward
15 | L\"owenheim--Skolem theorems hold
16 | (\olref[fol][com][com]{thm:compactness} and
17 | \olref[fol][com][dls]{thm:downward-ls}). First, we need a more general
18 | characterization of the general class of logics to which the theorem
19 | applies. We will restrict ourselves to \emph{relational} languages,
20 | i.e., languages which only contain !!{predicate}s and individual
21 | constants, but no !!{function}s.
22 |
23 | \end{document}
24 |
--------------------------------------------------------------------------------
/content/model-theory/lindstrom/lindstrom.tex:
--------------------------------------------------------------------------------
1 | % Part: model-theory
2 | % Chapter: lindstrom
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{mod}{lin}{Lindstr\"om's Theorem}
9 |
10 | \olimport{introduction}
11 |
12 | \olimport{abstract-logics}
13 |
14 | \olimport{ls-property}
15 |
16 | \olimport{lindstrom-proof}
17 |
18 | \OLEndChapterHook
19 |
20 | \end{document}
21 |
--------------------------------------------------------------------------------
/content/model-theory/model-theory.tex:
--------------------------------------------------------------------------------
1 | % Part: model-theory
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{mod}{Model Theory}
8 |
9 | \begin{editorial}
10 | Material on model theory is incomplete and experimental. It is
11 | currently simply an adaptation of Aldo Antonelli's notes on model
12 | theory, less those topics covered in the part on first-order logic
13 | (theories, completeness, compactness). It requires much more
14 | introduction, motivation, and explanation, as well as exercises, to
15 | be useful for a textbook. Andy Arana is at planning to work on this
16 | part specifically (\gitissue{65}).
17 | \end{editorial}
18 |
19 | \olimport[basics]{basics}
20 |
21 | \olimport[models-of-arithmetic]{models-of-arithmetic}
22 |
23 | \olimport[interpolation]{interpolation}
24 |
25 | \olimport[lindstrom]{lindstrom}
26 |
27 | \OLEndPartHook
28 |
29 | \end{document}
30 |
--------------------------------------------------------------------------------
/content/model-theory/models-of-arithmetic/models-of-arithmetic.tex:
--------------------------------------------------------------------------------
1 | % Part: model-theory
2 | % Chapter: models-of-arithmetic
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{mod}{mar}{Models of Arithmetic}
9 |
10 | \olimport{introduction}
11 |
12 | \olimport{standard-models}
13 |
14 | \olimport{non-standard-models}
15 |
16 | \olimport{models-of-q}
17 |
18 | \olimport{models-of-pa}
19 |
20 | \olimport{computable-models}
21 |
22 | \OLEndChapterHook
23 |
24 | \end{document}
25 |
--------------------------------------------------------------------------------
/content/normal-modal-logic/axioms-systems/axioms-systems.tex:
--------------------------------------------------------------------------------
1 | % Part: normal-modal-logic
2 | % Chapter: axioms-systems
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{nml}{prf}{Axiomatic \usetoken{P}{derivation}}
9 |
10 | \olimport{introduction}
11 | \olimport{normal-logics}
12 | \olimport{logics-proofs}
13 | \olimport{proofs-in-K}
14 | \olimport{derived-rules}
15 | \olimport{more-proofs-in-K}
16 | \olimport{duals}
17 | \olimport{proofs-modal-systems}
18 | \olimport{soundness}
19 | \olimport{systems-distinct}
20 | \olimport{provability-from-set}
21 | \olimport{provability-properties}
22 | \olimport{consistency}
23 |
24 | \OLEndChapterHook
25 |
26 | \end{document}
27 |
28 |
--------------------------------------------------------------------------------
/content/normal-modal-logic/axioms-systems/duals.tex:
--------------------------------------------------------------------------------
1 | % Part: normal-modal-logic
2 | % Chapter: axioms-systems
3 | % Section: duals
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{nml}{prf}{dua}
10 |
11 | \olsection{Dual \usetoken{P}{formula}}
12 |
13 | \begin{defn}\ollabel{def:duals}
14 | Each of the !!{formula}s \Ax{T}, \Ax{B}, \Ax{4}, and
15 | \Ax{5} has a \emph{dual}, denoted by a subscripted diamond, as
16 | follows:
17 | \begin{align}
18 | \tag{\Ax{T_\Diamond}} p & \lif \Diamond p\\
19 | \tag{\Ax{B_\Diamond}} \Diamond\Box p & \lif p\\
20 | \tag{\Ax{4_\Diamond}} \Diamond\Diamond p & \lif \Diamond p\\
21 | \tag{\Ax{5_\Diamond}} \Diamond\Box p & \lif \Box p
22 | \end{align}
23 | \end{defn}
24 |
25 | Each of the above dual !!{formula}s is obtained from the corresponding
26 | !!{formula} by substituting $\lnot p$ for $p$, contraposing, replacing
27 | $\lnot\Box\lnot$ by $\Diamond$, and replacing $\lnot\Diamond\lnot$
28 | by~$\Box$. \Ax{D}, i.e., $\Box!A \lif \Diamond!A$ is its own dual in
29 | that sense.
30 |
31 | \begin{prop}\ollabel{prop:dualsys}
32 | For each !!{formula}~$!A$ in \olref[nml][prf][dua]{def:duals}:
33 | $\Log{K}!A = \Log{K}!A_{\Diamond}$.
34 | \end{prop}
35 | \begin{proof}
36 | Exercise.
37 | \end{proof}
38 | \begin{prob}
39 | Prove \olref[nml][prf][dua]{prop:dualsys}.
40 | \end{prob}
41 |
42 | \end{document}
43 |
--------------------------------------------------------------------------------
/content/normal-modal-logic/axioms-systems/provability-from-set.tex:
--------------------------------------------------------------------------------
1 | % Part: normal-modal-logic
2 | % Chapter: axioms-systems
3 | % Section: provability-from-set
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{nml}{prf}{prg}
10 |
11 | \olsection{\usetoken{S}{derivability} from a Set of \usetoken{P}{formula}}
12 |
13 | In \olref[prf][prs]{sec} we defined a notion of provability
14 | of !!a{formula} in a system~$\Sigma$. We now extend this notion to
15 | provability in $\Sigma$ from !!{formula}s in a set~$\Gamma$.
16 |
17 | \begin{defn}\ollabel{defn:Gammaproves}
18 | !!^a{formula}~$!A$ is !!{derivable} in a system~$\Sigma$ from a set of
19 | !!{formula}s $\Gamma$, written $\Gamma \Proves[\Sigma] !A$ if and
20 | only if there are $!B_1$, \dots, $!B_n \in \Gamma$ such that
21 | $\Sigma \Proves !B_1 \lif (!B_2 \lif \cdots (!B_n \lif !A)
22 | \cdots)$.
23 | \end{defn}
24 |
25 | \end{document}
26 |
--------------------------------------------------------------------------------
/content/normal-modal-logic/completeness/canonical-models.tex:
--------------------------------------------------------------------------------
1 | % Part: normal-modal-logic
2 | % Chapter: completeness
3 | % Section: canonical-models
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{nml}{com}{cmd}
10 |
11 | \olsection{Canonical Models}
12 |
13 | The \emph{canonical model} for a modal system~$\Sigma$ is a specific
14 | model~$\mModel{M^\Sigma}$ in which the worlds are all complete
15 | $\Sigma$-consistent sets. Its accessibility relation~$R^\Sigma$ and
16 | valuation $V^\Sigma$ are defined so as to guarantee that the
17 | !!{formula}s true at a world~$\Delta$ are exactly the !!{formula}s
18 | making up~$\Delta$.
19 |
20 | \begin{defn}
21 | Let $\Sigma$ be a normal modal logic. The \emph{canonical model} for
22 | $\Sigma$ is $\mModel{M}^\Sigma = \tuple{W^\Sigma, R^\Sigma,
23 | V^\Sigma}$, where:
24 | \begin{enumerate}
25 | \item $W^\Sigma = \Setabs{ \Delta }{\Delta \text{
26 | is complete $\Sigma$-consistent} }$.
27 | \item $R^\Sigma \Delta\Delta'$ holds if and only if
28 | \iftag{prvBox}{$\Box^{-1}\Delta \subseteq
29 | \Delta'$}{$\Diamond\Delta' \subseteq \Delta$}.
30 | \item $V^\Sigma(p) = \Setabs{\Delta}{p \in \Delta}$.
31 | \end{enumerate}
32 | \end{defn}
33 |
34 |
35 | \end{document}
36 |
--------------------------------------------------------------------------------
/content/normal-modal-logic/completeness/completeness.tex:
--------------------------------------------------------------------------------
1 | % Part: normal-modal-logic
2 | % Chapter: completeness
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{nml}{com}{Completeness and Canonical Models}
9 |
10 | \olimport{introduction}
11 | \olimport{complete-consistent-sets}
12 | \olimport{lindenbaums-lemma}
13 | \olimport{modalities-ccs}
14 | \olimport{canonical-models}
15 | \olimport{truth-lemma}
16 | \olimport{completeness-K}
17 | \olimport{frame-completeness}
18 |
19 | \OLEndChapterHook
20 |
21 | \end{document}
22 |
23 |
--------------------------------------------------------------------------------
/content/normal-modal-logic/filtrations/S5-decidable.tex:
--------------------------------------------------------------------------------
1 | % Part: normal-modal-logic
2 | % Chapter: filtrations
3 | % Section: S5-decidable
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{nml}{fil}{dec}
10 |
11 | \olsection{\Log{S5} is Decidable}
12 | The finite model property gives us an easy way to show that systems of
13 | modal logic given by schemas are \emph{decidable} (i.e., that there is
14 | a computable procedure to determine whether !!a{formula} is !!{derivable} in
15 | the system or not).
16 |
17 | \begin{thm}
18 | \Log{S5} is decidable.
19 | \end{thm}
20 |
21 | \begin{proof}
22 | Let $!A$ be given, and suppose the !!{propositional variable}s
23 | occurring in $!A$ are among $p_1$, \dots, $p_k$. Since for each
24 | $n$ there are only finitely many models with $n$ worlds assigning a
25 | value to $p_1$, \dots, $p_k$, we can enumerate, \emph{in parallel}, all
26 | the theorems of \Log{S5} by generating proofs in some systematic
27 | way; and all the models containing $1$, $2$, \dots worlds and checking
28 | whether $!A$ fails at a world in some such model. Eventually
29 | one of the two parallel processes will give an answer, as by
30 | \olref[com][fra]{thm:generaldet} and \olref[fmp]{cor:S5fmp}, either
31 | $!A$ is !!{derivable} or it fails in a finite universal model.
32 | \end{proof}
33 |
34 | The above proof works for \Log{S5} because filtrations of universal
35 | models are automatically universal. The same holds for reflexivity and
36 | seriality, but more work is needed for other properties.
37 |
38 | \end{document}
39 |
--------------------------------------------------------------------------------
/content/normal-modal-logic/filtrations/filtrations.tex:
--------------------------------------------------------------------------------
1 | % Part: modal-logic
2 | % Chapter: filtrations
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{nml}{fil}{Filtrations and Decidability}
9 |
10 | \olimport{introduction}
11 | \olimport{preliminaries}
12 | \olimport{filtrations-def}
13 | \olimport{examples-of-filtrations}
14 | \olimport{finite}
15 | \olimport{S5-fmp}
16 | \olimport{S5-decidable}
17 | \olimport{more-filtrations}
18 | \olimport{euclidean-filtrations}
19 |
20 | \OLEndChapterHook
21 |
22 | \end{document}
23 |
24 |
--------------------------------------------------------------------------------
/content/normal-modal-logic/filtrations/finite.tex:
--------------------------------------------------------------------------------
1 | % Part: normal-modal-logic
2 | % Chapter: filtrations
3 | % Section: finite
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{nml}{fil}{fin}
10 |
11 | \olsection{Filtrations are Finite}
12 |
13 | We've defined filtrations for any set~$\Gamma$ that is closed under
14 | sub-!!{formula}s. Nothing in the definition itself guarantees that
15 | filtrations are finite. In fact, when $\Gamma$ is infinite (e.g., is
16 | the set of all !!{formula}s), it may well be infinite. However, if
17 | $\Gamma$ is finite (e.g., when it is the set of sub-!!{formula}s of a
18 | given !!{formula}~$!A$), so is any filtration through~$\Gamma$.
19 |
20 | \begin{prop}\ollabel{prop:filt-are-finite}
21 | If $\Gamma$ is finite then any filtration $\mModel{M^*}$ of a model
22 | $\mModel{M}$ through $\Gamma$ is also finite.
23 | \end{prop}
24 |
25 | \begin{proof}
26 | The size of $W^*$ is the number of different classes~$[w]$ under the
27 | equivalence relation~$\equiv$. Any two worlds $u$, $v$ in such
28 | class---that is, any $u$ and $v$ such that~$u \equiv v$---agree on
29 | all !!{formula}s~$!A$ in~$\Gamma$, $!A \in \Gamma$ either $!A$ is
30 | true at both $u$ and $v$, or at neither. So each class~$[w]$
31 | corresponds to subset of~$\Gamma$, namely the set of all $!A \in
32 | \Gamma$ such that $!A$ is true at the worlds in~$[w]$. No two
33 | different classes $[u]$ and $[v]$ correspond to the same subset
34 | of~$\Gamma$. For if the set of !!{formula}s true at $u$ and that of
35 | !!{formula}s true at $v$ are the same, then $u$ and $v$ agree on all
36 | formulas in~$\Gamma$, i.e., $u \equiv v$. But then $[u] = [v]$. So,
37 | there is !!a{injective} function from $W^*$ to $\Pow{\Gamma}$, and
38 | hence $\card{W^*} \le \card{\Pow{\Gamma}}$. Hence if $\Gamma$
39 | contains $n$ sentences, the cardinality of $W^*$ is no greater
40 | than~$2^n$.
41 | \end{proof}
42 |
43 | \end{document}
44 |
45 |
46 |
--------------------------------------------------------------------------------
/content/normal-modal-logic/frame-definability/frame-definability.tex:
--------------------------------------------------------------------------------
1 | % Part: normal-modal-logic
2 | % Chapter: frame-definability
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{nml}{frd}{Frame Definability}
9 |
10 | \olimport{introduction}
11 | \olimport{properties-accessibility}
12 | \olimport{frames}
13 | \olimport{definability}
14 | \olimport{first-order-definability}
15 | \olimport{equivalence-S5}
16 | \olimport{second-order-definability}
17 |
18 | \OLEndChapterHook
19 |
20 | \end{document}
21 |
22 |
--------------------------------------------------------------------------------
/content/normal-modal-logic/frame-definability/frames.tex:
--------------------------------------------------------------------------------
1 | % Part: normal-modal-logic
2 | % Chapter: frame-correspondence
3 | % Section: frames
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{nml}{frd}{fra}
10 |
11 | \olsection{Frames}
12 |
13 | \begin{defn}
14 | A \emph{frame} is a pair $\mModel{F} = \tuple{W,R}$ where $W$ is a
15 | non-empty set of worlds and $R$ a binary relation on~$W$. A model
16 | $\mModel{M}$ is \emph{based on} a frame $\mModel{F} = \tuple{W,R}$
17 | if and only if $\mModel{M} = \tuple{W, R, V}$ for some valuation $V$.
18 | \end{defn}
19 |
20 | \begin{defn}
21 | If $\mModel{F}$ is a frame, we say that $!A$ is \emph{valid in
22 | $\mModel{F}$,} $\mModel{F} \Entails !A$, if $\mSat{M}{!A}$ for
23 | every model~$\mModel{M}$ based on~$\mModel{F}$.
24 |
25 | If $\mClass{F}$ is a class of frames, we say $!A$ is \emph{valid in
26 | $\mClass{F}$,} $\mClass{F} \Entails !A$, iff $\mModel{F} \Entails
27 | !A$ for every frame~$\mModel{F} \in \mClass{F}$.
28 | \end{defn}
29 |
30 | The reason frames are interesting is that correspondence between
31 | schemas and properties of the accessibility relation~$R$ is at the
32 | level of frames, \emph{not of models}. For instance, although \Ax{T}
33 | is true in all reflexive models, not every model in which \Ax{T} is
34 | true is reflexive. However, it \emph{is} true that not only is \Ax{T}
35 | \emph{valid} on all reflexive \emph{frames}, also every frame in
36 | which \Ax{T} is valid is reflexive.
37 |
38 | \begin{rem}
39 | Validity in a class of frames is a special case of the notion of
40 | validity in a class of models: $\mClass{F} \Entails !A$ iff
41 | $\mClass{C} \Entails !A$ where $\mClass{C}$ is the class of all models
42 | based on a frame in~$\mClass{F}$.
43 |
44 | Obviously, if !!a{formula} or a schema is valid, i.e., valid with
45 | respect to the class of \emph{all} models, it is also valid with
46 | respect to any class~$\mClass{F}$ of frames.
47 | \end{rem}
48 |
49 | \end{document}
50 |
--------------------------------------------------------------------------------
/content/normal-modal-logic/normal-modal-logic.tex:
--------------------------------------------------------------------------------
1 | % Part: normal-modal-logic
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{nml}{Normal Modal Logics}
8 |
9 | \begin{editorial}
10 | This part covers the metatheory of normal modal logics. It currently
11 | consists of Aldo Antonelli's notes on classical correspondence
12 | theory for basic modal logic.
13 | \end{editorial}
14 |
15 | \olimport[syntax-and-semantics]{syntax-and-semantics}
16 |
17 | \olimport[frame-definability]{frame-definability}
18 |
19 | \olimport[axioms-systems]{axioms-systems}
20 |
21 | \olimport[completeness]{completeness}
22 |
23 | \olimport[filtrations]{filtrations}
24 |
25 | \olimport[tableaux]{tableaux}
26 |
27 | \OLEndPartHook
28 |
29 | \end{document}
30 |
--------------------------------------------------------------------------------
/content/normal-modal-logic/sequent-calculus/introduction.tex:
--------------------------------------------------------------------------------
1 | % Part: normal-modal-logic
2 | % Chapter: sequent-calculus
3 | % Section: introduction
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{nml}{seq}{int}
10 |
11 | \olsection{Introduction}
12 |
13 | The sequent calculus for propositional logic can be extended by
14 | additional rules that deal
15 | with~\iftag{prvBox}{$\Box$\iftag{prvDiamond}{ and~}{}}{}%
16 | \iftag{prvDiamond}{$\Diamond$}{}. For instance, for~$\Log{K}$, we
17 | have \Log{LK} plus:
18 | \[
19 | \iftag{prvBox}{\iftag{prvDiamond}{% <> and [] primitive
20 | \Axiom$\Gamma \fCenter \Delta, !A$
21 | \RightLabel{$\Box$}
22 | \UnaryInf$\Box\Gamma \fCenter \Diamond\Delta, \Box!A$
23 | \DisplayProof
24 | \qquad
25 | \Axiom$!A, \Gamma \fCenter \Delta$
26 | \RightLabel{$\Diamond$}
27 | \UnaryInf$\Diamond!A, \Box\Gamma \fCenter \Diamond\Delta$
28 | \DisplayProof
29 | }{% only Box primitive
30 | \Axiom$\Gamma \fCenter !A$
31 | \RightLabel{$\Box$}
32 | \UnaryInf$\Box\Gamma \fCenter \Box!A$
33 | \DisplayProof
34 | }}{% only <> primitive
35 | \Axiom$!A \fCenter \Delta$
36 | \RightLabel{$\Diamond$}
37 | \UnaryInf$\Diamond!A \fCenter \Diamond\Delta$
38 | \DisplayProof
39 | }
40 | \]
41 | For extensions of~$\Log{K}$, additional rules have to be added as
42 | well.
43 |
44 | Not every modal logic has such a sequent calculus. Even $\Log{S5}$,
45 | which is semantically simple (it can be defined without using
46 | accessibility relations at all) is not known to have a sequent
47 | calculus that results from~$\Log{LK}$ which is complete without the
48 | rule~\Cut. However, it has a cut-free complete \emph{hypersequent}
49 | calculus.
50 |
51 | \end{document}
52 |
--------------------------------------------------------------------------------
/content/normal-modal-logic/sequent-calculus/sequent-calculus.tex:
--------------------------------------------------------------------------------
1 | % Part: normal-modal-logic
2 | % Chapter: sequent-calculus
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{nml}{seq}{Modal Sequent Calculus}
9 | %\tagfalse{prvDiamond}
10 | \begin{editorial}
11 | Draft chapter on sequent calculi for modal logic. Needs more
12 | examples, soundness and completeness proofs.
13 | \end{editorial}
14 |
15 | \olimport{introduction}
16 | \olimport{rules-for-K}
17 | \olimport{proofs-in-K}
18 | %\olimport{soundness}
19 | \olimport{more-rules}
20 | %\olimport{more-soundness}
21 | %\olimport{hypersequents-S5}
22 |
23 | \OLEndChapterHook
24 |
25 | \end{document}
26 |
27 |
--------------------------------------------------------------------------------
/content/normal-modal-logic/syntax-and-semantics/syntax-and-semantics.tex:
--------------------------------------------------------------------------------
1 | % Part: normal-modal-logic
2 | % Chapter: syntax-and-semantics
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{nml}{syn}{Syntax and Semantics}
9 |
10 | \olimport{introduction}
11 | \olimport{language-modal-logic}
12 | \olimport{substitution}
13 | \olimport{relational-models}
14 | \olimport{truth-at-w}
15 | \olimport{truth-in-model}
16 | \olimport{modal-validity}
17 | \olimport{tautological-instances}
18 | \olimport{schemas}
19 | \olimport{entailment}
20 |
21 | \OLEndChapterHook
22 |
23 | \end{document}
24 |
25 |
--------------------------------------------------------------------------------
/content/normal-modal-logic/tableaux/tableaux.tex:
--------------------------------------------------------------------------------
1 | % Part: normal-modal-logic
2 | % Chapter: axioms-systems
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{nml}{tab}{Modal \usetoken{P}{tableau}}
9 |
10 | \begin{editorial}
11 | Draft chapter on prefixed tableaux for modal logic. Needs more
12 | examples, completeness proofs, and discussion of how one can find
13 | countermodels from unsuccessful searches for closed tableaux.
14 | \end{editorial}
15 |
16 | \olimport{introduction}
17 | \olimport{rules-for-K}
18 | \olimport{proofs-in-K}
19 | \olimport{soundness}
20 | \olimport{more-rules}
21 | \olimport{more-soundness}
22 | \olimport{simple-S5}
23 | \olimport{completeness}
24 | \olimport{countermodels}
25 |
26 | \OLEndChapterHook
27 |
28 | \end{document}
29 |
30 |
--------------------------------------------------------------------------------
/content/open-logic-about.tex:
--------------------------------------------------------------------------------
1 | \chapter*{About the Open Logic Project}
2 | \addcontentsline{toc}{chapter}{About the Open Logic Project}
3 |
4 |
5 | The \textit{Open Logic Text} is an open-source, collaborative textbook
6 | of formal meta-logic and formal methods, starting at an intermediate level
7 | (i.e., after an introductory formal logic course). Though aimed at a
8 | non-mathematical audience (in particular, students of philosophy and
9 | computer science), it is rigorous.
10 |
11 | Coverage of some topics currently included may
12 | not yet be complete, and many sections still require substantial
13 | revision. We plan to expand the text to cover more topics in
14 | the future. We also plan to add features to the text, such as a
15 | glossary, a list of further reading, historical notes, pictures, better
16 | explanations, sections explaining the relevance of results to
17 | philosophy, computer science, and mathematics, and more problems and
18 | examples. If you find an error, or have a suggestion,
19 | \href{https://github.com/OpenLogicProject/OpenLogic/wiki/Contributing}{please let the project team know}.
20 |
21 | The project operates in the spirit of open source. Not only is the
22 | text freely available, we provide the LaTeX source under the
23 | Creative Commons Attribution license, which gives anyone the right to
24 | download, use, modify, re-arrange, convert, and re-distribute our
25 | work, as long as they give appropriate credit.
26 | Please see the Open Logic Project website at
27 | \href{http://openlogicproject.org/}{openlogicproject.org} for
28 | additional information.
29 |
--------------------------------------------------------------------------------
/content/propositional-logic/propositional-logic.tex:
--------------------------------------------------------------------------------
1 | % Part: propositional-logic
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{pl}{Propositional Logic}
8 |
9 | \begin{editorial}
10 | This part contains material on classical propositional logic. The
11 | first chapter is relatively rudimentary and just lists definitions
12 | and results, many proofs are not carried out but are left as
13 | exercises. The material on proof systems and the completeness
14 | theorem is included from the part on first-order logic, with the
15 | ``FOL'' tag set to false. This leaves out everything related to
16 | predicates, terms, and quantifiers, and replaces talk of
17 | !!{structure}s~$\Struct{M}$ with talk about
18 | !!{valuation}s~$\pAssign{v}$.
19 |
20 | It is planned to expand this part to include
21 | more detail, and to add further topics and results, such as
22 | truth-functional completeness.
23 | \end{editorial}
24 |
25 | \olimport[syntax-and-semantics]{syntax-and-semantics}
26 |
27 | \tagfalse{FOL}
28 |
29 | \olimport[../first-order-logic/proof-systems]{proof-systems}
30 |
31 | \iftag{prfSC}{%
32 | \olimport[../first-order-logic/sequent-calculus]{sequent-calculus}
33 | }{}
34 |
35 | \iftag{prfND}{%
36 | \olimport[../first-order-logic/natural-deduction]{natural-deduction}
37 | }{}
38 |
39 | \iftag{prfTab}{%
40 | \olimport[../first-order-logic/tableaux]{tableaux}
41 | }{}
42 |
43 | \iftag{prfAX}{%
44 | \olimport[../first-order-logic/axiomatic-deduction]{axiomatic-deduction}
45 | }{}
46 |
47 | \olimport[../first-order-logic/completeness]{completeness}
48 |
49 | \tagtrue{FOL}
50 |
51 | \OLEndPartHook
52 |
53 | \end{document}
54 |
--------------------------------------------------------------------------------
/content/propositional-logic/syntax-and-semantics/soundness.tex:
--------------------------------------------------------------------------------
1 | % Part: propositional-logic
2 | % Chapter: propositional-logic
3 | % Section: soundness
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{pl}{prp}{snd}
10 |
11 | \olsection{Soundness of Propositional Logic}
12 |
13 | \begin{thm}[Soundness]
14 | \ollabel{thm:soundness}
15 | If $\Gamma\Proves!A$ then
16 | $\Gamma \Entails !A$.
17 | \end{thm}
18 |
19 | \begin{proof}
20 | By induction on theorems. If $!A$ is an axiom then $\Entails
21 | !A$ and hence a fortiori $\Gamma \Entails!A$. Similarly if $!A \in \Gamma$,
22 | $\Gamma \Entails!A$. For the inductive step, suppose $!A$ is obtained by
23 | \emph{modus ponens} from $!C$ and $!C\lif!A$; also assume as inductive
24 | hypothesis that the theorem holds for $!C\lif !A$ and $!C$. The third item
25 | in \olref[sem]{prop:semanticalfacts} gives the desired result.
26 | \end{proof}
27 |
28 | \begin{cor}
29 | If $\Gamma$ is satisfiable, then $\Gamma$ is consistent. Hence,
30 | propositional logic is consistent.
31 | \end{cor}
32 |
33 | \end{document}
34 |
--------------------------------------------------------------------------------
/content/propositional-logic/syntax-and-semantics/syntax-and-semantics.tex:
--------------------------------------------------------------------------------
1 | % Part: propositional-logic
2 | % Chapter: syntax-and-semantics
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{pl}{syn}{Syntax and Semantics}
9 |
10 | \begin{editorial}
11 | This is a very quick summary of definitions only. It should be
12 | expanded to provide a gentle intro to proofs by induction on
13 | formulas, with lots more examples.
14 | \end{editorial}
15 |
16 | \olimport{introduction}
17 |
18 | \olimport{formulas}
19 |
20 | \olimport{preliminaries}
21 |
22 | \olimport{formation-sequences}
23 |
24 | \olimport{valuations-sat}
25 |
26 | \olimport{semantic-notions}
27 |
28 | \OLEndChapterHook
29 |
30 | \end{document}
31 |
--------------------------------------------------------------------------------
/content/reference/fraktur-alphabet/fraktur-alphabet.tex:
--------------------------------------------------------------------------------
1 | % Part: reference
2 | % Chapter: fraktur-alphabet.tex
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{ref}{frk}{The Fraktur Alphabet}
9 |
10 | \begin{center}
11 | \begin{tabular}{llll@{\qquad}llll}
12 | A & $\mathfrak{A}$ & a & $\mathfrak{a}$ &
13 | N & $\mathfrak{N}$ & n & $\mathfrak{n}$ \\
14 | B & $\mathfrak{B}$ & b & $\mathfrak{b}$ &
15 | O & $\mathfrak{O}$ & o & $\mathfrak{o}$ \\
16 | C & $\mathfrak{C}$ & c & $\mathfrak{c}$ &
17 | P & $\mathfrak{P}$ & p & $\mathfrak{p}$ \\
18 | D & $\mathfrak{D}$ & d & $\mathfrak{d}$ &
19 | Q & $\mathfrak{Q}$ & q & $\mathfrak{q}$ \\
20 | E & $\mathfrak{E}$ & e & $\mathfrak{e}$ &
21 | R & $\mathfrak{R}$ & r & $\mathfrak{r}$ \\
22 | F & $\mathfrak{F}$ & f & $\mathfrak{f}$ &
23 | S & $\mathfrak{S}$ & s & $\mathfrak{s}$ \\
24 | G & $\mathfrak{G}$ & g & $\mathfrak{g}$ &
25 | T & $\mathfrak{T}$ & t & $\mathfrak{t}$ \\
26 | H & $\mathfrak{H}$ & h & $\mathfrak{h}$ &
27 | U & $\mathfrak{U}$ & u & $\mathfrak{u}$ \\
28 | I & $\mathfrak{I}$ & i & $\mathfrak{i}$ &
29 | V & $\mathfrak{V}$ & v & $\mathfrak{v}$ \\
30 | J & $\mathfrak{J}$ & j & $\mathfrak{j}$ &
31 | W & $\mathfrak{W}$ & w & $\mathfrak{w}$ \\
32 | K & $\mathfrak{K}$ & k & $\mathfrak{k}$ &
33 | X & $\mathfrak{X}$ & x & $\mathfrak{x}$ \\
34 | L & $\mathfrak{L}$ & l & $\mathfrak{l}$ &
35 | Y & $\mathfrak{Y}$ & y & $\mathfrak{y}$ \\
36 | M & $\mathfrak{M}$ & m & $\mathfrak{m}$ &
37 | Z & $\mathfrak{Z}$ & z & $\mathfrak{z}$
38 | \end{tabular}
39 | \end{center}
40 |
41 | \end{document}
--------------------------------------------------------------------------------
/content/reference/greek-alphabet/greek-alphabet.tex:
--------------------------------------------------------------------------------
1 | % Part: reference
2 | % Chapter: greek-alphabet.tex
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{ref}{grk}{The Greek Alphabet}
9 |
10 | \begin{center}
11 | \begin{tabular}{lll@{\qquad}lll}
12 | Alpha & $\alpha$ & $A$ &
13 | Nu & $\nu$ & $N$ \\
14 | Beta & $\beta$ & $B$ &
15 | Xi & $\xi$ & $\Xi$ \\
16 | Gamma & $\gamma$ & $\Gamma$ &
17 | Omicron & $o$ & $O$ \\
18 | Delta & $\delta$ & $\Delta$ &
19 | Pi & $\pi$ & $\Pi$ \\
20 | Epsilon & $\epsilon$ & $E$ &
21 | Rho & $\rho$ & $P$ \\
22 | Zeta & $\zeta$ & $Z$ &
23 | Sigma & $\sigma$ & $\Sigma$ \\
24 | Eta & $\eta$ & $H$ &
25 | Tau & $\tau$ & $T$ \\
26 | Theta & $\theta$ & $\Theta$ &
27 | Upsilon & $\upsilon$ & $\Upsilon$ \\
28 | Iota & $\iota$ & $I$ &
29 | Phi & $\varphi$ & $\Phi$ \\
30 | Kappa & $\kappa$ & $K$ &
31 | Chi & $\chi$ & $X$ \\
32 | Lambda & $\lambda$ & $\Lambda$ &
33 | Psi & $\psi$ & $\Psi$ \\
34 | Mu & $\mu$ & $M$ &
35 | Omega & $\omega$ & $\Omega$
36 | \end{tabular}
37 | \end{center}
38 |
39 | \end{document}
--------------------------------------------------------------------------------
/content/reference/reference.tex:
--------------------------------------------------------------------------------
1 | % Part: reference
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{ref}{Reference}
8 |
9 | \begin{editorial}
10 | This part collects various lists of alphabets, notations,
11 | definitions, rules, etc., for inclusion as appendices in a textbook.
12 | \end{editorial}
13 |
14 | \olimport[greek-alphabet]{greek-alphabet}
15 |
16 | \olimport[fraktur-alphabet]{fraktur-alphabet}
17 |
18 | \OLEndPartHook
19 |
20 | \end{document}
21 |
--------------------------------------------------------------------------------
/content/second-order-logic/metatheory/metatheory.tex:
--------------------------------------------------------------------------------
1 | % Part: second-order-logic
2 | % Chapter: metatheory
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sol}{met}{Metatheory of Second-order Logic}
9 |
10 | \olimport{introduction}
11 |
12 | \olimport{second-order-arithmetic}
13 |
14 | \olimport{undecidability-and-axiomatizability}
15 |
16 | \olimport{compactness}
17 |
18 | \olimport{loewenheim-skolem}
19 |
20 | \OLEndChapterHook
21 |
22 | \end{document}
23 |
--------------------------------------------------------------------------------
/content/second-order-logic/second-order-logic.tex:
--------------------------------------------------------------------------------
1 | % Part: second-order logic
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{sol}{Second-order Logic}
8 |
9 | \begin{editorial}
10 | This is the beginnings of a part on second-order logic.
11 | \end{editorial}
12 |
13 | \olimport[syntax-and-semantics]{syntax-and-semantics}
14 |
15 | \olimport[metatheory]{metatheory}
16 |
17 | \olimport[sol-and-set-theory]{sol-and-set-theory}
18 |
19 | \OLEndPartHook
20 |
21 | \end{document}
22 |
--------------------------------------------------------------------------------
/content/second-order-logic/sol-and-set-theory/introduction.tex:
--------------------------------------------------------------------------------
1 | % Part: second-order-logic
2 | % Chapter: sol-and-sets
3 | % Section: introduction
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{sol}{set}{int}
10 |
11 | \olsection{Introduction}
12 |
13 | Since second-order logic can quantify over subsets of the domain as
14 | well as functions, it is to be expected that some amount, at least, of
15 | set theory can be carried out in second-order logic. By ``carry out,''
16 | we mean that it is possible to express set theoretic properties and
17 | statements in second-order logic, and is possible without any special,
18 | non-logical vocabulary for sets (e.g., the membership !!{predicate} of
19 | set theory). For instance, we can define unions and intersections of
20 | sets and the subset relationship, but also compare the sizes of sets,
21 | and state results such as Cantor's Theorem.
22 |
23 | \end{document}
24 |
--------------------------------------------------------------------------------
/content/second-order-logic/sol-and-set-theory/sol-and-set-theory.tex:
--------------------------------------------------------------------------------
1 | % Part: second-order-logic
2 | % Chapter: sol-and-set-theory
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sol}{set}{Second-order Logic and Set Theory}
9 |
10 | \begin{editorial}
11 | This section deals with coding powersets and the continuum in
12 | second-order logic. The results are stated but proofs have yet to be
13 | filled in. There are no problems yet---and the definitions and results
14 | themselves may have problems. Use with caution and report anything
15 | that's false or unclear.
16 | \end{editorial}
17 |
18 | \olimport{introduction}
19 |
20 | \olimport{comparing-sets}
21 |
22 | \olimport{cardinalities}
23 |
24 | \olimport{power-of-continuum}
25 |
26 | \OLEndChapterHook
27 |
28 | \end{document}
29 |
--------------------------------------------------------------------------------
/content/second-order-logic/syntax-and-semantics/language-of-sol.tex:
--------------------------------------------------------------------------------
1 | % Part: second-order-logic
2 | % Chapter: syntax-and-semantics
3 | % Section: language-of-sol
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{sol}{syn}{lan}
10 |
11 | \olsection{The Language of Second-Order Logic}
12 |
13 | Like in first-order logic, expressions of second-order logic are built
14 | up from a basic vocabulary containing \emph{!!{variable}s},
15 | \emph{!!{constant}s}, \emph{!!{predicate}s} and sometimes
16 | \emph{!!{function}s}. From them, together with logical connectives,
17 | quantifiers, and punctuation symbols such as parentheses and commas,
18 | \emph{terms} and \emph{!!{formula}s} are formed. The difference is
19 | that in addition to variables for objects, second-order logic also
20 | contains variables for relations and functions, and allows
21 | quantification over them. So the logical symbols of second-order logic
22 | are those of first-order logic, plus:
23 |
24 | \begin{enumerate}
25 | \item A !!{denumerable}s set of second-order relation !!{variable}s of
26 | every arity~$n$: $\Obj V_0^n$, $\Obj V_1^n$, $\Obj V_2^n$, \dots
27 | \item A !!{denumerable}s set of second-order function !!{variable}s:
28 | $\Obj u_0^n$, $\Obj u_1^n$, $\Obj u_2^n$, \dots
29 | \end{enumerate}
30 |
31 | In first-order logic, the !!{identity}~$\eq$ is usually included. In
32 | first-order logic, the non-logical symbols of a language~$\Lang{L}$
33 | are crucial to allow us to express anything interesting. There are of
34 | course !!{sentences} that use no non-logical symbols, but with
35 | only~$\eq$ it is hard to say anything interesting. In second-order
36 | logic, since we have an unlimited supply of relation and function
37 | variables, we can say anything we can say in a first-order language
38 | even without a special supply of non-logical symbols.
39 |
40 | \end{document}
41 |
--------------------------------------------------------------------------------
/content/second-order-logic/syntax-and-semantics/semantic-notions.tex:
--------------------------------------------------------------------------------
1 | % Part: second-order-logic
2 | % Chapter: syntax-and-semantics
3 | % Section: semantic-notions
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{sol}{syn}{sem}
10 | \olsection{Semantic Notions}
11 |
12 | \begin{explain}
13 | The central logical notions of \emph{validity}, \emph{entailment}, and
14 | \emph{satisfiability} are defined the same way for second-order logic
15 | as they are for first-order logic, except that the underlying
16 | satisfaction relation is now that for second-order !!{formula}s. A
17 | second-order !!{sentence}, of course, is !!a{formula} in which all
18 | variables, including predicate and function variables, are bound.
19 | \end{explain}
20 |
21 | \begin{defn}[Validity]
22 | A sentence $!A$ is \emph{valid}, $\Entails !A$, iff $\Sat{M}{!A}$ for every
23 | !!{structure}~$\Struct M$.
24 | \end{defn}
25 |
26 | \begin{defn}[Entailment]
27 | A set of sentences~$\Gamma$ \emph{entails} a sentence~$!A$, $\Gamma
28 | \Entails !A$, iff for every !!{structure}~$\Struct M$ with
29 | $\Sat{M}{\Gamma}$, $\Sat{M}{!A}$.
30 | \end{defn}
31 |
32 | \begin{defn}[Satisfiability]
33 | A set of sentences~$\Gamma$ is \emph{satisfiable} if $\Sat{M}{\Gamma}$
34 | for some !!{structure}~$\Struct M$. If $\Gamma$ is not satisfiable it is
35 | called \emph{unsatisfiable}.
36 | \end{defn}
37 |
38 | \end{document}
39 |
--------------------------------------------------------------------------------
/content/second-order-logic/syntax-and-semantics/syntax-and-semantics.tex:
--------------------------------------------------------------------------------
1 | % Part: second-order-logic
2 | % Chapter: syntax-and-semantics
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sol}{syn}{Syntax and Semantics}
9 |
10 | \begin{editorial}
11 | Basic syntax and semantics for SOL covered so far. As a chapter it's
12 | too short. Substitution for second-order variables has to be covered
13 | to be able to talk about derivation systems for SOL, and there's some
14 | subtle issues there.
15 | \end{editorial}
16 |
17 | \olimport{introduction}
18 |
19 | \olimport{terms-formulas}
20 |
21 | \olimport{satisfaction}
22 |
23 | \olimport{semantic-notions}
24 |
25 | \olimport{expressive-power}
26 |
27 | \olimport{inf-count}
28 |
29 | \OLEndChapterHook
30 |
31 | \end{document}
32 |
--------------------------------------------------------------------------------
/content/set-theory/card-arithmetic/card-arithmetic.tex:
--------------------------------------------------------------------------------
1 | % Part: set-theory
2 | % Chapter: card-arithmetic
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sth}{card-arithmetic}{Cardinal Arithmetic}
9 |
10 | \olimport{opps}
11 | \olimport{simp}
12 | \olimport{expotough}
13 | \olimport{ch}
14 | \olimport{fix}
15 |
16 | \OLEndChapterHook
17 |
18 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/cardinals/cardinals.tex:
--------------------------------------------------------------------------------
1 | % Part: set-theory
2 | % Chapter: cardinals
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sth}{cardinals}{Cardinals}
9 |
10 | \olimport{cp}
11 | \olimport{cardsasords}
12 | \olimport{milestone}
13 | \olimport{classing}
14 | \olimport{hp}
15 |
16 | \OLEndChapterHook
17 |
18 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/cardinals/milestone.tex:
--------------------------------------------------------------------------------
1 | \documentclass[../../../include/open-logic-section]{subfiles}
2 |
3 | \begin{document}
4 |
5 | \olfileid{sth}{cardinals}{zfc}
6 | \olsection{$\ZFC$: A Milestone}
7 |
8 | With the addition of Well-Ordering, we have reached the final
9 | theoretical milestone. We now have all the axioms required for~$\ZFC$.
10 | In detail:
11 |
12 | \begin{defn}
13 | The theory $\ZFC$ has these axioms: Extensionality, Union, Pairs,
14 | Powersets, Infinity, Foundation, Well-Ordering and all instances of
15 | the Separation and Replacement schemes. Otherwise put, $\ZFC$ adds
16 | Well-Ordering to~$\ZF$.
17 | \end{defn}
18 |
19 | $\ZFC$ stands for \emph{Zermelo--Fraenkel} set theory with
20 | \emph{Choice}. Now this might seem slightly odd, since the axiom we
21 | added was called ``Well-Ordering'', not ``Choice''. But, when we later
22 | formulate {Choice}, it will turn out that Well-Ordering is equivalent
23 | (modulo~$\ZF$) to Choice (see \olref[choice][woproblem]{thmwochoice}).
24 | So which to take as our ``basic'' axiom is a matter of indifference.
25 | And the name ``$\ZFC$'' is entirely standard in the literature.
26 |
27 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/choice/choice.tex:
--------------------------------------------------------------------------------
1 | % Part: set-theory
2 | % Chapter: choice
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sth}{choice}{Choice}
9 |
10 | \olimport{introduction}
11 | \olimport{tarskiscott}
12 | \olimport{hartogs}
13 | \olimport{wellorderingproblem}
14 | \olimport{countablechoice}
15 | \olimport{justifications}
16 | \olimport{banach}
17 | \olimport{vitali}
18 |
19 | \OLEndChapterHook
20 |
21 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/choice/introduction.tex:
--------------------------------------------------------------------------------
1 | \documentclass[../../../include/open-logic-section]{subfiles}
2 |
3 | \begin{document}
4 |
5 | \olfileid{sth}{choice}{intro}
6 |
7 | \olsection{Introduction}
8 |
9 | In \crefrange{sth:cardinals::chap}{sth:card-arithmetic::chap}, we
10 | developed a theory of cardinals by treating cardinals as ordinals.
11 | That approach depends upon the Axiom of Well-Ordering. It turns out
12 | that Well-Ordering is equivalent to another principle---the Axiom of
13 | Choice---and there has been serious philosophical discussion of its
14 | acceptability. Our question for this chapter are: How is the Axiom
15 | used, and can it be justified?
16 |
17 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/ord-arithmetic/introduction.tex:
--------------------------------------------------------------------------------
1 | \documentclass[../../../include/open-logic-section]{subfiles}
2 |
3 | \begin{document}
4 | \olfileid{sth}{ord-arithmetic}{intro}
5 |
6 | \olsection{Introduction}
7 |
8 | In \olref[ordinals][]{chap}, we developed a theory of ordinal numbers.
9 | We saw in \olref[spine][]{chap} that we can think of the ordinals as a
10 | spine around which the remainder of the hierarchy is constructed. But
11 | that is not the only role for the ordinals. There is also the task of
12 | performing ordinal arithmetic.
13 |
14 | We already gestured at this, back in
15 | \olref[ordinals][idea]{sec}, when we spoke of $\omega$,
16 | $\omega+1$ and $\omega+\omega$. At the time, we spoke informally; the
17 | time has come to spell it out properly. However, we should mention
18 | that there is not much philosophy in this chapter; just technical
19 | developments, coupled with a (mildly) interesting observation that we
20 | can do the same thing in two different ways.
21 |
22 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/ord-arithmetic/ord-arithmetic.tex:
--------------------------------------------------------------------------------
1 | % Part: set-theory
2 | % Chapter: ord-arithmetic
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sth}{ord-arithmetic}{Ordinal Arithmetic}
9 |
10 | \olimport{introduction}
11 | \olimport{addition}
12 | \olimport{using-addition}
13 | \olimport{multiplication}
14 | \olimport{exponentiation}
15 |
16 | \OLEndChapterHook
17 |
18 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/ordinals/introduction.tex:
--------------------------------------------------------------------------------
1 | % Part: set-theory
2 | % Chapter: ordinals
3 | % Section: introduction
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{sth}{ordinals}{intro}
10 |
11 | \olsection{Introduction}
12 |
13 | In \olref[z][]{chap}, we postulated that there is an infinite-th stage
14 | of the hierarchy, in the form of \stagesinf{} (see also our axiom of
15 | Infinity). However, given \stagessucc{}, we can't stop at the
16 | infinite-th stage; we have to keep going. So: at the next stage after
17 | the first infinite stage, we form all possible collections of sets
18 | that were available at the first infinite stage; and repeat; and
19 | repeat; and repeat; \dots
20 |
21 | Implicitly what has happened here is that we have started to invoke an
22 | ``intuitive'' notion of number, according to which there can be
23 | numbers \emph{after} all the natural numbers. In particular, the
24 | notion involved is that of a \emph{transfinite ordinal}. The aim of
25 | this chapter is to make this idea more rigorous. We will explore the
26 | general notion of an ordinal, and then explicitly define certain sets
27 | to be our ordinals.
28 |
29 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/ordinals/milestone.tex:
--------------------------------------------------------------------------------
1 | \documentclass[../../../include/open-logic-section]{subfiles}
2 |
3 | \begin{document}
4 | \olfileid{sth}{ordinals}{zfm}
5 | \olsection{$\ZFminus$: a milestone}
6 |
7 | The question of how to justify Replacement (if at all) is not
8 | straightforward. As such, we will reserve that for
9 | \olref[replacement][]{chap}. However, with the addition of Replacement, we
10 | have reached another important milestone. We now have all the axioms
11 | required for the theory $\ZFminus$. In detail:
12 |
13 | \begin{defn}
14 | The theory $\ZFminus$ has these axioms: Extensionality, Union, Pairs,
15 | Powersets, Infinity, and all instances of the Separation and
16 | Replacement schemes. Otherwise put, $\ZFminus$ adds Replacement to
17 | $\Zminus$.
18 | \end{defn}
19 | \noindent
20 | This stands for \emph{Zermelo--Fraenkel} set theory (\emph{minus}
21 | something which we will come to later). Fraenkel gets the honour,
22 | since he is credited with the formulation of Replacement in
23 | \citeyear{Fraenkel1922}, although the first precise formulation was
24 | due to \citet{Skolem1922}.
25 |
26 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/ordinals/ordinals.tex:
--------------------------------------------------------------------------------
1 | % Chapter: Naive
2 |
3 | \documentclass[../../../include/open-logic-chapter]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olchapter{sth}{ordinals}{Ordinals}
8 |
9 | \olimport{introduction}
10 | \olimport{idea}
11 | \olimport{wo}
12 | \olimport{iso}
13 | \olimport{vn}
14 | \olimport{basic}
15 | \olimport{replacement}
16 | \olimport{milestone}
17 | \olimport{ordtype}
18 | \olimport{opps}
19 |
20 | \OLEndChapterHook
21 |
22 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/replacement/introduction.tex:
--------------------------------------------------------------------------------
1 | \documentclass[../../../include/open-logic-section]{subfiles}
2 |
3 | \begin{document}
4 |
5 | \olfileid{sth}{replacement}{intro}
6 | \olsection{Introduction}
7 |
8 | Replacement is the axiom scheme which makes the difference between $\ZF$
9 | and~$\Z$. We helped ourselves to it throughout
10 | \crefrange{sth:ordinals::chap}{sth:spine::chap}. In this chapter, we
11 | will finally consider the question: is Replacement justified?
12 |
13 | To make the question sharp, it is worth observing that Replacement is really
14 | rather \emph{strong}. We will get a sense of just how strong it is, during this chapter (and again in \olref[sth][card-arithmetic][fix]{sec}). But this will suggest that justification really is required.
15 |
16 | We will discuss two kinds of justification. Roughly: an \emph{extrinsic} justification is an attempt to justify an axiom by its fruits; an \emph{intrinsic} justification is an attempt to justify an axiom by suggesting that it is vindicated by the mathematical concepts in question. We will get a greater sense of what this means during this chapter, but it is just the tip of an iceberg. For more, see in particular \citeauthor{Maddy1988a} (\citeyear{Maddy1988a} and \citeyear{Maddy1988b}).
17 |
18 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/replacement/replacement.tex:
--------------------------------------------------------------------------------
1 | % Part: set-theory
2 | % Chapter: replacement
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sth}{replacement}{Replacement}
9 |
10 | \olimport{introduction}
11 | \olimport{strength}
12 | \olimport{extrinsic}
13 | \olimport{limofsize}
14 | \olimport{absinf}
15 | \olimport{ref}
16 | \olimport{refproofs}
17 | \olimport{finiteaxiomatizability}
18 |
19 | \OLEndChapterHook
20 |
21 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/set-theory.tex:
--------------------------------------------------------------------------------
1 | % Part: set-theory
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{sth}{Set Theory}
8 |
9 | \olimport[story]{story}
10 | \olimport[z]{z}
11 | \olimport[ordinals]{ordinals}
12 | \olimport[spine]{spine}
13 | \olimport[replacement]{replacement}
14 | \olimport[ord-arithmetic]{ord-arithmetic}
15 | \olimport[cardinals]{cardinals}
16 | \olimport[card-arithmetic]{card-arithmetic}
17 | \olimport[choice]{choice}
18 |
19 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/spine/idea.tex:
--------------------------------------------------------------------------------
1 | \documentclass[../../../include/open-logic-section]{subfiles}
2 |
3 | \begin{document}
4 |
5 | \olfileid{sth}{spine}{valpha}
6 |
7 | \olsection{Defining the Stages as the $V_\alpha$s}
8 |
9 | In \olref[sth][ordinals][]{chap}, we defined well-orderings and the
10 | (von Neumann) ordinals. In this chapter, we will use these to
11 | characterise the hierarchy of sets \emph{itself}. To do this, recall
12 | that in \olref[sth][ordinals][opps]{sec}, we defined the idea of
13 | successor and limit ordinals. We use these ideas in following
14 | definition:
15 |
16 | \begin{defn}\ollabel{defValphas}
17 | \begin{align*}
18 | V_\emptyset &\defis \emptyset\\
19 | V_{\ordsucc{\alpha}} &\defis \Pow{V_\alpha} & &
20 | \text{for any ordinal }\alpha\\
21 | V_{\alpha} &\defis \bigcup_{\gamma < \alpha} V_\gamma & &
22 | \text{when }\alpha\text{ is a limit ordinal}
23 | \end{align*}
24 | \end{defn}
25 | \noindent
26 | This will be a definition by \emph{transfinite recursion} on the
27 | ordinals. In this regard, we should compare this with recursive
28 | definitions of functions on the natural numbers.\footnote{Cf.\ the
29 | definitions of addition, multiplication, and exponentiation in
30 | \olref[sfr][infinite][dedekind]{sec}.} As when dealing with natural
31 | numbers, one defines a base case and successor cases; but when dealing
32 | with ordinals, we also need to describe the behaviour of \emph{limit}
33 | cases.
34 |
35 | This definition of the $V_\alpha$s will be an important milestone. We
36 | have informally motivated our hierarchy of sets as forming sets by
37 | \emph{stages}. The $V_\alpha$s are, in effect, just those stages.
38 | Importantly, though, this is an \emph{internal} characterisation of
39 | the stages. Rather than suggesting a possible \emph{model} of the
40 | theory, we will have defined the stages \emph{within} our set theory.
41 |
42 | \end{document}
43 |
--------------------------------------------------------------------------------
/content/set-theory/spine/spine.tex:
--------------------------------------------------------------------------------
1 | % Part: set-theory
2 | % Chapter: spine
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sth}{spine}{Stages and Ranks}
9 |
10 | \olimport{idea}
11 | \olimport{recursion}
12 | \olimport{stagesbasics}
13 | \olimport{foundation}
14 | \olimport{zf}
15 | \olimport{rank}
16 |
17 | \OLEndChapterHook
18 |
19 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/story/extensionality.tex:
--------------------------------------------------------------------------------
1 | \documentclass[../../../include/open-logic-section]{subfiles}
2 |
3 | \begin{document}
4 |
5 | \olfileid{sth}{story}{extensionality}
6 | \olsection{Extensionality}
7 |
8 | The very first thing to say is that sets are individuated by their
9 | !!{element}s. More precisely:
10 |
11 | \begin{axiom}[Extensionality]
12 | If sets $A$ and $B$ have the same !!{element}s, then $A$ and $B$ are
13 | the same set.
14 | \[
15 | \lforall[A][\lforall[B][(\lforall[x][(x \in A \liff x \in B)] \lif
16 | \eq[A][B])]]
17 | \]
18 | \end{axiom}
19 |
20 | We assumed this throughout \olref[sfr][][]{part}. But it bears
21 | repeating. The Axiom of Extensionality expresses the basic idea that a
22 | set is determined by its !!{element}s. (So sets might be contrasted with
23 | \emph{concepts}, where precisely the same objects might fall under
24 | many different concepts.)
25 |
26 | Why embrace this principle? Well, it is plausible to say that any
27 | denial of Extensionality is a decision to abandon anything which might
28 | even be called \emph{set theory}. Set theory is no more nor less than
29 | the theory of extensional collections.
30 |
31 | The real challenge in \olref[sth][][]{part}, though, is to lay
32 | down principles which tell us \emph{which sets exist}. And it turns
33 | out that the only truly ``obvious'' answer to this question is
34 | provably wrong.
35 |
36 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/story/story.tex:
--------------------------------------------------------------------------------
1 | % Chapter: Naive
2 |
3 | \documentclass[../../../include/open-logic-chapter]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olchapter{sth}{story}{The Iterative Conception}
8 |
9 | \olimport{extensionality}
10 | \olimport{russells-paradox-again}
11 | \olimport{predicativity}
12 | \olimport{cumulative-approach}
13 | \olimport{urelements}
14 | \olimport{grundgesetze}
15 |
16 | \OLEndChapterHook
17 |
18 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/z/milestone.tex:
--------------------------------------------------------------------------------
1 | \documentclass[../../../include/open-logic-section]{subfiles}
2 |
3 | \begin{document}
4 |
5 | \olfileid{sth}{z}{milestone}
6 | \olsection{$\Z^-$: a Milestone}
7 |
8 | We will revisit \stagesinf{} in the next section. However, with the
9 | Axiom of Infinity, we have reached an important milestone. We now have
10 | all the axioms required for the theory $\Zminus$. In detail:
11 |
12 | \begin{defn}
13 | The theory $\Zminus$ has these axioms: Extensionality, Union, Pairs, Powersets, Infinity, and all instances of the Separation scheme.
14 | \end{defn}
15 |
16 | The name stands for \emph{Zermelo} set theory (\emph{minus} something
17 | which we will come to later). Zermelo deserves the honour, since he
18 | essentially formulated this theory in his
19 | \citeyear{Zermelo1908Untersuchungen}.\footnote{For interesting
20 | comments on the history and technicalities, see \citet[Appendix
21 | A]{Potter2004}.}
22 |
23 | This theory is powerful enough to allow us to do an enormous amount of
24 | mathematics. In particular, you \emph{should} look back through
25 | \olref[sfr][][]{part}, and convince yourself that everything we did,
26 | na\"ively, could be done more formally within~$\Zminus$. (Once you
27 | have done that for a bit, you might want to skip ahead and read
28 | \olref[sth][z][arbintersections]{sec}.) So, henceforth,
29 | and without any further comment, we will take ourselves to be working
30 | in $\Zminus$ (at least).
31 |
32 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/z/story.tex:
--------------------------------------------------------------------------------
1 | \documentclass[../../../include/open-logic-section]{subfiles}
2 |
3 | \begin{document}
4 |
5 | \olfileid{sth}{z}{story}
6 | \olsection{The Story in More Detail}
7 |
8 | In \olref[story][approach]{sec}, we quoted Schoenfield's
9 | description of the process of set-formation. We now want to write down
10 | a few more principles, to make this story a bit more precise. Here
11 | they are:
12 | \begin{enumerate}
13 | \item[] \stageshier. Every set is formed at some stage.
14 | \item[] \stagesord. Stages are ordered: some come \emph{before}
15 | others.\footnote{We will actually assume---tacitly---that the stages
16 | are \emph{well-ordered}. What this amounts to is explained in
17 | \olref[ordinals][]{chap}. This is a substantial assumption. In fact,
18 | using a very clever technique due to \citet{Scott1974}, this
19 | assumption can be \emph{avoided} and then \emph{derived}. (This will
20 | also explain why we should think that there is an initial stage.) We cannot go into that here; for more, see \citet{ButtonLT1}.}
21 | \item[] \stagesacc. For any stage $S$, and for any sets which were
22 | formed \emph{before} stage~$S$: a set is formed at stage~$S$ whose
23 | members are exactly those sets. Nothing else is formed at stage~$S$.
24 | \end{enumerate}
25 | These are informal principles, but we will be able to use them to
26 | vindicate several of the axioms of Zermelo's set theory.
27 |
28 | (We should offer a word of caution. Although we will be presenting some
29 | completely standard axioms, with completely standard names, the
30 | italicized principles we have just presented have no particular names
31 | in the literature. We simply monikers which we hope are helpful.)
32 |
33 | \end{document}
--------------------------------------------------------------------------------
/content/set-theory/z/union.tex:
--------------------------------------------------------------------------------
1 | \documentclass[../../../include/open-logic-section]{subfiles}
2 |
3 | \begin{document}
4 |
5 | \olfileid{sth}{z}{union}
6 | \olsection{Union}
7 |
8 | \olref[sth][z][sep]{prop:intersectionsexist} gave us intersections.
9 | But if we want arbitrary unions to exist, we need to lay down another
10 | axiom:
11 |
12 | \begin{axiom}[Union] For any set $A$, the set $\bigcup A =
13 | \Setabs{x}{(\exists b \in A) x \in b}$ exists.
14 | \[
15 | \forall A \exists U \forall x(x \in U \liff (\exists b \in A)x \in b)
16 | \]
17 | \end{axiom}
18 |
19 | This axiom is also justified by the cumulative-iterative conception.
20 | Let $A$ be a set, so $A$ is formed at some stage $S$ (by \stageshier).
21 | Every member of $A$ was formed \emph{before} $S$ (by \stagesacc); so,
22 | reasoning similarly, every member of every member of $A$ was formed
23 | before $S$. Thus all of \emph{those} sets are available before $S$, to
24 | be formed into a set at $S$. And that set is just $\bigcup A$.
25 |
26 | \end{document}
27 |
--------------------------------------------------------------------------------
/content/set-theory/z/z.tex:
--------------------------------------------------------------------------------
1 | % Part: set-theory
2 | % Chapter: z
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sth}{z}{Steps towards $\Z$}
9 |
10 | \olimport{story}
11 | \olimport{separation}
12 | \olimport{union}
13 | \olimport{pairs}
14 | \olimport{powerset}
15 | \olimport{infinity-again}
16 | \olimport{milestone}
17 | \olimport{nat}
18 | \olimport{arbintersections}
19 |
20 | \OLEndChapterHook
21 |
22 | \end{document}
--------------------------------------------------------------------------------
/content/sets-functions-relations/arithmetization/arithmetization.tex:
--------------------------------------------------------------------------------
1 | % Part: sets-functions-relations
2 | % Chapter: arithmetization
3 |
4 | \documentclass[../../../include/open-logic-section]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sfr}{arith}{Arithmetization}
9 |
10 | \begin{editorial}
11 | The material in this chapter presents the construction of the number
12 | systems in na\"ive set theory. It is taken from Tim Button's Open Set
13 | Theory text.
14 | \end{editorial}
15 |
16 | \olimport{integers}
17 | \olimport{rationals}
18 | \olimport{reals}
19 | \olimport{cuts}
20 | \olimport{reflections}
21 | \olimport{checking-details}
22 | \olimport{cauchy}
23 |
24 | \OLEndChapterHook
25 |
26 | \end{document}
27 |
--------------------------------------------------------------------------------
/content/sets-functions-relations/functions/functions.tex:
--------------------------------------------------------------------------------
1 | % Part: sets-functions-relations
2 | % Chapter: functions
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sfr}{fun}{Functions}
9 |
10 | \olimport{function-basics}
11 |
12 | \olimport{function-kinds}
13 |
14 | \olimport{functions-relations}
15 |
16 | \olimport{inverses}
17 |
18 | \olimport{composition}
19 |
20 | %\olimport{isomorphic-functions}
21 |
22 | \olimport{partial-functions}
23 |
24 | \OLEndChapterHook
25 |
26 | \end{document}
27 |
--------------------------------------------------------------------------------
/content/sets-functions-relations/functions/isomorphic-functions.tex:
--------------------------------------------------------------------------------
1 | % Part: sets-functions-relations
2 | % Chapter: functions
3 | % Section: isomorphisms
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 |
8 | \begin{document}
9 |
10 | \olfileid{sfr}{fun}{iso}
11 | \olsection{Isomorphism}
12 |
13 | \begin{explain}
14 | An \emph{isomorphism} is a bijection that preserves the structure of
15 | the sets it relates, where structure is a matter of the relationships
16 | that obtain between the !!{element}s of the sets. Consider the
17 | following two sets $X=\{1,2,3\}$ and $Y=\{4,5,6\}$. These sets are
18 | both structured by the relations successor, less than, and greater
19 | than. An isomorphism between the two sets is !!a{bijection} that
20 | preserves those structures. So !!a{bijective} function $f \colon X
21 | \to Y$ is an isomorphism if, $ij$ iff
22 | $f(i)>f(j)$, and $j$ is the successor of $i$ iff $f(j)$ is the
23 | successor of $f(i)$.
24 | \end{explain}
25 |
26 | \begin{defn}[Isomorphism]
27 | Let $U$ be the pair $\langle X, R\rangle$ and $V$ be the pair $\langle
28 | Y, S\rangle$ such that $X$ and $Y$ are sets and $R$ and $S$ are
29 | relations on $X$ and $Y$ respectively. A !!{bijection} $f$ from $X$ to
30 | $Y$ is an \emph{isomorphism} from $U$ to $V$ iff it preserves the
31 | relational structure, that is, for any $x_{1}$ and $x_{2}$ in $X$,
32 | $\tuple{x_1,x_2} \in R$ iff $\tuple{f(x_1),f(x_2)} \in S$.
33 | \end{defn}
34 |
35 | \begin{ex}
36 | Consider the following two sets $X=\{1,2,3\}$ and $Y=\{4,5,6\}$, and
37 | the relations less than and greater than. The function $f\colon X \to
38 | Y$ where $f(x) = 7-x$ is an isomorphism between $\tuple{X,<}$ and
39 | $\tuple{Y,>}$.
40 | \end{ex}
41 |
42 | \end{document}
43 |
--------------------------------------------------------------------------------
/content/sets-functions-relations/infinite/infinite.tex:
--------------------------------------------------------------------------------
1 | % Part: sets-functions-relations
2 | % Chapter: infinite
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sfr}{infinite}{Infinite Sets}
9 |
10 | \begin{editorial}
11 | This chapter on infinite sets is taken from Tim Button's \emph{Open
12 | Set Theory}.
13 | \end{editorial}
14 |
15 | \olimport{hilberts-hotel}
16 | \olimport{dedekind-algebra}
17 | \olimport{dedekind-induction}
18 | \olimport{dedekinds-proof}
19 | \olimport{card-sb}
20 |
21 | \end{document}
--------------------------------------------------------------------------------
/content/sets-functions-relations/relations/relations-complete.tex:
--------------------------------------------------------------------------------
1 | % Part: sets-functions-relations
2 | % Chapter: relations-complete
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sfr}{rel}{Relations}
9 |
10 | \olimport{relations-as-sets}
11 |
12 | \olimport{reflections}
13 |
14 | \olimport{special-properties}
15 |
16 | \olimport{equivalence-relations}
17 |
18 | \olimport{orders}
19 |
20 | \olimport{graphs}
21 |
22 | \olimport{operations}
23 |
24 | \OLEndChapterHook
25 |
26 | \end{document}
27 |
--------------------------------------------------------------------------------
/content/sets-functions-relations/relations/relations.tex:
--------------------------------------------------------------------------------
1 | % Part: sets-functions-relations
2 | % Chapter: relations
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sfr}{rel}{Relations}
9 |
10 | \olimport{relations-as-sets}
11 |
12 | \olimport{special-properties}
13 |
14 | \olimport{equivalence-relations}
15 |
16 | \olimport{orders}
17 |
18 | \olimport{graphs}
19 |
20 | \olimport{operations}
21 |
22 | \OLEndChapterHook
23 |
24 | \end{document}
25 |
--------------------------------------------------------------------------------
/content/sets-functions-relations/sets-functions-relations-complete.tex:
--------------------------------------------------------------------------------
1 | % Part: sets-functions-relations-complete
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{sfr}{Na\"ive Set Theory}
8 |
9 | \begin{editorial}
10 | The material in this part is an introduction to basic naive set
11 | theory. With the inclusion of Tim Button's Open Set Theory, this
12 | also covers the construction of number systems, and discussion of
13 | infinity, which are not required for the logical parts of the OLP.
14 | \end{editorial}
15 |
16 | \olimport[sets]{sets}
17 |
18 | \olimport[relations]{relations-complete}
19 |
20 | \olimport[functions]{functions}
21 |
22 | \olimport[size-of-sets]{size-of-sets-complete}
23 |
24 | \olimport[arithmetization]{arithmetization}
25 |
26 | \olimport[infinite]{infinite}
27 |
28 | \OLEndPartHook
29 | \end{document}
30 |
--------------------------------------------------------------------------------
/content/sets-functions-relations/sets-functions-relations.tex:
--------------------------------------------------------------------------------
1 | % Part: Sets, Relations, Functions
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{sfr}{Sets, Relations, Functions}
8 |
9 | \begin{editorial}
10 | This file includes the first four chapters of the part on Na\"ive
11 | Set Theory, in the original slowpaced version. The complete part is
12 | included by \verb|sets-functions-relations-complete.tex|. The
13 | material in this part is a reasonably complete introduction to basic
14 | naive set theory. Unless students can be assumed to have this
15 | background, it's probably advisable to start a course with a review
16 | of this material, at least the part on sets, functions, and
17 | relations. This should ensure that all students have the basic
18 | facility with mathematical notation required for any of the other
19 | logical sections.
20 | \end{editorial}
21 |
22 | \olimport[sets]{sets}
23 |
24 | \olimport[relations]{relations}
25 |
26 | \olimport[functions]{functions}
27 |
28 | \olimport[size-of-sets]{size-of-sets}
29 |
30 | \OLEndPartHook
31 | \end{document}
32 |
--------------------------------------------------------------------------------
/content/sets-functions-relations/sets/sets.tex:
--------------------------------------------------------------------------------
1 | % Part: sets-functions-relations
2 | % Chapter: sets
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sfr}{set}{Sets}
9 |
10 | \olimport{basics}
11 |
12 | \olimport{subsets}
13 |
14 | \olimport{important-sets}
15 |
16 | \olimport{unions-and-intersections}
17 |
18 | \olimport{pairs-and-products}
19 |
20 | \olimport{russells-paradox}
21 |
22 | \OLEndChapterHook
23 |
24 | \end{document}
25 |
--------------------------------------------------------------------------------
/content/sets-functions-relations/size-of-sets/introduction.tex:
--------------------------------------------------------------------------------
1 | % Part:sets-functions-relations
2 | % Chapter: size-of-sets
3 | % Section: introduction
4 |
5 | \documentclass[../../../include/open-logic-section]{subfiles}
6 |
7 | \begin{document}
8 |
9 | \olfileid{sfr}{siz}{int}
10 |
11 | \olsection{Introduction}
12 |
13 | When Georg Cantor developed set theory in the 1870s, one of his aims
14 | was to make palatable the idea of an infinite collection---an actual
15 | infinity, as the medievals would say. A key part of this was his
16 | treatment of the \emph{size} of different sets. If $a$, $b$ and $c$ are
17 | all distinct, then the set $\{a, b, c\}$ is intuitively \emph{larger}
18 | than $\{a, b\}$. But what about infinite sets? Are they all as large
19 | as each other? It turns out that they are not.
20 |
21 | The first important idea here is that of an enumeration. We can
22 | list every finite set by listing all its !!{element}s. For some
23 | infinite sets, we can also list all their !!{element}s if we allow the
24 | list itself to be infinite. Such sets are called !!{enumerable}.
25 | Cantor's surprising result, which we will fully understand by the end
26 | of this chapter, was that some infinite sets are not !!{enumerable}.
27 |
28 | \end{document}
29 |
--------------------------------------------------------------------------------
/content/sets-functions-relations/size-of-sets/size-of-sets-complete.tex:
--------------------------------------------------------------------------------
1 | % Part: sets-functions-relations
2 | % Chapter: size-of-sets-complete
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sfr}{siz}{The Size of Sets}
9 |
10 | \begin{editorial}
11 | This chapter discusses enumerations, countability and uncountability.
12 | Several sections come in two versions: a more elementary one, that
13 | takes enumerations to be lists, or surjections from $\PosInt$; and a
14 | more abstract one that defines enumerations as bijections with $\Nat$.
15 | \end{editorial}
16 |
17 | \olimport{introduction}
18 |
19 | \olimport{enumerability}
20 |
21 | \olimport{zig-zag}
22 |
23 | \olimport{pairing}
24 |
25 | \olimport{pairing-alt}
26 |
27 | \olimport{non-enumerability}
28 |
29 | \olimport{reduction}
30 |
31 | \olimport{equinumerous-sets}
32 |
33 | \olimport{comparing-size}
34 |
35 | \olimport{schroder-bernstein}
36 |
37 | \begin{editorial}
38 | The following \olref[sfr][siz][enm-alt]{sec},
39 | \olref[sfr][siz][nen-alt]{sec}, \olref[sfr][siz][red-alt]{sec} are
40 | alternative versions of \olref[sfr][siz][enm]{sec},
41 | \olref[sfr][siz][nen]{sec}, \olref[sfr][siz][red]{sec} due to Tim
42 | Button for use in his Open Set Theory text. They are slightly more
43 | advanced and use a difference definition of enumerability more
44 | suitable in a set theory context (i.e., bijection with $\Nat$ or an
45 | initial segment, rather than being listable or being the range of a
46 | surjective function from $\PosInt$).
47 | \end{editorial}
48 |
49 | \olimport{enumerability-alt}
50 | \olimport{non-enumerability-alt}
51 | \olimport{reduction-alt}
52 |
53 | \OLEndChapterHook
54 |
55 | \end{document}
56 |
--------------------------------------------------------------------------------
/content/sets-functions-relations/size-of-sets/size-of-sets.tex:
--------------------------------------------------------------------------------
1 | % Part: sets-functions-relations
2 | % Chapter: size-of-sets
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{sfr}{siz}{The Size of Sets}
9 |
10 | \begin{editorial}
11 | This chapter discusses enumerations, countability and uncountability.
12 | The text includes two versions of a few sections, a more elementary
13 | version and a more advanced version for use if set theory is
14 | discussed in more detail. This file only includes the elementary
15 | versions. The more advanced versions are included in \verb|size-of-sets-complete|.
16 | \end{editorial}
17 |
18 | \olimport{introduction}
19 |
20 | \olimport{enumerability}
21 |
22 | \olimport{zig-zag}
23 |
24 | \olimport{pairing}
25 |
26 | \olimport{pairing-alt}
27 |
28 | \olimport{non-enumerability}
29 |
30 | \olimport{reduction}
31 |
32 | \olimport{equinumerous-sets}
33 |
34 | \olimport{comparing-size}
35 |
36 | \olimport{schroder-bernstein}
37 |
38 | \OLEndChapterHook
39 |
40 | \end{document}
41 |
--------------------------------------------------------------------------------
/content/turing-machines/machines-computations/machines-computations.tex:
--------------------------------------------------------------------------------
1 | % Part: turing-machines
2 | % Chapter: machines-computations
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{tur}{mac}{Turing Machine Computations}
9 |
10 | \olimport{introduction}
11 |
12 | \olimport{representing-tms}
13 |
14 | \olimport{turing-machines}
15 |
16 | \olimport{configuration}
17 |
18 | \olimport{unary-numbers}
19 |
20 | \olimport{halting-states}
21 |
22 | \olimport{disciplined-machines}
23 |
24 | \olimport{combining-machines}
25 |
26 | \olimport{variants}
27 |
28 | \olimport{church-turing-thesis}
29 |
30 | \OLEndChapterHook
31 |
32 | \end{document}
33 |
--------------------------------------------------------------------------------
/content/turing-machines/turing-machines.tex:
--------------------------------------------------------------------------------
1 | % Part: turing-machines
2 |
3 | \documentclass[../../include/open-logic-part]{subfiles}
4 |
5 | \begin{document}
6 |
7 | \olpart{tur}{Turing Machines}
8 |
9 | \olimport[machines-computations]{machines-computations}
10 |
11 | \olimport[undecidability]{undecidability}
12 |
13 | \OLEndPartHook
14 |
15 | \end{document}
16 |
--------------------------------------------------------------------------------
/content/turing-machines/undecidability/undecidability.tex:
--------------------------------------------------------------------------------
1 | % Part: turing-machines
2 | % Chapter: undecidability
3 |
4 | \documentclass[../../../include/open-logic-chapter]{subfiles}
5 |
6 | \begin{document}
7 |
8 | \olchapter{tur}{und}{Undecidability}
9 |
10 | \olimport{introduction}
11 |
12 | \olimport{enumerating-tms}
13 |
14 | \olimport{universal-tm}
15 |
16 | \olimport{halting-problem}
17 |
18 | \olimport{decision-problem}
19 |
20 | \olimport{representing-tms}
21 |
22 | \olimport{verification}
23 |
24 | \olimport{unsolvability-decision-problem}
25 |
26 | \olimport{trakhtenbrot}
27 |
28 | \OLEndChapterHook
29 |
30 | \end{document}
31 |
--------------------------------------------------------------------------------
/courses/README.md:
--------------------------------------------------------------------------------
1 | Courses
2 | =======
3 |
4 | Put driver files for textbooks for individual courses into subdirectories of this one.
5 |
--------------------------------------------------------------------------------
/courses/enderton/Makefile:
--------------------------------------------------------------------------------
1 | # sample course based on OLP
2 | # Makefile
3 |
4 | # YOU DO NOT HAVE TO USE THIS MAKEFILE
5 | # Just run pdflatex on whichever tex file you want to compile
6 | # The job of this makefile is to compile *everything*
7 |
8 | # Requires latexmk https://www.ctan.org/pkg/latexmk/
9 | # The PDF of the open-logic-config documentation also requires
10 | # pandoc http://pandoc.org/
11 |
12 | .PHONY : FORCE_MAKE
13 |
14 | all: open-logic-enderton.pdf
15 |
16 | %.pdf : %.tex FORCE_MAKE
17 | latexmk -pdf -dvi- -ps- -interaction=nonstopmode $<
18 |
19 | clean:
20 | latexmk -c open-logic-enderton.tex
21 |
--------------------------------------------------------------------------------
/courses/enderton/open-logic-enderton-config.sty:
--------------------------------------------------------------------------------
1 | % Configuration File for courses/enderton/open-logic-enderton
2 | % OpenLogic Project
3 |
4 | % We copy the style of Enderton's Mathematical Introduction to Logic
5 |
6 | % Formulas are \alpha, \beta, etc.
7 |
8 | \olalphagreekformulas
9 |
10 | % Herb liked \mathfrak{A} for structures
11 |
12 | \def\switchmods#1{\expandafter\lookup\expandafter{M/{\mathfrak{A}},N/{\mathfrak{B}},S/{\mathfrak{C}},Q/{\mathfrak{Q}}}#1}
13 | \DeclareDocumentCommand \Struct { m }{\applytofirst{\switchmods}{#1}}
14 |
15 | \DeclareDocumentCommand \Sat { t{/} m m o } {
16 | \IfBooleanTF{#1}{
17 | % negated
18 | \IfNoValueTF {#4}
19 | { \not\models_{\Struct{#2}} #3 }
20 | { \not\models_{\Struct{#2}} #3\, [#4]}}{
21 | % not negated
22 | \IfNoValueTF {#4}
23 | { \models_{\Struct{#2}} #3 }
24 | { \models_{\Struct{#2}} #3\, [#4] }}
25 | }
26 |
27 | \DeclareDocumentCommand \Value { m m o} {
28 | \IfNoValueTF {#3}
29 | % optional argument not present
30 | { {#1}^{\Struct{#2}} }
31 | % optional argument present
32 | { \bar{#3}(#1) }
33 | }
34 |
35 | % object language: regular math italics
36 |
37 | \DeclareDocumentCommand \Obj { m }{#1}
38 |
39 | % atomic formulas -- no parens, no commas
40 |
41 | \DeclareDocumentCommand \Atom { m m }{ #1 \args{#2} }
42 |
43 | \settexttoken{formula}{wff}{wffs}
44 |
45 | \settexttoken{identity}*{equality symbol}{equality symbols}
46 |
47 | % only \not, \lif, \lforall are primitives
48 |
49 | \tagfalse{prvOr,prvAnd,prvIff,prvTrue,prvFalse,prvEx}
50 |
51 | % \everything else defined, no constants
52 |
53 | \tagtrue{defOr,defAnd,defIff,defEx,defTrue,defFalse}
54 |
55 | \tagfalse{probNot,probOr,probAnd,probIf,probIff,probEx,probAll}
56 |
57 | % no limit clauses
58 |
59 | \tagfalse{limitClause}
60 |
61 | % Do only axiomatic deduction
62 |
63 | \tagtrue{prfAX}
64 | \tagfalse{prfND,prfSC,prfTab}
65 |
--------------------------------------------------------------------------------
/courses/enderton/open-logic-enderton.tex:
--------------------------------------------------------------------------------
1 | % open-logic-enderton.tex
2 | % master file to produce an example text
3 | % in the style of Enderton
4 |
5 | \documentclass{memoir}
6 |
7 | % we're compiling from example directory
8 | \newcommand{\olpath}{../../}
9 |
10 | \usepackage{gitinfo2}
11 |
12 | \input{\olpath sty/open-logic.sty}
13 | \input{\olpath sty/open-logic-defer.sty}
14 |
15 | \problemsperchapter
16 |
17 | \title{An Open Mathematical Introduction to Logic\\
18 | Example OLP Text \`a la Enderton}
19 |
20 | \author{Open Logic Project}
21 | \date{\shortollicense}
22 |
23 | % sections start with section symbol
24 | \setsecnumformat{\S\csname the#1\endcsname\quad}
25 |
26 | % section numbering starts with 0
27 | \appto{\memendofchapterhook}{\setcounter{section}{-1}}
28 |
29 | % Problems are numbered per chapter
30 | \renewcommand*{\theprobd}{\arabic{probd}}
31 |
32 | \pagestyle{giruled}
33 |
34 | \begin{document}
35 |
36 | \maketitle
37 |
38 | \tableofcontents*
39 |
40 | \olimport*[propositional-logic]{propositional-logic}
41 |
42 | \olimport*[first-order-logic]{first-order-logic}
43 |
44 | \olimport*[computability]{computability}
45 |
46 | \olimport*[incompleteness]{incompleteness}
47 |
48 | \end{document}
49 |
50 |
--------------------------------------------------------------------------------
/courses/sample/Makefile:
--------------------------------------------------------------------------------
1 | # sample course based on OLP
2 | # Makefile
3 |
4 | # YOU DO NOT HAVE TO USE THIS MAKEFILE
5 | # Just run pdflatex on whichever tex file you want to compile
6 | # The job of this makefile is to compile *everything*
7 |
8 | # Requires latexmk https://www.ctan.org/pkg/latexmk/
9 | # The PDF of the open-logic-config documentation also requires
10 | # pandoc http://pandoc.org/
11 |
12 | .PHONY : FORCE_MAKE
13 |
14 | all: open-logic-sample.pdf
15 |
16 | %.pdf : %.tex FORCE_MAKE
17 | latexmk -pdf -dvi- -ps- -interaction=nonstopmode $<
18 |
19 | clean:
20 | latexmk -c open-logic-sample.tex
21 |
--------------------------------------------------------------------------------
/courses/sample/open-logic-sample-config.sty:
--------------------------------------------------------------------------------
1 | % For the sample text, let's redefine the logical connectives
2 |
3 | \DeclareDocumentMacro \lnot {\mathord{\sim}}
4 |
5 | \DeclareDocumentMacro \land {\mathbin{\&}}
6 |
7 | \DeclareDocumentMacro \lif {\supset}
8 |
9 | \DeclareDocumentMacro \liff {\equiv}
10 |
11 | % Set abstracts with a | instead of a :
12 |
13 | \DeclareDocumentCommand \Setabs { m m }{\{ #1 \mid #2 \}}
14 |
15 | % let's be pretentious about the plural of formula
16 |
17 | \settexttoken{formula}{formula}{formulae}
18 |
19 | \settexttoken{subformula}{subformula}{subformulae}
20 |
21 | \settexttoken{enumerable}{countable}{countable}
22 |
23 | \settexttoken{nonenumerable}*{uncountable}{uncountable}
24 |
25 | \settexttoken{denumerable}{countably infinite}{countably infinite}
26 |
27 | % make biconditional, verum defined
28 |
29 | \tagtrue{defIff,defTrue}
30 | \tagfalse{prvIff,prvTrue}
31 |
32 | % cases for conditional, universal quantifier left to reader
33 |
34 | \tagtrue{probIf,probAll}
35 |
36 | % do just natural deduction
37 |
38 | \tagtrue{prfND}
39 | \tagfalse{prfSC,prfAX,prfTab}
40 |
--------------------------------------------------------------------------------
/include/open-logic-chapter.tex:
--------------------------------------------------------------------------------
1 | \documentclass[openany]{memoir}
2 |
3 | \usepackage{subfiles}
4 |
5 | % Open Logic main path is 3 directories up for chapters; they live in
6 | % content/*/*
7 | \newcommand*{\olpath}{../../..}
8 |
9 | \input{\olpath/sty/open-logic.sty}
10 | \input{\olpath/sty/open-logic-debug.sty}
11 |
12 | \def\thechapter{\theolchapter}
13 |
14 | \pagestyle{openlogic}
15 |
16 | \begin{document}
17 |
18 | This file should not be compiled on its own. It is merely a template to
19 | compile chapters by themselves.
20 |
21 | \end{document}
22 |
23 |
--------------------------------------------------------------------------------
/include/open-logic-part.tex:
--------------------------------------------------------------------------------
1 | \documentclass[openany]{memoir}
2 |
3 | \usepackage{subfiles}
4 |
5 | % Open Logic main path is two directory levels up; parts live in content/*/
6 | \newcommand{\olpath}{../..}
7 |
8 | \input{\olpath/sty/open-logic.sty}
9 | \input{\olpath/sty/open-logic-debug.sty}
10 |
11 | \pagestyle{openlogic}
12 |
13 | \begin{document}
14 |
15 | This file should not be compiled on its own. It is merely a template to
16 | compile parts by themselves.
17 |
18 | \end{document}
19 |
20 |
--------------------------------------------------------------------------------
/include/open-logic-section.tex:
--------------------------------------------------------------------------------
1 | \documentclass[article]{memoir}
2 |
3 | \usepackage{subfiles}
4 |
5 | % Open Logic main path is 3 directories up for sections; they live in
6 | % content/part/chapter/*
7 | \newcommand*{\olpath}{../../..}
8 |
9 | \input{\olpath/sty/open-logic.sty}
10 | \input{\olpath/sty/open-logic-debug.sty}
11 |
12 | \def\thechapter{\theolchapter}
13 |
14 | \pagestyle{openlogic}
15 |
16 | \begin{document}
17 |
18 | This file should not be compiled on its own. It is merely a template to
19 | compile sections by themselves.
20 |
21 | \end{document}
22 |
23 |
--------------------------------------------------------------------------------
/misc/htmltoc:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | echo "$2"
3 | echo ""
4 | if grep -q 'olimport\[' $1/$2.tex ; then
5 | for f in `grep 'olimport' $1/$2.tex | grep -v '\.\.' | sed "s/^.*\olimport\[\([^]]*\)\]{\([^}]*\)}/\1\/\2/"` ; do
6 | echo "- "
7 | d="$(dirname $f)"
8 | ff="$(basename $f)"
9 | $0 $1/$d $ff
10 | echo "
"
11 | done
12 | fi
13 | if grep -q 'olimport{' $1/$2.tex ; then
14 | for f in `grep 'olimport' $1/$2.tex | grep -v '\.\.' | sed "s/^.*\olimport{\([^}]*\)}/\1/"` ; do
15 | echo "- $f
"
16 | done
17 | fi
18 | echo "
"
19 |
--------------------------------------------------------------------------------
/misc/makeolprevision:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | grep shash $1/.git/gitHeadInfo.gin |sed 's/[^{]*{\([^}]*\)},/\\setOLPrevision\{\1/' > olprevision.tex
4 | grep authsdate $1/.git/gitHeadInfo.gin |sed 's/[^{]*{\([^}]*\)},/(\1)\}/' >> olprevision.tex
5 |
--------------------------------------------------------------------------------
/open-logic-complete-config.sty:
--------------------------------------------------------------------------------
1 | % Biconditional, verum are defined symbols
2 |
3 | \tagtrue{defIff,defTrue}
4 | \tagfalse{prvIff,prvTrue}
5 |
6 | % I'll leave cases for conditional, universal quantifier, diamond as exercises
7 |
8 | \tagtrue{probAnd,probIf,probAll,probDiamond}
9 |
--------------------------------------------------------------------------------
/open-logic-complete.tex:
--------------------------------------------------------------------------------
1 | % open-logic-complete.tex
2 | % master file to produce a complete release version
3 | % without references, markup, etc.
4 |
5 | \documentclass[openany]{memoir}
6 |
7 | % we're compiling from main directory
8 | \newcommand{\olpath}{.}
9 |
10 | \usepackage{mathpazo}
11 | \usepackage{helvet}
12 | \usepackage{courier}
13 | \linespread{1.05} % Palatino looks better with this
14 |
15 | \usepackage{gitinfo2}
16 |
17 | \input{\olpath/sty/open-logic.sty}
18 | \input{\olpath/sty/open-logic-defer.sty}
19 |
20 | \includeenv{editorial}
21 |
22 | \problemsperchapter
23 |
24 | \let\cleardoublepage\clearpage
25 |
26 | \pagestyle{plain}
27 |
28 | \begin{document}
29 |
30 | \begin{titlingpage}
31 | \begin{raggedleft}
32 | \HUGE
33 | \selectfont\bfseries\sffamily
34 | THE OPEN LOGIC TEXT
35 | \vskip 3ex
36 | \normalfont\huge
37 | Complete Build
38 | \vskip 4ex
39 | \textbf{\href{http://openlogicproject.org/}{Open Logic Project}}
40 | \vskip 4ex
41 | \Large
42 | Revision\gitRel: \gitAbbrevHash{} (\gitBranch)\\
43 | \gitAuthorDate
44 |
45 | \end{raggedleft}
46 |
47 | \vfill
48 |
49 | \ollicense
50 |
51 | \end{titlingpage}
52 |
53 | \pagestyle{giheadings}
54 |
55 | \include{content/open-logic-about}
56 |
57 | \tableofcontents*
58 |
59 | \olimport[content]{content}
60 |
61 | \photocredits
62 |
63 | \bibliographystyle{\olpath/bib/natbib-oup}
64 | \bibliography{\olpath/bib/open-logic}
65 |
66 | \end{document}
67 |
68 |
--------------------------------------------------------------------------------
/open-logic-debug.tex:
--------------------------------------------------------------------------------
1 | % open-logic-debug.tex
2 | % master file to produce debug version
3 | % includes all references, markup, etc.
4 |
5 | \documentclass{memoir}
6 |
7 | % Lives in main directory
8 | \newcommand*{\olpath}{./}
9 |
10 | \usepackage{gitinfo2}
11 |
12 | \input{\olpath/sty/open-logic.sty}
13 | \input{\olpath/sty/open-logic-debug.sty}
14 |
15 | % all sections have filename & link to GitHub printed
16 |
17 | \setsechook{\noindent
18 | \hrulefill\par{\hfill
19 | \href{https://github.com/OpenLogicProject/OpenLogic/blob/master/\olfilebase\olfilename.tex}{\texttt{\olfilebase\olfilename.tex}}}\par}
20 |
21 | \renewcommand*{\beforepartskip}{}
22 | \renewcommand*{\afterpartskip}{}
23 | \renewcommand*{\clearforchapter}{}
24 | \nopartblankpage
25 | \let\cleardoublepage\clearpage
26 |
27 | \pagestyle{openlogic}
28 |
29 | \begin{document}
30 |
31 | \begin{titlingpage}
32 | \begin{raggedleft}
33 | \HUGE
34 | \selectfont\bfseries\sffamily
35 | THE OPEN LOGIC TEXT
36 | \vskip 3ex
37 | \normalfont\huge
38 | Debug Build
39 | \vskip 4ex
40 | \textbf{\href{http://openlogicproject.org/}{Open Logic Project}}
41 | \vskip 4ex
42 | \Large
43 | Revision\gitRel: \gitAbbrevHash{} (\gitBranch)\\
44 | \gitAuthorDate
45 |
46 | \end{raggedleft}
47 |
48 | \vfill
49 |
50 | \ollicense
51 |
52 | \end{titlingpage}
53 |
54 | % make links red green
55 | \hypersetup{urlcolor=[rgb]{0.5,0,0}}
56 |
57 | \pagestyle{giheadings}
58 |
59 | \tableofcontents*
60 |
61 | % include complete text
62 | \olimport[content]{content}
63 |
64 | \end{document}
65 |
66 |
--------------------------------------------------------------------------------
/sty/bpextra.sty:
--------------------------------------------------------------------------------
1 | % Wrapper for backwards compatibility
2 |
3 | \RequirePackage{bussproofs-extra}
4 | \PackageWarning{bussproofs-extra}{You've loaded bussproofs with
5 | bpextra, but you should use bussproofs-extra instead}
6 |
--------------------------------------------------------------------------------
/sty/open-logic-debug.sty:
--------------------------------------------------------------------------------
1 | % OpenLogic Project
2 | % debug commands
3 |
4 | \RequirePackage{marginnote}
5 | \RequirePackage{xparse}
6 | \RequirePackage{xcolor}
7 | \RequirePackage{gitinfo2}
8 |
9 | % oldebugnote puts a note in the margin
10 |
11 | \DeclareDocumentCommand \oldebugnote { s o m } {
12 | \IfBooleanTF{#1}{\reversemarginpar}{}%
13 | \marginnote{\tiny
14 | \IfNoValueTF{#2}{}{\color{#2}}%
15 | #3}%
16 | \IfBooleanTF{#1}{\normalmarginpar}{}%
17 | }
18 |
19 | % patch various commands and envs to produce margin notes
20 |
21 | \apptocmd{\ollabel}{%
22 | \oldebugnote*[blue]{\theolpart:\theolchapter:\theolsection:\\
23 | {#1}}}{\typeout{OK!}}{\typeout{FAIL!}}
24 |
25 | \AtBeginEnvironment{explain}{\oldebugnote[blue]{explanation}}
26 | \AtBeginEnvironment{digress}{\oldebugnote[blue]{digression}}
27 | \AtBeginEnvironment{intro}{\oldebugnote[blue]{intro}}
28 | \AtBeginEnvironment{pedantic}{\oldebugnote[blue]{pedantic}}
29 |
30 | % print tokenized text in dark green
31 | \def\tokencolor{\color[rgb]{0,.5,0}}
32 | \def\tokenformat#1{{\tokencolor #1}}
33 |
34 | % Print photo credits & bibliography at end of document
35 | \AtEndDocument{%
36 | \photocredits
37 | \bibliographystyle{\olpath/bib/natbib-oup}
38 | \bibliography{\olpath/bib/open-logic}}
39 |
40 | % put file info in footer (depends on memoir)
41 |
42 | \copypagestyle{openlogic}{plain}
43 | \makeevenfoot{openlogic}{\thepage}{}{\shortollicense}
44 | \makeoddfoot{openlogic}{\shortollicense}{}{\thepage}
45 |
46 | % adjust section number widths (depends on memoir)
47 |
48 | \setlength{\cftpartnumwidth}{2.2em}
49 | \setlength{\cftchapternumwidth}{2.2em}
50 | \setlength{\cftsectionnumwidth}{2.8em}
51 |
52 | % make sure editorial comments are included
53 |
54 | \includeenv{editorial}
55 |
--------------------------------------------------------------------------------
/sty/open-logic-formulas.sty:
--------------------------------------------------------------------------------
1 | % OpenLogic Project
2 | % formulas
3 |
4 | \NeedsTeXFormat{LaTeX2e}
5 |
6 | \ProvidesFile{open-logic-formulas}
7 |
8 |
9 | \RequirePackage{amsfonts}
10 | \RequirePackage{amssymb}
11 | \RequirePackage[OMLmathsfit]{isomath}
12 |
13 | % provide \mathexclaim
14 |
15 | \DeclareMathSymbol{\mathexclaim}{\mathord}{operators}{`!}%
16 |
17 | % make ! active in math mode for formula meta variables
18 |
19 | {\catcode`!=\active
20 | \gdef!{\formula}
21 | \let\formula\relax % default: do nothing
22 | }
23 | \mathcode`\!="8000 % set ! active in math mode
24 |
25 | % latinformulas -- switch to latin formulas A, B, C, etc.
26 |
27 | \def\ollatinformulas{\let\formula\relax}
28 |
29 | % greekformulas -- formula metavariables are phi, psi, etc.
30 | % Provides !A, !B etc in math mode to produce \phi, \psi etc.
31 |
32 | \def\olgreekformulas
33 | {\gdef\formula{\lookup{A/\varphi,B/\psi,C/\chi,D/\theta,E/\alpha,F/\beta,G/\gamma,H/\delta,K/\xi,L/\zeta,O/\omega,R/\rho,S/\sigma,T/\tau}}}
34 |
35 | \def\olalphagreekformulas
36 | {\gdef\formula{\lookup{A/\alpha,B/\beta,C/\gamma,D/\delta,E/\phi,F/\psi,G/\chi,H/\theta,K/\xi,L/\zeta,O/\omega,R/\rho,S/\sigma,T/\tau}}}
37 |
38 | % args -- format a list of arguments separated by commas without commas
39 |
40 | \newcommand*{\args}[1]{%
41 | \let\@argsep\@argsepinit
42 | \@for\@arg:=#1\do{%
43 | \@argsep\@arg}%
44 | }
45 |
46 | \def\@argsepinit{\let\@argsep\argsep}
47 |
48 | \newcommand{\argsep}{}
49 |
50 | % lookup#1#2 -- look up #2 in #1, a comma-separated list of pairs
51 |
52 | \def\@match#1/#2{\def\match@input{#1}\def\match@result{#2}}
53 | \newcommand*{\lookup}[2]{%
54 | \def\lookup@input{#2}
55 | \def\lookup@result{#2}%
56 | \def\do##1{\@match##1\if\lookup@input\match@input
57 | \let\lookup@result\match@result\fi}%
58 | \docsvlist{#1}%
59 | \lookup@result}
60 |
--------------------------------------------------------------------------------