case intro.intro
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
l₁ : Option Λ
v : σ
L R : ListBlank Γ
⊢ FRespects (step (tr enc dec M)) (fun c₁ => trCfg enc enc₀ c₁)
    (trCfg enc enc₀ { l := l₁, var := v, Tape := Tape.mk' L R }) (step M { l := l₁, var := v, Tape := Tape.mk' L R })
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
l₁ : Option Λ
v : σ
T : Tape Γ
⊢ FRespects (step (tr enc dec M)) (fun c₁ => trCfg enc enc₀ c₁) (trCfg enc enc₀ { l := l₁, var := v, Tape := T })
    (step M { l := l₁, var := v, Tape := T })
obtain ⟨L, R, rfl⟩ := T.exists_mk'
case intro.intro.none
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v : σ
L R : ListBlank Γ
⊢ FRespects (step (tr enc dec M)) (fun c₁ => trCfg enc enc₀ c₁)
    (trCfg enc enc₀ { l := none, var := v, Tape := Tape.mk' L R })
    (step M { l := none, var := v, Tape := Tape.mk' L R })

case intro.intro.some
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v : σ
L R : ListBlank Γ
l₁ : Λ
⊢ FRespects (step (tr enc dec M)) (fun c₁ => trCfg enc enc₀ c₁)
    (trCfg enc enc₀ { l := some l₁, var := v, Tape := Tape.mk' L R })
    (step M { l := some l₁, var := v, Tape := Tape.mk' L R })
case intro.intro
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
l₁ : Option Λ
v : σ
L R : ListBlank Γ
⊢ FRespects (step (tr enc dec M)) (fun c₁ => trCfg enc enc₀ c₁)
    (trCfg enc enc₀ { l := l₁, var := v, Tape := Tape.mk' L R }) (step M { l := l₁, var := v, Tape := Tape.mk' L R })
cases' l₁ with l₁
case intro.intro.some
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v : σ
L R : ListBlank Γ
l₁ : Λ
⊢ ∀ (q : Stmt₁) (R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
case intro.intro.some
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v : σ
L R : ListBlank Γ
l₁ : Λ
⊢ FRespects (step (tr enc dec M)) (fun c₁ => trCfg enc enc₀ c₁)
    (trCfg enc enc₀ { l := some l₁, var := v, Tape := Tape.mk' L R })
    (step M { l := some l₁, var := v, Tape := Tape.mk' L R })
suffices ∀ q R, Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux q v (Tape.mk' L R))) by
  refine' TransGen.head' rfl _
  rw [trTape_mk']
  exact this _ R
case intro.intro.some
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v : σ
L : ListBlank Γ
⊢ ∀ (q : Stmt₁) (R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
case intro.intro.some
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v : σ
L R : ListBlank Γ
l₁ : Λ
⊢ ∀ (q : Stmt₁) (R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
clear R l₁
case intro.intro.some
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v : σ
L : ListBlank Γ
q : Stmt₁
R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
case intro.intro.some
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v : σ
L : ListBlank Γ
⊢ ∀ (q : Stmt₁) (R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
intro q R
case intro.intro.some.move
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝¹ : Dir
a✝ : Stmt₁
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.move a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.move a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.write
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝¹ : Γ → σ → Γ
a✝ : Stmt₁
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.write a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.write a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.load
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝¹ : Γ → σ → σ
a✝ : Stmt₁
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.load a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.load a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.branch
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝² : Γ → σ → Bool
a✝¹ a✝ : Stmt₁
a_ih✝¹ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝¹) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝¹ v (Tape.mk' L R)))
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.branch a✝² a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.goto
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝ : Γ → σ → Λ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.goto a✝) v (Tape.mk' L R)))

case intro.intro.some.halt
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))
case intro.intro.some
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v : σ
L : ListBlank Γ
q : Stmt₁
R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
induction' q generalizing v L R
case intro.intro.some.write
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝¹ : Γ → σ → Γ
a✝ : Stmt₁
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.write a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.write a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.load
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝¹ : Γ → σ → σ
a✝ : Stmt₁
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.load a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.load a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.branch
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝² : Γ → σ → Bool
a✝¹ a✝ : Stmt₁
a_ih✝¹ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝¹) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝¹ v (Tape.mk' L R)))
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.branch a✝² a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.goto
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝ : Γ → σ → Λ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.goto a✝) v (Tape.mk' L R)))

case intro.intro.some.halt
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))
case intro.intro.some.move
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝¹ : Dir
a✝ : Stmt₁
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.move a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.move a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.write
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝¹ : Γ → σ → Γ
a✝ : Stmt₁
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.write a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.write a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.load
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝¹ : Γ → σ → σ
a✝ : Stmt₁
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.load a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.load a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.branch
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝² : Γ → σ → Bool
a✝¹ a✝ : Stmt₁
a_ih✝¹ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝¹) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝¹ v (Tape.mk' L R)))
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.branch a✝² a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.goto
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝ : Γ → σ → Λ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.goto a✝) v (Tape.mk' L R)))

case intro.intro.some.halt
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))
case move d q IH =>
  cases d <;>
      simp only [trNormal, iterate, stepAux_move, stepAux, ListBlank.head_cons,
        Tape.move_left_mk', ListBlank.cons_head_tail, ListBlank.tail_cons,
        trTape'_move_left enc0, trTape'_move_right enc0] <;>
    apply IH
case intro.intro.some.load
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝¹ : Γ → σ → σ
a✝ : Stmt₁
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.load a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.load a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.branch
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝² : Γ → σ → Bool
a✝¹ a✝ : Stmt₁
a_ih✝¹ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝¹) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝¹ v (Tape.mk' L R)))
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.branch a✝² a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.goto
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝ : Γ → σ → Λ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.goto a✝) v (Tape.mk' L R)))

case intro.intro.some.halt
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))
case intro.intro.some.write
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝¹ : Γ → σ → Γ
a✝ : Stmt₁
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.write a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.write a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.load
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝¹ : Γ → σ → σ
a✝ : Stmt₁
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.load a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.load a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.branch
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝² : Γ → σ → Bool
a✝¹ a✝ : Stmt₁
a_ih✝¹ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝¹) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝¹ v (Tape.mk' L R)))
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.branch a✝² a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.goto
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝ : Γ → σ → Λ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.goto a✝) v (Tape.mk' L R)))

case intro.intro.some.halt
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))
case write f q IH =>
  simp only [trNormal, stepAux_read dec enc0 encdec, stepAux]
  refine' ReflTransGen.head rfl _
  obtain ⟨a, R, rfl⟩ := R.exists_cons
  rw [tr, Tape.mk'_head, stepAux_write, ListBlank.head_cons, stepAux_move,
    trTape'_move_left enc0, ListBlank.head_cons, ListBlank.tail_cons, Tape.write_mk']
  apply IH
case intro.intro.some.branch
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝² : Γ → σ → Bool
a✝¹ a✝ : Stmt₁
a_ih✝¹ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝¹) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝¹ v (Tape.mk' L R)))
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.branch a✝² a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.goto
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝ : Γ → σ → Λ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.goto a✝) v (Tape.mk' L R)))

case intro.intro.some.halt
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))
case intro.intro.some.load
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝¹ : Γ → σ → σ
a✝ : Stmt₁
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.load a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.load a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.branch
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝² : Γ → σ → Bool
a✝¹ a✝ : Stmt₁
a_ih✝¹ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝¹) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝¹ v (Tape.mk' L R)))
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.branch a✝² a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.goto
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝ : Γ → σ → Λ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.goto a✝) v (Tape.mk' L R)))

case intro.intro.some.halt
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))
case load a q IH =>
  simp only [trNormal, stepAux_read dec enc0 encdec]
  apply IH
case intro.intro.some.goto
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝ : Γ → σ → Λ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.goto a✝) v (Tape.mk' L R)))

case intro.intro.some.halt
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))
case intro.intro.some.branch
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝² : Γ → σ → Bool
a✝¹ a✝ : Stmt₁
a_ih✝¹ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝¹) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝¹ v (Tape.mk' L R)))
a_ih✝ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.branch a✝² a✝¹ a✝) v (Tape.mk' L R)))

case intro.intro.some.goto
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝ : Γ → σ → Λ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.goto a✝) v (Tape.mk' L R)))

case intro.intro.some.halt
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))
case branch p q₁ q₂ IH₁ IH₂ =>
  simp only [trNormal, stepAux_read dec enc0 encdec, stepAux]
  cases p R.head v <;> [apply IH₂; apply IH₁]
