internlm/Lean-Github huggingface dataset:
Theorem: loadedTruthLemmaProg
Proof state before:
case refine_3
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
β : Program
Y : { x // x ∈ Worlds }
m : ℕ
X : { x // x ∈ Worlds }
φ : Formula
YS : Vector { x // x ∈ Worlds } (m + 1).succ
Z : { x // x ∈ Worlds } := YS.get 1
ℓ : TP (∗β)
δ : List Program
boxP_in_X : (⌈∗β⌉φ) ∈ ↑YS.head
X_def : X = YS.head
Y_def : Y = YS.last
relSteps : ∀ (i : Fin (m + 1)), relate (↑MG) β (YS.get i.castSucc) (YS.get i.succ)
X_β_Z : relate (↑MG) β YS.head Z
mysat : ∀ (x : Formula), (x ∈ F (∗β) ℓ ∨ ∃ a ∈ P (∗β) ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑YS.head
TP_eq : TP (∗β) = TP β
X_ConF : evaluate (↑MG) YS.head (Con (F β fun x => ℓ ⟨↑x, ⋯⟩))
δ_in_P : δ ∈ P β fun x => ℓ ⟨↑x, ⋯⟩
X_δ_Z : relateSeq (↑MG) δ YS.head Z
δ_notEmpty : ¬δ = []
this✝ : δ ++ [∗β] ∈ P (∗β) ℓ
δβSφ_in_X : (⌈⌈δ⌉⌉⌈∗β⌉φ) ∈ ↑YS.head
this : (⌈∗β⌉φ) ∈ ↑Z
i : Fin m
⊢ relate (↑MG) β (YS.tail.get i.castSucc) (YS.tail.get i.succ)
Tactic:
clear * -relSteps
Proof state after:
case refine_3
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
β : Program
m : ℕ
YS : Vector { x // x ∈ Worlds } (m + 1).succ
relSteps : ∀ (i : Fin (m + 1)), relate (↑MG) β (YS.get i.castSucc) (YS.get i.succ)
i : Fin m
⊢ relate (↑MG) β (YS.tail.get i.castSucc) (YS.tail.get i.succ)
Theorem: loadedTruthLemmaProg
Proof state before:
case refine_3
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
β : Program
m : ℕ
YS : Vector { x // x ∈ Worlds } (m + 1).succ
i : Fin m
relSteps : relate (↑MG) β (YS.get i.succ.castSucc) (YS.get i.succ.succ)
⊢ relate (↑MG) β (YS.tail.get i.castSucc) (YS.tail.get i.succ)
Tactic:
have : ((Vector.tail YS).get i.castSucc) = (YS.get i.succ.castSucc) := by aesop
Proof state after:
case refine_3
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
β : Program
m : ℕ
YS : Vector { x // x ∈ Worlds } (m + 1).succ
i : Fin m
relSteps : relate (↑MG) β (YS.get i.succ.castSucc) (YS.get i.succ.succ)
this : YS.tail.get i.castSucc = YS.get i.succ.castSucc
⊢ relate (↑MG) β (YS.tail.get i.castSucc) (YS.tail.get i.succ)
Theorem: loadedTruthLemmaProg
Proof state before:
case refine_3
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
β : Program
m : ℕ
YS : Vector { x // x ∈ Worlds } (m + 1).succ
i : Fin m
relSteps : relate (↑MG) β (YS.get i.succ.castSucc) (YS.get i.succ.succ)
⊢ relate (↑MG) β (YS.get i.succ.castSucc) (YS.tail.get i.succ)
Tactic:
have : ((Vector.tail YS).get i.succ) = (YS.get i.succ.succ) := by aesop
Proof state after:
case refine_3
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
β : Program
m : ℕ
YS : Vector { x // x ∈ Worlds } (m + 1).succ
i : Fin m
relSteps : relate (↑MG) β (YS.get i.succ.castSucc) (YS.get i.succ.succ)
this : YS.tail.get i.succ = YS.get i.succ.succ
⊢ relate (↑MG) β (YS.get i.succ.castSucc) (YS.tail.get i.succ)
Theorem: loadedTruthLemmaProg
Proof state before:
case test
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
⊢ φ ∈ ↑Y
Tactic:
have satX := (MG.prop.1 X).left
Proof state after:
case test
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX : saturated ↑X
⊢ φ ∈ ↑Y
Theorem: loadedTruthLemmaProg
Proof state before:
case test
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX : saturated ↑X
⊢ φ ∈ ↑Y
Tactic:
simp only [saturated, List.all_eq_true, decide_eq_true_eq, Prod.exists] at satX
Proof state after:
case test
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
⊢ φ ∈ ↑Y
Theorem: loadedTruthLemmaProg
Proof state before:
case test
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
⊢ φ ∈ ↑Y
Tactic:
rcases (satX φ φ α).right.right.right.left boxP_in_X with ⟨ℓ, Xset_sub_X⟩
Proof state after:
case test.intro
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ x ∈ Xset α ℓ φ, x ∈ ↑X
⊢ φ ∈ ↑Y
Theorem: loadedTruthLemmaProg
Proof state before:
case test.intro
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ x ∈ Xset α ℓ φ, x ∈ ↑X
⊢ φ ∈ ↑Y
Tactic:
simp only [Xset, List.mem_append, List.mem_map] at Xset_sub_X
Proof state after:
case test.intro
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
⊢ φ ∈ ↑Y
Theorem: loadedTruthLemmaProg
Proof state before:
case test.intro
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
⊢ φ ∈ ↑Y
Tactic:
have X_F : ∀ τ ∈ F _ (α_def ▸ ℓ), evaluate MG.val X τ := by
  intro τ τ_in
  have forTermination : lengthOfFormula τ < lengthOfProgram _ := F_goes_down τ_in
  have := loadedTruthLemma MG X τ
  subst α_def
  simp_all only [instBot, relate, Subtype.exists, lengthOfProgram, true_or, forall_true_left]
Proof state after:
case test.intro
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
X_F : ∀ τ ∈ F (?'a✝) (α_def ▸ ℓ), evaluate (↑MG) X τ
⊢ φ ∈ ↑Y
Theorem: loadedTruthLemmaProg
Proof state before:
case test.intro
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
X_F : ∀ τ ∈ F (?'a✝) (α_def ▸ ℓ), evaluate (↑MG) X τ
⊢ φ ∈ ↑Y
Tactic:
have := existsBoxFP _ X_rel_Y (α_def ▸ ℓ)
  (by simp [modelCanSemImplyForm,conEval]; exact X_F)
Proof state after:
case test.intro
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
X_F : ∀ τ ∈ F (?'a✝) (α_def ▸ ℓ), evaluate (↑MG) X τ
this : ∃ δ ∈ P (?'a✝) (α_def ▸ ℓ), relateSeq (↑MG) δ X Y
⊢ φ ∈ ↑Y
Theorem: loadedTruthLemmaProg
Proof state before:
case test.intro
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
X_F : ∀ τ ∈ F (?'a✝) (α_def ▸ ℓ), evaluate (↑MG) X τ
this : ∃ δ ∈ P (?'a✝) (α_def ▸ ℓ), relateSeq (↑MG) δ X Y
⊢ φ ∈ ↑Y
Tactic:
rcases this with ⟨δ, δ_in_P, X_δ_Y⟩
Proof state after:
case test.intro.intro.intro
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
X_F : ∀ τ ∈ F (?'a✝) (α_def ▸ ℓ), evaluate (↑MG) X τ
δ : List Program
δ_in_P : δ ∈ P (?'a✝) (α_def ▸ ℓ)
X_δ_Y : relateSeq (↑MG) δ X Y
⊢ φ ∈ ↑Y
Theorem: loadedTruthLemmaProg
Proof state before:
case test.intro.intro.intro
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
X_F : ∀ τ ∈ F (?'a✝) (α_def ▸ ℓ), evaluate (↑MG) X τ
δ : List Program
δ_in_P : δ ∈ P (?'a✝) (α_def ▸ ℓ)
X_δ_Y : relateSeq (↑MG) δ X Y
⊢ φ ∈ ↑Y
Tactic:
have δφ_in_X : (⌈⌈δ⌉⌉φ) ∈ X.val := by
  simp_all only [instBot, relate, Subtype.exists]
  subst_eqs
  apply Xset_sub_X
  right
  use δ
Proof state after:
case test.intro.intro.intro
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
X_F : ∀ τ ∈ F (?'a✝) (α_def ▸ ℓ), evaluate (↑MG) X τ
δ : List Program
δ_in_P : δ ∈ P (?'a✝) (α_def ▸ ℓ)
X_δ_Y : relateSeq (↑MG) δ X Y
δφ_in_X : (⌈⌈δ⌉⌉φ) ∈ ↑X
⊢ φ ∈ ↑Y
Theorem: loadedTruthLemmaProg
Proof state before:
case test.intro.intro.intro
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
X_F : ∀ τ ∈ F (?'a✝) (α_def ▸ ℓ), evaluate (↑MG) X τ
δ : List Program
δ_in_P : δ ∈ P (?'a✝) (α_def ▸ ℓ)
X_δ_Y : relateSeq (↑MG) δ X Y
δφ_in_X : (⌈⌈δ⌉⌉φ) ∈ ↑X
⊢ φ ∈ ↑Y
Tactic:
have IHδ : ∀ d ∈ δ, ∀ (X' Y' : Worlds), ∀ φ',
    (⌈d⌉φ') ∈ X'.val → relate MG.val d X' Y' → φ' ∈ Y'.val := by
  intro d d_in_δ X' Y' φ' dφ_in_X' X'_d_Y'
  have forTermination : lengthOf d < lengthOf α := by
    have := P_goes_down d_in_δ δ_in_P
    simp_all [isAtomic, isStar]
  exact loadedTruthLemmaProg MG d X' φ' dφ_in_X' Y' X'_d_Y'
Proof state after:
case test.intro.intro.intro
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
X_F : ∀ τ ∈ F (?'a✝) (α_def ▸ ℓ), evaluate (↑MG) X τ
δ : List Program
δ_in_P : δ ∈ P (?'a✝) (α_def ▸ ℓ)
X_δ_Y : relateSeq (↑MG) δ X Y
δφ_in_X : (⌈⌈δ⌉⌉φ) ∈ ↑X
IHδ : ∀ d ∈ δ, ∀ (X' Y' : { x // x ∈ Worlds }) (φ' : Formula), (⌈d⌉φ') ∈ ↑X' → relate (↑MG) d X' Y' → φ' ∈ ↑Y'
⊢ φ ∈ ↑Y
Theorem: loadedTruthLemmaProg
Proof state before:
case test.intro.intro.intro
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
X_F : ∀ τ ∈ F (?'a✝) (α_def ▸ ℓ), evaluate (↑MG) X τ
δ : List Program
δ_in_P : δ ∈ P (?'a✝) (α_def ▸ ℓ)
X_δ_Y : relateSeq (↑MG) δ X Y
δφ_in_X : (⌈⌈δ⌉⌉φ) ∈ ↑X
IHδ : ∀ d ∈ δ, ∀ (X' Y' : { x // x ∈ Worlds }) (φ' : Formula), (⌈d⌉φ') ∈ ↑X' → relate (↑MG) d X' Y' → φ' ∈ ↑Y'
⊢ φ ∈ ↑Y
Tactic:
cases em (δ = [])
Proof state after:
case test.intro.intro.intro.inl
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
X_F : ∀ τ ∈ F (?'a✝) (α_def ▸ ℓ), evaluate (↑MG) X τ
δ : List Program
δ_in_P : δ ∈ P (?'a✝) (α_def ▸ ℓ)
X_δ_Y : relateSeq (↑MG) δ X Y
δφ_in_X : (⌈⌈δ⌉⌉φ) ∈ ↑X
IHδ : ∀ d ∈ δ, ∀ (X' Y' : { x // x ∈ Worlds }) (φ' : Formula), (⌈d⌉φ') ∈ ↑X' → relate (↑MG) d X' Y' → φ' ∈ ↑Y'
h✝ : δ = []
⊢ φ ∈ ↑Y

case test.intro.intro.intro.inr
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
X_F : ∀ τ ∈ F (?'a✝) (α_def ▸ ℓ), evaluate (↑MG) X τ
δ : List Program
δ_in_P : δ ∈ P (?'a✝) (α_def ▸ ℓ)
X_δ_Y : relateSeq (↑MG) δ X Y
δφ_in_X : (⌈⌈δ⌉⌉φ) ∈ ↑X
IHδ : ∀ d ∈ δ, ∀ (X' Y' : { x // x ∈ Worlds }) (φ' : Formula), (⌈d⌉φ') ∈ ↑X' → relate (↑MG) d X' Y' → φ' ∈ ↑Y'
h✝ : ¬δ = []
⊢ φ ∈ ↑Y
Theorem: loadedTruthLemmaProg
Proof state before:
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
X_F : ∀ τ ∈ F (?'a✝) (α_def ▸ ℓ), evaluate (↑MG) X τ
δ : List Program
δ_in_P : δ ∈ P (?'a✝) (α_def ▸ ℓ)
X_δ_Y : relateSeq (↑MG) δ X Y
δφ_in_X : (⌈⌈δ⌉⌉φ) ∈ ↑X
IHδ : ∀ d ∈ δ, ∀ (X' Y' : { x // x ∈ Worlds }) (φ' : Formula), (⌈d⌉φ') ∈ ↑X' → relate (↑MG) d X' Y' → φ' ∈ ↑Y'
δ_notEmpty : ¬δ = []
⊢ φ ∈ ↑Y
Tactic:
case inr δ_notEmpty =>
  have := relateSeq_toChain' X_δ_Y δ_notEmpty
  rcases this with ⟨l, length_def, lchain⟩
  suffices loadClaim : ∀ i : Fin (X :: l ++ [Y]).length,
      (⌈⌈δ.drop i⌉⌉φ) ∈ ((X :: l ++ [Y]).get i).val by
    specialize loadClaim (Fin.last _)
    simp [length_def] at loadClaim
    convert loadClaim
    have := @List.get_last _ Y (X :: l) (Fin.last _)
    simp_all [eq_comm]
  intro i
  exact loadClaimHelper length_def δφ_in_X lchain IHδ i
Proof state after:
no goals
Theorem: loadedTruthLemmaProg
Proof state before:
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
⊢ ∀ τ ∈ F (?'a✝) (α_def ▸ ℓ), evaluate (↑MG) X τ
Tactic:
intro τ τ_in
Proof state after:
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
τ : Formula
τ_in : τ ∈ F (?'a✝) (α_def ▸ ℓ)
⊢ evaluate (↑MG) X τ
Theorem: loadedTruthLemmaProg
Proof state before:
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
τ : Formula
τ_in : τ ∈ F (?'a✝) (α_def ▸ ℓ)
⊢ evaluate (↑MG) X τ
Tactic:
have forTermination : lengthOfFormula τ < lengthOfProgram _ := F_goes_down τ_in
Proof state after:
Worlds : Finset (Finset Formula)
MG : ModelGraph Worlds
α : Program
X : { x // x ∈ Worlds }
φ : Formula
boxP_in_X : (⌈α⌉φ) ∈ ↑X
a✝ : Formula
α_def : α = (?'a✝)
Y : { x // x ∈ Worlds }
X_rel_Y : relate (↑MG) (?'a✝) X Y
satX :
  ∀ (P Q : Formula) (α : Program),
    ((~~P) ∈ ↑X → P ∈ ↑X) ∧
      (P⋀Q ∈ ↑X → P ∈ ↑X ∧ Q ∈ ↑X) ∧
        ((~P⋀Q) ∈ ↑X → (~P) ∈ ↑X ∨ (~Q) ∈ ↑X) ∧
          ((⌈α⌉P) ∈ ↑X → ∃ l, ∀ x ∈ Xset α l P, x ∈ ↑X) ∧
            ((~⌈α⌉P) ∈ ↑X → ∃ a b, (a, b) ∈ H α ∧ ∀ x ∈ Yset (a, b) P, x ∈ ↑X)
ℓ : TP α
Xset_sub_X : ∀ (x : Formula), (x ∈ F α ℓ ∨ ∃ a ∈ P α ℓ, (⌈⌈a⌉⌉φ) = x) → x ∈ ↑X
τ : Formula
τ_in : τ ∈ F (?'a✝) (α_def ▸ ℓ)
forTermination : lengthOfFormula τ < lengthOfProgram (?'a✝)
⊢ evaluate (↑MG) X τ