Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
⊢ ∀ (q : Stmt₁),
    SupportsStmt S q →
      (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
        SupportsStmt (trSupp M S) (trNormal dec q) ∧
          ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (tr enc dec M q)
suffices ∀ q, SupportsStmt S q → (∀ q' ∈ writes q, q' ∈ trSupp M S) →
    SupportsStmt (trSupp M S) (trNormal dec q) ∧
    ∀ q' ∈ writes q, SupportsStmt (trSupp M S) (tr enc dec M q') by
  rcases Finset.mem_biUnion.1 h with ⟨l, hl, h⟩
  have :=
    this _ (ss.2 _ hl) fun q' hq ↦ Finset.mem_biUnion.2 ⟨_, hl, Finset.mem_insert_of_mem hq⟩
  rcases Finset.mem_insert.1 h with (rfl | h)
  exacts [this.1, this.2 _ h]
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
q : Stmt₁
hs : SupportsStmt S q
hw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
⊢ ∀ (q : Stmt₁),
    SupportsStmt S q →
      (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
        SupportsStmt (trSupp M S) (trNormal dec q) ∧
          ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
intro q hs hw
case move
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝¹ : Dir
a✝ : Stmt₁
a_ih✝ :
  SupportsStmt S a✝ →
    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.move a✝¹ a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.move a✝¹ a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.move a✝¹ a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.move a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case write
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝¹ : Γ → σ → Γ
a✝ : Stmt₁
a_ih✝ :
  SupportsStmt S a✝ →
    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.write a✝¹ a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.write a✝¹ a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.write a✝¹ a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.write a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case load
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝¹ : Γ → σ → σ
a✝ : Stmt₁
a_ih✝ :
  SupportsStmt S a✝ →
    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.load a✝¹ a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.load a✝¹ a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.load a✝¹ a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.load a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case branch
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝² : Γ → σ → Bool
a✝¹ a✝ : Stmt₁
a_ih✝¹ :
  SupportsStmt S a✝¹ →
    (∀ (q' : Λ'), q' ∈ writes a✝¹ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝¹) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝¹ → SupportsStmt (trSupp M S) (tr enc dec M q')
a_ih✝ :
  SupportsStmt S a✝ →
    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.branch a✝² a✝¹ a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case goto
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝ : Γ → σ → Λ
hs : SupportsStmt S (Stmt.goto a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case halt
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
hs : SupportsStmt S Stmt.halt
hw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧
    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
q : Stmt₁
hs : SupportsStmt S q
hw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
induction q
case write
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝¹ : Γ → σ → Γ
a✝ : Stmt₁
a_ih✝ :
  SupportsStmt S a✝ →
    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.write a✝¹ a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.write a✝¹ a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.write a✝¹ a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.write a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case load
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝¹ : Γ → σ → σ
a✝ : Stmt₁
a_ih✝ :
  SupportsStmt S a✝ →
    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.load a✝¹ a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.load a✝¹ a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.load a✝¹ a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.load a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case branch
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝² : Γ → σ → Bool
a✝¹ a✝ : Stmt₁
a_ih✝¹ :
  SupportsStmt S a✝¹ →
    (∀ (q' : Λ'), q' ∈ writes a✝¹ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝¹) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝¹ → SupportsStmt (trSupp M S) (tr enc dec M q')
a_ih✝ :
  SupportsStmt S a✝ →
    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.branch a✝² a✝¹ a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case goto
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝ : Γ → σ → Λ
hs : SupportsStmt S (Stmt.goto a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case halt
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
hs : SupportsStmt S Stmt.halt
hw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧
    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')
case move
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝¹ : Dir
a✝ : Stmt₁
a_ih✝ :
  SupportsStmt S a✝ →
    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.move a✝¹ a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.move a✝¹ a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.move a✝¹ a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.move a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case write
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝¹ : Γ → σ → Γ
a✝ : Stmt₁
a_ih✝ :
  SupportsStmt S a✝ →
    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.write a✝¹ a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.write a✝¹ a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.write a✝¹ a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.write a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case load
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝¹ : Γ → σ → σ
a✝ : Stmt₁
a_ih✝ :
  SupportsStmt S a✝ →
    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.load a✝¹ a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.load a✝¹ a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.load a✝¹ a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.load a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case branch
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝² : Γ → σ → Bool
a✝¹ a✝ : Stmt₁
a_ih✝¹ :
  SupportsStmt S a✝¹ →
    (∀ (q' : Λ'), q' ∈ writes a✝¹ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝¹) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝¹ → SupportsStmt (trSupp M S) (tr enc dec M q')
a_ih✝ :
  SupportsStmt S a✝ →
    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.branch a✝² a✝¹ a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case goto
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝ : Γ → σ → Λ
hs : SupportsStmt S (Stmt.goto a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case halt
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
hs : SupportsStmt S Stmt.halt
hw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧
    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')
case move d q IH =>
  unfold writes at hw⊢
  replace IH := IH hs hw; refine' ⟨_, IH.2⟩
  cases d <;> simp only [trNormal, iterate, supportsStmt_move, IH]
case branch
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝² : Γ → σ → Bool
a✝¹ a✝ : Stmt₁
a_ih✝¹ :
  SupportsStmt S a✝¹ →
    (∀ (q' : Λ'), q' ∈ writes a✝¹ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝¹) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝¹ → SupportsStmt (trSupp M S) (tr enc dec M q')
a_ih✝ :
  SupportsStmt S a✝ →
    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.branch a✝² a✝¹ a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case goto
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝ : Γ → σ → Λ
hs : SupportsStmt S (Stmt.goto a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case halt
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
hs : SupportsStmt S Stmt.halt
hw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧
    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')
case load
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝¹ : Γ → σ → σ
a✝ : Stmt₁
a_ih✝ :
  SupportsStmt S a✝ →
    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.load a✝¹ a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.load a✝¹ a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.load a✝¹ a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.load a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case branch
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝² : Γ → σ → Bool
a✝¹ a✝ : Stmt₁
a_ih✝¹ :
  SupportsStmt S a✝¹ →
    (∀ (q' : Λ'), q' ∈ writes a✝¹ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝¹) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝¹ → SupportsStmt (trSupp M S) (tr enc dec M q')
a_ih✝ :
  SupportsStmt S a✝ →
    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.branch a✝² a✝¹ a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case goto
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝ : Γ → σ → Λ
hs : SupportsStmt S (Stmt.goto a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case halt
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
hs : SupportsStmt S Stmt.halt
hw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧
    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')
case load a q IH =>
  unfold writes at hw⊢
  replace IH := IH hs hw
  refine' ⟨supportsStmt_read _ fun _ ↦ IH.1, IH.2⟩
case goto
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝ : Γ → σ → Λ
hs : SupportsStmt S (Stmt.goto a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case halt
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
hs : SupportsStmt S Stmt.halt
hw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧
    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')
case branch
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝² : Γ → σ → Bool
a✝¹ a✝ : Stmt₁
a_ih✝¹ :
  SupportsStmt S a✝¹ →
    (∀ (q' : Λ'), q' ∈ writes a✝¹ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝¹) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝¹ → SupportsStmt (trSupp M S) (tr enc dec M q')
a_ih✝ :
  SupportsStmt S a✝ →
    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧
        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.branch a✝² a✝¹ a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case goto
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝ : Γ → σ → Λ
hs : SupportsStmt S (Stmt.goto a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case halt
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
hs : SupportsStmt S Stmt.halt
hw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧
    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')
case branch p q₁ q₂ IH₁ IH₂ =>
  unfold writes at hw⊢
  simp only [Finset.mem_union] at hw⊢
  replace IH₁ := IH₁ hs.1 fun q hq ↦ hw q (Or.inl hq)
  replace IH₂ := IH₂ hs.2 fun q hq ↦ hw q (Or.inr hq)
  exact ⟨supportsStmt_read _ fun _ ↦ ⟨IH₁.1, IH₂.1⟩, fun q ↦ Or.rec (IH₁.2 _) (IH₂.2 _)⟩
case halt
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
hs : SupportsStmt S Stmt.halt
hw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧
    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')
case goto
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
a✝ : Γ → σ → Λ
hs : SupportsStmt S (Stmt.goto a✝)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto a✝)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')

case halt
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
hs : SupportsStmt S Stmt.halt
hw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧
    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')
case goto l =>
  simp only [writes, Finset.not_mem_empty]; refine' ⟨_, fun _ ↦ False.elim⟩
  refine' supportsStmt_read _ fun a _ s ↦ _
  exact Finset.mem_biUnion.2 ⟨_, hs _ _, Finset.mem_insert_self _ _⟩
no goals
case halt
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
hs : SupportsStmt S Stmt.halt
hw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧
    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')
case halt =>
  simp only [writes, Finset.not_mem_empty]; refine' ⟨_, fun _ ↦ False.elim⟩
  simp only [SupportsStmt, supportsStmt_move, trNormal]
case intro.intro
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h✝ : q ∈ trSupp M S
this :
  ∀ (q : Stmt₁),
    SupportsStmt S q →
      (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
        SupportsStmt (trSupp M S) (trNormal dec q) ∧
          ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
l : Λ
hl : l ∈ S
h : q ∈ insert (Λ'.normal l) (writes (M l))
⊢ SupportsStmt (trSupp M S) (tr enc dec M q)
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
this :
  ∀ (q : Stmt₁),
    SupportsStmt S q →
      (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
        SupportsStmt (trSupp M S) (trNormal dec q) ∧
          ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
⊢ SupportsStmt (trSupp M S) (tr enc dec M q)
rcases Finset.mem_biUnion.1 h with ⟨l, hl, h⟩
case intro.intro
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h✝ : q ∈ trSupp M S
this✝ :
  ∀ (q : Stmt₁),
    SupportsStmt S q →
      (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
        SupportsStmt (trSupp M S) (trNormal dec q) ∧
          ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
l : Λ
hl : l ∈ S
h : q ∈ insert (Λ'.normal l) (writes (M l))
this :
  SupportsStmt (trSupp M S) (trNormal dec (M l)) ∧
    ∀ (q' : Λ'), q' ∈ writes (M l) → SupportsStmt (trSupp M S) (tr enc dec M q')
⊢ SupportsStmt (trSupp M S) (tr enc dec M q)
case intro.intro
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h✝ : q ∈ trSupp M S
this :
  ∀ (q : Stmt₁),
    SupportsStmt S q →
      (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
        SupportsStmt (trSupp M S) (trNormal dec q) ∧
          ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
l : Λ
hl : l ∈ S
h : q ∈ insert (Λ'.normal l) (writes (M l))
⊢ SupportsStmt (trSupp M S) (tr enc dec M q)
have :=
  this _ (ss.2 _ hl) fun q' hq ↦ Finset.mem_biUnion.2 ⟨_, hl, Finset.mem_insert_of_mem hq⟩
case intro.intro.inl
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
this✝ :
  ∀ (q : Stmt₁),
    SupportsStmt S q →
      (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
        SupportsStmt (trSupp M S) (trNormal dec q) ∧
          ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
l : Λ
hl : l ∈ S
this :
  SupportsStmt (trSupp M S) (trNormal dec (M l)) ∧
    ∀ (q' : Λ'), q' ∈ writes (M l) → SupportsStmt (trSupp M S) (tr enc dec M q')
h✝ : Λ'.normal l ∈ trSupp M S
h : Λ'.normal l ∈ insert (Λ'.normal l) (writes (M l))
⊢ SupportsStmt (trSupp M S) (tr enc dec M (Λ'.normal l))

case intro.intro.inr
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h✝¹ : q ∈ trSupp M S
this✝ :
  ∀ (q : Stmt₁),
    SupportsStmt S q →
      (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
        SupportsStmt (trSupp M S) (trNormal dec q) ∧
          ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
l : Λ
hl : l ∈ S
h✝ : q ∈ insert (Λ'.normal l) (writes (M l))
this :
  SupportsStmt (trSupp M S) (trNormal dec (M l)) ∧
    ∀ (q' : Λ'), q' ∈ writes (M l) → SupportsStmt (trSupp M S) (tr enc dec M q')
h : q ∈ writes (M l)
⊢ SupportsStmt (trSupp M S) (tr enc dec M q)
case intro.intro
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h✝ : q ∈ trSupp M S
this✝ :
  ∀ (q : Stmt₁),
    SupportsStmt S q →
      (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
        SupportsStmt (trSupp M S) (trNormal dec q) ∧
          ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
l : Λ
hl : l ∈ S
h : q ∈ insert (Λ'.normal l) (writes (M l))
this :
  SupportsStmt (trSupp M S) (trNormal dec (M l)) ∧
    ∀ (q' : Λ'), q' ∈ writes (M l) → SupportsStmt (trSupp M S) (tr enc dec M q')
⊢ SupportsStmt (trSupp M S) (tr enc dec M q)
rcases Finset.mem_insert.1 h with (rfl | h)
no goals
case intro.intro.inl
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
this✝ :
  ∀ (q : Stmt₁),
    SupportsStmt S q →
      (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
        SupportsStmt (trSupp M S) (trNormal dec q) ∧
          ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
l : Λ
hl : l ∈ S
this :
  SupportsStmt (trSupp M S) (trNormal dec (M l)) ∧
    ∀ (q' : Λ'), q' ∈ writes (M l) → SupportsStmt (trSupp M S) (tr enc dec M q')
h✝ : Λ'.normal l ∈ trSupp M S
h : Λ'.normal l ∈ insert (Λ'.normal l) (writes (M l))
⊢ SupportsStmt (trSupp M S) (tr enc dec M (Λ'.normal l))

case intro.intro.inr
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h✝¹ : q ∈ trSupp M S
this✝ :
  ∀ (q : Stmt₁),
    SupportsStmt S q →
      (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
        SupportsStmt (trSupp M S) (trNormal dec q) ∧
          ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
l : Λ
hl : l ∈ S
h✝ : q ∈ insert (Λ'.normal l) (writes (M l))
this :
  SupportsStmt (trSupp M S) (trNormal dec (M l)) ∧
    ∀ (q' : Λ'), q' ∈ writes (M l) → SupportsStmt (trSupp M S) (tr enc dec M q')
h : q ∈ writes (M l)
⊢ SupportsStmt (trSupp M S) (tr enc dec M q)
exacts [this.1, this.2 _ h]
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
d : Dir
q : Stmt₁
IH :
  SupportsStmt S q →
    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q) ∧
        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.move d q)
hw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.move d q)) ∧
    ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
d : Dir
q : Stmt₁
IH :
  SupportsStmt S q →
    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q) ∧
        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.move d q)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.move d q) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.move d q)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.move d q) → SupportsStmt (trSupp M S) (tr enc dec M q')
unfold writes at hw⊢
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
d : Dir
q : Stmt₁
hs : SupportsStmt S (Stmt.move d q)
hw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S
IH :
  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.move d q)) ∧
    ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
d : Dir
q : Stmt₁
IH :
  SupportsStmt S q →
    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q) ∧
        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.move d q)
hw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.move d q)) ∧
    ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
replace IH := IH hs hw
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
d : Dir
q : Stmt₁
hs : SupportsStmt S (Stmt.move d q)
hw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S
IH :
  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.move d q))
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
d : Dir
q : Stmt₁
hs : SupportsStmt S (Stmt.move d q)
hw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S
IH :
  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.move d q)) ∧
    ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
