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

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

tactic: iterate 4 rcases h with (rfl | h) <;> [exact hs; exact IH h hs]
state_before: case push
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
k✝ : K
a✝ : σ → Γ k✝
q : Stmt₂
IH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁
hs : SupportsStmt S q
h : q₁ = push k✝ a✝ q ∨ q₁ ∈ stmts₁ q
⊢ SupportsStmt S q₁

case peek
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
k✝ : K
a✝ : σ → Option (Γ k✝) → σ
q : Stmt₂
IH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁
hs : SupportsStmt S q
h : q₁ = peek k✝ a✝ q ∨ q₁ ∈ stmts₁ q
⊢ SupportsStmt S q₁

case pop
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
k✝ : K
a✝ : σ → Option (Γ k✝) → σ
q : Stmt₂
IH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁
hs : SupportsStmt S q
h : q₁ = pop k✝ a✝ q ∨ q₁ ∈ stmts₁ q
⊢ SupportsStmt S q₁

case load
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
a✝ : σ → σ
q : Stmt₂
IH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁
hs : SupportsStmt S q
h : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q
⊢ SupportsStmt S q₁

case branch
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
a✝² : σ → Bool
a✝¹ a✝ : Stmt₂
a_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → SupportsStmt S a✝¹ → SupportsStmt S q₁
a_ih✝ : q₁ ∈ stmts₁ a✝ → SupportsStmt S a✝ → SupportsStmt S q₁
hs : SupportsStmt S a✝¹ ∧ SupportsStmt S a✝
h : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝
⊢ SupportsStmt S q₁

case goto
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
a✝ : σ → Λ
hs : ∀ (v : σ), a✝ v ∈ S
h : q₁ = goto a✝
⊢ SupportsStmt S q₁

case halt
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
hs : True
h : q₁ = halt
⊢ SupportsStmt S q₁

tactic: case branch f q₁ q₂ IH₁ IH₂ => rcases h with (rfl | h | h); exacts [hs, IH₁ h hs.1, IH₂ h hs.2]
state_before: case branch
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
a✝² : σ → Bool
a✝¹ a✝ : Stmt₂
a_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → SupportsStmt S a✝¹ → SupportsStmt S q₁
a_ih✝ : q₁ ∈ stmts₁ a✝ → SupportsStmt S a✝ → SupportsStmt S q₁
hs : SupportsStmt S a✝¹ ∧ SupportsStmt S a✝
h : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝
⊢ SupportsStmt S q₁

case goto
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
a✝ : σ → Λ
hs : ∀ (v : σ), a✝ v ∈ S
h : q₁ = goto a✝
⊢ SupportsStmt S q₁

case halt
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
hs : True
h : q₁ = halt
⊢ SupportsStmt S q₁

tactic: case goto l => subst h; exact hs
state_before: case goto
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
a✝ : σ → Λ
hs : ∀ (v : σ), a✝ v ∈ S
h : q₁ = goto a✝
⊢ SupportsStmt S q₁

case halt
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
hs : True
h : q₁ = halt
⊢ SupportsStmt S q₁

tactic: case halt => subst h; trivial
state_before: case halt
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
hs : True
h : q₁ = halt
⊢ SupportsStmt S q₁

tactic: rcases h with (rfl | h) <;> [exact hs; exact IH h hs]
state_before: case load
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
a✝ : σ → σ
q : Stmt₂
IH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁
hs : SupportsStmt S q
h : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q
⊢ SupportsStmt S q₁

case branch
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
a✝² : σ → Bool
a✝¹ a✝ : Stmt₂
a_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → SupportsStmt S a✝¹ → SupportsStmt S q₁
a_ih✝ : q₁ ∈ stmts₁ a✝ → SupportsStmt S a✝ → SupportsStmt S q₁
hs : SupportsStmt S a✝¹ ∧ SupportsStmt S a✝
h : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝
⊢ SupportsStmt S q₁

case goto
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
a✝ : σ → Λ
hs : ∀ (v : σ), a✝ v ∈ S
h : q₁ = goto a✝
⊢ SupportsStmt S q₁

case halt
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
hs : True
h : q₁ = halt
⊢ SupportsStmt S q₁

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

tactic: exacts [hs, IH₁ h hs.1, IH₂ h hs.2]
state_before: case inl
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₂✝ : Stmt₂
hs✝ : SupportsStmt S q₂✝
f : σ → Bool
q₁ q₂ : Stmt₂
hs : SupportsStmt S q₁ ∧ SupportsStmt S q₂
h : branch f q₁ q₂ ∈ stmts₁ q₂✝
IH₁ : branch f q₁ q₂ ∈ stmts₁ q₁ → SupportsStmt S q₁ → SupportsStmt S (branch f q₁ q₂)
IH₂ : branch f q₁ q₂ ∈ stmts₁ q₂ → SupportsStmt S q₂ → SupportsStmt S (branch f q₁ q₂)
⊢ SupportsStmt S (branch f q₁ q₂)

case inr.inl
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁✝ q₂✝ : Stmt₂
h✝ : q₁✝ ∈ stmts₁ q₂✝
hs✝ : SupportsStmt S q₂✝
f : σ → Bool
q₁ q₂ : Stmt₂
IH₁ : q₁✝ ∈ stmts₁ q₁ → SupportsStmt S q₁ → SupportsStmt S q₁✝
IH₂ : q₁✝ ∈ stmts₁ q₂ → SupportsStmt S q₂ → SupportsStmt S q₁✝
hs : SupportsStmt S q₁ ∧ SupportsStmt S q₂
h : q₁✝ ∈ stmts₁ q₁
⊢ SupportsStmt S q₁✝

case inr.inr
K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁✝ q₂✝ : Stmt₂
h✝ : q₁✝ ∈ stmts₁ q₂✝
hs✝ : SupportsStmt S q₂✝
f : σ → Bool
q₁ q₂ : Stmt₂
IH₁ : q₁✝ ∈ stmts₁ q₁ → SupportsStmt S q₁ → SupportsStmt S q₁✝
IH₂ : q₁✝ ∈ stmts₁ q₂ → SupportsStmt S q₂ → SupportsStmt S q₁✝
hs : SupportsStmt S q₁ ∧ SupportsStmt S q₂
h : q₁✝ ∈ stmts₁ q₂
⊢ SupportsStmt S q₁✝

tactic: subst h
state_before: K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
l : σ → Λ
hs : ∀ (v : σ), l v ∈ S
h : q₁ = goto l
⊢ SupportsStmt S q₁

tactic: exact hs
state_before: K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₂ : Stmt₂
hs✝ : SupportsStmt S q₂
l : σ → Λ
hs : ∀ (v : σ), l v ∈ S
h : goto l ∈ stmts₁ q₂
⊢ SupportsStmt S (goto l)

tactic: subst h
state_before: K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₁ q₂ : Stmt₂
h✝ : q₁ ∈ stmts₁ q₂
hs✝ : SupportsStmt S q₂
hs : True
h : q₁ = halt
⊢ SupportsStmt S q₁

tactic: trivial
state_before: K : Type u_2
inst✝ : DecidableEq K
Γ : K → Type u_3
Λ : Type u_1
σ : Type u_4
S : Finset Λ
q₂ : Stmt₂
hs✝ : SupportsStmt S q₂
hs : True
h : halt ∈ stmts₁ q₂
⊢ SupportsStmt S halt