Documentation

Foundation.Logic.Calculus

Sequent calculus and variants #

This file defines a characterization of Tait style calculus and Gentzen style calculus.

Main Definitions #

Structural rules #

class FFL.Structural {F : Type u_1} (𝔇 : Multiset F → Type u_2) :
Type (max u_1 u_2)
Instances

    One-sided $\mathbf{LK}$ #

    Instances
      Instances
        def FFL.Structural.cast {F : Type u_1} {𝔇 : Multiset F → Type u_2} {Γ Δ : Multiset F} (d : 𝔇 Γ) (h : Γ = Δ := by abel) :
        𝔇 Δ
        Equations
        Instances For
          def FFL.Structural.weakenMany {F : Type u_1} {𝔇 : Multiset F → Type u_2} [Structural 𝔇] {Γ Δ : Multiset F} (t : Δ.Traversal) (d : 𝔇 Γ) :
          𝔇 (Γ + Δ)

          Repeated weakening along a traversal (a routine structural derivation).

          Equations
          Instances For
            def FFL.Structural.contractMany {F : Type u_1} {𝔇 : Multiset F → Type u_2} [Structural 𝔇] {Γ Δ : Multiset F} (t : Γ.Traversal) (d : 𝔇 (Δ + Γ + Γ)) :
            𝔇 (Δ + Γ)

            Repeated contraction along a traversal (a routine structural derivation).

            Equations
            Instances For
              def FFL.Structural.absorb {F : Type u_1} {𝔇 : Multiset F → Type u_2} {Γ : Multiset F} {φ : F} [Structural 𝔇] [DecidableEq F] (d : 𝔇 (Γ + ⦃φ⦄)) (h : φ ∈ Γ) :
              𝔇 Γ

              Absorbs a formula already in the context (a routine structural derivation).

              Equations
              Instances For
                def FFL.Structural.ofSubset {F : Type u_1} {𝔇 : Multiset F → Type u_2} {Γ Δ : Multiset F} [Structural 𝔇] [DecidableEq F] (tΓ : Γ.Traversal) (tΔ : Δ.Traversal) (d : 𝔇 Γ) (h : Γ ⊆ Δ) :
                𝔇 Δ

                Expands multiset inclusion into local structural rules using traversals.

                Equations
                Instances For
                  def FFL.Structural.ofSubset.go {F : Type u_1} {𝔇 : Multiset F → Type u_2} {Δ : Multiset F} [Structural 𝔇] [DecidableEq F] {Γ : Multiset F} (t : Γ.Traversal) (h : Γ ⊆ Δ) (d : 𝔇 (Δ + Γ)) :
                  𝔇 Δ
                  Equations
                  Instances For
                    def FFL.OneSidedLK.cast {F : Type u_1} {𝔇 : Multiset F → Type u_2} {Γ Δ : Multiset F} (d : 𝔇 Γ) (h : Γ = Δ := by abel) :
                    𝔇 Δ

                    Alias of FFL.Structural.cast.

                    Equations
                    Instances For
                      def FFL.OneSidedLK.weakenMany {F : Type u_1} {𝔇 : Multiset F → Type u_2} [Structural 𝔇] {Γ Δ : Multiset F} (t : Δ.Traversal) (d : 𝔇 Γ) :
                      𝔇 (Γ + Δ)

                      Alias of FFL.Structural.weakenMany.


                      Repeated weakening along a traversal (a routine structural derivation).

                      Equations
                      Instances For
                        def FFL.OneSidedLK.ofSubset {F : Type u_1} {𝔇 : Multiset F → Type u_2} {Γ Δ : Multiset F} [Structural 𝔇] [DecidableEq F] (tΓ : Γ.Traversal) (tΔ : Δ.Traversal) (d : 𝔇 Γ) (h : Γ ⊆ Δ) :
                        𝔇 Δ

                        Alias of FFL.Structural.ofSubset.


                        Expands multiset inclusion into local structural rules using traversals.

                        Equations
                        Instances For
                          def FFL.OneSidedLK.contra {F : Type u_1} [LogicalConnective F] [LogicalNeutral F] [TildeInvolutive F] [LogicalConnective.DeMorgan F] [LogicalNeutral.DeMorgan F] {𝔇 : Multiset F → Type u_2} {Γ Δ : Multiset F} [OneSidedLK 𝔇] [DecidableEq F] (tΓ : Γ.Traversal) (tΔ : Δ.Traversal) (d : 𝔇 Γ) (h : Γ ⊆ Δ := by simp) :
                          𝔇 Δ
                          Equations
                          Instances For
                            def FFL.OneSidedLK.close {F : Type u_1} [LogicalConnective F] [LogicalNeutral F] [TildeInvolutive F] [LogicalConnective.DeMorgan F] [LogicalNeutral.DeMorgan F] {𝔇 : Multiset F → Type u_2} {Γ : Multiset F} [OneSidedLK 𝔇] [DecidableEq F] (φ : F) (t : Γ.Traversal) (hp : φ ∈ Γ := by simp) (hn : ∼φ ∈ Γ := by simp) :
                            𝔇 Γ
                            Equations
                            Instances For
                              def FFL.OneSidedLK.tensor {F : Type u_1} [LogicalConnective F] [LogicalNeutral F] [TildeInvolutive F] [LogicalConnective.DeMorgan F] [LogicalNeutral.DeMorgan F] {𝔇 : Multiset F → Type u_2} {Γ Δ : Multiset F} [OneSidedLK 𝔇] {φ ψ : F} (tΓ : Γ.Traversal) (tΔ : Δ.Traversal) (dφ : 𝔇 (Γ + ⦃φ⦄)) (dψ : 𝔇 (Δ + ⦃ψ⦄)) :
                              𝔇 (Γ + Δ + ⦃φ ⋏ ψ⦄)
                              Equations
                              Instances For
                                def FFL.OneSidedLK.cut {F : Type u_1} {inst✝ : LogicalConnective F} {inst✝¹ : LogicalNeutral F} {inst✝² : TildeInvolutive F} {inst✝³ : LogicalConnective.DeMorgan F} {inst✝⁴ : LogicalNeutral.DeMorgan F} {𝔇 : Multiset F → Type u_2} [self : Cut 𝔇] {Γ : Multiset F} {φ : F} {Δ : Multiset F} :
                                𝔇 (Γ + ⦃φ⦄) → 𝔇 (Δ + ⦃∼φ⦄) → 𝔇 (Γ + Δ)

                                Alias of FFL.OneSidedLK.Cut.cut.

                                Equations
                                Instances For
                                  def FFL.OneSidedLK.eCut {F : Type u_1} [LogicalConnective F] [LogicalNeutral F] [TildeInvolutive F] [LogicalConnective.DeMorgan F] [LogicalNeutral.DeMorgan F] {𝔇 : Multiset F → Type u_2} {Γ : Multiset F} {φ : F} {Δ : Multiset F} {ψ : F} [Cut 𝔇] (d₁ : 𝔇 (Γ + ⦃φ⦄)) (d₂ : 𝔇 (Δ + ⦃ψ⦄)) (e : ∼φ = ψ := by simp) :
                                  𝔇 (Γ + Δ)
                                  Equations
                                  Instances For
                                    def FFL.OneSidedLK.removeBot {F : Type u_1} [LogicalConnective F] [LogicalNeutral F] [TildeInvolutive F] [LogicalConnective.DeMorgan F] [LogicalNeutral.DeMorgan F] {𝔇 : Multiset F → Type u_2} {Γ : Multiset F} [Cut 𝔇] (d : 𝔇 (Γ + ⦃⊥⦄)) :
                                    𝔇 Γ

                                    Eliminating falsum is the routine cut against the verum rule.

                                    Equations
                                    Instances For
                                      def FFL.OneSidedLK.modusPonens {F : Type u_1} [LogicalConnective F] [LogicalNeutral F] [TildeInvolutive F] [LogicalConnective.DeMorgan F] [LogicalNeutral.DeMorgan F] {𝔇 : Multiset F → Type u_2} {Γ : Multiset F} {φ ψ : F} {Δ : Multiset F} [Cut 𝔇] (di : 𝔇 (Γ + ⦃φ 🡒 ψ⦄)) (dp : 𝔇 (Δ + ⦃φ⦄)) :
                                      𝔇 (Γ + Δ + ⦃ψ⦄)

                                      Modus ponens with independent side contexts. This is the routine cut derivation.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        def FFL.OneSidedLK.conj₂ {F : Type u_1} [LogicalConnective F] [LogicalNeutral F] [TildeInvolutive F] [LogicalConnective.DeMorgan F] [LogicalNeutral.DeMorgan F] {𝔇 : Multiset F → Type u_2} [OneSidedLK 𝔇] {Γ : List F} {Δ : Multiset F} (tΔ : Δ.Traversal) (d : (φ : F) → φ ∈ Γ → 𝔇 (Δ + ⦃φ⦄)) :
                                        𝔇 (Δ + ⦃⋀Γ⦄)
                                        Equations
                                        Instances For

                                          The rule expansion of the classical negation equivalence axiom. This is a routine syntactic derivation.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For

                                            The rule expansion of the S axiom. This is a routine syntactic derivation.

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For

                                              The rule expansion of the first conjunction axiom. This is a routine syntactic derivation.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For

                                                The rule expansion of the second conjunction axiom. This is a routine syntactic derivation.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For

                                                  The rule expansion of conjunction introduction. This is a routine syntactic derivation.

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For

                                                    The rule expansion of the first disjunction axiom. This is a routine syntactic derivation.

                                                    Equations
                                                    Instances For

                                                      The rule expansion of the second disjunction axiom. This is a routine syntactic derivation.

                                                      Equations
                                                      Instances For

                                                        The rule expansion of disjunction elimination. This is a routine syntactic derivation.

                                                        Equations
                                                        • One or more equations did not get rendered due to their size.
                                                        Instances For

                                                          The rule expansion of double-negation elimination. This is a routine syntactic derivation.

                                                          Equations
                                                          Instances For
                                                            @[reducible, inline]
                                                            abbrev FFL.OneSidedLK.AxiomDerivation.cl {F : Type u_1} [LogicalConnective F] [LogicalNeutral F] [TildeInvolutive F] [LogicalConnective.DeMorgan F] [LogicalNeutral.DeMorgan F] {𝔇 : Multiset F → Type u_2} {P : Type u_3} [Entailment P F] (𝓟 : P) [Entailment.ModusPonens 𝓟] [OneSidedLK 𝔇] (lift : {φ : F} → 𝔇 ⦃φ⦄ → 𝓟 ⊢! φ) :

                                                            A one-sided classical calculus induces classical entailment whenever singleton derivations can be embedded as proofs. This is the routine translation of the Hilbert axioms into one-sided sequent rules.

                                                            Equations
                                                            • One or more equations did not get rendered due to their size.
                                                            Instances For
                                                              class FFL.OneSidedLK.PrincipalEntailment {F : Type u_1} (𝔇 : outParam (Multiset F → Type u_3)) {P : Type u_4} [Entailment P F] (𝓟 : P) :
                                                              Type (max (max u_1 u_3) u_5)

                                                              An entailment relation which is determined solely by derivability.

                                                              Instances
                                                                theorem FFL.OneSidedLK.PrincipalEntailment.provable_iff {F : Type u_1} {𝔇 : Multiset F → Type u_2} {P : Type u_3} [Entailment P F] {𝓟 : P} [PrincipalEntailment 𝔇 𝓟] {φ : F} :
                                                                𝓟 ⊢ φ ↔ Nonempty (𝔇 ⦃φ⦄)
                                                                @[instance_reducible]
                                                                Equations
                                                                • One or more equations did not get rendered due to their size.
                                                                @[reducible, inline]
                                                                abbrev FFL.OneSidedLK.Pullback {F : Type u_1} [LogicalConnective F] [LogicalNeutral F] (𝔇 : Multiset F → Type u_3) {G : Type u_4} [LogicalConnective G] [LogicalNeutral G] (f : G →ˡᶜ F) :
                                                                Multiset G → Type u_3
                                                                Equations
                                                                Instances For
                                                                  def FFL.OneSidedLK.Pullback.cast {F : Type u_1} [LogicalConnective F] [LogicalNeutral F] {𝔇 : Multiset F → Type u_2} {G : Type u_3} [LogicalConnective G] [LogicalNeutral G] {f : G →ˡᶜ F} {Δ : Multiset F} {Γ : Multiset G} (d : 𝔇 Δ) (h : Δ = Multiset.map (⇑f) Γ := by simp) :
                                                                  Pullback 𝔇 f Γ
                                                                  Equations
                                                                  Instances For
                                                                    def FFL.OneSidedLK.Pullback.uncast {F : Type u_1} [LogicalConnective F] [LogicalNeutral F] {𝔇 : Multiset F → Type u_2} {G : Type u_3} [LogicalConnective G] [LogicalNeutral G] {f : G →ˡᶜ F} {Γ : Multiset G} {Δ : Multiset F} (d : Pullback 𝔇 f Γ) (h : Δ = Multiset.map (⇑f) Γ := by simp) :
                                                                    𝔇 Δ
                                                                    Equations
                                                                    Instances For
                                                                      @[instance_reducible]
                                                                      Equations
                                                                      • One or more equations did not get rendered due to their size.
                                                                      @[instance_reducible]
                                                                      Equations
                                                                      • One or more equations did not get rendered due to their size.
                                                                      @[simp]
                                                                      theorem FFL.OneSidedLK.Pullback.nonempty_iff {F : Type u_1} [LogicalConnective F] [LogicalNeutral F] {𝔇 : Multiset F → Type u_2} {G : Type u_3} [LogicalConnective G] [LogicalNeutral G] {f : G →ˡᶜ F} {Γ : Multiset G} :
                                                                      Nonempty (Pullback 𝔇 f Γ) ↔ Nonempty (𝔇 (Multiset.map (⇑f) Γ))
                                                                      @[simp]
                                                                      theorem FFL.OneSidedLK.Pullback.isEmpty_iff {F : Type u_1} [LogicalConnective F] [LogicalNeutral F] {𝔇 : Multiset F → Type u_2} {G : Type u_3} [LogicalConnective G] [LogicalNeutral G] {f : G →ˡᶜ F} {Γ : Multiset G} :
                                                                      IsEmpty (Pullback 𝔇 f Γ) ↔ IsEmpty (𝔇 (Multiset.map (⇑f) Γ))