refine' ⟨_, IH.2⟩
no goals
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
d : Dir
q : Stmt₁
hs : SupportsStmt S (Stmt.move d q)
hw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S
IH :
  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.move d q))
cases d <;> simp only [trNormal, iterate, supportsStmt_move, IH]
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
f : Γ → σ → Γ
q : Stmt₁
IH :
  SupportsStmt S q →
    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q) ∧
        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.write f q)
hw : ∀ (q' : Λ'), q' ∈ Finset.image (fun a => Λ'.write a q) Finset.univ ∪ writes q → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.write f q)) ∧
    ∀ (q' : Λ'),
      q' ∈ Finset.image (fun a => Λ'.write a q) Finset.univ ∪ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
f : Γ → σ → Γ
q : Stmt₁
IH :
  SupportsStmt S q →
    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q) ∧
        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.write f q)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.write f q) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.write f q)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.write f q) → SupportsStmt (trSupp M S) (tr enc dec M q')
unfold writes at hw⊢
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
f : Γ → σ → Γ
q : Stmt₁
IH :
  SupportsStmt S q →
    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q) ∧
        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.write f q)
hw : ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.write f q)) ∧
    ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
f : Γ → σ → Γ
q : Stmt₁
IH :
  SupportsStmt S q →
    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q) ∧
        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.write f q)
