Kripke.Completeness


namespace Kripke


open Classical

open Set

open Syntax


namespace Canonical


abbrev Theory := Set Tm


def ProvableFrom (T : Theory) (φ : Tm) : Prop :=
  ∃ Γ : Ctxt, (∀ ψΓ, ψT) ∧ Pf Γ φ


def Closed (T : Theory) : Prop :=
  ∀ ⦃φ : Tm⦄, ProvableFrom T φφT


def Consistent (T : Theory) : Prop :=
  Tm.ffT


def Prime (T : Theory) : Prop :=
  ∀ ⦃φ ψ : Tm⦄, (φψ) ∈ TφTψT


def closure (T : Theory) : Theory := {φ | ProvableFrom T φ}


structure Admissible (S : Theory) (A : Tm) (T : Theory) : Prop where
  base : ST
  closed : Closed T
  consistent : Consistent T
  avoids : AT


lemma subset_closure {T : Theory} : Tclosure T := by
T : Theory
T closure T
intro φ φ_in_T
T : Theory
φ : Tm
φ_in_T : φ T
φ closure T
refine [φ], ?_, ?_
refine_1
T : Theory
φ : Tm
φ_in_T : φ T
ψ[φ], ψ T
refine_2
T : Theory
φ : Tm
φ_in_T : φ T
Pf [φ] φ
·
refine_1
T : Theory
φ : Tm
φ_in_T : φ T
ψ[φ], ψ T
intro ψ ψ_in_ls
refine_1
T : Theory
φ : Tm
φ_in_T : φ T
ψ : Tm
ψ_in_ls : ψ [φ]
ψ T
have : ψ = φ := by
T : Theory
T closure T
simpa using ψ_in_ls simpa [this] using φ_in_T ·
refine_2
T : Theory
φ : Tm
φ_in_T : φ T
Pf [φ] φ
exact Pf.assume


lemma closure_mono {S T : Theory} (S_in_T : ST) : closure Sclosure T := by
S : Theory
T : Theory
S_in_T : S T
intro φ φ_in_clS
S : Theory
T : Theory
S_in_T : S T
φ : Tm
φ_in_clS : φ closure S
φ closure T
rcases φ_in_clS withΓ, Γ_in_S, pf_φ
S : Theory
T : Theory
S_in_T : S T
φ : Tm
Γ : Ctxt
Γ_in_S : ψΓ, ψ S
pf_φ : Pf Γ φ
φ closure T
exists Γ
S : Theory
T : Theory
S_in_T : S T
φ : Tm
Γ : Ctxt
Γ_in_S : ψΓ, ψ S
pf_φ : Pf Γ φ
(∀ ψΓ, ψ T) Pf Γ φ
constructor
left
S : Theory
T : Theory
S_in_T : S T
φ : Tm
Γ : Ctxt
Γ_in_S : ψΓ, ψ S
pf_φ : Pf Γ φ
ψΓ, ψ T
right
S : Theory
T : Theory
S_in_T : S T
φ : Tm
Γ : Ctxt
Γ_in_S : ψΓ, ψ S
pf_φ : Pf Γ φ
Pf Γ φ
·
left
S : Theory
T : Theory
S_in_T : S T
φ : Tm
Γ : Ctxt
Γ_in_S : ψΓ, ψ S
pf_φ : Pf Γ φ
ψΓ, ψ T
intro ψ ψ_in_Γ
left
S : Theory
T : Theory
S_in_T : S T
φ : Tm
Γ : Ctxt
Γ_in_S : ψΓ, ψ S
pf_φ : Pf Γ φ
ψ : Tm
ψ_in_Γ : ψ Γ
ψ T
apply S_in_T
left.a
S : Theory
T : Theory
S_in_T : S T
φ : Tm
Γ : Ctxt
Γ_in_S : ψΓ, ψ S
pf_φ : Pf Γ φ
ψ : Tm
ψ_in_Γ : ψ Γ
ψ S
apply Γ_in_S ψ ψ_in_Γ ·
right
S : Theory
T : Theory
S_in_T : S T
φ : Tm
Γ : Ctxt
Γ_in_S : ψΓ, ψ S
pf_φ : Pf Γ φ
Pf Γ φ
exact pf_φ


lemma provable_merge {T : Theory} :
    ∀ Γ : Ctxt, (∀ ψΓ, ProvableFrom T ψ) →
      ∃ Δ : Ctxt, (∀ ξΔ, ξT) ∧ ∀ ψΓ, Pf Δ ψ
  | [], _ =>
T : Theory
x✝ : ψ[], ProvableFrom T ψ
Δ, (∀ ξΔ, ξ T) ψ[], Pf Δ ψ
by
T : Theory
x✝ : ψ[], ProvableFrom T ψ
Δ, (∀ ξΔ, ξ T) ψ[], Pf Δ ψ
exists []
T : Theory
x✝ : ψ[], ProvableFrom T ψ
(∀ ξ[], ξ T) ψ[], Pf [] ψ
aesop | ψ :: Γ, Γ_from_T =>
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δ, (∀ ξΔ, ξ T) ψ_1ψ :: Γ, Pf Δ ψ_1
by
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δ, (∀ ξΔ, ξ T) ψ_1ψ :: Γ, Pf Δ ψ_1
rcases Γ_from_T ψ (by
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
ψ ψ :: Γ
simp) withΔψ, Δψ_in_T, pf_ψhave Γ_T : ∀ ξΓ , ProvableFrom T ξ := by
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δ, (∀ ξΔ, ξ T) ψ_1ψ :: Γ, Pf Δ ψ_1
intro ξ ξ_in_Γ
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
ξ : Tm
ξ_in_Γ : ξ Γ
ProvableFrom T ξ
apply Γ_from_T
a
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
ξ : Tm
ξ_in_Γ : ξ Γ
ξ ψ :: Γ
simp [ξ_in_Γ] rcases provable_merge Γ Γ_T withΔ, Δ_in_T, pf_Γ
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
Δ, (∀ ξΔ, ξ T) ψ_1ψ :: Γ, Pf Δ ψ_1
-- Δψ is a context from which we can prove φ -- Δ is a context from which we can prove each of Γ -- so the concatenation should be able to prove φ :: Γ set tot_Γ : Ctxt := Δψ ++ Δ
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
Δ, (∀ ξΔ, ξ T) ψ_1ψ :: Γ, Pf Δ ψ_1
refine tot_Γ, ?_, ?_
refine_1
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξtot_Γ, ξ T
refine_2
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ψ_1ψ :: Γ, Pf tot_Γ ψ_1
·
refine_1
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξtot_Γ, ξ T
intro ξ ξ_in_tot
refine_1
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
ξ_in_tot : ξ tot_Γ
ξ T
simp [tot_Γ] at ξ_in_tot
refine_1
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
ξ_in_tot : ξ Δψ ξ Δ
ξ T
apply ξ_in_tot.elim
refine_1.left
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
ξ_in_tot : ξ Δψ ξ Δ
ξ Δψξ T
refine_1.right
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
ξ_in_tot : ξ Δψ ξ Δ
ξ Δξ T
·
refine_1.left
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
ξ_in_tot : ξ Δψ ξ Δ
ξ Δψξ T
intro ξ_in_Δψ
refine_1.left
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
ξ_in_tot : ξ Δψ ξ Δ
ξ_in_Δψ : ξ Δψ
ξ T
; exact Δψ_in_T ξ ξ_in_Δψ ·
refine_1.right
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
ξ_in_tot : ξ Δψ ξ Δ
ξ Δξ T
intro ξ_in_Δ
refine_1.right
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
ξ_in_tot : ξ Δψ ξ Δ
ξ_in_Δ : ξ Δ
ξ T
; exact Δ_in_T ξ ξ_in_Δ ·
refine_2
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ψ_1ψ :: Γ, Pf tot_Γ ψ_1
intro ξ ξ_in_Γ'
refine_2
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
ξ_in_Γ' : ξ ψ :: Γ
Pf tot_Γ ξ
simp at ξ_in_Γ'
refine_2
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
ξ_in_Γ' : ξ = ψ ξ Γ
Pf tot_Γ ξ
rcases ξ_in_Γ' with rfl |
refine_2.inl
T : Theory
Γ : List Tm
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
Γ_from_T : ψξ :: Γ, ProvableFrom T ψ
pf_ψ : Pf Δψ ξ
Pf tot_Γ ξ
refine_2.inr
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
: ξ Γ
Pf tot_Γ ξ
·
refine_2.inl
T : Theory
Γ : List Tm
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
Γ_from_T : ψξ :: Γ, ProvableFrom T ψ
pf_ψ : Pf Δψ ξ
Pf tot_Γ ξ
apply Pf.monotone_mem Δψ (Δψ ++ Δ)
refine_2.inl.hmem
T : Theory
Γ : List Tm
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
Γ_from_T : ψξ :: Γ, ProvableFrom T ψ
pf_ψ : Pf Δψ ξ
QΔψ, Q Δψ ++ Δ
refine_2.inl.a
T : Theory
Γ : List Tm
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
Γ_from_T : ψξ :: Γ, ProvableFrom T ψ
pf_ψ : Pf Δψ ξ
Pf Δψ ξ
·
refine_2.inl.hmem
T : Theory
Γ : List Tm
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
Γ_from_T : ψξ :: Γ, ProvableFrom T ψ
pf_ψ : Pf Δψ ξ
QΔψ, Q Δψ ++ Δ
intro tm tm_in_Δψ
refine_2.inl.hmem
T : Theory
Γ : List Tm
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
Γ_from_T : ψξ :: Γ, ProvableFrom T ψ
pf_ψ : Pf Δψ ξ
tm : Tm
tm_in_Δψ : tm Δψ
tm Δψ ++ Δ
simp [tm_in_Δψ] ·
refine_2.inl.a
T : Theory
Γ : List Tm
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
Γ_from_T : ψξ :: Γ, ProvableFrom T ψ
pf_ψ : Pf Δψ ξ
Pf Δψ ξ
exact pf_ψ ·
refine_2.inr
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
: ξ Γ
Pf tot_Γ ξ
apply Pf.monotone_mem Δ (Δψ ++ Δ)
refine_2.inr.hmem
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
: ξ Γ
QΔ, Q Δψ ++ Δ
refine_2.inr.a
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
: ξ Γ
Pf Δ ξ
·
refine_2.inr.hmem
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
: ξ Γ
QΔ, Q Δψ ++ Δ
intro tm tm_in_Δ
refine_2.inr.hmem
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
: ξ Γ
tm : Tm
tm_in_Δ : tm Δ
tm Δψ ++ Δ
simp [tm_in_Δ] ·
refine_2.inr.a
T : Theory
ψ : Tm
Γ : List Tm
Γ_from_T : ψ_1ψ :: Γ, ProvableFrom T ψ_1
Δψ : Ctxt
Δψ_in_T : ψΔψ, ψ T
pf_ψ : Pf Δψ ψ
Γ_T : ξΓ, ProvableFrom T ξ
Δ : Ctxt
Δ_in_T : ξΔ, ξ T
pf_Γ : ψΓ, Pf Δ ψ
tot_Γ : Ctxt := Δψ ++ Δ
ξ : Tm
: ξ Γ
Pf Δ ξ
exact (pf_Γ ξ )


