Orthologic #
[UPSTREAM] candidate.
This file defines orthologic, the logic of ortholattices, and proves Goldblatt's least orthologic
sound and complete for them. An orthologic is a consequence relation on formulas built from ⊤,
¬ and ∧ satisfying Goldblatt's ten rules, and its Lindenbaum–Tarski algebra, formulas modulo
interderivability, is an ortholattice. Evaluating in that algebra under the canonical valuation
shows that a consequence holding in every ortholattice is derivable, following Holliday and
Mandelkern's presentation.
Main definitions #
Orthologic.IsOrthologic F: a consequence preorder onFsatisfying Goldblatt's rules.Orthologic.LindenbaumTarski F: formulas modulo interderivability, an ortholattice for an orthologic.Orthologic.Formula,Orthologic.Derivable: the language of orthologic and its least orthologic.Orthologic.Formula.eval: the value of a formula in an ortholattice.
Main results #
Orthologic.derivable_iff: the least orthologic is sound and complete for ortholattices.
Implementation notes #
The Lindenbaum–Tarski algebra is Antisymmetrization F (· ≤ ·) for the consequence preorder,
mathlib's free functor from preorders to partial orders, so the quotient and its order come for
free. It is built once for any orthologic, and the epistemic orthologic of
Logic/Orthologic/EpistemicOrthologic.lean reuses it.
References #
Syntax #
Formulas of orthologic over a variable type Var, with disjunction and falsum defined
([HM24] Definition 3.9).
- top {Var : Type u_1} : Formula Var
- var {Var : Type u_1} (p : Var) : Formula Var
- neg {Var : Type u_1} (φ : Formula Var) : Formula Var
- and {Var : Type u_1} (φ ψ : Formula Var) : Formula Var
Instances For
Falsum is ¬⊤.
Equations
Instances For
The proof system #
Consequence φ ⊢ ψ in the least orthologic is generated by Goldblatt's ten rules:
⊤-introduction, reflexivity, the two ∧-projections, double-negation introduction and
elimination, non-contradiction φ ∧ ¬φ ⊢ ψ, cut, ∧-introduction, and contraposition
([HM24] Definition 3.12).
- top_intro {Var : Type u_1} (φ : Formula Var) : Derivable φ Formula.top
- refl {Var : Type u_1} (φ : Formula Var) : Derivable φ φ
- and_le_left {Var : Type u_1} (φ ψ : Formula Var) : Derivable (φ.and ψ) φ
- and_le_right {Var : Type u_1} (φ ψ : Formula Var) : Derivable (φ.and ψ) ψ
- le_negNeg {Var : Type u_1} (φ : Formula Var) : Derivable φ φ.neg.neg
- negNeg_le {Var : Type u_1} (φ : Formula Var) : Derivable φ.neg.neg φ
- contradiction {Var : Type u_1} (φ ψ : Formula Var) : Derivable (φ.and φ.neg) ψ
- trans {Var : Type u_1} {φ ψ χ : Formula Var} : Derivable φ ψ → Derivable ψ χ → Derivable φ χ
- le_and {Var : Type u_1} {φ ψ χ : Formula Var} : Derivable φ ψ → Derivable φ χ → Derivable φ (ψ.and χ)
- neg_le_neg {Var : Type u_1} {φ ψ : Formula Var} : Derivable φ ψ → Derivable ψ.neg φ.neg
Instances For
Consequence φ ⊢ ψ in the least orthologic is generated by Goldblatt's ten rules:
⊤-introduction, reflexivity, the two ∧-projections, double-negation introduction and
elimination, non-contradiction φ ∧ ¬φ ⊢ ψ, cut, ∧-introduction, and contraposition
([HM24] Definition 3.12).
Equations
- Orthologic.«term_⊢_» = Lean.ParserDescr.trailingNode `Orthologic.«term_⊢_» 50 51 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⊢ ") (Lean.ParserDescr.cat `term 51))
Instances For
Orthologics and their Lindenbaum–Tarski algebras #
A consequence preorder on formulas with ⊤, ⊓ and ᶜ is an orthologic when it satisfies
Goldblatt's rules, reflexivity and cut being the preorder axioms. On Formula Var this is the
notion of an orthologic of [HM24] Definition 3.12.
- le_top (φ : F) : φ ≤ ⊤
- inf_le_left (φ ψ : F) : φ ⊓ ψ ≤ φ
- inf_le_right (φ ψ : F) : φ ⊓ ψ ≤ ψ
- inf_compl_le (φ ψ : F) : φ ⊓ φᶜ ≤ ψ
- le_inf {φ ψ χ : F} : φ ≤ ψ → φ ≤ χ → φ ≤ ψ ⊓ χ
Instances
The Lindenbaum–Tarski algebra of a consequence preorder is the type of formulas modulo
interderivability, the Antisymmetrization of the preorder. It is an ortholattice when the
preorder is an orthologic.
Equations
- Orthologic.LindenbaumTarski F = Antisymmetrization F fun (x1 x2 : F) => x1 ≤ x2
Instances For
Disjunction is De Morgan's φ ∨ ψ := ¬(¬φ ∧ ¬ψ).
Equations
- Orthologic.IsOrthologic.sup φ ψ = (φᶜ ⊓ ψᶜ)ᶜ
Instances For
⟦φ⟧ ≤ ⟦ψ⟧ in the Lindenbaum–Tarski algebra iff φ ≤ ψ.
Equations
- Orthologic.LindenbaumTarski.instMin = { min := Quotient.map₂ (fun (x1 x2 : F) => x1 ⊓ x2) ⋯ }
Equations
- Orthologic.LindenbaumTarski.instMax = { max := Quotient.map₂ Orthologic.IsOrthologic.sup ⋯ }
Equations
- Orthologic.LindenbaumTarski.instCompl = { compl := Quotient.map (fun (x : F) => xᶜ) ⋯ }
Equations
- Orthologic.LindenbaumTarski.instTop = { top := toAntisymmetrization (fun (x1 x2 : F) => x1 ≤ x2) ⊤ }
Equations
- Orthologic.LindenbaumTarski.instBot = { bot := toAntisymmetrization (fun (x1 x2 : F) => x1 ≤ x2) ⊤ᶜ }
Equations
- One or more equations did not get rendered due to their size.
Equations
- Orthologic.LindenbaumTarski.instBoundedOrder = { toTop := Orthologic.LindenbaumTarski.instTop, le_top := ⋯, toBot := Orthologic.LindenbaumTarski.instBot, bot_le := ⋯ }
Equations
- Orthologic.LindenbaumTarski.instInvolutiveCompl = { toCompl := Orthologic.LindenbaumTarski.instCompl, compl_compl := ⋯, compl_le_compl := ⋯ }
The Lindenbaum–Tarski algebra of an orthologic is an ortholattice.
The least orthologic #
The connectives share the symbols of the lattice operations, as in [HM24].
Equations
- Orthologic.Formula.instTop = { top := Orthologic.Formula.top }
Equations
- Orthologic.Formula.instMin = { min := Orthologic.Formula.and }
Equations
- Orthologic.Formula.instCompl = { compl := Orthologic.Formula.neg }
Consequence in the least orthologic is a preorder, reflexivity and cut.
Equations
- Orthologic.Formula.instPreorder = { le := Orthologic.Derivable, le_refl := ⋯, le_trans := ⋯, lt_iff_le_not_ge := ⋯ }
Evaluation, soundness and completeness #
The value of a formula in an ortholattice under a valuation v : Var → L
([HM24] Definition 3.10).
Equations
- Orthologic.Formula.eval v Orthologic.Formula.top = ⊤
- Orthologic.Formula.eval v (Orthologic.Formula.var p) = v p
- Orthologic.Formula.eval v φ.neg = (Orthologic.Formula.eval v φ)ᶜ
- Orthologic.Formula.eval v (φ.and ψ) = Orthologic.Formula.eval v φ ⊓ Orthologic.Formula.eval v ψ
Instances For
Derivable consequences hold in every ortholattice under every valuation ([HM24] Theorem 3.13, soundness).
The canonical valuation into the Lindenbaum–Tarski algebra sends p to its class.
Equations
- Orthologic.Formula.canonicalVal p = toAntisymmetrization (fun (x1 x2 : Orthologic.Formula Var) => x1 ≤ x2) (Orthologic.Formula.var p)
Instances For
Under the canonical valuation every formula evaluates to its own class.
A consequence holding in every ortholattice under every valuation is derivable, by evaluating
in the Lindenbaum–Tarski algebra under the canonical valuation
([HM24] Theorem 3.13, completeness). Ortholattices in Var's universe
suffice.
Derivability is consequence in every ortholattice ([HM24] Theorem 3.13).