hw : ∀ (q' : Λ'), q' ∈ Finset.image (fun a => Λ'.write a q) Finset.univ ∪ writes q → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.write f q)) ∧
    ∀ (q' : Λ'),
      q' ∈ Finset.image (fun a => Λ'.write a q) Finset.univ ∪ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
simp only [Finset.mem_image, Finset.mem_union, Finset.mem_univ, exists_prop, true_and_iff]
  at hw⊢
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
f : Γ → σ → Γ
q : Stmt₁
hs : SupportsStmt S (Stmt.write f q)
hw : ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → q' ∈ trSupp M S
IH :
  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.write f q)) ∧
    ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
f : Γ → σ → Γ
q : Stmt₁
IH :
  SupportsStmt S q →
    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q) ∧
        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.write f q)
hw : ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.write f q)) ∧
    ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
replace IH := IH hs fun q hq ↦ hw q (Or.inr hq)
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
f : Γ → σ → Γ
q : Stmt₁
hs : SupportsStmt S (Stmt.write f q)
hw : ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → q' ∈ trSupp M S
IH :
  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
q' : Λ'
hq : (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q
⊢ SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
f : Γ → σ → Γ
q : Stmt₁
hs : SupportsStmt S (Stmt.write f q)
hw : ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → q' ∈ trSupp M S
IH :
  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.write f q)) ∧
    ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
