Theorem: Turing.TM2to1.tr_supports
File: Mathlib/Computability/TuringMachine.lean

tactic: suffices ∀ (q) (_ : TM2.SupportsStmt S q) (_ : ∀ x ∈ trStmts₁ q, x ∈ trSupp M S),
    TM1.SupportsStmt (trSupp M S) (trNormal q) ∧
    ∀ l' ∈ trStmts₁ q, TM1.SupportsStmt (trSupp M S) (tr M l') by
  rcases Finset.mem_biUnion.1 h with ⟨l, lS, h⟩
  have :=
    this _ (ss.2 l lS) fun x hx ↦ Finset.mem_biUnion.2 ⟨_, lS, Finset.mem_insert_of_mem hx⟩
  rcases Finset.mem_insert.1 h with (rfl | h) <;> [exact this.1; exact this.2 _ h]
state_before: K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
l' : Λ'
h : l' ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: clear h l'
state_before: K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
l' : Λ'
h : l' ∈ trSupp M S
⊢ ∀ (q : Stmt₂),
    TM2.SupportsStmt S q →
      (∀ (x : Λ'), x ∈ trStmts₁ q → x ∈ trSupp M S) →
        TM1.SupportsStmt (trSupp M S) (trNormal q) ∧
          ∀ (l' : Λ'), l' ∈ trStmts₁ q → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: refine' stmtStRec _ _ _ _ _
state_before: K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
⊢ ∀ (q : Stmt₂),
    TM2.SupportsStmt S q →
      (∀ (x : Λ'), x ∈ trStmts₁ q → x ∈ trSupp M S) →
        TM1.SupportsStmt (trSupp M S) (trNormal q) ∧
          ∀ (l' : Λ'), l' ∈ trStmts₁ q → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: rcases Finset.mem_biUnion.1 h with ⟨l, lS, h⟩
state_before: K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
l' : Λ'
h : l' ∈ trSupp M S
this :
  ∀ (q : Stmt₂),
    TM2.SupportsStmt S q →
      (∀ (x : Λ'), x ∈ trStmts₁ q → x ∈ trSupp M S) →
        TM1.SupportsStmt (trSupp M S) (trNormal q) ∧
          ∀ (l' : Λ'), l' ∈ trStmts₁ q → TM1.SupportsStmt (trSupp M S) (tr M l')
⊢ TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: have :=
  this _ (ss.2 l lS) fun x hx ↦ Finset.mem_biUnion.2 ⟨_, lS, Finset.mem_insert_of_mem hx⟩
state_before: case intro.intro
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
l' : Λ'
h✝ : l' ∈ trSupp M S
this :
  ∀ (q : Stmt₂),
    TM2.SupportsStmt S q →
      (∀ (x : Λ'), x ∈ trStmts₁ q → x ∈ trSupp M S) →
        TM1.SupportsStmt (trSupp M S) (trNormal q) ∧
          ∀ (l' : Λ'), l' ∈ trStmts₁ q → TM1.SupportsStmt (trSupp M S) (tr M l')
l : Λ
lS : l ∈ S
h : l' ∈ insert (normal l) (trStmts₁ (M l))
⊢ TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: rcases Finset.mem_insert.1 h with (rfl | h) <;> [exact this.1; exact this.2 _ h]
state_before: case intro.intro
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
l' : Λ'
h✝ : l' ∈ trSupp M S
this✝ :
  ∀ (q : Stmt₂),
    TM2.SupportsStmt S q →
      (∀ (x : Λ'), x ∈ trStmts₁ q → x ∈ trSupp M S) →
        TM1.SupportsStmt (trSupp M S) (trNormal q) ∧
          ∀ (l' : Λ'), l' ∈ trStmts₁ q → TM1.SupportsStmt (trSupp M S) (tr M l')
l : Λ
lS : l ∈ S
h : l' ∈ insert (normal l) (trStmts₁ (M l))
this :
  TM1.SupportsStmt (trSupp M S) (trNormal (M l)) ∧
    ∀ (l' : Λ'), l' ∈ trStmts₁ (M l) → TM1.SupportsStmt (trSupp M S) (tr M l')
⊢ TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: intro _ s _ IH ss' sub
state_before: case refine'_1
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
⊢ ∀ (k : K) (s : StAct k) (q : Stmt₂),
    (TM2.SupportsStmt S q →
        (∀ (x : Λ'), x ∈ trStmts₁ q → x ∈ trSupp M S) →
          TM1.SupportsStmt (trSupp M S) (trNormal q) ∧
            ∀ (l' : Λ'), l' ∈ trStmts₁ q → TM1.SupportsStmt (trSupp M S) (tr M l')) →
      TM2.SupportsStmt S (stRun s q) →
        (∀ (x : Λ'), x ∈ trStmts₁ (stRun s q) → x ∈ trSupp M S) →
          TM1.SupportsStmt (trSupp M S) (trNormal (stRun s q)) ∧
            ∀ (l' : Λ'), l' ∈ trStmts₁ (stRun s q) → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: rw [TM2to1.supports_run] at ss'
state_before: case refine'_1
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
s : StAct k✝
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S (stRun s q✝)
sub : ∀ (x : Λ'), x ∈ trStmts₁ (stRun s q✝) → x ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (trNormal (stRun s q✝)) ∧
    ∀ (l' : Λ'), l' ∈ trStmts₁ (stRun s q✝) → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: simp only [TM2to1.trStmts₁_run, Finset.mem_union, Finset.mem_insert, Finset.mem_singleton]
  at sub
state_before: case refine'_1
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
s : StAct k✝
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
sub : ∀ (x : Λ'), x ∈ trStmts₁ (stRun s q✝) → x ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (trNormal (stRun s q✝)) ∧
    ∀ (l' : Λ'), l' ∈ trStmts₁ (stRun s q✝) → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: have hgo := sub _ (Or.inl <| Or.inl rfl)
state_before: case refine'_1
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
s : StAct k✝
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
sub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (trNormal (stRun s q✝)) ∧
    ∀ (l' : Λ'), l' ∈ trStmts₁ (stRun s q✝) → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: have hret := sub _ (Or.inl <| Or.inr rfl)
state_before: case refine'_1
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
s : StAct k✝
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
sub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S
hgo : go k✝ s q✝ ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (trNormal (stRun s q✝)) ∧
    ∀ (l' : Λ'), l' ∈ trStmts₁ (stRun s q✝) → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: cases' IH ss' fun x hx ↦ sub x <| Or.inr hx with IH₁ IH₂
state_before: case refine'_1
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
s : StAct k✝
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
sub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S
hgo : go k✝ s q✝ ∈ trSupp M S
hret : ret q✝ ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (trNormal (stRun s q✝)) ∧
    ∀ (l' : Λ'), l' ∈ trStmts₁ (stRun s q✝) → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: refine' ⟨by simp only [trNormal_run, TM1.SupportsStmt]; intros; exact hgo, fun l h ↦ _⟩
state_before: case refine'_1.intro
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
s : StAct k✝
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
sub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S
hgo : go k✝ s q✝ ∈ trSupp M S
hret : ret q✝ ∈ trSupp M S
IH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)
IH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
⊢ TM1.SupportsStmt (trSupp M S) (trNormal (stRun s q✝)) ∧
    ∀ (l' : Λ'), l' ∈ trStmts₁ (stRun s q✝) → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: rw [trStmts₁_run] at h
state_before: case refine'_1.intro
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
s : StAct k✝
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
sub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S
hgo : go k✝ s q✝ ∈ trSupp M S
hret : ret q✝ ∈ trSupp M S
IH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)
IH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
l : Λ'
h : l ∈ trStmts₁ (stRun s q✝)
⊢ TM1.SupportsStmt (trSupp M S) (tr M l)

tactic: simp only [TM2to1.trStmts₁_run, Finset.mem_union, Finset.mem_insert, Finset.mem_singleton]
  at h
state_before: case refine'_1.intro
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
s : StAct k✝
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
sub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S
hgo : go k✝ s q✝ ∈ trSupp M S
hret : ret q✝ ∈ trSupp M S
IH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)
IH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
l : Λ'
h : l ∈ {go k✝ s q✝, ret q✝} ∪ trStmts₁ q✝
⊢ TM1.SupportsStmt (trSupp M S) (tr M l)

tactic: rcases h with (⟨rfl | rfl⟩ | h)
state_before: case refine'_1.intro
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
s : StAct k✝
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
sub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S
hgo : go k✝ s q✝ ∈ trSupp M S
hret : ret q✝ ∈ trSupp M S
IH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)
IH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
l : Λ'
h : (l = go k✝ s q✝ ∨ l = ret q✝) ∨ l ∈ trStmts₁ q✝
⊢ TM1.SupportsStmt (trSupp M S) (tr M l)

tactic: simp only [trNormal_run, TM1.SupportsStmt]
state_before: K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
s : StAct k✝
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
sub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S
hgo : go k✝ s q✝ ∈ trSupp M S
hret : ret q✝ ∈ trSupp M S
IH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)
IH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
⊢ TM1.SupportsStmt (trSupp M S) (trNormal (stRun s q✝))

tactic: intros
state_before: K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
s : StAct k✝
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
sub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S
hgo : go k✝ s q✝ ∈ trSupp M S
hret : ret q✝ ∈ trSupp M S
IH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)
IH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
⊢ Γ' → σ → go k✝ s q✝ ∈ trSupp M S

tactic: exact hgo
state_before: K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
s : StAct k✝
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
sub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S
hgo : go k✝ s q✝ ∈ trSupp M S
hret : ret q✝ ∈ trSupp M S
IH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)
IH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
a✝ : Γ'
v✝ : σ
⊢ go k✝ s q✝ ∈ trSupp M S

tactic: cases s
state_before: case refine'_1.intro.inl.inl
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
s : StAct k✝
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
sub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S
hgo : go k✝ s q✝ ∈ trSupp M S
hret : ret q✝ ∈ trSupp M S
IH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)
IH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
⊢ TM1.SupportsStmt (trSupp M S) (tr M (go k✝ s q✝))

tactic: exact ⟨fun _ _ ↦ hret, fun _ _ ↦ hgo⟩
state_before: case refine'_1.intro.inl.inl.push
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
hret : ret q✝ ∈ trSupp M S
IH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)
IH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
a✝ : σ → Γ k✝
sub : ∀ (x : Λ'), (x = go k✝ (StAct.push a✝) q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S
hgo : go k✝ (StAct.push a✝) q✝ ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (tr M (go k✝ (StAct.push a✝) q✝))

tactic: exact ⟨fun _ _ ↦ hret, fun _ _ ↦ hgo⟩
state_before: case refine'_1.intro.inl.inl.peek
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
hret : ret q✝ ∈ trSupp M S
IH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)
IH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
a✝ : σ → Option (Γ k✝) → σ
sub : ∀ (x : Λ'), (x = go k✝ (StAct.peek a✝) q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S
hgo : go k✝ (StAct.peek a✝) q✝ ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (tr M (go k✝ (StAct.peek a✝) q✝))

tactic: exact ⟨⟨fun _ _ ↦ hret, fun _ _ ↦ hret⟩, fun _ _ ↦ hgo⟩
state_before: case refine'_1.intro.inl.inl.pop
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
hret : ret q✝ ∈ trSupp M S
IH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)
IH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
a✝ : σ → Option (Γ k✝) → σ
sub : ∀ (x : Λ'), (x = go k✝ (StAct.pop a✝) q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S
hgo : go k✝ (StAct.pop a✝) q✝ ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (tr M (go k✝ (StAct.pop a✝) q✝))

tactic: unfold TM1.SupportsStmt TM2to1.tr
state_before: case refine'_1.intro.inl.inr
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
s : StAct k✝
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
sub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S
hgo : go k✝ s q✝ ∈ trSupp M S
hret : ret q✝ ∈ trSupp M S
IH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)
IH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
⊢ TM1.SupportsStmt (trSupp M S) (tr M (ret q✝))

tactic: exact ⟨IH₁, fun _ _ ↦ hret⟩
state_before: case refine'_1.intro.inl.inr
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
s : StAct k✝
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
sub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S
hgo : go k✝ s q✝ ∈ trSupp M S
hret : ret q✝ ∈ trSupp M S
IH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)
IH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
⊢ match
    match ret q✝ with
    | normal q => trNormal (M q)
    | go k s q =>
      branch (fun a x => Option.isNone (Prod.snd a k)) (trStAct (goto fun x x => ret q) s)
        (move Dir.right (goto fun x x => go k s q))
    | ret q => branch (fun a x => a.fst) (trNormal q) (move Dir.left (goto fun x x => ret q)) with
  | move a q => TM1.SupportsStmt (trSupp M S) q
  | write a q => TM1.SupportsStmt (trSupp M S) q
  | load a q => TM1.SupportsStmt (trSupp M S) q
  | branch a q₁ q₂ => TM1.SupportsStmt (trSupp M S) q₁ ∧ TM1.SupportsStmt (trSupp M S) q₂
  | goto l => ∀ (a : Γ') (v : σ), l a v ∈ trSupp M S
  | halt => True

tactic: exact IH₂ _ h
state_before: case refine'_1.intro.inr
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
k✝ : K
s : StAct k✝
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S q✝
sub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S
hgo : go k✝ s q✝ ∈ trSupp M S
hret : ret q✝ ∈ trSupp M S
IH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)
IH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
l : Λ'
h : l ∈ trStmts₁ q✝
⊢ TM1.SupportsStmt (trSupp M S) (tr M l)

tactic: intro _ _ IH ss' sub
state_before: case refine'_2
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
⊢ ∀ (a : σ → σ) (q : Stmt₂),
    (TM2.SupportsStmt S q →
        (∀ (x : Λ'), x ∈ trStmts₁ q → x ∈ trSupp M S) →
          TM1.SupportsStmt (trSupp M S) (trNormal q) ∧
            ∀ (l' : Λ'), l' ∈ trStmts₁ q → TM1.SupportsStmt (trSupp M S) (tr M l')) →
      TM2.SupportsStmt S (TM2.Stmt.load a q) →
        (∀ (x : Λ'), x ∈ trStmts₁ (TM2.Stmt.load a q) → x ∈ trSupp M S) →
          TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.load a q)) ∧
            ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.load a q) → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: unfold TM2to1.trStmts₁ at ss' sub⊢
state_before: case refine'_2
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
a✝ : σ → σ
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S (TM2.Stmt.load a✝ q✝)
sub : ∀ (x : Λ'), x ∈ trStmts₁ (TM2.Stmt.load a✝ q✝) → x ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.load a✝ q✝)) ∧
    ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.load a✝ q✝) → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: exact IH ss' sub
state_before: case refine'_2
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
a✝ : σ → σ
q✝ : Stmt₂
IH :
  TM2.SupportsStmt S q✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S (TM2.Stmt.load a✝ q✝)
sub : ∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.load a✝ q✝)) ∧
    ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: intro _ _ _ IH₁ IH₂ ss' sub
