Theorem: LO.FirstOrder.Derivation.ProofList.provable_iff (Logic/FirstOrder/Computability/Calculus.lean)

State before:
μ : Type ?u.1107580
L : Language
inst✝⁷ : (k : ℕ) → DecidableEq (L.Func k)
inst✝⁶ : (k : ℕ) → DecidableEq (L.Rel k)
inst✝⁵ : (k : ℕ) → Primcodable (L.Func k)
inst✝⁴ : (k : ℕ) → Primcodable (L.Rel k)
inst✝³ : UniformlyPrimcodable L.Func
inst✝² : UniformlyPrimcodable L.Rel
inst✝¹ : Primcodable μ
T : Theory L
inst✝ : DecidablePred T
σ : Sentence L
⊢ T ⊢! σ →
    ∃ l U,
      (U.all fun x => decide (T x)) = true ∧
        List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U) ∈ l.sequents ∧ l.isProper = true
Tactic:
rintro ⟨U, hU, d⟩
State after:
case intro.mk
μ : Type ?u.1107580
L : Language
inst✝⁷ : (k : ℕ) → DecidableEq (L.Func k)
inst✝⁶ : (k : ℕ) → DecidableEq (L.Rel k)
inst✝⁵ : (k : ℕ) → Primcodable (L.Func k)
inst✝⁴ : (k : ℕ) → Primcodable (L.Rel k)
inst✝³ : UniformlyPrimcodable L.Func
inst✝² : UniformlyPrimcodable L.Rel
inst✝¹ : Primcodable μ
T : Theory L
inst✝ : DecidablePred T
σ : Sentence L
U : List (Sentence L)
hU : ∀ p ∈ U, p ∈ T
d : U ⊢² [σ]
⊢ ∃ l U,
    (U.all fun x => decide (T x)) = true ∧
      List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U) ∈ l.sequents ∧ l.isProper = true

State before:
case intro.mk
μ : Type ?u.1107580
L : Language
inst✝⁷ : (k : ℕ) → DecidableEq (L.Func k)
inst✝⁶ : (k : ℕ) → DecidableEq (L.Rel k)
inst✝⁵ : (k : ℕ) → Primcodable (L.Func k)
inst✝⁴ : (k : ℕ) → Primcodable (L.Rel k)
inst✝³ : UniformlyPrimcodable L.Func
inst✝² : UniformlyPrimcodable L.Rel
inst✝¹ : Primcodable μ
T : Theory L
inst✝ : DecidablePred T
σ : Sentence L
U : List (Sentence L)
hU : ∀ p ∈ U, p ∈ T
d : U ⊢² [σ]
⊢ ∃ l U,
    (U.all fun x => decide (T x)) = true ∧
      List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U) ∈ l.sequents ∧ l.isProper = true
Tactic:
rcases derivable_iff_isProper.mp ⟨d⟩ with ⟨l, hl, hmem⟩
State after:
case intro.mk.intro.intro
μ : Type ?u.1107580
L : Language
inst✝⁷ : (k : ℕ) → DecidableEq (L.Func k)
inst✝⁶ : (k : ℕ) → DecidableEq (L.Rel k)
inst✝⁵ : (k : ℕ) → Primcodable (L.Func k)
inst✝⁴ : (k : ℕ) → Primcodable (L.Rel k)
inst✝³ : UniformlyPrimcodable L.Func
inst✝² : UniformlyPrimcodable L.Rel
inst✝¹ : Primcodable μ
T : Theory L
inst✝ : DecidablePred T
σ : Sentence L
U : List (Sentence L)
hU : ∀ p ∈ U, p ∈ T
d : U ⊢² [σ]
l : ProofList L
hl : l.isProper = true
hmem : List.map (⇑Rew.emb.hom) (List.map (fun x => ~x) U ++ [σ]) ∈ l.sequents
⊢ ∃ l U,
    (U.all fun x => decide (T x)) = true ∧
      List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U) ∈ l.sequents ∧ l.isProper = true

State before:
case intro.mk.intro.intro
μ : Type ?u.1107580
L : Language
inst✝⁷ : (k : ℕ) → DecidableEq (L.Func k)
inst✝⁶ : (k : ℕ) → DecidableEq (L.Rel k)
inst✝⁵ : (k : ℕ) → Primcodable (L.Func k)
inst✝⁴ : (k : ℕ) → Primcodable (L.Rel k)
inst✝³ : UniformlyPrimcodable L.Func
inst✝² : UniformlyPrimcodable L.Rel
inst✝¹ : Primcodable μ
T : Theory L
inst✝ : DecidablePred T
σ : Sentence L
U : List (Sentence L)
hU : ∀ p ∈ U, p ∈ T
d : U ⊢² [σ]
l : ProofList L
hl : l.isProper = true
hmem : List.map (⇑Rew.emb.hom) (List.map (fun x => ~x) U ++ [σ]) ∈ l.sequents
l' : List (Code L × List (Semiformula L ℕ 0)) :=
  (Code.wk (List.map (⇑Rew.emb.hom) (List.map (fun x => ~x) U ++ [σ])),
      List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U)) ::
    l
