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

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

tactic: induction' q₂ with _ q IH _ q IH _ q IH <;> simp only [stmts₁] at h₁₂⊢ <;>
  simp only [Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h₁₂
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
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
Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
q₁ q₂ : Stmt₁
h₁₂✝ : q₁ ∈ stmts₁ q₂
q₀ : Stmt₁
h₀₁ : q₀ ∈ stmts₁ q₁
a✝ : Γ → σ → Λ
h₁₂ : q₁ = goto a✝
⊢ q₀ ∈ {goto a✝}

case halt
Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
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
Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
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
Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
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
Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
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
Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
q₁ q₂ : Stmt₁
h₁₂✝ : q₁ ∈ stmts₁ q₂
q₀ : Stmt₁
h₀₁ : q₀ ∈ stmts₁ q₁
a✝ : Γ → σ → Λ
h₁₂ : q₁ = goto a✝
⊢ q₀ ∈ {goto a✝}

case halt
Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
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
Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
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
Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
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
Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
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: Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
q₁✝ q₂✝ : Stmt₁
h₁₂✝ : q₁✝ ∈ stmts₁ q₂✝
q₀ : Stmt₁
h₀₁ : q₀ ∈ stmts₁ q₁✝
p : Γ → σ → Bool
q₁ q₂ : Stmt₁
IH₁ : q₁✝ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁
IH₂ : q₁✝ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂
h₁₂ : q₁✝ = branch p q₁ q₂ ∨ q₁✝ ∈ stmts₁ q₁ ∨ q₁✝ ∈ stmts₁ q₂
⊢ q₀ ∈ insert (branch p q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)

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

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

tactic: exact Finset.mem_insert_of_mem (Finset.mem_union_left _ <| IH₁ h₁₂)
state_before: case inr.inl
Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
q₁✝ q₂✝ : Stmt₁
h₁₂✝ : q₁✝ ∈ stmts₁ q₂✝
q₀ : Stmt₁
h₀₁ : q₀ ∈ stmts₁ q₁✝
p : Γ → σ → 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 p q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)

tactic: exact Finset.mem_insert_of_mem (Finset.mem_union_right _ <| IH₂ h₁₂)
state_before: case inr.inr
Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
q₁✝ q₂✝ : Stmt₁
h₁₂✝ : q₁✝ ∈ stmts₁ q₂✝
q₀ : Stmt₁
h₀₁ : q₀ ∈ stmts₁ q₁✝
p : Γ → σ → 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 p q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)

tactic: subst h₁₂
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
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: Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
q₂ q₀ : Stmt₁
l : Γ → σ → Λ
h₁₂ : goto l ∈ stmts₁ q₂
h₀₁ : q₀ ∈ stmts₁ (goto l)
⊢ q₀ ∈ {goto l}

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

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