state_before: case refine'_3
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
⊢ ∀ (p : σ → Bool) (q₁ q₂ : Stmt₂),
    (TM2.SupportsStmt S q₁ →
        (∀ (x : Λ'), x ∈ trStmts₁ q₁ → x ∈ trSupp M S) →
          TM1.SupportsStmt (trSupp M S) (trNormal q₁) ∧
            ∀ (l' : Λ'), l' ∈ trStmts₁ q₁ → TM1.SupportsStmt (trSupp M S) (tr M l')) →
      (TM2.SupportsStmt S q₂ →
          (∀ (x : Λ'), x ∈ trStmts₁ q₂ → x ∈ trSupp M S) →
            TM1.SupportsStmt (trSupp M S) (trNormal q₂) ∧
              ∀ (l' : Λ'), l' ∈ trStmts₁ q₂ → TM1.SupportsStmt (trSupp M S) (tr M l')) →
        TM2.SupportsStmt S (TM2.Stmt.branch p q₁ q₂) →
          (∀ (x : Λ'), x ∈ trStmts₁ (TM2.Stmt.branch p q₁ q₂) → x ∈ trSupp M S) →
            TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.branch p q₁ q₂)) ∧
              ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.branch p q₁ q₂) → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: unfold TM2to1.trStmts₁ at sub
state_before: case refine'_3
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
p✝ : σ → Bool
q₁✝ q₂✝ : Stmt₂
IH₁ :
  TM2.SupportsStmt S q₁✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q₁✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q₁✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
IH₂ :
  TM2.SupportsStmt S q₂✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q₂✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q₂✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S (TM2.Stmt.branch p✝ q₁✝ q₂✝)
sub : ∀ (x : Λ'), x ∈ trStmts₁ (TM2.Stmt.branch p✝ q₁✝ q₂✝) → x ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.branch p✝ q₁✝ q₂✝)) ∧
    ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.branch p✝ q₁✝ q₂✝) → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: cases' IH₁ ss'.1 fun x hx ↦ sub x <| Finset.mem_union_left _ hx with IH₁₁ IH₁₂
state_before: case refine'_3
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
p✝ : σ → Bool
q₁✝ q₂✝ : Stmt₂
IH₁ :
  TM2.SupportsStmt S q₁✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q₁✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q₁✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
IH₂ :
  TM2.SupportsStmt S q₂✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q₂✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q₂✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S (TM2.Stmt.branch p✝ q₁✝ q₂✝)
sub : ∀ (x : Λ'), x ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝ → x ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.branch p✝ q₁✝ q₂✝)) ∧
    ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.branch p✝ q₁✝ q₂✝) → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: cases' IH₂ ss'.2 fun x hx ↦ sub x <| Finset.mem_union_right _ hx with IH₂₁ IH₂₂
state_before: case refine'_3.intro
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
p✝ : σ → Bool
q₁✝ q₂✝ : Stmt₂
IH₁ :
  TM2.SupportsStmt S q₁✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q₁✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q₁✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
IH₂ :
  TM2.SupportsStmt S q₂✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q₂✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q₂✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S (TM2.Stmt.branch p✝ q₁✝ q₂✝)
sub : ∀ (x : Λ'), x ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝ → x ∈ trSupp M S
IH₁₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₁✝)
IH₁₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.branch p✝ q₁✝ q₂✝)) ∧
    ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.branch p✝ q₁✝ q₂✝) → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: refine' ⟨⟨IH₁₁, IH₂₁⟩, fun l h ↦ _⟩