⊢ ∃ l U,
    (U.all fun x => decide (T x)) = true ∧
      List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U) ∈ l.sequents ∧ l.isProper = true
Tactic:
have hl' : isProper l' := by simpa[isProper, hl] using hmem
State after:
case intro.mk.intro.intro
μ : Type ?u.1107580
L : Language
inst✝⁷ : (k : ℕ) → DecidableEq (L.Func k)
inst✝⁶ : (k : ℕ) → DecidableEq (L.Rel k)
inst✝⁵ : (k : ℕ) → Primcodable (L.Func k)
inst✝⁴ : (k : ℕ) → Primcodable (L.Rel k)
inst✝³ : UniformlyPrimcodable L.Func
inst✝² : UniformlyPrimcodable L.Rel
inst✝¹ : Primcodable μ
T : Theory L
inst✝ : DecidablePred T
σ : Sentence L
U : List (Sentence L)
hU : ∀ p ∈ U, p ∈ T
d : U ⊢² [σ]
l : ProofList L
hl : l.isProper = true
hmem : List.map (⇑Rew.emb.hom) (List.map (fun x => ~x) U ++ [σ]) ∈ l.sequents
l' : List (Code L × List (Semiformula L ℕ 0)) :=
  (Code.wk (List.map (⇑Rew.emb.hom) (List.map (fun x => ~x) U ++ [σ])),
      List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U)) ::
    l
hl' : isProper l' = true
⊢ ∃ l U,
    (U.all fun x => decide (T x)) = true ∧
      List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U) ∈ l.sequents ∧ l.isProper = true

State before:
case intro.mk.intro.intro
μ : Type ?u.1107580
L : Language
inst✝⁷ : (k : ℕ) → DecidableEq (L.Func k)
inst✝⁶ : (k : ℕ) → DecidableEq (L.Rel k)
inst✝⁵ : (k : ℕ) → Primcodable (L.Func k)
inst✝⁴ : (k : ℕ) → Primcodable (L.Rel k)
inst✝³ : UniformlyPrimcodable L.Func
inst✝² : UniformlyPrimcodable L.Rel
inst✝¹ : Primcodable μ
T : Theory L
inst✝ : DecidablePred T
σ : Sentence L
U : List (Sentence L)
hU : ∀ p ∈ U, p ∈ T
d : U ⊢² [σ]
l : ProofList L
hl : l.isProper = true
hmem : List.map (⇑Rew.emb.hom) (List.map (fun x => ~x) U ++ [σ]) ∈ l.sequents
l' : List (Code L × List (Semiformula L ℕ 0)) :=
  (Code.wk (List.map (⇑Rew.emb.hom) (List.map (fun x => ~x) U ++ [σ])),
      List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U)) ::
    l
hl' : isProper l' = true
⊢ ∃ l U,
    (U.all fun x => decide (T x)) = true ∧
      List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U) ∈ l.sequents ∧ l.isProper = true
Tactic:
exact ⟨l', U, by simpa[List.subsetSet] using hU, by simp [l'], hl'⟩
State after:
no goals

State before:
μ : Type ?u.1107580
L : Language
inst✝⁷ : (k : ℕ) → DecidableEq (L.Func k)
inst✝⁶ : (k : ℕ) → DecidableEq (L.Rel k)
inst✝⁵ : (k : ℕ) → Primcodable (L.Func k)
inst✝⁴ : (k : ℕ) → Primcodable (L.Rel k)
inst✝³ : UniformlyPrimcodable L.Func
inst✝² : UniformlyPrimcodable L.Rel
inst✝¹ : Primcodable μ
T : Theory L
inst✝ : DecidablePred T
σ : Sentence L
U : List (Sentence L)
hU : ∀ p ∈ U, p ∈ T
d : U ⊢² [σ]
l : ProofList L
hl : l.isProper = true
hmem : List.map (⇑Rew.emb.hom) (List.map (fun x => ~x) U ++ [σ]) ∈ l.sequents
l' : List (Code L × List (Semiformula L ℕ 0)) :=
  (Code.wk (List.map (⇑Rew.emb.hom) (List.map (fun x => ~x) U ++ [σ])),
      List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U)) ::
    l