lemma provableFrom_of_pf {T : Theory} {Γ : Ctxt} {φ : Tm}
    ( : ∀ ψΓ, ProvableFrom T ψ) (hpf : Pf Γ φ) : ProvableFrom T φ := by
T : Theory
Γ : Ctxt
φ : Tm
: ψΓ, ProvableFrom T ψ
hpf : Pf Γ φ
ProvableFrom T φ
rcases provable_merge Γ withΔ, , hproofs
T : Theory
Γ : Ctxt
φ : Tm
: ψΓ, ProvableFrom T ψ
hpf : Pf Γ φ
Δ : Ctxt
: ξΔ, ξ T
hproofs : ψΓ, Pf Δ ψ
ProvableFrom T φ
exact Δ, , Pf.multicut hpf hproofs


lemma closure_closed (T : Theory) : Closed (closure T) := by
T : Theory
Closed (closure T)
intro φ
T : Theory
φ : Tm
: ProvableFrom (closure T) φ
φ closure T
rcases withΓ, , hpf
T : Theory
φ : Tm
Γ : Ctxt
: ψΓ, ψ closure T
hpf : Pf Γ φ
φ closure T
exact provableFrom_of_pf hpf


def contextSet (Γ : Ctxt) : Theory := {φ | φΓ}


def theoryOf (Γ : Ctxt) : Theory := closure (contextSet Γ)


lemma mem_theoryOf {Γ : Ctxt} {φ : Tm} : φtheoryOf ΓPf Γ φ := by
Γ : Ctxt
φ : Tm
φ theoryOf Γ Pf Γ φ
constructor
mp
Γ : Ctxt
φ : Tm
φ theoryOf ΓPf Γ φ
mpr
Γ : Ctxt
φ : Tm
Pf Γ φφ theoryOf Γ
·
mp
Γ : Ctxt
φ : Tm
φ theoryOf ΓPf Γ φ
intro φ_in_Γ_Th
mp
Γ : Ctxt
φ : Tm
φ_in_Γ_Th : φ theoryOf Γ
Pf Γ φ
rcases φ_in_Γ_Th withΔ, Δ_in_Γ, φ_pf
mp
Γ : Ctxt
φ : Tm
Δ : Ctxt
Δ_in_Γ : ψΔ, ψ contextSet Γ
φ_pf : Pf Δ φ
Pf Γ φ
apply Pf.multicut φ_pf
mp
Γ : Ctxt
φ : Tm
Δ : Ctxt
Δ_in_Γ : ψΔ, ψ contextSet Γ
φ_pf : Pf Δ φ
QΔ, Pf Γ Q
intro ψ ψ_in_Δ
mp
Γ : Ctxt
φ : Tm
Δ : Ctxt
Δ_in_Γ : ψΔ, ψ contextSet Γ
φ_pf : Pf Δ φ
ψ : Tm
ψ_in_Δ : ψ Δ
Pf Γ ψ
exact Pf.of_mem (Δ_in_Γ ψ ψ_in_Δ) ·
mpr
Γ : Ctxt
φ : Tm
Pf Γ φφ theoryOf Γ
intro pf_Ψ
mpr
Γ : Ctxt
φ : Tm
pf_Ψ : Pf Γ φ
φ theoryOf Γ
simp [theoryOf, closure, ProvableFrom]
mpr
Γ : Ctxt
φ : Tm
pf_Ψ : Pf Γ φ
Γ_1, (∀ ψΓ_1, ψ contextSet Γ) Pf Γ_1 φ
exists Γ
mpr
Γ : Ctxt
φ : Tm
pf_Ψ : Pf Γ φ
(∀ ψΓ, ψ contextSet Γ) Pf Γ φ
aesop



lemma contextSet_mem {Γ : Ctxt} {φ : Tm} (φ_in_Γ : φΓ) : φtheoryOf Γ :=
  subset_closure φ_in_Γ


-- if a context is provably from a union of a chain of theories,
-- then there is some theory that proves everything in the context
lemma chain_member_for_ctxt
   {c : Set Theory} (hc : IsChain (· ⊆ ·) c) (hne : c.Nonempty) :
    ∀ Γ : Ctxt, (∀ ψΓ, ψsUnion c) → ∃ Tc, ∀ ψΓ, ψT
  | [],  =>
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
: ψ[], ψ ⋃₀ c
Tc, ∀ ψ[], ψ T
by
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
: ψ[], ψ ⋃₀ c
Tc, ∀ ψ[], ψ T
rcases hne withT, T_in_c
hc : IsChain (fun x1 x2 => x1 x2) c
: ψ[], ψ ⋃₀ c
T : Theory
T_in_c : T c
Tc, ∀ ψ[], ψ T
exists T
hc : IsChain (fun x1 x2 => x1 x2) c
: ψ[], ψ ⋃₀ c
T : Theory
T_in_c : T c
T c ψ[], ψ T
aesop | ψ :: Γ, Γ_in =>
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
ψ : Tm
Γ : List Tm
Γ_in : ψ_1ψ :: Γ, ψ_1 ⋃₀ c
Tc, ∀ ψ_1ψ :: Γ, ψ_1 T
by
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
ψ : Tm
Γ : List Tm
Γ_in : ψ_1ψ :: Γ, ψ_1 ⋃₀ c
Tc, ∀ ψ_1ψ :: Γ, ψ_1 T
rcases Γ_in ψ (by
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
ψ : Tm
Γ : List Tm
Γ_in : ψ_1ψ :: Γ, ψ_1 ⋃₀ c
ψ ψ :: Γ
simp) with, Tψ_in_c, ψ_in_Tψhave : ∃ Tc, ∀ ψΓ, ψT := by
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
ψ : Tm
Γ : List Tm
Γ_in : ψ_1ψ :: Γ, ψ_1 ⋃₀ c
Tc, ∀ ψ_1ψ :: Γ, ψ_1 T
apply chain_member_for_ctxt hc hne Γ
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
ψ : Tm
Γ : List Tm
Γ_in : ψ_1ψ :: Γ, ψ_1 ⋃₀ c
: Set Tm
Tψ_in_c : c
ψ_in_Tψ : ψ
ψΓ, ψ ⋃₀ c
aesop rcases this with, TΓ_in_c, Γ_in_TΓ
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
ψ : Tm
Γ : List Tm
Γ_in : ψ_1ψ :: Γ, ψ_1 ⋃₀ c
: Set Tm
Tψ_in_c : c
ψ_in_Tψ : ψ
: Theory
TΓ_in_c : c
Γ_in_TΓ : ψΓ, ψ
Tc, ∀ ψ_1ψ :: Γ, ψ_1 T
by_cases hEq : =
pos
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
ψ : Tm
Γ : List Tm
Γ_in : ψ_1ψ :: Γ, ψ_1 ⋃₀ c
: Set Tm
Tψ_in_c : c
ψ_in_Tψ : ψ
: Theory
TΓ_in_c : c
Γ_in_TΓ : ψΓ, ψ
hEq : =
Tc, ∀ ψ_1ψ :: Γ, ψ_1 T
neg
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
ψ : Tm
Γ : List Tm
Γ_in : ψ_1ψ :: Γ, ψ_1 ⋃₀ c
: Set Tm
Tψ_in_c : c
ψ_in_Tψ : ψ
: Theory
TΓ_in_c : c
Γ_in_TΓ : ψΓ, ψ
hEq : ¬ =
Tc, ∀ ψ_1ψ :: Γ, ψ_1 T
·
pos
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
ψ : Tm
Γ : List Tm
Γ_in : ψ_1ψ :: Γ, ψ_1 ⋃₀ c
: Set Tm
Tψ_in_c : c
ψ_in_Tψ : ψ
: Theory
TΓ_in_c : c
Γ_in_TΓ : ψΓ, ψ
hEq : =
Tc, ∀ ψ_1ψ :: Γ, ψ_1 T
refine , TΓ_in_c, ?_
pos
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
ψ : Tm
Γ : List Tm
Γ_in : ψ_1ψ :: Γ, ψ_1 ⋃₀ c
: Set Tm
Tψ_in_c : c
ψ_in_Tψ : ψ
: Theory
TΓ_in_c : c
Γ_in_TΓ : ψΓ, ψ
hEq : =
ψ_1ψ :: Γ, ψ_1
aesop ·
neg
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
ψ : Tm
Γ : List Tm
Γ_in : ψ_1ψ :: Γ, ψ_1 ⋃₀ c
: Set Tm
Tψ_in_c : c
ψ_in_Tψ : ψ
: Theory
TΓ_in_c : c
Γ_in_TΓ : ψΓ, ψ
hEq : ¬ =
Tc, ∀ ψ_1ψ :: Γ, ψ_1 T
rcases hc Tψ_in_c TΓ_in_c hEq with hsub | hsub
neg.inl
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
ψ : Tm
Γ : List Tm
Γ_in : ψ_1ψ :: Γ, ψ_1 ⋃₀ c
: Set Tm
Tψ_in_c : c
ψ_in_Tψ : ψ
: Theory
TΓ_in_c : c
Γ_in_TΓ : ψΓ, ψ
hEq : ¬ =
hsub :
Tc, ∀ ψ_1ψ :: Γ, ψ_1 T
neg.inr
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
ψ : Tm
Γ : List Tm
Γ_in : ψ_1ψ :: Γ, ψ_1 ⋃₀ c
: Set Tm
Tψ_in_c : c
ψ_in_Tψ : ψ
: Theory
TΓ_in_c : c
Γ_in_TΓ : ψΓ, ψ
hEq : ¬ =
hsub :
Tc, ∀ ψ_1ψ :: Γ, ψ_1 T
·
neg.inl
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
ψ : Tm
Γ : List Tm
Γ_in : ψ_1ψ :: Γ, ψ_1 ⋃₀ c
: Set Tm
Tψ_in_c : c
ψ_in_Tψ : ψ
: Theory
TΓ_in_c : c
Γ_in_TΓ : ψΓ, ψ
hEq : ¬ =
hsub :
Tc, ∀ ψ_1ψ :: Γ, ψ_1 T
refine , TΓ_in_c, ?_
neg.inl
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
ψ : Tm
Γ : List Tm
Γ_in : ψ_1ψ :: Γ, ψ_1 ⋃₀ c
: Set Tm
Tψ_in_c : c
ψ_in_Tψ : ψ
: Theory
TΓ_in_c : c
Γ_in_TΓ : ψΓ, ψ
hEq : ¬ =
hsub :
ψ_1ψ :: Γ, ψ_1
aesop ·
neg.inr
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
ψ : Tm
Γ : List Tm
Γ_in : ψ_1ψ :: Γ, ψ_1 ⋃₀ c
: Set Tm
Tψ_in_c : c
ψ_in_Tψ : ψ
: Theory
TΓ_in_c : c
Γ_in_TΓ : ψΓ, ψ
hEq : ¬ =
hsub :
Tc, ∀ ψ_1ψ :: Γ, ψ_1 T
refine , Tψ_in_c, ?_
neg.inr
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
ψ : Tm
Γ : List Tm
Γ_in : ψ_1ψ :: Γ, ψ_1 ⋃₀ c
: Set Tm
Tψ_in_c : c
ψ_in_Tψ : ψ
: Theory
TΓ_in_c : c
Γ_in_TΓ : ψΓ, ψ
hEq : ¬ =
hsub :
ψ_1ψ :: Γ, ψ_1
aesop