state_before: case refine'_3.intro.intro
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
p✝ : σ → Bool
q₁✝ q₂✝ : Stmt₂
IH₁ :
  TM2.SupportsStmt S q₁✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q₁✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q₁✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
IH₂ :
  TM2.SupportsStmt S q₂✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q₂✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q₂✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S (TM2.Stmt.branch p✝ q₁✝ q₂✝)
sub : ∀ (x : Λ'), x ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝ → x ∈ trSupp M S
IH₁₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₁✝)
IH₁₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
IH₂₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₂✝)
IH₂₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.branch p✝ q₁✝ q₂✝)) ∧
    ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.branch p✝ q₁✝ q₂✝) → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: rw [trStmts₁] at h
state_before: case refine'_3.intro.intro
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
p✝ : σ → Bool
q₁✝ q₂✝ : Stmt₂
IH₁ :
  TM2.SupportsStmt S q₁✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q₁✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q₁✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
IH₂ :
  TM2.SupportsStmt S q₂✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q₂✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q₂✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S (TM2.Stmt.branch p✝ q₁✝ q₂✝)
sub : ∀ (x : Λ'), x ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝ → x ∈ trSupp M S
IH₁₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₁✝)
IH₁₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
IH₂₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₂✝)
IH₂₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
l : Λ'
h : l ∈ trStmts₁ (TM2.Stmt.branch p✝ q₁✝ q₂✝)
⊢ TM1.SupportsStmt (trSupp M S) (tr M l)