refine' ⟨supportsStmt_read _ fun a _ s ↦ hw _ (Or.inl ⟨_, rfl⟩), fun q' hq ↦ _⟩
case inl.intro.refl
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
f : Γ → σ → Γ
q : Stmt₁
hs : SupportsStmt S (Stmt.write f q)
hw : ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → q' ∈ trSupp M S
IH :
  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
a : Γ
⊢ SupportsStmt (trSupp M S) (tr enc dec M (Λ'.write a q))

case inr
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
f : Γ → σ → Γ
q : Stmt₁
hs : SupportsStmt S (Stmt.write f q)
hw : ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → q' ∈ trSupp M S
IH :
  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
q' : Λ'
hq : q' ∈ writes q
⊢ SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
f : Γ → σ → Γ
q : Stmt₁
hs : SupportsStmt S (Stmt.write f q)
hw : ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → q' ∈ trSupp M S
IH :
  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
q' : Λ'
hq : (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q
⊢ SupportsStmt (trSupp M S) (tr enc dec M q')
rcases hq with (⟨a, q₂, rfl⟩ | hq)
no goals
case inl.intro.refl
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
f : Γ → σ → Γ
q : Stmt₁
hs : SupportsStmt S (Stmt.write f q)
hw : ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → q' ∈ trSupp M S
IH :
  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
a : Γ
⊢ SupportsStmt (trSupp M S) (tr enc dec M (Λ'.write a q))
simp only [tr, supportsStmt_write, supportsStmt_move, IH.1]
no goals
case inr
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
f : Γ → σ → Γ
q : Stmt₁
hs : SupportsStmt S (Stmt.write f q)
hw : ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → q' ∈ trSupp M S
IH :
  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
q' : Λ'
hq : q' ∈ writes q
⊢ SupportsStmt (trSupp M S) (tr enc dec M q')
exact IH.2 _ hq
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
a : Γ → σ → σ
q : Stmt₁
IH :
  SupportsStmt S q →
    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q) ∧
        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.load a q)
hw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.load a q)) ∧
    ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
a : Γ → σ → σ
q : Stmt₁
IH :
  SupportsStmt S q →
    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q) ∧
        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.load a q)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.load a q) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.load a q)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.load a q) → SupportsStmt (trSupp M S) (tr enc dec M q')
unfold writes at hw⊢
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
a : Γ → σ → σ
q : Stmt₁
hs : SupportsStmt S (Stmt.load a q)
hw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S
IH :
  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.load a q)) ∧
    ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