⊢ isProper l' = true
Tactic:
simpa[isProper, hl] using hmem
State after:
no goals

State before:
μ : Type ?u.1107580
L : Language
inst✝⁷ : (k : ℕ) → DecidableEq (L.Func k)
inst✝⁶ : (k : ℕ) → DecidableEq (L.Rel k)
inst✝⁵ : (k : ℕ) → Primcodable (L.Func k)
inst✝⁴ : (k : ℕ) → Primcodable (L.Rel k)
inst✝³ : UniformlyPrimcodable L.Func
inst✝² : UniformlyPrimcodable L.Rel
inst✝¹ : Primcodable μ
T : Theory L
inst✝ : DecidablePred T
σ : Sentence L
U : List (Sentence L)
hU : ∀ p ∈ U, p ∈ T
d : U ⊢² [σ]
l : ProofList L
hl : l.isProper = true
hmem : List.map (⇑Rew.emb.hom) (List.map (fun x => ~x) U ++ [σ]) ∈ l.sequents
l' : List (Code L × List (Semiformula L ℕ 0)) :=
  (Code.wk (List.map (⇑Rew.emb.hom) (List.map (fun x => ~x) U ++ [σ])),
      List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U)) ::
    l
hl' : isProper l' = true
⊢ (U.all fun x => decide (T x)) = true
Tactic:
simpa[List.subsetSet] using hU
State after:
no goals

State before:
μ : Type ?u.1107580
L : Language
inst✝⁷ : (k : ℕ) → DecidableEq (L.Func k)
inst✝⁶ : (k : ℕ) → DecidableEq (L.Rel k)
inst✝⁵ : (k : ℕ) → Primcodable (L.Func k)
inst✝⁴ : (k : ℕ) → Primcodable (L.Rel k)
inst✝³ : UniformlyPrimcodable L.Func
inst✝² : UniformlyPrimcodable L.Rel
inst✝¹ : Primcodable μ
T : Theory L
inst✝ : DecidablePred T
σ : Sentence L
U : List (Sentence L)
hU : ∀ p ∈ U, p ∈ T
d : U ⊢² [σ]
l : ProofList L
hl : l.isProper = true
hmem : List.map (⇑Rew.emb.hom) (List.map (fun x => ~x) U ++ [σ]) ∈ l.sequents
l' : List (Code L × List (Semiformula L ℕ 0)) :=
  (Code.wk (List.map (⇑Rew.emb.hom) (List.map (fun x => ~x) U ++ [σ])),
      List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U)) ::
    l
hl' : isProper l' = true
⊢ List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U) ∈ sequents l'
Tactic:
simp [l']
State after:
no goals

State before:
μ : Type ?u.1107580
L : Language
inst✝⁷ : (k : ℕ) → DecidableEq (L.Func k)
inst✝⁶ : (k : ℕ) → DecidableEq (L.Rel k)
inst✝⁵ : (k : ℕ) → Primcodable (L.Func k)
inst✝⁴ : (k : ℕ) → Primcodable (L.Rel k)
inst✝³ : UniformlyPrimcodable L.Func
inst✝² : UniformlyPrimcodable L.Rel
inst✝¹ : Primcodable μ
T : Theory L
inst✝ : DecidablePred T
σ : Sentence L
⊢ (∃ l U,
      (U.all fun x => decide (T x)) = true ∧
        List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U) ∈ l.sequents ∧ l.isProper = true) →
    T ⊢! σ
Tactic:
rintro ⟨l, U, hU, hl, hproper⟩
State after:
case intro.intro.intro.intro
μ : Type ?u.1107580
L : Language
inst✝⁷ : (k : ℕ) → DecidableEq (L.Func k)
inst✝⁶ : (k : ℕ) → DecidableEq (L.Rel k)
inst✝⁵ : (k : ℕ) → Primcodable (L.Func k)
inst✝⁴ : (k : ℕ) → Primcodable (L.Rel k)
inst✝³ : UniformlyPrimcodable L.Func
inst✝² : UniformlyPrimcodable L.Rel
inst✝¹ : Primcodable μ
T : Theory L
inst✝ : DecidablePred T
σ : Sentence L
l : ProofList L
U : List (Sentence L)
hU : (U.all fun x => decide (T x)) = true
hl : List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U) ∈ l.sequents
hproper : l.isProper = true
⊢ T ⊢! σ

