Theorem: Turing.TM2.stmts₁_trans
File: Mathlib/Computability/TuringMachine.lean

tactic: intro h₁₂ q₀ h₀₁
state_before: K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₁ q₂ : Stmt₂
⊢ q₁ ∈ stmts₁ q₂ → stmts₁ q₁ ⊆ stmts₁ q₂

tactic: induction' q₂ with _ _ q IH _ _ q IH _ _ q IH _ q IH <;> simp only [stmts₁] at h₁₂⊢ <;>
  simp only [Finset.mem_insert, Finset.mem_singleton, Finset.mem_union] at h₁₂
state_before: K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₁ q₂ : Stmt₂
h₁₂ : q₁ ∈ stmts₁ q₂
q₀ : Stmt₂
h₀₁ : q₀ ∈ stmts₁ q₁
⊢ q₀ ∈ stmts₁ q₂

tactic: case goto l => subst h₁₂; exact h₀₁
state_before: case goto
K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₁ q₂ : Stmt₂
h₁₂✝ : q₁ ∈ stmts₁ q₂
q₀ : Stmt₂
h₀₁ : q₀ ∈ stmts₁ q₁
a✝ : σ → Λ
h₁₂ : q₁ = goto a✝
⊢ q₀ ∈ {goto a✝}

case halt
K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₁ q₂ : Stmt₂
h₁₂✝ : q₁ ∈ stmts₁ q₂
q₀ : Stmt₂
h₀₁ : q₀ ∈ stmts₁ q₁
h₁₂ : q₁ = halt
⊢ q₀ ∈ {halt}

tactic: case halt => subst h₁₂; exact h₀₁
state_before: case halt
K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₁ q₂ : Stmt₂
h₁₂✝ : q₁ ∈ stmts₁ q₂
q₀ : Stmt₂
h₀₁ : q₀ ∈ stmts₁ q₁
h₁₂ : q₁ = halt
⊢ q₀ ∈ {halt}

tactic: rcases h₁₂ with (rfl | h₁₂)
state_before: case load
K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₁ q₂ : Stmt₂
h₁₂✝ : q₁ ∈ stmts₁ q₂
q₀ : Stmt₂
h₀₁ : q₀ ∈ stmts₁ q₁
a✝ : σ → σ
q : Stmt₂
IH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q
h₁₂ : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q
⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)

case branch
K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₁ q₂ : Stmt₂
h₁₂✝ : q₁ ∈ stmts₁ q₂
q₀ : Stmt₂
h₀₁ : q₀ ∈ stmts₁ q₁
a✝² : σ → Bool
a✝¹ a✝ : Stmt₂
a_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → q₀ ∈ stmts₁ a✝¹
a_ih✝ : q₁ ∈ stmts₁ a✝ → q₀ ∈ stmts₁ a✝
h₁₂ : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝
⊢ q₀ ∈ insert (branch a✝² a✝¹ a✝) (stmts₁ a✝¹ ∪ stmts₁ a✝)

case goto
K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₁ q₂ : Stmt₂
h₁₂✝ : q₁ ∈ stmts₁ q₂
q₀ : Stmt₂
h₀₁ : q₀ ∈ stmts₁ q₁
a✝ : σ → Λ
h₁₂ : q₁ = goto a✝
⊢ q₀ ∈ {goto a✝}

case halt
K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₁ q₂ : Stmt₂
h₁₂✝ : q₁ ∈ stmts₁ q₂
q₀ : Stmt₂
h₀₁ : q₀ ∈ stmts₁ q₁
h₁₂ : q₁ = halt
⊢ q₀ ∈ {halt}

tactic: unfold stmts₁ at h₀₁
state_before: case load.inl
K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₂ q₀ : Stmt₂
a✝ : σ → σ
q : Stmt₂
h₁₂ : load a✝ q ∈ stmts₁ q₂
h₀₁ : q₀ ∈ stmts₁ (load a✝ q)
IH : load a✝ q ∈ stmts₁ q → q₀ ∈ stmts₁ q
⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)

tactic: exact h₀₁
state_before: case load.inl
K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₂ q₀ : Stmt₂
a✝ : σ → σ
q : Stmt₂
h₁₂ : load a✝ q ∈ stmts₁ q₂
IH : load a✝ q ∈ stmts₁ q → q₀ ∈ stmts₁ q
h₀₁ : q₀ ∈ insert (load a✝ q) (stmts₁ q)
⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)