a : Γ → σ → σ
q : Stmt₁
IH :
  SupportsStmt S q →
    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q) ∧
        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.load a q)
hw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.load a q)) ∧
    ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
replace IH := IH hs hw
no goals
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q✝ : Λ'
h : q✝ ∈ trSupp M S
a : Γ → σ → σ
q : Stmt₁
hs : SupportsStmt S (Stmt.load a q)
hw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S
IH :
  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.load a q)) ∧
    ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')
refine' ⟨supportsStmt_read _ fun _ ↦ IH.1, IH.2⟩
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
p : Γ → σ → Bool
q₁ q₂ : Stmt₁
IH₁ :
  SupportsStmt S q₁ →
    (∀ (q' : Λ'), q' ∈ writes q₁ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q₁) ∧
        ∀ (q' : Λ'), q' ∈ writes q₁ → SupportsStmt (trSupp M S) (tr enc dec M q')
IH₂ :
  SupportsStmt S q₂ →
    (∀ (q' : Λ'), q' ∈ writes q₂ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q₂) ∧
        ∀ (q' : Λ'), q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.branch p q₁ q₂)
hw : ∀ (q' : Λ'), q' ∈ writes q₁ ∪ writes q₂ → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch p q₁ q₂)) ∧
    ∀ (q' : Λ'), q' ∈ writes q₁ ∪ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