lemma sUnion_closed {c : Set Theory} (hc : IsChain (· ⊆ ·) c) (hne : c.Nonempty)
    (hclosed : ∀ Tc, Closed T) : Closed (sUnion c) := by
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
hclosed : Tc, Closed T
intro φ φ_prov
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
hclosed : Tc, Closed T
φ : Tm
φ_prov : ProvableFrom (⋃₀ c) φ
φ ⋃₀ c
rcases φ_prov withΓ, Γ_in_union, φ_pf
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
hclosed : Tc, Closed T
φ : Tm
Γ : Ctxt
Γ_in_union : ψΓ, ψ ⋃₀ c
φ_pf : Pf Γ φ
φ ⋃₀ c
rcases chain_member_for_ctxt hc hne Γ Γ_in_union withT, T_in_c, φ_in_T
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
hclosed : Tc, Closed T
φ : Tm
Γ : Ctxt
Γ_in_union : ψΓ, ψ ⋃₀ c
φ_pf : Pf Γ φ
T : Theory
T_in_c : T c
φ_in_T : ψΓ, ψ T
φ ⋃₀ c
apply mem_sUnion_of_mem
hx
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
hclosed : Tc, Closed T
φ : Tm
Γ : Ctxt
Γ_in_union : ψΓ, ψ ⋃₀ c
φ_pf : Pf Γ φ
T : Theory
T_in_c : T c
φ_in_T : ψΓ, ψ T
φ ?t
ht
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
hclosed : Tc, Closed T
φ : Tm
Γ : Ctxt
Γ_in_union : ψΓ, ψ ⋃₀ c
φ_pf : Pf Γ φ
T : Theory
T_in_c : T c
φ_in_T : ψΓ, ψ T
?t c
t
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
hclosed : Tc, Closed T
φ : Tm
Γ : Ctxt
Γ_in_union : ψΓ, ψ ⋃₀ c
φ_pf : Pf Γ φ
T : Theory
T_in_c : T c
φ_in_T : ψΓ, ψ T
Set Tm
·
hx
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
hclosed : Tc, Closed T
φ : Tm
Γ : Ctxt
Γ_in_union : ψΓ, ψ ⋃₀ c
φ_pf : Pf Γ φ
T : Theory
T_in_c : T c
φ_in_T : ψΓ, ψ T
φ ?t
apply hclosed T T_in_c
hx.a
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
hclosed : Tc, Closed T
φ : Tm
Γ : Ctxt
Γ_in_union : ψΓ, ψ ⋃₀ c
φ_pf : Pf Γ φ
T : Theory
T_in_c : T c
φ_in_T : ψΓ, ψ T
ProvableFrom T φ
exact Γ, φ_in_T, φ_pf ·
ht
hc : IsChain (fun x1 x2 => x1 x2) c
hne : c.Nonempty
hclosed : Tc, Closed T
φ : Tm
Γ : Ctxt
Γ_in_union : ψΓ, ψ ⋃₀ c
φ_pf : Pf Γ φ
T : Theory
T_in_c : T c
φ_in_T : ψΓ, ψ T
?t c
exact T_in_c


lemma closure_insert_imp {T : Theory} {φ tm : Tm} (T_closed : Closed T)
    (htm : tmclosure (Set.insert φ T)) : (φtm) ∈ T := by
T : Theory
φ : Tm
tm : Tm
T_closed : Closed T
htm : tm closure (Set.insert φ T)
(φ tm) T
rcases htm withΓ, Γ_in_T', pf_tm
T : Theory
φ : Tm
tm : Tm
T_closed : Closed T
Γ : Ctxt
Γ_in_T' : ψΓ, ψ Set.insert φ T
pf_tm : Pf Γ tm
(φ tm) T
let Δ : Ctxt := Γ.filter (· ∈ T)
T : Theory
φ : Tm
tm : Tm
T_closed : Closed T
Γ : Ctxt
Γ_in_T' : ψΓ, ψ Set.insert φ T
pf_tm : Pf Γ tm
Δ : Ctxt := List.filter (fun x => decide (x T)) Γ
(φ tm) T
have Δ_in_T : ∀ ξΔ, ξT := by
T : Theory
φ : Tm
tm : Tm
T_closed : Closed T
htm : tm closure (Set.insert φ T)
(φ tm) T
intro ξ
T : Theory
φ : Tm
tm : Tm
T_closed : Closed T
Γ : Ctxt
Γ_in_T' : ψΓ, ψ Set.insert φ T
pf_tm : Pf Γ tm
Δ : Ctxt := List.filter (fun x => decide (x T)) Γ
ξ : Tm
: ξ Δ
ξ T
simp [Δ] at
T : Theory
φ : Tm
tm : Tm
T_closed : Closed T
Γ : Ctxt
Γ_in_T' : ψΓ, ψ Set.insert φ T
pf_tm : Pf Γ tm
Δ : Ctxt := List.filter (fun x => decide (x T)) Γ
ξ : Tm
: ξ Γ ξ T
ξ T
exact .2 have tm_ass_φ : Pf (φ :: Δ) tm := by
T : Theory
φ : Tm
tm : Tm
T_closed : Closed T
htm : tm closure (Set.insert φ T)
(φ tm) T
apply Pf.multicut pf_tm
T : Theory
φ : Tm
tm : Tm
T_closed : Closed T
Γ : Ctxt
Γ_in_T' : ψΓ, ψ Set.insert φ T
pf_tm : Pf Γ tm
Δ : Ctxt := List.filter (fun x => decide (x T)) Γ
Δ_in_T : ξΔ, ξ T
QΓ, Pf (φ :: Δ) Q
intro ξ ξ_in_Γ
T : Theory
φ : Tm
tm : Tm
T_closed : Closed T
Γ : Ctxt
Γ_in_T' : ψΓ, ψ Set.insert φ T
pf_tm : Pf Γ tm
Δ : Ctxt := List.filter (fun x => decide (x T)) Γ
Δ_in_T : ξΔ, ξ T
ξ : Tm
ξ_in_Γ : ξ Γ
Pf (φ :: Δ) ξ
have ξ_in_T' := Γ_in_T' ξ ξ_in_Γ
T : Theory
φ : Tm
tm : Tm
T_closed : Closed T
Γ : Ctxt
Γ_in_T' : ψΓ, ψ Set.insert φ T
pf_tm : Pf Γ tm
Δ : Ctxt := List.filter (fun x => decide (x T)) Γ
Δ_in_T : ξΔ, ξ T
ξ : Tm
ξ_in_Γ : ξ Γ
ξ_in_T' : ξ Set.insert φ T
Pf (φ :: Δ) ξ
rcases ξ_in_T' with rfl | ξ_in_T
inl
T : Theory
tm : Tm
T_closed : Closed T
Γ : Ctxt
pf_tm : Pf Γ tm
Δ : Ctxt := List.filter (fun x => decide (x T)) Γ
Δ_in_T : ξΔ, ξ T
ξ : Tm
ξ_in_Γ : ξ Γ
Γ_in_T' : ψΓ, ψ Set.insert ξ T
Pf (ξ :: Δ) ξ
inr
T : Theory
φ : Tm
tm : Tm
T_closed : Closed T
Γ : Ctxt
Γ_in_T' : ψΓ, ψ Set.insert φ T
pf_tm : Pf Γ tm
Δ : Ctxt := List.filter (fun x => decide (x T)) Γ
Δ_in_T : ξΔ, ξ T
ξ : Tm
ξ_in_Γ : ξ Γ
ξ_in_T : ξ T
Pf (φ :: Δ) ξ
·
inl
T : Theory
tm : Tm
T_closed : Closed T
Γ : Ctxt
pf_tm : Pf Γ tm
Δ : Ctxt := List.filter (fun x => decide (x T)) Γ
Δ_in_T : ξΔ, ξ T
ξ : Tm
ξ_in_Γ : ξ Γ
Γ_in_T' : ψΓ, ψ Set.insert ξ T
Pf (ξ :: Δ) ξ
exact Pf.assume ·
inr
T : Theory
φ : Tm
tm : Tm
T_closed : Closed T
Γ : Ctxt
Γ_in_T' : ψΓ, ψ Set.insert φ T
pf_tm : Pf Γ tm
Δ : Ctxt := List.filter (fun x => decide (x T)) Γ
Δ_in_T : ξΔ, ξ T
ξ : Tm
ξ_in_Γ : ξ Γ
ξ_in_T : ξ T
Pf (φ :: Δ) ξ
have ξ_in_Δ' : ξφ :: Δ := by
T : Theory
φ : Tm
tm : Tm
T_closed : Closed T
htm : tm closure (Set.insert φ T)
(φ tm) T
simp [Δ, ξ_in_Γ, ξ_in_T] exact Pf.of_mem ξ_in_Δ' apply T_closed
a
T : Theory
φ : Tm
tm : Tm
T_closed : Closed T
Γ : Ctxt
Γ_in_T' : ψΓ, ψ Set.insert φ T
pf_tm : Pf Γ tm
Δ : Ctxt := List.filter (fun x => decide (x T)) Γ
Δ_in_T : ξΔ, ξ T
tm_ass_φ : Pf (φ :: Δ) tm
ProvableFrom T (φ tm)
exact Δ, Δ_in_T, Pf.imp_I tm_ass_φ