State before:
case intro.intro.intro.intro
μ : Type ?u.1107580
L : Language
inst✝⁷ : (k : ℕ) → DecidableEq (L.Func k)
inst✝⁶ : (k : ℕ) → DecidableEq (L.Rel k)
inst✝⁵ : (k : ℕ) → Primcodable (L.Func k)
inst✝⁴ : (k : ℕ) → Primcodable (L.Rel k)
inst✝³ : UniformlyPrimcodable L.Func
inst✝² : UniformlyPrimcodable L.Rel
inst✝¹ : Primcodable μ
T : Theory L
inst✝ : DecidablePred T
σ : Sentence L
l : ProofList L
U : List (Sentence L)
hU : (U.all fun x => decide (T x)) = true
hl : List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U) ∈ l.sequents
hproper : l.isProper = true
⊢ T ⊢! σ
Tactic:
rcases derivation_of_isProper l hproper _ hl with ⟨d⟩
State after:
case intro.intro.intro.intro.intro
μ : Type ?u.1107580
L : Language
inst✝⁷ : (k : ℕ) → DecidableEq (L.Func k)
inst✝⁶ : (k : ℕ) → DecidableEq (L.Rel k)
inst✝⁵ : (k : ℕ) → Primcodable (L.Func k)
inst✝⁴ : (k : ℕ) → Primcodable (L.Rel k)
inst✝³ : UniformlyPrimcodable L.Func
inst✝² : UniformlyPrimcodable L.Rel
inst✝¹ : Primcodable μ
T : Theory L
inst✝ : DecidablePred T
σ : Sentence L
l : ProofList L
U : List (Sentence L)
hU : (U.all fun x => decide (T x)) = true
hl : List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U) ∈ l.sequents
hproper : l.isProper = true
d :  ⊢¹ List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U)
⊢ T ⊢! σ

State before:
case intro.intro.intro.intro.intro
μ : Type ?u.1107580
L : Language
inst✝⁷ : (k : ℕ) → DecidableEq (L.Func k)
inst✝⁶ : (k : ℕ) → DecidableEq (L.Rel k)
inst✝⁵ : (k : ℕ) → Primcodable (L.Func k)
inst✝⁴ : (k : ℕ) → Primcodable (L.Rel k)
inst✝³ : UniformlyPrimcodable L.Func
inst✝² : UniformlyPrimcodable L.Rel
inst✝¹ : Primcodable μ
T : Theory L
inst✝ : DecidablePred T
σ : Sentence L
l : ProofList L
U : List (Sentence L)
hU : (U.all fun x => decide (T x)) = true
hl : List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U) ∈ l.sequents
hproper : l.isProper = true
d :  ⊢¹ List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U)
⊢ T ⊢! σ
Tactic:
exact Gentzen.provable_iff.mpr ⟨U, by simpa using hU, ⟨Derivation.toOneSided (d.wk $ by simp)⟩⟩
State after:
no goals

State before:
μ : Type ?u.1107580
L : Language
inst✝⁷ : (k : ℕ) → DecidableEq (L.Func k)
inst✝⁶ : (k : ℕ) → DecidableEq (L.Rel k)
inst✝⁵ : (k : ℕ) → Primcodable (L.Func k)
inst✝⁴ : (k : ℕ) → Primcodable (L.Rel k)
inst✝³ : UniformlyPrimcodable L.Func
inst✝² : UniformlyPrimcodable L.Rel
inst✝¹ : Primcodable μ
T : Theory L
inst✝ : DecidablePred T
σ : Sentence L
l : ProofList L
U : List (Sentence L)
hU : (U.all fun x => decide (T x)) = true
hl : List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U) ∈ l.sequents
hproper : l.isProper = true
d :  ⊢¹ List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U)
⊢ ∀ π ∈ U, π ∈ T
Tactic:
simpa using hU
State after:
no goals

State before:
μ : Type ?u.1107580
L : Language
inst✝⁷ : (k : ℕ) → DecidableEq (L.Func k)
inst✝⁶ : (k : ℕ) → DecidableEq (L.Rel k)
inst✝⁵ : (k : ℕ) → Primcodable (L.Func k)
inst✝⁴ : (k : ℕ) → Primcodable (L.Rel k)
inst✝³ : UniformlyPrimcodable L.Func
inst✝² : UniformlyPrimcodable L.Rel
inst✝¹ : Primcodable μ
T : Theory L
inst✝ : DecidablePred T
σ : Sentence L
l : ProofList L
U : List (Sentence L)
hU : (U.all fun x => decide (T x)) = true
hl : List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U) ∈ l.sequents
hproper : l.isProper = true
d :  ⊢¹ List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U)
⊢ List.map (⇑Rew.emb.hom) (σ :: List.map (fun x => ~x) U) ⊆ List.map (⇑Rew.emb.hom) (List.map (fun x => ~x) U ++ [σ])
Tactic:
simp
State after:
no goals