p : Γ → σ → Bool
q₁ q₂ : Stmt₁
IH₁ :
  SupportsStmt S q₁ →
    (∀ (q' : Λ'), q' ∈ writes q₁ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q₁) ∧
        ∀ (q' : Λ'), q' ∈ writes q₁ → SupportsStmt (trSupp M S) (tr enc dec M q')
IH₂ :
  SupportsStmt S q₂ →
    (∀ (q' : Λ'), q' ∈ writes q₂ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q₂) ∧
        ∀ (q' : Λ'), q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.branch p q₁ q₂)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.branch p q₁ q₂) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch p q₁ q₂)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.branch p q₁ q₂) → SupportsStmt (trSupp M S) (tr enc dec M q')
unfold writes at hw⊢
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
p : Γ → σ → Bool
q₁ q₂ : Stmt₁
IH₁ :
  SupportsStmt S q₁ →
    (∀ (q' : Λ'), q' ∈ writes q₁ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q₁) ∧
        ∀ (q' : Λ'), q' ∈ writes q₁ → SupportsStmt (trSupp M S) (tr enc dec M q')
IH₂ :
  SupportsStmt S q₂ →
    (∀ (q' : Λ'), q' ∈ writes q₂ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q₂) ∧
        ∀ (q' : Λ'), q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.branch p q₁ q₂)
hw : ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch p q₁ q₂)) ∧
    ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