lemma closure_insert_failure {S T : Theory} {A φ : Tm}
    (hbase : ST) (hnot :
      ¬ Admissible S A (closure (Set.insert φ T))) : Aclosure (Set.insert φ T) ∨ Tm.ffclosure (Set.insert φ T) := by
S : Theory
T : Theory
A : Tm
φ : Tm
hbase : S T
hnot : ¬Admissible S A (closure (Set.insert φ T))
by_contra hfail
S : Theory
T : Theory
A : Tm
φ : Tm
hbase : S T
hnot : ¬Admissible S A (closure (Set.insert φ T))
False
apply hnot
S : Theory
T : Theory
A : Tm
φ : Tm
hbase : S T
hnot : ¬Admissible S A (closure (Set.insert φ T))
Admissible S A (closure (Set.insert φ T))
refine ?_, closure_closed _, ?_, ?_
refine_1
S : Theory
T : Theory
A : Tm
φ : Tm
hbase : S T
hnot : ¬Admissible S A (closure (Set.insert φ T))
S closure (Set.insert φ T)
refine_2
S : Theory
T : Theory
A : Tm
φ : Tm
hbase : S T
hnot : ¬Admissible S A (closure (Set.insert φ T))
refine_3
S : Theory
T : Theory
A : Tm
φ : Tm
hbase : S T
hnot : ¬Admissible S A (closure (Set.insert φ T))
Aclosure (Set.insert φ T)
·
refine_1
S : Theory
T : Theory
A : Tm
φ : Tm
hbase : S T
hnot : ¬Admissible S A (closure (Set.insert φ T))
S closure (Set.insert φ T)
intro χ
refine_1
S : Theory
T : Theory
A : Tm
φ : Tm
hbase : S T
hnot : ¬Admissible S A (closure (Set.insert φ T))
χ : Tm
: χ S
χ closure (Set.insert φ T)
exact subset_closure (Or.inr (hbase )) ·
refine_2
S : Theory
T : Theory
A : Tm
φ : Tm
hbase : S T
hnot : ¬Admissible S A (closure (Set.insert φ T))
intro hff
refine_2
S : Theory
T : Theory
A : Tm
φ : Tm
hbase : S T
hnot : ¬Admissible S A (closure (Set.insert φ T))
False
exact hfail (Or.inr hff) ·
refine_3
S : Theory
T : Theory
A : Tm
φ : Tm
hbase : S T
hnot : ¬Admissible S A (closure (Set.insert φ T))
Aclosure (Set.insert φ T)
intro hA
refine_3
S : Theory
T : Theory
A : Tm
φ : Tm
hbase : S T
hnot : ¬Admissible S A (closure (Set.insert φ T))
hA : A closure (Set.insert φ T)
False
exact hfail (Or.inl hA)


lemma imp_target_of_failure {T : Theory} {φ A : Tm} (T_closed : Closed T)
    (ext_with : Aclosure (Set.insert φ T) ∨ Tm.ffclosure (Set.insert φ T)) :
    (φA) ∈ T := by
T : Theory
φ : Tm
A : Tm
T_closed : Closed T
ext_with : A closure (Set.insert φ T) Tm.ff closure (Set.insert φ T)
(φ A) T
rcases ext_with with A_in_T' | ff_in_T'
inl
T : Theory
φ : Tm
A : Tm
T_closed : Closed T
A_in_T' : A closure (Set.insert φ T)
(φ A) T
inr
T : Theory
φ : Tm
A : Tm
T_closed : Closed T
ff_in_T' : Tm.ff closure (Set.insert φ T)
(φ A) T
·
inl
T : Theory
φ : Tm
A : Tm
T_closed : Closed T
A_in_T' : A closure (Set.insert φ T)
(φ A) T
exact closure_insert_imp T_closed A_in_T' ·
inr
T : Theory
φ : Tm
A : Tm
T_closed : Closed T
ff_in_T' : Tm.ff closure (Set.insert φ T)
(φ A) T
have neg_φ_in_T : (φTm.ff) ∈ T := closure_insert_imp T_closed ff_in_T'
inr
T : Theory
φ : Tm
A : Tm
T_closed : Closed T
ff_in_T' : Tm.ff closure (Set.insert φ T)
neg_φ_in_T : (φ Tm.ff) T
(φ A) T
apply T_closed
inr.a
T : Theory
φ : Tm
A : Tm
T_closed : Closed T
ff_in_T' : Tm.ff closure (Set.insert φ T)
neg_φ_in_T : (φ Tm.ff) T
ProvableFrom T (φ A)
exists [φTm.ff]
inr.a
T : Theory
φ : Tm
A : Tm
T_closed : Closed T
ff_in_T' : Tm.ff closure (Set.insert φ T)
neg_φ_in_T : (φ Tm.ff) T
(∀ ψ[φ Tm.ff], ψ T) Pf [φ Tm.ff] (φ A)
constructor
inr.a.left
T : Theory
φ : Tm
A : Tm
T_closed : Closed T
ff_in_T' : Tm.ff closure (Set.insert φ T)
neg_φ_in_T : (φ Tm.ff) T
ψ[φ Tm.ff], ψ T
inr.a.right
T : Theory
φ : Tm
A : Tm
T_closed : Closed T
ff_in_T' : Tm.ff closure (Set.insert φ T)
neg_φ_in_T : (φ Tm.ff) T
Pf [φ Tm.ff] (φ A)
·
inr.a.left
T : Theory
φ : Tm
A : Tm
T_closed : Closed T
ff_in_T' : Tm.ff closure (Set.insert φ T)
neg_φ_in_T : (φ Tm.ff) T
ψ[φ Tm.ff], ψ T
simpa using neg_φ_in_T ·
inr.a.right
T : Theory
φ : Tm
A : Tm
T_closed : Closed T
ff_in_T' : Tm.ff closure (Set.insert φ T)
neg_φ_in_T : (φ Tm.ff) T
Pf [φ Tm.ff] (φ A)
exact Pf.quodlibet φ A