tactic: rcases Finset.mem_union.1 h with (h | h) <;> [exact IH₁₂ _ h; exact IH₂₂ _ h]
state_before: case refine'_3.intro.intro
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
p✝ : σ → Bool
q₁✝ q₂✝ : Stmt₂
IH₁ :
  TM2.SupportsStmt S q₁✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q₁✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q₁✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
IH₂ :
  TM2.SupportsStmt S q₂✝ →
    (∀ (x : Λ'), x ∈ trStmts₁ q₂✝ → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal q₂✝) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
ss' : TM2.SupportsStmt S (TM2.Stmt.branch p✝ q₁✝ q₂✝)
sub : ∀ (x : Λ'), x ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝ → x ∈ trSupp M S
IH₁₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₁✝)
IH₁₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
IH₂₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₂✝)
IH₂₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')
l : Λ'
h : l ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝
⊢ TM1.SupportsStmt (trSupp M S) (tr M l)

tactic: intro _ ss' _
state_before: case refine'_4
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
⊢ ∀ (l : σ → Λ),
    TM2.SupportsStmt S (TM2.Stmt.goto l) →
      (∀ (x : Λ'), x ∈ trStmts₁ (TM2.Stmt.goto l) → x ∈ trSupp M S) →
        TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.goto l)) ∧
          ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.goto l) → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: simp only [trStmts₁, Finset.not_mem_empty]