p : Γ → σ → Bool
q₁ q₂ : Stmt₁
IH₁ :
  SupportsStmt S q₁ →
    (∀ (q' : Λ'), q' ∈ writes q₁ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q₁) ∧
        ∀ (q' : Λ'), q' ∈ writes q₁ → SupportsStmt (trSupp M S) (tr enc dec M q')
IH₂ :
  SupportsStmt S q₂ →
    (∀ (q' : Λ'), q' ∈ writes q₂ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q₂) ∧
        ∀ (q' : Λ'), q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.branch p q₁ q₂)
hw : ∀ (q' : Λ'), q' ∈ writes q₁ ∪ writes q₂ → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch p q₁ q₂)) ∧
    ∀ (q' : Λ'), q' ∈ writes q₁ ∪ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')
simp only [Finset.mem_union] at hw⊢
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
p : Γ → σ → Bool
q₁ q₂ : Stmt₁
IH₂ :
  SupportsStmt S q₂ →
    (∀ (q' : Λ'), q' ∈ writes q₂ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q₂) ∧
        ∀ (q' : Λ'), q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.branch p q₁ q₂)
hw : ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → q' ∈ trSupp M S
IH₁ :
  SupportsStmt (trSupp M S) (trNormal dec q₁) ∧
    ∀ (q' : Λ'), q' ∈ writes q₁ → SupportsStmt (trSupp M S) (tr enc dec M q')
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch p q₁ q₂)) ∧
    ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
p : Γ → σ → Bool
q₁ q₂ : Stmt₁
IH₁ :
  SupportsStmt S q₁ →
    (∀ (q' : Λ'), q' ∈ writes q₁ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q₁) ∧
        ∀ (q' : Λ'), q' ∈ writes q₁ → SupportsStmt (trSupp M S) (tr enc dec M q')
IH₂ :
  SupportsStmt S q₂ →
    (∀ (q' : Λ'), q' ∈ writes q₂ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q₂) ∧
        ∀ (q' : Λ'), q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.branch p q₁ q₂)
hw : ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch p q₁ q₂)) ∧
    ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')
replace IH₁ := IH₁ hs.1 fun q hq ↦ hw q (Or.inl hq)
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
p : Γ → σ → Bool
q₁ q₂ : Stmt₁
hs : SupportsStmt S (Stmt.branch p q₁ q₂)
hw : ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → q' ∈ trSupp M S
IH₁ :
  SupportsStmt (trSupp M S) (trNormal dec q₁) ∧
    ∀ (q' : Λ'), q' ∈ writes q₁ → SupportsStmt (trSupp M S) (tr enc dec M q')
IH₂ :
  SupportsStmt (trSupp M S) (trNormal dec q₂) ∧
    ∀ (q' : Λ'), q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch p q₁ q₂)) ∧
    ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
p : Γ → σ → Bool
q₁ q₂ : Stmt₁
IH₂ :
  SupportsStmt S q₂ →
    (∀ (q' : Λ'), q' ∈ writes q₂ → q' ∈ trSupp M S) →
      SupportsStmt (trSupp M S) (trNormal dec q₂) ∧
        ∀ (q' : Λ'), q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')
hs : SupportsStmt S (Stmt.branch p q₁ q₂)
hw : ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → q' ∈ trSupp M S
IH₁ :
  SupportsStmt (trSupp M S) (trNormal dec q₁) ∧
    ∀ (q' : Λ'), q' ∈ writes q₁ → SupportsStmt (trSupp M S) (tr enc dec M q')
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch p q₁ q₂)) ∧
    ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')