theorem prime_extension_avoiding {S : Theory} {A : Tm}
    (S_closed : Closed S) (S_consistent : Consistent S) (not_A_in_S : AS) :
    ∃ T, Admissible S A TPrime T := by
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
T, Admissible S A T Prime T
let candidates : Set Theory := {T | Admissible S A T}
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
T, Admissible S A T Prime T
have S_in_candidates : Scandidates := subset_rfl, S_closed, S_consistent, not_A_in_S
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
T, Admissible S A T Prime T
obtainM, hSM, M_maximal⟩ : ∃ m, SmMaximal (· ∈ candidates) m := by
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
m, S m Maximal (fun x => x candidates) m
-- if we for any non-empty chain c in candidates, we have an upper bound (also in candidates), -- then for any candidate we can find a maximal candidate set containing it apply zorn_subset_nonempty candidates
H
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
ccandidates, IsChain (fun x1 x2 => x1 x2) cc.Nonempty → ∃ ubcandidates, ∀ sc, s ub
hx
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
S candidates
intro c c_in_C
H
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
IsChain (fun x1 x2 => x1 x2) cc.Nonempty → ∃ ubcandidates, ∀ sc, s ub
hx
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
S candidates
hcChain
H
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c.Nonempty → ∃ ubcandidates, ∀ sc, s ub
hx
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
S candidates
c_ne
H
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
ubcandidates, ∀ sc, s ub
hx
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
S candidates
refine sUnion c, ?_, ?_
H.refine_1
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
⋃₀ c candidates
H.refine_2
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
sc, s ⋃₀ c
hx
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
S candidates
-- show that the union of a chain is a candidate have union_closed : Closed (⋃₀ c) := by
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
m, S m Maximal (fun x => x candidates) m
apply sUnion_closed hcChain c_ne
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
Tc, Closed T
intro T T_in_c
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
T : Theory
T_in_c : T c
Closed T
apply (c_in_C T_in_c).closed ·
H.refine_1
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
union_closed : Closed (⋃₀ c)
⋃₀ c candidates
refine ?_, union_closed , ?_, ?_
H.refine_1.refine_1
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
union_closed : Closed (⋃₀ c)
S ⋃₀ c
H.refine_1.refine_2
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
union_closed : Closed (⋃₀ c)
H.refine_1.refine_3
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
union_closed : Closed (⋃₀ c)
A⋃₀ c
·
H.refine_1.refine_1
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
union_closed : Closed (⋃₀ c)
S ⋃₀ c
intro φ φ_in_S
H.refine_1.refine_1
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
union_closed : Closed (⋃₀ c)
φ : Tm
φ_in_S : φ S
φ ⋃₀ c
rcases c_ne withtms, tms_in_c
H.refine_1.refine_1
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
union_closed : Closed (⋃₀ c)
φ : Tm
φ_in_S : φ S
tms : Set Tm
tms_in_c : tms c
φ ⋃₀ c
-- φ is in S and so in any candidate admissible theory have φ_in_tms : φtms := by
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
m, S m Maximal (fun x => x candidates) m
apply (c_in_C tms_in_c).base
a
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
union_closed : Closed (⋃₀ c)
φ : Tm
φ_in_S : φ S
tms : Set Tm
tms_in_c : tms c
φ S
exact φ_in_S apply mem_sUnion_of_mem φ_in_tms
H.refine_1.refine_1
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
union_closed : Closed (⋃₀ c)
φ : Tm
φ_in_S : φ S
tms : Set Tm
tms_in_c : tms c
φ_in_tms : φ tms
tms c
exact tms_in_c ·
H.refine_1.refine_2
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
union_closed : Closed (⋃₀ c)
intro ff_in_Uc
H.refine_1.refine_2
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
union_closed : Closed (⋃₀ c)
ff_in_Uc : Tm.ff ⋃₀ c
False
rcases ff_in_Uc withT, T_in_c, ff_in_T
H.refine_1.refine_2
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
union_closed : Closed (⋃₀ c)
T : Set Tm
T_in_c : T c
ff_in_T : Tm.ff T
False
exact (c_in_C T_in_c).consistent ff_in_T ·
H.refine_1.refine_3
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
union_closed : Closed (⋃₀ c)
A⋃₀ c
intro A_in_Uc
H.refine_1.refine_3
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
union_closed : Closed (⋃₀ c)
A_in_Uc : A ⋃₀ c
False
rcases A_in_Uc withT, T_in_c, A_in_T
H.refine_1.refine_3
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
union_closed : Closed (⋃₀ c)
T : Set Tm
T_in_c : T c
A_in_T : A T
False
exact (c_in_C T_in_c).avoids A_in_T ·
H.refine_2
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
sc, s ⋃₀ c
intro s s_in_c
H.refine_2
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
c : Set (Set Tm)
c_in_C : c candidates
hcChain : IsChain (fun x1 x2 => x1 x2) c
c_ne : c.Nonempty
s : Set Tm
s_in_c : s c
s ⋃₀ c
exact subset_sUnion_of_mem s_in_c ·
hx
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
S candidates
exact S_in_candidates have M_admissible : Admissible S A M := by
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
T, Admissible S A T Prime T
apply M_maximal.1 refine M, M_admissible, ?_
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
Prime M
-- prove that M = ⋃₀ c is prime: intro φ ψ
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
(φ ψ) Mφ M ψ M
or_in_M
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
φ M ψ M
by_contra hPrime
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : ¬(φ M ψ M)
False
push Not at hPrime
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
False
have not_φ_in_M : φM := hPrime.1
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
False
have not_ψ_in_M : ψM := hPrime.2
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
False
let : Theory := closure (Set.insert φ M)
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
False
let : Theory := closure (Set.insert ψ M)
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
False
have hMφ : M := by
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
T, Admissible S A T Prime T
intro tm tm_in_M
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
tm : Tm
tm_in_M : tm M
tm
apply subset_closure
a
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
tm : Tm
tm_in_M : tm M
tm Set.insert φ M
exact Or.inr tm_in_M have hMψ : M := by
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
T, Admissible S A T Prime T
intro tm tm_in_M
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
tm : Tm
tm_in_M : tm M
tm
apply subset_closure
a
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
tm : Tm
tm_in_M : tm M
tm Set.insert ψ M
exact Or.inr tm_in_M -- neither Mφ not Mψ are admissible as then they would be equal to M -- by maximality, but then either φ or ψ would be in M have Mφ_not_addmissble : ¬ Admissible S A := by
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
T, Admissible S A T Prime T
intro Mφ_admissible
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_admissible : Admissible S A
False
have hEq : M = := M_maximal.eq_of_subset Mφ_admissible hMφ
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_admissible : Admissible S A
hEq : M =
False
apply not_φ_in_M
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_admissible : Admissible S A
hEq : M =
φ M
rw [hEq]
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_admissible : Admissible S A
hEq : M =
φ
apply subset_closure
a
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_admissible : Admissible S A
hEq : M =
φ Set.insert φ M
apply Or.inl
a.h
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_admissible : Admissible S A
hEq : M =
φ = φ
rfl have Mψ_not_admissible : ¬ Admissible S A := by
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
T, Admissible S A T Prime T
intro Mψ_admissible
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_admissible : Admissible S A
False
have hEq : M = := M_maximal.eq_of_subset Mψ_admissible hMψ
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_admissible : Admissible S A
hEq : M =
False
apply not_ψ_in_M
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_admissible : Admissible S A
hEq : M =
ψ M
rw [hEq]
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_admissible : Admissible S A
hEq : M =
ψ
apply subset_closure
a
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_admissible : Admissible S A
hEq : M =
ψ Set.insert ψ M
apply Or.inl
a.h
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_admissible : Admissible S A
hEq : M =
ψ = ψ
rfl have φ_imp_A_in_M : (φA) ∈ M := by
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
T, Admissible S A T Prime T
apply imp_target_of_failure
T_closed
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
Closed M
ext_with
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
apply M_admissible.closed
ext_with
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
apply (closure_insert_failure M_admissible.base Mφ_not_addmissble) have ψ_imp_A_in_M : (ψA) ∈ M := by
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
T, Admissible S A T Prime T
apply imp_target_of_failure
T_closed
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
Closed M
ext_with
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
apply M_admissible.closed
ext_with
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
apply closure_insert_failure M_admissible.base Mψ_not_admissible have hA : AM := by
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
T, Admissible S A T Prime T
apply M_admissible.closed
a
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
ψ_imp_A_in_M : (ψ A) M
ProvableFrom M A
·
a
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
ψ_imp_A_in_M : (ψ A) M
ProvableFrom M A
exists [φψ, φA, ψA]
a
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
ψ_imp_A_in_M : (ψ A) M
(∀ ψ_1[φ ψ, φ A, ψ A], ψ_1 M) Pf [φ ψ, φ A, ψ A] A
constructor
a.left
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
ψ_imp_A_in_M : (ψ A) M
ψ_1[φ ψ, φ A, ψ A], ψ_1 M
a.right
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
ψ_imp_A_in_M : (ψ A) M
Pf [φ ψ, φ A, ψ A] A
·
a.left
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
ψ_imp_A_in_M : (ψ A) M
ψ_1[φ ψ, φ A, ψ A], ψ_1 M
intro tm tm_in_ctxt
a.left
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
ψ_imp_A_in_M : (ψ A) M
tm : Tm
tm_in_ctxt : tm [φ ψ, φ A, ψ A]
tm M
simp at tm_in_ctxt
a.left
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
ψ_imp_A_in_M : (ψ A) M
tm : Tm
tm_in_ctxt : tm = (φ ψ) tm = (φ A) tm = (ψ A)
tm M
rcases tm_in_ctxt with rfl | rfl | rfl
a.left.inl
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
ψ_imp_A_in_M : (ψ A) M
(φ ψ) M
a.left.inr.inl
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
ψ_imp_A_in_M : (ψ A) M
(φ A) M
a.left.inr.inr
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
ψ_imp_A_in_M : (ψ A) M
(ψ A) M
·
a.left.inl
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
ψ_imp_A_in_M : (ψ A) M
(φ ψ) M
exact or_in_M ·
a.left.inr.inl
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
ψ_imp_A_in_M : (ψ A) M
(φ A) M
exact φ_imp_A_in_M ·
a.left.inr.inr
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
ψ_imp_A_in_M : (ψ A) M
(ψ A) M
exact ψ_imp_A_in_M ·
a.right
S : Theory
A : Tm
S_closed : Closed S
S_consistent : Consistent S
not_A_in_S : AS
candidates : Set Theory := {T | Admissible S A T}
S_in_candidates : S candidates
M : Theory
hSM : S M
M_maximal : Maximal (fun x => x candidates) M
M_admissible : Admissible S A M
φ : Tm
ψ : Tm
or_in_M : (φ ψ) M
hPrime : φM ψM
not_φ_in_M : φM
not_ψ_in_M : ψM
: Theory := closure (Set.insert φ M)
: Theory := closure (Set.insert ψ M)
hMφ : M
hMψ : M
Mφ_not_addmissble : ¬Admissible S A
Mψ_not_admissible : ¬Admissible S A
φ_imp_A_in_M : (φ A) M
ψ_imp_A_in_M : (ψ A) M
Pf [φ ψ, φ A, ψ A] A
exact Pf.or_cases_to φ ψ A exact M_admissible.avoids hA


structure World where
  carrier : Theory
  closed : Closed carrier
  consistent : Consistent carrier
  prime : Prime carrier


instance : LE World where
  le w v := w.carrierv.carrier


instance : Preorder World where
  le := (· ≤ ·)
  le_refl _ := subset_rfl
  le_trans _ _ _ := Set.Subset.trans


instance : Frame World where
  val w i := Tm.var iw.carrier
  le_val := by