case intro.intro.some.halt
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))
case intro.intro.some.goto
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a✝ : Γ → σ → Λ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto a✝)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.goto a✝) v (Tape.mk' L R)))

case intro.intro.some.halt
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))
case goto l =>
  simp only [trNormal, stepAux_read dec enc0 encdec, stepAux, trCfg, trTape_mk']
  apply ReflTransGen.refl
no goals
case intro.intro.some.halt
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))
case halt =>
  simp only [trNormal, stepAux, trCfg, stepAux_move, trTape'_move_left enc0,
    trTape'_move_right enc0, trTape_mk']
  apply ReflTransGen.refl
no goals
case intro.intro.none
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v : σ
L R : ListBlank Γ
⊢ FRespects (step (tr enc dec M)) (fun c₁ => trCfg enc enc₀ c₁)
    (trCfg enc enc₀ { l := none, var := v, Tape := Tape.mk' L R })
    (step M { l := none, var := v, Tape := Tape.mk' L R })
exact rfl
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v : σ
L R : ListBlank Γ
l₁ : Λ
this :
  ∀ (q : Stmt₁) (R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
⊢ ReflTransGen (fun a b => b ∈ step (tr enc dec M) a)
    (stepAux (tr enc dec M (Λ'.normal l₁)) v (trTape enc₀ (Tape.mk' L R)))
    ((fun c₁ => trCfg enc enc₀ c₁) (stepAux (M l₁) v (Tape.mk' L R)))
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v : σ
L R : ListBlank Γ
l₁ : Λ
this :
  ∀ (q : Stmt₁) (R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
⊢ FRespects (step (tr enc dec M)) (fun c₁ => trCfg enc enc₀ c₁)
    (trCfg enc enc₀ { l := some l₁, var := v, Tape := Tape.mk' L R })
    (step M { l := some l₁, var := v, Tape := Tape.mk' L R })
refine' TransGen.head' rfl _
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v : σ
L R : ListBlank Γ
l₁ : Λ
this :
  ∀ (q : Stmt₁) (R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
⊢ ReflTransGen (fun a b => b ∈ step (tr enc dec M) a) (stepAux (tr enc dec M (Λ'.normal l₁)) v (trTape' enc₀ L R))
    ((fun c₁ => trCfg enc enc₀ c₁) (stepAux (M l₁) v (Tape.mk' L R)))
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v : σ
L R : ListBlank Γ
l₁ : Λ
this :
  ∀ (q : Stmt₁) (R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
⊢ ReflTransGen (fun a b => b ∈ step (tr enc dec M) a)
    (stepAux (tr enc dec M (Λ'.normal l₁)) v (trTape enc₀ (Tape.mk' L R)))
    ((fun c₁ => trCfg enc enc₀ c₁) (stepAux (M l₁) v (Tape.mk' L R)))
rw [trTape_mk']
no goals
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v : σ
L R : ListBlank Γ
l₁ : Λ
this :
  ∀ (q : Stmt₁) (R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
⊢ ReflTransGen (fun a b => b ∈ step (tr enc dec M) a) (stepAux (tr enc dec M (Λ'.normal l₁)) v (trTape' enc₀ L R))
    ((fun c₁ => trCfg enc enc₀ c₁) (stepAux (M l₁) v (Tape.mk' L R)))
exact this _ R
no goals
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
d : Dir
q : Stmt₁
IH :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.move d q)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.move d q) v (Tape.mk' L R)))
cases d <;>
    simp only [trNormal, iterate, stepAux_move, stepAux, ListBlank.head_cons,
      Tape.move_left_mk', ListBlank.cons_head_tail, ListBlank.tail_cons,
      trTape'_move_left enc0, trTape'_move_right enc0] <;>
  apply IH
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
f : Γ → σ → Γ
q : Stmt₁
IH :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) { l := some (Λ'.write (f (ListBlank.head R) v) q), var := v, Tape := trTape' enc0 L R }
    (trCfg enc enc0 (stepAux q v (Tape.write (f (Tape.mk' L R).head v) (Tape.mk' L R))))
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
f : Γ → σ → Γ
q : Stmt₁
IH :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.write f q)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.write f q) v (Tape.mk' L R)))
simp only [trNormal, stepAux_read dec enc0 encdec, stepAux]
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
f : Γ → σ → Γ
q : Stmt₁
IH :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ ReflTransGen (fun a b => b ∈ step (tr enc dec M) a)
    (stepAux (tr enc dec M (Λ'.write (f (ListBlank.head R) v) q)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux q v (Tape.write (f (Tape.mk' L R).head v) (Tape.mk' L R))))
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
f : Γ → σ → Γ
q : Stmt₁
IH :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) { l := some (Λ'.write (f (ListBlank.head R) v) q), var := v, Tape := trTape' enc0 L R }
    (trCfg enc enc0 (stepAux q v (Tape.write (f (Tape.mk' L R).head v) (Tape.mk' L R))))
refine' ReflTransGen.head rfl _
case intro.intro
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
f : Γ → σ → Γ
q : Stmt₁
IH :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
v : σ
L : ListBlank Γ
a : Γ
R : ListBlank Γ
⊢ ReflTransGen (fun a b => b ∈ step (tr enc dec M) a)
    (stepAux (tr enc dec M (Λ'.write (f (ListBlank.head (ListBlank.cons a R)) v) q)) v
      (trTape' enc0 L (ListBlank.cons a R)))
    (trCfg enc enc0
      (stepAux q v (Tape.write (f (Tape.mk' L (ListBlank.cons a R)).head v) (Tape.mk' L (ListBlank.cons a R)))))
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
f : Γ → σ → Γ
q : Stmt₁
IH :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ ReflTransGen (fun a b => b ∈ step (tr enc dec M) a)
    (stepAux (tr enc dec M (Λ'.write (f (ListBlank.head R) v) q)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux q v (Tape.write (f (Tape.mk' L R).head v) (Tape.mk' L R))))
obtain ⟨a, R, rfl⟩ := R.exists_cons
case intro.intro
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
f : Γ → σ → Γ
q : Stmt₁
IH :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
v : σ
L : ListBlank Γ
a : Γ
R : ListBlank Γ
⊢ ReflTransGen (fun a b => b ∈ step (tr enc dec M) a)
    (stepAux (trNormal dec q) v (trTape' enc0 L (ListBlank.cons (f a v) R)))
    (trCfg enc enc0 (stepAux q v (Tape.mk' L (ListBlank.cons (f a v) R))))
case intro.intro
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
f : Γ → σ → Γ
q : Stmt₁
IH :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
v : σ
L : ListBlank Γ
a : Γ
R : ListBlank Γ
⊢ ReflTransGen (fun a b => b ∈ step (tr enc dec M) a)
    (stepAux (tr enc dec M (Λ'.write (f (ListBlank.head (ListBlank.cons a R)) v) q)) v
      (trTape' enc0 L (ListBlank.cons a R)))
    (trCfg enc enc0
      (stepAux q v (Tape.write (f (Tape.mk' L (ListBlank.cons a R)).head v) (Tape.mk' L (ListBlank.cons a R)))))
rw [tr, Tape.mk'_head, stepAux_write, ListBlank.head_cons, stepAux_move,
  trTape'_move_left enc0, ListBlank.head_cons, ListBlank.tail_cons, Tape.write_mk']
no goals
case intro.intro
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
f : Γ → σ → Γ
q : Stmt₁
IH :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
v : σ
L : ListBlank Γ
a : Γ
R : ListBlank Γ
⊢ ReflTransGen (fun a b => b ∈ step (tr enc dec M) a)
    (stepAux (trNormal dec q) v (trTape' enc0 L (ListBlank.cons (f a v) R)))
    (trCfg enc enc0 (stepAux q v (Tape.mk' L (ListBlank.cons (f a v) R))))
apply IH
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a : Γ → σ → σ
q : Stmt₁
IH :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M))
    (stepAux (Stmt.load (fun x s => a (ListBlank.head R) s) (trNormal dec q)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.load a q) v (Tape.mk' L R)))
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a : Γ → σ → σ
q : Stmt₁
IH :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.load a q)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.load a q) v (Tape.mk' L R)))
simp only [trNormal, stepAux_read dec enc0 encdec]
no goals
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
a : Γ → σ → σ
q : Stmt₁
IH :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M))
    (stepAux (Stmt.load (fun x s => a (ListBlank.head R) s) (trNormal dec q)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.load a q) v (Tape.mk' L R)))
apply IH
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
p : Γ → σ → Bool
q₁ q₂ : Stmt₁
IH₁ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₁) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q₁ v (Tape.mk' L R)))
IH₂ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₂) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q₂ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M))
    (bif p (ListBlank.head R) v then stepAux (trNormal dec q₁) v (trTape' enc0 L R)
    else stepAux (trNormal dec q₂) v (trTape' enc0 L R))
    (trCfg enc enc0 (bif p (Tape.mk' L R).head v then stepAux q₁ v (Tape.mk' L R) else stepAux q₂ v (Tape.mk' L R)))
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
p : Γ → σ → Bool
q₁ q₂ : Stmt₁
IH₁ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₁) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q₁ v (Tape.mk' L R)))
IH₂ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₂) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q₂ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.branch p q₁ q₂)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.branch p q₁ q₂) v (Tape.mk' L R)))
simp only [trNormal, stepAux_read dec enc0 encdec, stepAux]
no goals
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
p : Γ → σ → Bool
q₁ q₂ : Stmt₁
IH₁ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₁) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q₁ v (Tape.mk' L R)))
IH₂ :
  ∀ (v : σ) (L R : ListBlank Γ),
    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₂) v (trTape' enc0 L R))
      (trCfg enc enc0 (stepAux q₂ v (Tape.mk' L R)))
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M))
    (bif p (ListBlank.head R) v then stepAux (trNormal dec q₁) v (trTape' enc0 L R)
    else stepAux (trNormal dec q₂) v (trTape' enc0 L R))
    (trCfg enc enc0 (bif p (Tape.mk' L R).head v then stepAux q₁ v (Tape.mk' L R) else stepAux q₂ v (Tape.mk' L R)))
cases p R.head v <;> [apply IH₂; apply IH₁]
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
l : Γ → σ → Λ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) { l := some (Λ'.normal (l (ListBlank.head R) v)), var := v, Tape := trTape' enc0 L R }
    { l := Option.map Λ'.normal (some (l (Tape.mk' L R).head v)), var := v, Tape := trTape' enc0 L R }
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
l : Γ → σ → Λ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto l)) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux (Stmt.goto l) v (Tape.mk' L R)))
simp only [trNormal, stepAux_read dec enc0 encdec, stepAux, trCfg, trTape_mk']
no goals
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
l : Γ → σ → Λ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) { l := some (Λ'.normal (l (ListBlank.head R) v)), var := v, Tape := trTape' enc0 L R }
    { l := Option.map Λ'.normal (some (l (Tape.mk' L R).head v)), var := v, Tape := trTape' enc0 L R }
apply ReflTransGen.refl
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) { l := none, var := v, Tape := trTape' enc0 L R }
    { l := Option.map Λ'.normal none, var := v, Tape := trTape' enc0 L R }
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))
    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))
simp only [trNormal, stepAux, trCfg, stepAux_move, trTape'_move_left enc0,
  trTape'_move_right enc0, trTape_mk']
no goals
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_2
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
enc₀ : enc default = Vector.replicate n false
x✝ : Cfg₁
v✝ : σ
L✝ R✝ : ListBlank Γ
v : σ
L R : ListBlank Γ
⊢ Reaches (step (tr enc dec M)) { l := none, var := v, Tape := trTape' enc0 L R }
    { l := Option.map Λ'.normal none, var := v, Tape := trTape' enc0 L R }
apply ReflTransGen.refl