replace IH₂ := IH₂ hs.2 fun q hq ↦ hw q (Or.inr hq)
no goals
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
p : Γ → σ → Bool
q₁ q₂ : Stmt₁
hs : SupportsStmt S (Stmt.branch p q₁ q₂)
hw : ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → q' ∈ trSupp M S
IH₁ :
  SupportsStmt (trSupp M S) (trNormal dec q₁) ∧
    ∀ (q' : Λ'), q' ∈ writes q₁ → SupportsStmt (trSupp M S) (tr enc dec M q')
IH₂ :
  SupportsStmt (trSupp M S) (trNormal dec q₂) ∧
    ∀ (q' : Λ'), q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch p q₁ q₂)) ∧
    ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')
exact ⟨supportsStmt_read _ fun _ ↦ ⟨IH₁.1, IH₂.1⟩, fun q ↦ Or.rec (IH₁.2 _) (IH₂.2 _)⟩
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
l : Γ → σ → Λ
hs : SupportsStmt S (Stmt.goto l)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto l) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto l)) ∧
    ∀ (q' : Λ'), False → SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
l : Γ → σ → Λ
hs : SupportsStmt S (Stmt.goto l)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto l) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto l)) ∧
    ∀ (q' : Λ'), q' ∈ writes (Stmt.goto l) → SupportsStmt (trSupp M S) (tr enc dec M q')
simp only [writes, Finset.not_mem_empty]
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
l : Γ → σ → Λ
hs : SupportsStmt S (Stmt.goto l)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto l) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto l))
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
l : Γ → σ → Λ
hs : SupportsStmt S (Stmt.goto l)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto l) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto l)) ∧
    ∀ (q' : Λ'), False → SupportsStmt (trSupp M S) (tr enc dec M q')
refine' ⟨_, fun _ ↦ False.elim⟩
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
l : Γ → σ → Λ
hs : SupportsStmt S (Stmt.goto l)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto l) → q' ∈ trSupp M S
a : Γ
x✝ : Bool
s : σ
⊢ (fun x s => Λ'.normal (l a s)) x✝ s ∈ trSupp M S
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
l : Γ → σ → Λ
hs : SupportsStmt S (Stmt.goto l)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto l) → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto l))
refine' supportsStmt_read _ fun a _ s ↦ _
no goals
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
l : Γ → σ → Λ
hs : SupportsStmt S (Stmt.goto l)
hw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto l) → q' ∈ trSupp M S
a : Γ
x✝ : Bool
s : σ
⊢ (fun x s => Λ'.normal (l a s)) x✝ s ∈ trSupp M S
exact Finset.mem_biUnion.2 ⟨_, hs _ _, Finset.mem_insert_self _ _⟩
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
hs : SupportsStmt S Stmt.halt
hw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧ ∀ (q' : Λ'), False → SupportsStmt (trSupp M S) (tr enc dec M q')
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
hs : SupportsStmt S Stmt.halt
hw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧
    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')
simp only [writes, Finset.not_mem_empty]
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
hs : SupportsStmt S Stmt.halt
hw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt)
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
hs : SupportsStmt S Stmt.halt
hw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧ ∀ (q' : Λ'), False → SupportsStmt (trSupp M S) (tr enc dec M q')
refine' ⟨_, fun _ ↦ False.elim⟩
no goals
Γ : Type u_2
inst✝³ : Inhabited Γ
Λ : Type u_1
inst✝² : Inhabited Λ
σ : Type u_3
inst✝¹ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
enc0 : enc default = Vector.replicate n false
M : Λ → Stmt₁
encdec : ∀ (a : Γ), dec (enc a) = a
inst✝ : Fintype Γ
S : Finset Λ
ss : Supports M S
q : Λ'
h : q ∈ trSupp M S
hs : SupportsStmt S Stmt.halt
hw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S
⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt)
simp only [SupportsStmt, supportsStmt_move, trNormal]