∀ {w w' : World} {i : }, w w'Tm.var i w.carrierTm.var i w'.carrier
aesop



theorem truth_lemma (w : World) : ∀ φ : Tm, at_world w φφw.carrier
  | Tm.var i => Iff.rfl
  | Tm.and φ ψ =>
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
constructor
mp
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ)(φ ψ) w.carrier
mpr
w : World
φ : Tm
ψ : Tm
(φ ψ) w.carrierat_world w (φ ψ)
·
mp
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ)(φ ψ) w.carrier
intro at_w_and
mp
w : World
φ : Tm
ψ : Tm
at_w_and : at_world w (φ ψ)
(φ ψ) w.carrier
have : φw.carrier := by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
rw [<- truth_lemma w φ]
w : World
φ : Tm
ψ : Tm
at_w_and : at_world w (φ ψ)
at_world w φ
apply And.left
self
w : World
φ : Tm
ψ : Tm
at_w_and : at_world w (φ ψ)
at_world w φ ?b
b
w : World
φ : Tm
ψ : Tm
at_w_and : at_world w (φ ψ)
Prop
apply at_w_and have : ψw.carrier := by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
rw [<- truth_lemma w ψ]
w : World
φ : Tm
ψ : Tm
at_w_and : at_world w (φ ψ)
: φ w.carrier
at_world w ψ
apply And.right
self
w : World
φ : Tm
ψ : Tm
at_w_and : at_world w (φ ψ)
: φ w.carrier
?a at_world w ψ
a
w : World
φ : Tm
ψ : Tm
at_w_and : at_world w (φ ψ)
: φ w.carrier
Prop
apply at_w_and -- use that w is deductively closed apply w.closed
mp.a
w : World
φ : Tm
ψ : Tm
at_w_and : at_world w (φ ψ)
: φ w.carrier
: ψ w.carrier
exists [φ, ψ]
mp.a
w : World
φ : Tm
ψ : Tm
at_w_and : at_world w (φ ψ)
: φ w.carrier
: ψ w.carrier
(∀ ψ_1[φ, ψ], ψ_1 w.carrier) Pf [φ, ψ] (φ ψ)
constructor
mp.a.left
w : World
φ : Tm
ψ : Tm
at_w_and : at_world w (φ ψ)
: φ w.carrier
: ψ w.carrier
ψ_1[φ, ψ], ψ_1 w.carrier
mp.a.right
w : World
φ : Tm
ψ : Tm
at_w_and : at_world w (φ ψ)
: φ w.carrier
: ψ w.carrier
Pf [φ, ψ] (φ ψ)
·
mp.a.left
w : World
φ : Tm
ψ : Tm
at_w_and : at_world w (φ ψ)
: φ w.carrier
: ψ w.carrier
ψ_1[φ, ψ], ψ_1 w.carrier
aesop ·
mp.a.right
w : World
φ : Tm
ψ : Tm
at_w_and : at_world w (φ ψ)
: φ w.carrier
: ψ w.carrier
Pf [φ, ψ] (φ ψ)
have hφmem : φ ∈ [φ, ψ] := by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
simp have hψmem : ψ ∈ [φ, ψ] := by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
simp exact Pf.and_I (Pf.of_mem hφmem) (Pf.of_mem hψmem) ·
mpr
w : World
φ : Tm
ψ : Tm
(φ ψ) w.carrierat_world w (φ ψ)
intro both_in_w
mpr
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
at_world w (φ ψ)
constructor
mpr.left
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
at_world w φ
mpr.right
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
at_world w ψ
·
mpr.left
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
at_world w φ
rw [truth_lemma w φ]
mpr.left
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
φ w.carrier
apply w.closed
mpr.left.a
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
exists [φψ]
mpr.left.a
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
(∀ ψ_1[φ ψ], ψ_1 w.carrier) Pf [φ ψ] φ
constructor
mpr.left.a.left
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
ψ_1[φ ψ], ψ_1 w.carrier
mpr.left.a.right
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
Pf [φ ψ] φ
·
mpr.left.a.left
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
ψ_1[φ ψ], ψ_1 w.carrier
simpa using both_in_w ·
mpr.left.a.right
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
Pf [φ ψ] φ
have hmem : (φψ) ∈ [φψ] := by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
simp exact Pf.and_E₁ (Pf.of_mem hmem) ·
mpr.right
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
at_world w ψ
rw [truth_lemma w ψ]
mpr.right
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
ψ w.carrier
apply w.closed
mpr.right.a
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
exists [φψ]
mpr.right.a
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
(∀ ψ_1[φ ψ], ψ_1 w.carrier) Pf [φ ψ] ψ
constructor
mpr.right.a.left
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
ψ_1[φ ψ], ψ_1 w.carrier
mpr.right.a.right
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
Pf [φ ψ] ψ
·
mpr.right.a.left
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
ψ_1[φ ψ], ψ_1 w.carrier
simpa using both_in_w ·
mpr.right.a.right
w : World
φ : Tm
ψ : Tm
both_in_w : (φ ψ) w.carrier
Pf [φ ψ] ψ
have hmem : (φψ) ∈ [φψ] := by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
simp exact Pf.and_E₂ (Pf.of_mem hmem) | Tm.or φ ψ =>
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
constructor
mp
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ)(φ ψ) w.carrier
mpr
w : World
φ : Tm
ψ : Tm
(φ ψ) w.carrierat_world w (φ ψ)
·
mp
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ)(φ ψ) w.carrier
intro or_at_w
mp
w : World
φ : Tm
ψ : Tm
or_at_w : at_world w (φ ψ)
(φ ψ) w.carrier
rcases or_at_w with φ_at_w | ψ_at_w
mp.inl
w : World
φ : Tm
ψ : Tm
φ_at_w : at_world w φ
(φ ψ) w.carrier
mp.inr
w : World
φ : Tm
ψ : Tm
ψ_at_w : at_world w ψ
(φ ψ) w.carrier
·
mp.inl
w : World
φ : Tm
ψ : Tm
φ_at_w : at_world w φ
(φ ψ) w.carrier
apply w.closed
mp.inl.a
w : World
φ : Tm
ψ : Tm
φ_at_w : at_world w φ
exists [φ]
mp.inl.a
w : World
φ : Tm
ψ : Tm
φ_at_w : at_world w φ
(∀ ψ[φ], ψ w.carrier) Pf [φ] (φ ψ)
constructor
mp.inl.a.left
w : World
φ : Tm
ψ : Tm
φ_at_w : at_world w φ
ψ[φ], ψ w.carrier
mp.inl.a.right
w : World
φ : Tm
ψ : Tm
φ_at_w : at_world w φ
Pf [φ] (φ ψ)
·
mp.inl.a.left
w : World
φ : Tm
ψ : Tm
φ_at_w : at_world w φ
ψ[φ], ψ w.carrier
simp
mp.inl.a.left
w : World
φ : Tm
ψ : Tm
φ_at_w : at_world w φ
φ w.carrier
rw [<- truth_lemma w φ]
mp.inl.a.left
w : World
φ : Tm
ψ : Tm
φ_at_w : at_world w φ
at_world w φ
exact φ_at_w ·
mp.inl.a.right
w : World
φ : Tm
ψ : Tm
φ_at_w : at_world w φ
Pf [φ] (φ ψ)
have hmem : φ ∈ [φ] := by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
simp exact Pf.or_I₁ (Pf.of_mem hmem) ·
mp.inr
w : World
φ : Tm
ψ : Tm
ψ_at_w : at_world w ψ
(φ ψ) w.carrier
apply w.closed
mp.inr.a
w : World
φ : Tm
ψ : Tm
ψ_at_w : at_world w ψ
exists [ψ]
mp.inr.a
w : World
φ : Tm
ψ : Tm
ψ_at_w : at_world w ψ
(∀ ψ_1[ψ], ψ_1 w.carrier) Pf [ψ] (φ ψ)
constructor
mp.inr.a.left
w : World
φ : Tm
ψ : Tm
ψ_at_w : at_world w ψ
ψ_1[ψ], ψ_1 w.carrier
mp.inr.a.right
w : World
φ : Tm
ψ : Tm
ψ_at_w : at_world w ψ
Pf [ψ] (φ ψ)
·
mp.inr.a.left
w : World
φ : Tm
ψ : Tm
ψ_at_w : at_world w ψ
ψ_1[ψ], ψ_1 w.carrier
simp
mp.inr.a.left
w : World
φ : Tm
ψ : Tm
ψ_at_w : at_world w ψ
ψ w.carrier
rw [<- truth_lemma w ψ]
mp.inr.a.left
w : World
φ : Tm
ψ : Tm
ψ_at_w : at_world w ψ
at_world w ψ
exact ψ_at_w ·
mp.inr.a.right
w : World
φ : Tm
ψ : Tm
ψ_at_w : at_world w ψ
Pf [ψ] (φ ψ)
have hmem : ψ ∈ [ψ] := by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
simp exact Pf.or_I₂ (Pf.of_mem hmem) ·
mpr
w : World
φ : Tm
ψ : Tm
(φ ψ) w.carrierat_world w (φ ψ)
intro or_in_w
mpr
w : World
φ : Tm
ψ : Tm
or_in_w : (φ ψ) w.carrier
at_world w (φ ψ)
rcases w.prime or_in_w with φ_in_w | ψ_in_w
mpr.inl
w : World
φ : Tm
ψ : Tm
or_in_w : (φ ψ) w.carrier
φ_in_w : φ w.carrier
at_world w (φ ψ)
mpr.inr
w : World
φ : Tm
ψ : Tm
or_in_w : (φ ψ) w.carrier
ψ_in_w : ψ w.carrier
at_world w (φ ψ)
·
mpr.inl
w : World
φ : Tm
ψ : Tm
or_in_w : (φ ψ) w.carrier
φ_in_w : φ w.carrier
at_world w (φ ψ)
simp
mpr.inl
w : World
φ : Tm
ψ : Tm
or_in_w : (φ ψ) w.carrier
φ_in_w : φ w.carrier
at_world w φ at_world w ψ
rw [truth_lemma w φ]
mpr.inl
w : World
φ : Tm
ψ : Tm
or_in_w : (φ ψ) w.carrier
φ_in_w : φ w.carrier
φ w.carrier at_world w ψ
apply Or.inl
mpr.inl.h
w : World
φ : Tm
ψ : Tm
or_in_w : (φ ψ) w.carrier
φ_in_w : φ w.carrier
φ w.carrier
assumption ·
mpr.inr
w : World
φ : Tm
ψ : Tm
or_in_w : (φ ψ) w.carrier
ψ_in_w : ψ w.carrier
at_world w (φ ψ)
simp
mpr.inr
w : World
φ : Tm
ψ : Tm
or_in_w : (φ ψ) w.carrier
ψ_in_w : ψ w.carrier
at_world w φ at_world w ψ
rw [truth_lemma w ψ]
mpr.inr
w : World
φ : Tm
ψ : Tm
or_in_w : (φ ψ) w.carrier
ψ_in_w : ψ w.carrier
at_world w φ ψ w.carrier
apply Or.inr
mpr.inr.h
w : World
φ : Tm
ψ : Tm
or_in_w : (φ ψ) w.carrier
ψ_in_w : ψ w.carrier
ψ w.carrier
assumption | Tm.imp φ ψ =>
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
constructor
mp
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ)(φ ψ) w.carrier
mpr
w : World
φ : Tm
ψ : Tm
(φ ψ) w.carrierat_world w (φ ψ)
·
mp
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ)(φ ψ) w.carrier
intro imp_at_w
mp
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
(φ ψ) w.carrier
by_contra imp_not_in_w
mp
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
False
have ψ_not_in_clos : ψclosure (Set.insert φ w.carrier) := by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
intro ψ_in_clos
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_in_clos : ψ closure (Set.insert φ w.carrier)
False
apply imp_not_in_w
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_in_clos : ψ closure (Set.insert φ w.carrier)
(φ ψ) w.carrier
apply closure_insert_imp
T_closed
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_in_clos : ψ closure (Set.insert φ w.carrier)
htm
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_in_clos : ψ closure (Set.insert φ w.carrier)
apply w.closed
htm
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_in_clos : ψ closure (Set.insert φ w.carrier)
exact ψ_in_clos have w'_consistent : Consistent (closure (Set.insert φ w.carrier)) := by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
intro ff_in_w'
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_not_in_clos : ψclosure (Set.insert φ w.carrier)
ff_in_w' : Tm.ff closure (Set.insert φ w.carrier)
False
have not_φ_in_w : (φTm.ff) ∈ w.carrier := closure_insert_imp w.closed ff_in_w'
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_not_in_clos : ψclosure (Set.insert φ w.carrier)
ff_in_w' : Tm.ff closure (Set.insert φ w.carrier)
not_φ_in_w : (φ Tm.ff) w.carrier
False
apply imp_not_in_w
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_not_in_clos : ψclosure (Set.insert φ w.carrier)
ff_in_w' : Tm.ff closure (Set.insert φ w.carrier)
not_φ_in_w : (φ Tm.ff) w.carrier
(φ ψ) w.carrier
apply w.closed
a
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_not_in_clos : ψclosure (Set.insert φ w.carrier)
ff_in_w' : Tm.ff closure (Set.insert φ w.carrier)
not_φ_in_w : (φ Tm.ff) w.carrier
exists [φTm.ff]
a
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_not_in_clos : ψclosure (Set.insert φ w.carrier)
ff_in_w' : Tm.ff closure (Set.insert φ w.carrier)
not_φ_in_w : (φ Tm.ff) w.carrier
(∀ ψ[φ Tm.ff], ψ w.carrier) Pf [φ Tm.ff] (φ ψ)
constructor
a.left
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_not_in_clos : ψclosure (Set.insert φ w.carrier)
ff_in_w' : Tm.ff closure (Set.insert φ w.carrier)
not_φ_in_w : (φ Tm.ff) w.carrier
ψ[φ Tm.ff], ψ w.carrier
a.right
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_not_in_clos : ψclosure (Set.insert φ w.carrier)
ff_in_w' : Tm.ff closure (Set.insert φ w.carrier)
not_φ_in_w : (φ Tm.ff) w.carrier
Pf [φ Tm.ff] (φ ψ)
·
a.left
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_not_in_clos : ψclosure (Set.insert φ w.carrier)
ff_in_w' : Tm.ff closure (Set.insert φ w.carrier)
not_φ_in_w : (φ Tm.ff) w.carrier
ψ[φ Tm.ff], ψ w.carrier
simpa using not_φ_in_w ·
a.right
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_not_in_clos : ψclosure (Set.insert φ w.carrier)
ff_in_w' : Tm.ff closure (Set.insert φ w.carrier)
not_φ_in_w : (φ Tm.ff) w.carrier
Pf [φ Tm.ff] (φ ψ)
exact Pf.quodlibet φ ψ -- construct a world containing w and φ, which extends w, and where -- φ holds but ψ doesn't obtainT, T_adm, T_prime⟩ := prime_extension_avoiding (closure_closed _) w'_consistent ψ_not_in_clos
mp
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_not_in_clos : ψclosure (Set.insert φ w.carrier)
w'_consistent : Consistent (closure (Set.insert φ w.carrier))
T : Theory
T_adm : Admissible (closure (Set.insert φ w.carrier)) ψ T
T_prime : Prime T
False
let v : World := T, T_adm.closed, T_adm.consistent, T_prime
mp
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_not_in_clos : ψclosure (Set.insert φ w.carrier)
w'_consistent : Consistent (closure (Set.insert φ w.carrier))
T : Theory
T_adm : Admissible (closure (Set.insert φ w.carrier)) ψ T
T_prime : Prime T
v : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
False
have w_le_v : wv := by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
intro χ
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_not_in_clos : ψclosure (Set.insert φ w.carrier)
w'_consistent : Consistent (closure (Set.insert φ w.carrier))
T : Theory
T_adm : Admissible (closure (Set.insert φ w.carrier)) ψ T
T_prime : Prime T
v : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
χ : Tm
: χ w.carrier
χ v.carrier
exact T_adm.base (subset_closure (Or.inr )) have φ_at_v : at_world v φ := by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
apply (truth_lemma v φ).2
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_not_in_clos : ψclosure (Set.insert φ w.carrier)
w'_consistent : Consistent (closure (Set.insert φ w.carrier))
T : Theory
T_adm : Admissible (closure (Set.insert φ w.carrier)) ψ T
T_prime : Prime T
v : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
w_le_v : w v
φ v.carrier
exact T_adm.base (subset_closure (Or.inl rfl)) have not_ψ_at_v : ¬ at_world v ψ := by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
intro hψv
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_not_in_clos : ψclosure (Set.insert φ w.carrier)
w'_consistent : Consistent (closure (Set.insert φ w.carrier))
T : Theory
T_adm : Admissible (closure (Set.insert φ w.carrier)) ψ T
T_prime : Prime T
v : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
w_le_v : w v
φ_at_v : at_world v φ
hψv : at_world v ψ
False
exact T_adm.avoids ((truth_lemma v ψ).1 hψv) apply not_ψ_at_v
mp
w : World
φ : Tm
ψ : Tm
imp_at_w : at_world w (φ ψ)
imp_not_in_w : (φ ψ)w.carrier
ψ_not_in_clos : ψclosure (Set.insert φ w.carrier)
w'_consistent : Consistent (closure (Set.insert φ w.carrier))
T : Theory
T_adm : Admissible (closure (Set.insert φ w.carrier)) ψ T
T_prime : Prime T
v : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
w_le_v : w v
φ_at_v : at_world v φ
not_ψ_at_v : ¬at_world v ψ
at_world v ψ
apply imp_at_w v w_le_v φ_at_v ·
mpr
w : World
φ : Tm
ψ : Tm
(φ ψ) w.carrierat_world w (φ ψ)
intro imp_in_w v
mpr
w : World
φ : Tm
ψ : Tm
imp_in_w : (φ ψ) w.carrier
v : World
w vat_world v φat_world v ψ
w_le_v
mpr
w : World
φ : Tm
ψ : Tm
imp_in_w : (φ ψ) w.carrier
v : World
w_le_v : w v
at_world v φat_world v ψ
φ_at_v
mpr
w : World
φ : Tm
ψ : Tm
imp_in_w : (φ ψ) w.carrier
v : World
w_le_v : w v
φ_at_v : at_world v φ
at_world v ψ
have imp_in_v : (φψ) ∈ v.carrier := w_le_v imp_in_w
mpr
w : World
φ : Tm
ψ : Tm
imp_in_w : (φ ψ) w.carrier
v : World
w_le_v : w v
φ_at_v : at_world v φ
imp_in_v : (φ ψ) v.carrier
at_world v ψ
have φ_in_v : φv.carrier := by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
rw [<- truth_lemma v φ]
w : World
φ : Tm
ψ : Tm
imp_in_w : (φ ψ) w.carrier
v : World
w_le_v : w v
φ_at_v : at_world v φ
imp_in_v : (φ ψ) v.carrier
at_world v φ
exact φ_at_v have ψ_in_v : ψv.carrier := by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
apply v.closed
a
w : World
φ : Tm
ψ : Tm
imp_in_w : (φ ψ) w.carrier
v : World
w_le_v : w v
φ_at_v : at_world v φ
imp_in_v : (φ ψ) v.carrier
φ_in_v : φ v.carrier
exists [φψ, φ]
a
w : World
φ : Tm
ψ : Tm
imp_in_w : (φ ψ) w.carrier
v : World
w_le_v : w v
φ_at_v : at_world v φ
imp_in_v : (φ ψ) v.carrier
φ_in_v : φ v.carrier
(∀ ψ_1[φ ψ, φ], ψ_1 v.carrier) Pf [φ ψ, φ] ψ
constructor
a.left
w : World
φ : Tm
ψ : Tm
imp_in_w : (φ ψ) w.carrier
v : World
w_le_v : w v
φ_at_v : at_world v φ
imp_in_v : (φ ψ) v.carrier
φ_in_v : φ v.carrier
ψ_1[φ ψ, φ], ψ_1 v.carrier
a.right
w : World
φ : Tm
ψ : Tm
imp_in_w : (φ ψ) w.carrier
v : World
w_le_v : w v
φ_at_v : at_world v φ
imp_in_v : (φ ψ) v.carrier
φ_in_v : φ v.carrier
Pf [φ ψ, φ] ψ
·
a.left
w : World
φ : Tm
ψ : Tm
imp_in_w : (φ ψ) w.carrier
v : World
w_le_v : w v
φ_at_v : at_world v φ
imp_in_v : (φ ψ) v.carrier
φ_in_v : φ v.carrier
ψ_1[φ ψ, φ], ψ_1 v.carrier
intro tm tm_in_ctx
a.left
w : World
φ : Tm
ψ : Tm
imp_in_w : (φ ψ) w.carrier
v : World
w_le_v : w v
φ_at_v : at_world v φ
imp_in_v : (φ ψ) v.carrier
φ_in_v : φ v.carrier
tm : Tm
tm_in_ctx : tm [φ ψ, φ]
tm v.carrier
simp at tm_in_ctx
a.left
w : World
φ : Tm
ψ : Tm
imp_in_w : (φ ψ) w.carrier
v : World
w_le_v : w v
φ_at_v : at_world v φ
imp_in_v : (φ ψ) v.carrier
φ_in_v : φ v.carrier
tm : Tm
tm_in_ctx : tm = (φ ψ) tm = φ
tm v.carrier
rcases tm_in_ctx with rfl | rfl
a.left.inl
w : World
φ : Tm
ψ : Tm
imp_in_w : (φ ψ) w.carrier
v : World
w_le_v : w v
φ_at_v : at_world v φ
imp_in_v : (φ ψ) v.carrier
φ_in_v : φ v.carrier
(φ ψ) v.carrier
a.left.inr
w : World
ψ : Tm
v : World
w_le_v : w v
tm : Tm
imp_in_w : (tm ψ) w.carrier
φ_at_v : at_world v tm
imp_in_v : (tm ψ) v.carrier
φ_in_v : tm v.carrier
tm v.carrier
·
a.left.inl
w : World
φ : Tm
ψ : Tm
imp_in_w : (φ ψ) w.carrier
v : World
w_le_v : w v
φ_at_v : at_world v φ
imp_in_v : (φ ψ) v.carrier
φ_in_v : φ v.carrier
(φ ψ) v.carrier
exact imp_in_v ·
a.left.inr
w : World
ψ : Tm
v : World
w_le_v : w v
tm : Tm
imp_in_w : (tm ψ) w.carrier
φ_at_v : at_world v tm
imp_in_v : (tm ψ) v.carrier
φ_in_v : tm v.carrier
tm v.carrier
exact φ_in_v ·
a.right
w : World
φ : Tm
ψ : Tm
imp_in_w : (φ ψ) w.carrier
v : World
w_le_v : w v
φ_at_v : at_world v φ
imp_in_v : (φ ψ) v.carrier
φ_in_v : φ v.carrier
Pf [φ ψ, φ] ψ
have imp_mem : (φψ) ∈ [φψ, φ] := by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
simp have φ_mem: φ ∈ [φψ, φ] := by
w : World
φ : Tm
ψ : Tm
at_world w (φ ψ) (φ ψ) w.carrier
simp exact Pf.imp_E (Pf.of_mem imp_mem) (Pf.of_mem φ_mem) rw [truth_lemma v ψ]
mpr
w : World
φ : Tm
ψ : Tm
imp_in_w : (φ ψ) w.carrier
v : World
w_le_v : w v
φ_at_v : at_world v φ
imp_in_v : (φ ψ) v.carrier
φ_in_v : φ v.carrier
ψ_in_v : ψ v.carrier
ψ v.carrier
exact ψ_in_v | Tm.tt => by constructor
mp
w : World
mpr
w : World
·
mp
w : World
intro _
mp
w : World
a✝ : at_world w Tm.tt
exact w.closed [], by
w : World
a✝ : at_world w Tm.tt
ψ[], ψ w.carrier
simp, Pf.tt_I ·
mpr
w : World
aesop | Tm.ff => by constructor
mp
w : World
mpr
w : World
·
mp
w : World
intro ff_at_w
mp
w : World
ff_at_w : at_world w Tm.ff
exact False.elim ff_at_w ·
mpr
w : World
intro ff_in_w
mpr
w : World
ff_in_w : Tm.ff w.carrier
exfalso
mpr
w : World
ff_in_w : Tm.ff w.carrier
False
exact w.consistent ff_in_w