tactic: exact Finset.mem_insert_of_mem (IH h₁₂)
state_before: case load.inr
K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₁ q₂ : Stmt₂
h₁₂✝ : q₁ ∈ stmts₁ q₂
q₀ : Stmt₂
h₀₁ : q₀ ∈ stmts₁ q₁
a✝ : σ → σ
q : Stmt₂
IH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q
h₁₂ : q₁ ∈ stmts₁ q
⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)

tactic: rcases h₁₂ with (rfl | h₁₂ | h₁₂)
state_before: K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₁✝ q₂✝ : Stmt₂
h₁₂✝ : q₁✝ ∈ stmts₁ q₂✝
q₀ : Stmt₂
h₀₁ : q₀ ∈ stmts₁ q₁✝
f : σ → Bool
q₁ q₂ : Stmt₂
IH₁ : q₁✝ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁
IH₂ : q₁✝ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂
h₁₂ : q₁✝ = branch f q₁ q₂ ∨ q₁✝ ∈ stmts₁ q₁ ∨ q₁✝ ∈ stmts₁ q₂
⊢ q₀ ∈ insert (branch f q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)

tactic: unfold stmts₁ at h₀₁
state_before: case inl
K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₂✝ q₀ : Stmt₂
f : σ → Bool
q₁ q₂ : Stmt₂
h₁₂ : branch f q₁ q₂ ∈ stmts₁ q₂✝
h₀₁ : q₀ ∈ stmts₁ (branch f q₁ q₂)
IH₁ : branch f q₁ q₂ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁
IH₂ : branch f q₁ q₂ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂
⊢ q₀ ∈ insert (branch f q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)

tactic: exact h₀₁
state_before: case inl
K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₂✝ q₀ : Stmt₂
f : σ → Bool
q₁ q₂ : Stmt₂
h₁₂ : branch f q₁ q₂ ∈ stmts₁ q₂✝
IH₁ : branch f q₁ q₂ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁
IH₂ : branch f q₁ q₂ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂
h₀₁ : q₀ ∈ insert (branch f q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)
⊢ q₀ ∈ insert (branch f q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)

tactic: exact Finset.mem_insert_of_mem (Finset.mem_union_left _ (IH₁ h₁₂))
state_before: case inr.inl
K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₁✝ q₂✝ : Stmt₂
h₁₂✝ : q₁✝ ∈ stmts₁ q₂✝
q₀ : Stmt₂
h₀₁ : q₀ ∈ stmts₁ q₁✝
f : σ → Bool
q₁ q₂ : Stmt₂
IH₁ : q₁✝ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁
IH₂ : q₁✝ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂
h₁₂ : q₁✝ ∈ stmts₁ q₁
⊢ q₀ ∈ insert (branch f q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)

tactic: exact Finset.mem_insert_of_mem (Finset.mem_union_right _ (IH₂ h₁₂))
state_before: case inr.inr
K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₁✝ q₂✝ : Stmt₂
h₁₂✝ : q₁✝ ∈ stmts₁ q₂✝
q₀ : Stmt₂
h₀₁ : q₀ ∈ stmts₁ q₁✝
f : σ → Bool
q₁ q₂ : Stmt₂
IH₁ : q₁✝ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁
IH₂ : q₁✝ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂
h₁₂ : q₁✝ ∈ stmts₁ q₂
⊢ q₀ ∈ insert (branch f q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)

tactic: subst h₁₂
state_before: K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₁ q₂ : Stmt₂
h₁₂✝ : q₁ ∈ stmts₁ q₂
q₀ : Stmt₂
h₀₁ : q₀ ∈ stmts₁ q₁
l : σ → Λ
h₁₂ : q₁ = goto l
⊢ q₀ ∈ {goto l}

tactic: exact h₀₁
state_before: K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₂ q₀ : Stmt₂
l : σ → Λ
h₁₂ : goto l ∈ stmts₁ q₂
h₀₁ : q₀ ∈ stmts₁ (goto l)
⊢ q₀ ∈ {goto l}

tactic: subst h₁₂
state_before: K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₁ q₂ : Stmt₂
h₁₂✝ : q₁ ∈ stmts₁ q₂
q₀ : Stmt₂
h₀₁ : q₀ ∈ stmts₁ q₁
h₁₂ : q₁ = halt
⊢ q₀ ∈ {halt}

tactic: exact h₀₁
state_before: K : Type u_1
inst✝ : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
σ : Type u_4
q₂ q₀ : Stmt₂
h₁₂ : halt ∈ stmts₁ q₂
h₀₁ : q₀ ∈ stmts₁ halt
⊢ q₀ ∈ {halt}