state_before: case refine'_4
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
l✝ : σ → Λ
ss' : TM2.SupportsStmt S (TM2.Stmt.goto l✝)
x✝ : ∀ (x : Λ'), x ∈ trStmts₁ (TM2.Stmt.goto l✝) → x ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.goto l✝)) ∧
    ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.goto l✝) → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: refine' ⟨_, fun _ ↦ False.elim⟩
state_before: case refine'_4
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
l✝ : σ → Λ
ss' : TM2.SupportsStmt S (TM2.Stmt.goto l✝)
x✝ : ∀ (x : Λ'), x ∈ trStmts₁ (TM2.Stmt.goto l✝) → x ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.goto l✝)) ∧
    ∀ (l' : Λ'), False → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: exact fun _ v ↦ Finset.mem_biUnion.2 ⟨_, ss' v, Finset.mem_insert_self _ _⟩
state_before: case refine'_4
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
l✝ : σ → Λ
ss' : TM2.SupportsStmt S (TM2.Stmt.goto l✝)
x✝ : ∀ (x : Λ'), x ∈ trStmts₁ (TM2.Stmt.goto l✝) → x ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.goto l✝))

tactic: intro _ _
state_before: case refine'_5
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
⊢ TM2.SupportsStmt S TM2.Stmt.halt →
    (∀ (x : Λ'), x ∈ trStmts₁ TM2.Stmt.halt → x ∈ trSupp M S) →
      TM1.SupportsStmt (trSupp M S) (trNormal TM2.Stmt.halt) ∧
        ∀ (l' : Λ'), l' ∈ trStmts₁ TM2.Stmt.halt → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: simp only [trStmts₁, Finset.not_mem_empty]
state_before: case refine'_5
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
x✝¹ : TM2.SupportsStmt S TM2.Stmt.halt
x✝ : ∀ (x : Λ'), x ∈ trStmts₁ TM2.Stmt.halt → x ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (trNormal TM2.Stmt.halt) ∧
    ∀ (l' : Λ'), l' ∈ trStmts₁ TM2.Stmt.halt → TM1.SupportsStmt (trSupp M S) (tr M l')

tactic: exact ⟨trivial, fun _ ↦ False.elim⟩
state_before: case refine'_5
K : Type u_2
inst✝² : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
M : Λ → Stmt₂
S : Finset Λ
ss : TM2.Supports M S
x✝¹ : TM2.SupportsStmt S TM2.Stmt.halt
x✝ : ∀ (x : Λ'), x ∈ trStmts₁ TM2.Stmt.halt → x ∈ trSupp M S
⊢ TM1.SupportsStmt (trSupp M S) (trNormal TM2.Stmt.halt) ∧ ∀ (l' : Λ'), False → TM1.SupportsStmt (trSupp M S) (tr M l')