end Canonical


open Canonical


theorem countermodel {Γ : Ctxt} {tm : Tm} (neg_pf : ¬ Pf Γ tm) :
    ¬ Kripke.SemEntails.{0} Γ tm := by
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
¬SemEntails Γ tm
have tm_avoids_T : tmtheoryOf Γ := by
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
¬SemEntails Γ tm
intro htm
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
htm : tm theoryOf Γ
False
apply neg_pf
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
htm : tm theoryOf Γ
Pf Γ tm
rw [<- mem_theoryOf]
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
htm : tm theoryOf Γ
tm theoryOf Γ
assumption have ΓT_Cons : Consistent (theoryOf Γ) := by
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
¬SemEntails Γ tm
intro hff
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
hff : Tm.ff theoryOf Γ
False
apply neg_pf
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
hff : Tm.ff theoryOf Γ
Pf Γ tm
apply Pf.ff_E
a
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
hff : Tm.ff theoryOf Γ
Pf Γ Tm.ff
rw [<- mem_theoryOf]
a
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
hff : Tm.ff theoryOf Γ
assumption obtainT, T_admissible, T_prime⟩ := prime_extension_avoiding (closure_closed _) ΓT_Cons tm_avoids_T
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
¬SemEntails Γ tm
let w : World := T, T_admissible.closed, T_admissible.consistent, T_prime
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
¬SemEntails Γ tm
have all_in_T : ∀ Δ : Ctxt, (∀ φΔ, φT) → all_at_world w Δ := by
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
¬SemEntails Γ tm
intro Δ
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
Δ : Ctxt
: φΔ, φ T
all_at_world w Δ
induction Δ with | nil =>
nil
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
: φ[], φ T
simp | cons φ Δ ih =>
cons
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
φ : Tm
Δ : List Tm
ih : (∀ φΔ, φ T) → all_at_world w Δ
: φ_1φ :: Δ, φ_1 T
all_at_world w (φ :: Δ)
constructor
cons.left
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
φ : Tm
Δ : List Tm
ih : (∀ φΔ, φ T) → all_at_world w Δ
: φ_1φ :: Δ, φ_1 T
at_world w φ
cons.right
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
φ : Tm
Δ : List Tm
ih : (∀ φΔ, φ T) → all_at_world w Δ
: φ_1φ :: Δ, φ_1 T
all_at_world w Δ
·
cons.left
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
φ : Tm
Δ : List Tm
ih : (∀ φΔ, φ T) → all_at_world w Δ
: φ_1φ :: Δ, φ_1 T
at_world w φ
rw [truth_lemma w φ]
cons.left
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
φ : Tm
Δ : List Tm
ih : (∀ φΔ, φ T) → all_at_world w Δ
: φ_1φ :: Δ, φ_1 T
φ w.carrier
apply φ
cons.left
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
φ : Tm
Δ : List Tm
ih : (∀ φΔ, φ T) → all_at_world w Δ
: φ_1φ :: Δ, φ_1 T
φ φ :: Δ
simp ·
cons.right
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
φ : Tm
Δ : List Tm
ih : (∀ φΔ, φ T) → all_at_world w Δ
: φ_1φ :: Δ, φ_1 T
all_at_world w Δ
apply ih
cons.right
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
φ : Tm
Δ : List Tm
ih : (∀ φΔ, φ T) → all_at_world w Δ
: φ_1φ :: Δ, φ_1 T
φΔ, φ T
intro ψ
cons.right
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
φ : Tm
Δ : List Tm
ih : (∀ φΔ, φ T) → all_at_world w Δ
: φ_1φ :: Δ, φ_1 T
ψ : Tm
: ψ Δ
ψ T
apply ψ
cons.right
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
φ : Tm
Δ : List Tm
ih : (∀ φΔ, φ T) → all_at_world w Δ
: φ_1φ :: Δ, φ_1 T
ψ : Tm
: ψ Δ
ψ φ :: Δ
simp [] have all_at_Γ : all_at_world w Γ := by
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
¬SemEntails Γ tm
apply all_in_T Γ
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
all_in_T : ∀ (Δ : Ctxt), (∀ φΔ, φ T) → all_at_world w Δ
φΓ, φ T
intro φ φ_in_Γ
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
all_in_T : ∀ (Δ : Ctxt), (∀ φΔ, φ T) → all_at_world w Δ
φ : Tm
φ_in_Γ : φ Γ
φ T
apply T_admissible.base (contextSet_mem φ_in_Γ) have not_tm_at_w : ¬ at_world w tm := by
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
¬SemEntails Γ tm
intro tm_at_w
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
all_in_T : ∀ (Δ : Ctxt), (∀ φΔ, φ T) → all_at_world w Δ
all_at_Γ : all_at_world w Γ
tm_at_w : at_world w tm
False
apply T_admissible.avoids
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
all_in_T : ∀ (Δ : Ctxt), (∀ φΔ, φ T) → all_at_world w Δ
all_at_Γ : all_at_world w Γ
tm_at_w : at_world w tm
tm T
rw [<- truth_lemma w tm]
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
all_in_T : ∀ (Δ : Ctxt), (∀ φΔ, φ T) → all_at_world w Δ
all_at_Γ : all_at_world w Γ
tm_at_w : at_world w tm
at_world w tm
apply tm_at_w intro sem_tm
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
all_in_T : ∀ (Δ : Ctxt), (∀ φΔ, φ T) → all_at_world w Δ
all_at_Γ : all_at_world w Γ
not_tm_at_w : ¬at_world w tm
sem_tm : SemEntails Γ tm
False
apply not_tm_at_w
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
all_in_T : ∀ (Δ : Ctxt), (∀ φΔ, φ T) → all_at_world w Δ
all_at_Γ : all_at_world w Γ
not_tm_at_w : ¬at_world w tm
sem_tm : SemEntails Γ tm
at_world w tm
apply sem_tm
a
Γ : Ctxt
tm : Tm
neg_pf : ¬Pf Γ tm
tm_avoids_T : tmtheoryOf Γ
ΓT_Cons : Consistent (theoryOf Γ)
T : Theory
T_admissible : Admissible (Canonical.closure (contextSet Γ)) tm T
T_prime : Canonical.Prime T
w : World := { carrier := T, closed :=, consistent :=, prime := T_prime }
all_in_T : ∀ (Δ : Ctxt), (∀ φΔ, φ T) → all_at_world w Δ
all_at_Γ : all_at_world w Γ
not_tm_at_w : ¬at_world w tm
sem_tm : SemEntails Γ tm
all_at_world w Γ
apply all_at_Γ


theorem completeness {Γ : Ctxt} {tm : Tm} : Kripke.SemEntails.{0} Γ tmPf Γ tm := by
Γ : Ctxt
tm : Tm
SemEntails Γ tmPf Γ tm
contrapose!
Γ : Ctxt
tm : Tm
¬Pf Γ tm¬SemEntails Γ tm
exact countermodel


end Kripke