One-sided sequent calculus for first-order classical logic #
@[reducible, inline]
Equations
Instances For
Equations
Instances For
theorem
FFL.FirstOrder.LK.Sequent.not_fvar?_newVar
{L : Language}
{φ : Proposition L}
{Γ : Sequent L}
(h : φ ∈ Γ)
:
Equations
Instances For
@[simp]
Derivation for $\mathbf{LK}$ #
Derivation for $\mathbf{LK}$
- identity {L : Language} {k : ℕ} (r : L.Rel k) (v : Fin k → Semiterm L ℕ 0) : ⊢ᴸᴷ¹ ⦃Semiformula.rel r v⦄ + ⦃Semiformula.nrel r v⦄
- cut {L : Language} {Γ : Sequent L} {φ : Proposition L} {Δ : Sequent L} : ⊢ᴸᴷ¹ Γ + ⦃φ⦄ → ⊢ᴸᴷ¹ Δ + ⦃∼φ⦄ → ⊢ᴸᴷ¹ Γ + Δ
- contraction {L : Language} {Γ : Multiset (Proposition L)} {φ : Proposition L} : ⊢ᴸᴷ¹ Γ + (⦃φ⦄ + ⦃φ⦄) → ⊢ᴸᴷ¹ Γ + ⦃φ⦄
- weakening {L : Language} {Γ : Sequent L} {φ : Proposition L} : ⊢ᴸᴷ¹ Γ → ⊢ᴸᴷ¹ Γ + ⦃φ⦄
- verum {L : Language} : ⊢ᴸᴷ¹ ⦃⊤⦄
- or {L : Language} {Γ : Multiset (Proposition L)} {φ ψ : Proposition L} : ⊢ᴸᴷ¹ Γ + (⦃φ⦄ + ⦃ψ⦄) → ⊢ᴸᴷ¹ Γ + ⦃φ ⋎ ψ⦄
- and {L : Language} {Γ : Multiset (Proposition L)} {φ ψ : Proposition L} : ⊢ᴸᴷ¹ Γ + ⦃φ⦄ → ⊢ᴸᴷ¹ Γ + ⦃ψ⦄ → ⊢ᴸᴷ¹ Γ + ⦃φ ⋏ ψ⦄
- all {L : Language} {Γ : Multiset (Semiproposition L 0)} {φ : Semiproposition L (0 + 1)} : ⊢ᴸᴷ¹ Rewriting.shifts Γ + ⦃Semiformula.free φ⦄ → ⊢ᴸᴷ¹ Γ + ⦃∀¹ φ⦄
- exs {L : Language} {Γ : Multiset (Semiproposition L 0)} {φ : Semiproposition L (Nat.succ 0)} {t : Semiterm L ℕ 0} : ⊢ᴸᴷ¹ Γ + ⦃φ/[t]⦄ → ⊢ᴸᴷ¹ Γ + ⦃∃¹ φ⦄
Instances For
Equations
- FFL.FirstOrder.«term⊢ᴸᴷ¹_» = Lean.ParserDescr.node `FFL.FirstOrder.«term⊢ᴸᴷ¹_» 45 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "⊢ᴸᴷ¹ ") (Lean.ParserDescr.cat `term 45))
Instances For
Equations
- (FFL.FirstOrder.LK.Derivation.identity r v).height = 0
- (dp.cut dn).height = max dp.height dn.height + 1
- d.contraction.height = d.height + 1
- d.weakening.height = d.height + 1
- FFL.FirstOrder.LK.Derivation.verum.height = 0
- d.or.height = d.height + 1
- (dp.and dq).height = max dp.height dq.height + 1
- d.all.height = d.height + 1
- d.exs.height = d.height + 1
Instances For
@[simp]
theorem
FFL.FirstOrder.LK.Derivation.height_all
{L : Language}
{Γ : Sequent L}
{φ : Semiproposition L 1}
(d : ⊢ᴸᴷ¹ Rewriting.shifts Γ + ⦃Semiformula.free φ⦄)
:
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
def
FFL.FirstOrder.LK.Derivation.traversal
{L : Language}
[L.DecidableEq]
{Γ : Sequent L}
:
⊢ᴸᴷ¹ Γ → Multiset.Traversal Γ
Enumerates the end sequent by recursion on the local inference rules. This is a routine syntactic construction.
Equations
- One or more equations did not get rendered due to their size.
- (FFL.FirstOrder.LK.Derivation.identity r v).traversal = Multiset.Traversal.succ (FFL.FirstOrder.Semiformula.nrel r v) (Multiset.Traversal.atom (FFL.FirstOrder.Semiformula.rel r v))
- (dp.cut dn).traversal = dp.traversal.remove.add dn.traversal.remove
- d.contraction.traversal = (Multiset.Traversal.cast ⋯ d.traversal).remove
- d.weakening.traversal = Multiset.Traversal.succ φ d.traversal
- FFL.FirstOrder.LK.Derivation.verum.traversal = Multiset.Traversal.atom ⊤
- d.or.traversal = Multiset.Traversal.succ (φ ⋎ ψ) (Multiset.Traversal.cast ⋯ d.traversal).remove.remove
- (dp.and dq).traversal = Multiset.Traversal.succ (φ ⋏ ψ) dp.traversal.remove
- d.exs.traversal = Multiset.Traversal.succ (∃¹ φ) d.traversal.remove
Instances For
def
FFL.FirstOrder.LK.Derivation.contra
{L : Language}
{Γ Δ : Sequent L}
[L.DecidableEq]
(d : ⊢ᴸᴷ¹ Δ)
(t : Multiset.Traversal Γ)
(h : Δ ⊆ Γ := by simp)
:
⊢ᴸᴷ¹ Γ
Applies structural rules along supplied traversals (a routine derived rule).
Equations
- d.contra t h = FFL.Structural.ofSubset d.traversal t d h
Instances For
def
FFL.FirstOrder.LK.Derivation.tensor
{L : Language}
{Γ Δ : Sequent L}
{φ ψ : Proposition L}
(tΓ : Multiset.Traversal Γ)
(tΔ : Multiset.Traversal Δ)
(dφ : ⊢ᴸᴷ¹ Γ + ⦃φ⦄)
(dψ : ⊢ᴸᴷ¹ Δ + ⦃ψ⦄)
:
Equations
- FFL.FirstOrder.LK.Derivation.tensor tΓ tΔ dφ dψ = ((FFL.Structural.weakenMany tΔ dφ).cast ⋯).and ((FFL.Structural.weakenMany tΓ dψ).cast ⋯)
Instances For
@[irreducible]
Equations
- One or more equations did not get rendered due to their size.
- FFL.FirstOrder.LK.Derivation.eta (FFL.FirstOrder.Semiformula.rel R v) = FFL.FirstOrder.LK.Derivation.identity R v
- FFL.FirstOrder.LK.Derivation.eta (FFL.FirstOrder.Semiformula.nrel R v) = (FFL.FirstOrder.LK.Derivation.identity R v).cast ⋯
- FFL.FirstOrder.LK.Derivation.eta FFL.FirstOrder.Semiformula.verum = FFL.FirstOrder.LK.Derivation.verum.weakening
- FFL.FirstOrder.LK.Derivation.eta FFL.FirstOrder.Semiformula.falsum = FFL.FirstOrder.LK.Derivation.verum.weakening.cast ⋯
- FFL.FirstOrder.LK.Derivation.eta (FFL.FirstOrder.Semiformula.all φ) = (((FFL.FirstOrder.LK.Derivation.eta (FFL.FirstOrder.Semiformula.free φ)).cast ⋯).exs.cast ⋯).all.cast ⋯
- FFL.FirstOrder.LK.Derivation.eta (FFL.FirstOrder.Semiformula.exs φ) = (((FFL.FirstOrder.LK.Derivation.eta (FFL.FirstOrder.Semiformula.free φ)).cast ⋯).exs.cast ⋯).all.cast ⋯
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.
def
FFL.FirstOrder.LK.Derivation.rewrite
{L : Language}
{Γ : Sequent L}
(f : ℕ → SyntacticTerm L)
:
⊢ᴸᴷ¹ Γ → ⊢ᴸᴷ¹ Multiset.map (fun (x : Semiproposition L 0) => (Rewriting.app (Rew.rewrite f)) x) Γ
Equations
- One or more equations did not get rendered due to their size.
- FFL.FirstOrder.LK.Derivation.rewrite f (FFL.FirstOrder.LK.Derivation.identity r v) = FFL.FirstOrder.LK.Derivation.identity r (⇑(FFL.FirstOrder.Rew.rewrite f) ∘ v)
- FFL.FirstOrder.LK.Derivation.rewrite f (dp.cut dn) = (((FFL.FirstOrder.LK.Derivation.rewrite f dp).cast ⋯).cut ((FFL.FirstOrder.LK.Derivation.rewrite f dn).cast ⋯)).cast ⋯
- FFL.FirstOrder.LK.Derivation.rewrite f d.contraction = ((FFL.FirstOrder.LK.Derivation.rewrite f d).cast ⋯).contraction.cast ⋯
- FFL.FirstOrder.LK.Derivation.rewrite f d.weakening = (FFL.FirstOrder.LK.Derivation.rewrite f d).weakening.cast ⋯
- FFL.FirstOrder.LK.Derivation.rewrite f FFL.FirstOrder.LK.Derivation.verum = FFL.FirstOrder.LK.Derivation.verum
- FFL.FirstOrder.LK.Derivation.rewrite f d.or = ((FFL.FirstOrder.LK.Derivation.rewrite f d).cast ⋯).or.cast ⋯
- FFL.FirstOrder.LK.Derivation.rewrite f (dp.and dq) = (((FFL.FirstOrder.LK.Derivation.rewrite f dp).cast ⋯).and ((FFL.FirstOrder.LK.Derivation.rewrite f dq).cast ⋯)).cast ⋯
- FFL.FirstOrder.LK.Derivation.rewrite f d.exs = ((FFL.FirstOrder.LK.Derivation.rewrite f d).cast ⋯).exs.cast ⋯
Instances For
def
FFL.FirstOrder.LK.Derivation.map
{L : Language}
{Δ : Sequent L}
(d : ⊢ᴸᴷ¹ Δ)
(f : ℕ → ℕ)
:
⊢ᴸᴷ¹ Multiset.map (fun (x : Semiproposition L 0) => (Rewriting.app (Rew.rewriteMap f)) x) Δ
Equations
- d.map f = FFL.FirstOrder.LK.Derivation.rewrite (fun (x : ℕ) => FFL.FirstOrder.Semiterm.fvar (f x)) d
Instances For
theorem
FFL.FirstOrder.LK.Derivation.shifts_image
{L₁ : Language}
{L₂ : Language}
(Φ : L₁.Hom L₂)
{Δ : Multiset (Proposition L₁)}
:
Rewriting.shifts (Multiset.map (⇑(Semiformula.lMap Φ)) Δ) = Multiset.map (⇑(Semiformula.lMap Φ)) (Rewriting.shifts Δ)
def
FFL.FirstOrder.LK.Derivation.lMap
{L₁ : Language}
{L₂ : Language}
(Φ : L₁.Hom L₂)
{Γ : Sequent L₁}
:
⊢ᴸᴷ¹ Γ → ⊢ᴸᴷ¹ Multiset.map (⇑(Semiformula.lMap Φ)) Γ
Equations
- FFL.FirstOrder.LK.Derivation.lMap Φ (FFL.FirstOrder.LK.Derivation.identity r v) = (FFL.FirstOrder.LK.Derivation.identity (Φ.rel r) fun (i : Fin k) => FFL.FirstOrder.Semiterm.lMap Φ (v i)).cast ⋯
- FFL.FirstOrder.LK.Derivation.lMap Φ (dp.cut dn) = (((FFL.FirstOrder.LK.Derivation.lMap Φ dp).cast ⋯).cut ((FFL.FirstOrder.LK.Derivation.lMap Φ dn).cast ⋯)).cast ⋯
- FFL.FirstOrder.LK.Derivation.lMap Φ d.contraction = ((FFL.FirstOrder.LK.Derivation.lMap Φ d).cast ⋯).contraction.cast ⋯
- FFL.FirstOrder.LK.Derivation.lMap Φ d.weakening = (FFL.FirstOrder.LK.Derivation.lMap Φ d).weakening.cast ⋯
- FFL.FirstOrder.LK.Derivation.lMap Φ FFL.FirstOrder.LK.Derivation.verum = ⋯.mpr FFL.FirstOrder.LK.Derivation.verum
- FFL.FirstOrder.LK.Derivation.lMap Φ d.or = ((FFL.FirstOrder.LK.Derivation.lMap Φ d).cast ⋯).or.cast ⋯
- FFL.FirstOrder.LK.Derivation.lMap Φ (dp.and dq) = (((FFL.FirstOrder.LK.Derivation.lMap Φ dp).cast ⋯).and ((FFL.FirstOrder.LK.Derivation.lMap Φ dq).cast ⋯)).cast ⋯
- FFL.FirstOrder.LK.Derivation.lMap Φ d.all = ((FFL.FirstOrder.LK.Derivation.lMap Φ d).cast ⋯).all.cast ⋯
- FFL.FirstOrder.LK.Derivation.lMap Φ d.exs = ((FFL.FirstOrder.LK.Derivation.lMap Φ d).cast ⋯).exs.cast ⋯
Instances For
def
FFL.FirstOrder.LK.Derivation.generalizeByNewVar
{L : Language}
{Δ : Sequent L}
{m : ℕ}
{φ : Semiproposition L 1}
(hp : ¬Semiformula.FVar? φ m)
(hΔ : ∀ ψ ∈ Δ, ¬Semiformula.FVar? ψ m)
(d : ⊢ᴸᴷ¹ Δ + ⦃φ/[Semiterm.fvar m]⦄)
:
Equations
Instances For
Classical proof system #
Equations
- FFL.FirstOrder.«term𝐋𝐊¹» = Lean.ParserDescr.node `FFL.FirstOrder.«term𝐋𝐊¹» 1024 (Lean.ParserDescr.symbol "𝐋𝐊¹")
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[instance_reducible]
instance
FFL.FirstOrder.instEntailmentLKProposition
{L : Language}
:
Entailment (LK L) (Proposition L)
Equations
- FFL.FirstOrder.instEntailmentLKProposition = { Prf := fun (x : FFL.FirstOrder.LK L) => FFL.FirstOrder.LK.Proof }
@[instance_reducible]
instance
FFL.FirstOrder.LK.Proof.instPrincipalEntailmentPropositionDerivationSymbol
{L : Language}
:
Equations
- FFL.FirstOrder.LK.Proof.instPrincipalEntailmentPropositionDerivationSymbol = { equiv := fun {φ : FFL.FirstOrder.Proposition L} => Equiv.refl (𝐋𝐊¹ ⊢! φ) }
@[instance_reducible]
theorem
FFL.FirstOrder.LK.Proof.allClosure_fixitr
{L : Language}
{φ : Proposition L}
(dp : 𝐋𝐊¹ ⊢ φ)
(m : ℕ)
:
theorem
FFL.FirstOrder.LK.Proof.lMap
{L₁ : Language}
{L₂ : Language}
(Φ : L₁.Hom L₂)
{φ : Proposition L₁}
:
𝐋𝐊¹ ⊢ φ → 𝐋𝐊¹ ⊢ (Semiformula.lMap Φ) φ
- derivation : OneSidedLK.Pullback LK.Derivation Rewriting.emb (⦃σ⦄ + ∼self.axioms)
Instances For
@[instance_reducible]
instance
FFL.FirstOrder.Theory.Proof.instEntailmentSentence
{L : Language}
:
Entailment (Theory L) (Sentence L)
Equations
def
FFL.FirstOrder.Theory.Proof.ofDerivation
{L : Language}
{T : Theory L}
{φ : Sentence L}
(d : OneSidedLK.Pullback LK.Derivation Rewriting.emb ⦃φ⦄)
:
A singleton derivation gives a theory proof without using any axioms.
Equations
- FFL.FirstOrder.Theory.Proof.ofDerivation d = { axioms := 0, axioms_mem := ⋯, derivation := FFL.OneSidedLK.cast d ⋯ }
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.
@[instance_reducible]
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
noncomputable def
FFL.FirstOrder.Theory.Proof.cut.go
{L : Language}
{T U : Theory L}
(h : T ⊢!* U)
(l : List (Sentence L))
(hl : ∀ ψ ∈ l, ψ ∈ U)
{φ : Sentence L}
(d : OneSidedLK.Pullback LK.Derivation Rewriting.emb (⦃φ⦄ + ∼↑l))
:
Equations
- FFL.FirstOrder.Theory.Proof.cut.go h [] hl_2 d_2 = FFL.FirstOrder.Theory.Proof.ofDerivation (FFL.OneSidedLK.cast d_2 ⋯)
- FFL.FirstOrder.Theory.Proof.cut.go h (ψ :: l_2) hl_2 d_2 = FFL.FirstOrder.Theory.Proof.cut.go h l_2 ⋯ (FFL.OneSidedLK.cast (FFL.OneSidedLK.or (FFL.OneSidedLK.cast d_2 ⋯)) ⋯)⨀!h ⋯
Instances For
@[instance_reducible]
noncomputable instance
FFL.FirstOrder.Theory.Proof.instStrongCutSentence
{L : Language}
:
Entailment.StrongCut (Theory L) (Theory L)
Equations
- FFL.FirstOrder.Theory.Proof.instStrongCutSentence = { cut := fun {𝓢 𝓣 : FFL.FirstOrder.Theory L} {φ : FFL.FirstOrder.Sentence L} => FFL.FirstOrder.Theory.Proof.cut }
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
theorem
FFL.FirstOrder.Theory.Proof.inconsistent_iff
{L : Language}
{T : Theory L}
:
Entailment.Inconsistent T ↔ ∃ (Γ : Multiset (Sentence L)), (∀ ψ ∈ Γ, ψ ∈ T) ∧ Nonempty (⊢ᴸᴷ¹ ∼LK.Sequent.embed Γ)
@[simp]
theorem
FFL.FirstOrder.Theory.Proof.of_LK_provable
{L : Language}
{T : Theory L}
{φ : Sentence L}
:
𝐋𝐊¹ ⊢ Rewriting.emb φ → T ⊢ φ
theorem
FFL.FirstOrder.Theory.Proof.specialize
{L : Language}
{T : Theory L}
(φ : Semisentence L 1)
(t : ClosedTerm L)
:
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.