l3lab/ntp-mathlib huggingface dataset:
theorem addBottom_modifyNth (f : (∀ k, Option (Γ k)) → ∀ k, Option (Γ k))
    (L : ListBlank (∀ k, Option (Γ k))) (n : ℕ) :
    (addBottom L).modifyNth (fun a ↦ (a.1, f a.2)) n = addBottom (L.modifyNth f n) := by
  cases n <;>
    simp only [addBottom, ListBlank.head_cons, ListBlank.modifyNth, ListBlank.tail_cons]
  congr; 

Proof state:
case succ.e_l
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
f : ((k : K) → Option (Γ k)) → (k : K) → Option (Γ k)
L : ListBlank ((k : K) → Option (Γ k))
n✝ : ℕ
⊢ ListBlank.modifyNth (fun a => (a.1, f a.2)) n✝
      (ListBlank.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } (ListBlank.tail L)) =
    ListBlank.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) }
      (ListBlank.modifyNth f n✝ (ListBlank.tail L))

Next tactic:
symm
theorem addBottom_modifyNth (f : (∀ k, Option (Γ k)) → ∀ k, Option (Γ k))
    (L : ListBlank (∀ k, Option (Γ k))) (n : ℕ) :
    (addBottom L).modifyNth (fun a ↦ (a.1, f a.2)) n = addBottom (L.modifyNth f n) := by
  cases n <;>
    simp only [addBottom, ListBlank.head_cons, ListBlank.modifyNth, ListBlank.tail_cons]
  congr; symm; 

Proof state:
case succ.e_l
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
f : ((k : K) → Option (Γ k)) → (k : K) → Option (Γ k)
L : ListBlank ((k : K) → Option (Γ k))
n✝ : ℕ
⊢ ListBlank.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) }
      (ListBlank.modifyNth f n✝ (ListBlank.tail L)) =
    ListBlank.modifyNth (fun a => (a.1, f a.2)) n✝
      (ListBlank.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } (ListBlank.tail L))

Next tactic:
apply ListBlank.map_modifyNth
theorem addBottom_modifyNth (f : (∀ k, Option (Γ k)) → ∀ k, Option (Γ k))
    (L : ListBlank (∀ k, Option (Γ k))) (n : ℕ) :
    (addBottom L).modifyNth (fun a ↦ (a.1, f a.2)) n = addBottom (L.modifyNth f n) := by
  cases n <;>
    simp only [addBottom, ListBlank.head_cons, ListBlank.modifyNth, ListBlank.tail_cons]
  congr; symm; apply ListBlank.map_modifyNth; 

Proof state:
case succ.e_l.H
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
f : ((k : K) → Option (Γ k)) → (k : K) → Option (Γ k)
L : ListBlank ((k : K) → Option (Γ k))
n✝ : ℕ
⊢ ∀ (x : (k : K) → Option (Γ k)),
    PointedMap.f { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } (f x) =
      ((PointedMap.f { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } x).1,
        f (PointedMap.f { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } x).2)

Next tactic:
intro
theorem addBottom_modifyNth (f : (∀ k, Option (Γ k)) → ∀ k, Option (Γ k))
    (L : ListBlank (∀ k, Option (Γ k))) (n : ℕ) :
    (addBottom L).modifyNth (fun a ↦ (a.1, f a.2)) n = addBottom (L.modifyNth f n) := by
  cases n <;>
    simp only [addBottom, ListBlank.head_cons, ListBlank.modifyNth, ListBlank.tail_cons]
  congr; symm; apply ListBlank.map_modifyNth; intro; 

Proof state:
case succ.e_l.H
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
f : ((k : K) → Option (Γ k)) → (k : K) → Option (Γ k)
L : ListBlank ((k : K) → Option (Γ k))
n✝ : ℕ
x✝ : (k : K) → Option (Γ k)
⊢ PointedMap.f { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } (f x✝) =
    ((PointedMap.f { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } x✝).1,
      f (PointedMap.f { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } x✝).2)

Next tactic:
rfl
theorem addBottom_nth_snd (L : ListBlank (∀ k, Option (Γ k))) (n : ℕ) :
    ((addBottom L).nth n).2 = L.nth n := by
  

Proof state:
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
L : ListBlank ((k : K) → Option (Γ k))
n : ℕ
⊢ (ListBlank.nth (addBottom L) n).2 = ListBlank.nth L n

Next tactic:
conv => rhs; rw [← addBottom_map L, ListBlank.nth_map]
theorem addBottom_nth_snd (L : ListBlank (∀ k, Option (Γ k))) (n : ℕ) :
    ((addBottom L).nth n).2 = L.nth n := by
  conv => 

Proof state:
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
L : ListBlank ((k : K) → Option (Γ k))
n : ℕ
| (ListBlank.nth (addBottom L) n).2 = ListBlank.nth L n

Next tactic:
rhs; rw [← addBottom_map L, ListBlank.nth_map]
theorem addBottom_nth_snd (L : ListBlank (∀ k, Option (Γ k))) (n : ℕ) :
    ((addBottom L).nth n).2 = L.nth n := by
  conv => 

Proof state:
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
L : ListBlank ((k : K) → Option (Γ k))
n : ℕ
| (ListBlank.nth (addBottom L) n).2 = ListBlank.nth L n

Next tactic:
rhs
theorem addBottom_nth_snd (L : ListBlank (∀ k, Option (Γ k))) (n : ℕ) :
    ((addBottom L).nth n).2 = L.nth n := by
  conv => rhs; 

Proof state:
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
L : ListBlank ((k : K) → Option (Γ k))
n : ℕ
| ListBlank.nth L n

Next tactic:
rw [← addBottom_map L, ListBlank.nth_map]
theorem addBottom_nth_succ_fst (L : ListBlank (∀ k, Option (Γ k))) (n : ℕ) :
    ((addBottom L).nth (n + 1)).1 = false := by
  

Proof state:
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
L : ListBlank ((k : K) → Option (Γ k))
n : ℕ
⊢ (ListBlank.nth (addBottom L) (n + 1)).1 = false

Next tactic:
rw [ListBlank.nth_succ, addBottom, ListBlank.tail_cons, ListBlank.nth_map]
theorem addBottom_head_fst (L : ListBlank (∀ k, Option (Γ k))) : (addBottom L).head.1 = true := by
  

Proof state:
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
L : ListBlank ((k : K) → Option (Γ k))
⊢ (ListBlank.head (addBottom L)).1 = true

Next tactic:
rw [addBottom, ListBlank.head_cons]
theorem supports_run (S : Finset Λ) {k : K} (s : StAct₂ k) (q : Stmt₂) :
    TM2.SupportsStmt S (stRun s q) ↔ TM2.SupportsStmt S q := by
  

Proof state:
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
S : Finset Λ
k : K
s : StAct k
q : Stmt₂
⊢ TM2.SupportsStmt S (stRun s q) ↔ TM2.SupportsStmt S q

Next tactic:
cases s
theorem supports_run (S : Finset Λ) {k : K} (s : StAct₂ k) (q : Stmt₂) :
    TM2.SupportsStmt S (stRun s q) ↔ TM2.SupportsStmt S q := by
  cases s <;> 

Proof state:
case push
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
S : Finset Λ
k : K
q : Stmt₂
a✝ : σ → Γ k
⊢ TM2.SupportsStmt S (stRun (push a✝) q) ↔ TM2.SupportsStmt S q

Next tactic:
rfl
theorem supports_run (S : Finset Λ) {k : K} (s : StAct₂ k) (q : Stmt₂) :
    TM2.SupportsStmt S (stRun s q) ↔ TM2.SupportsStmt S q := by
  cases s <;> 

Proof state:
case peek
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
S : Finset Λ
k : K
q : Stmt₂
a✝ : σ → Option (Γ k) → σ
⊢ TM2.SupportsStmt S (stRun (peek a✝) q) ↔ TM2.SupportsStmt S q

Next tactic:
rfl
theorem supports_run (S : Finset Λ) {k : K} (s : StAct₂ k) (q : Stmt₂) :
    TM2.SupportsStmt S (stRun s q) ↔ TM2.SupportsStmt S q := by
  cases s <;> 

Proof state:
case pop
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
S : Finset Λ
k : K
q : Stmt₂
a✝ : σ → Option (Γ k) → σ
⊢ TM2.SupportsStmt S (stRun (pop a✝) q) ↔ TM2.SupportsStmt S q

Next tactic:
rfl
theorem step_run {k : K} (q : Stmt₂) (v : σ) (S : ∀ k, List (Γ k)) : ∀ s : StAct₂ k,
    TM2.stepAux (stRun s q) v S = TM2.stepAux q (stVar v (S k) s) (update S k (stWrite v (S k) s))
  | StAct.push f => rfl
  | StAct.peek f => by 

Proof state:
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
q : Stmt₂
v : σ
S : (k : K) → List (Γ k)
f : σ → Option (Γ k) → σ
⊢ TM2.stepAux (stRun (StAct.peek f) q) v S =
    TM2.stepAux q (stVar v (S k) (StAct.peek f)) (update S k (stWrite v (S k) (StAct.peek f)))

Next tactic:
unfold stWrite
theorem step_run {k : K} (q : Stmt₂) (v : σ) (S : ∀ k, List (Γ k)) : ∀ s : StAct₂ k,
    TM2.stepAux (stRun s q) v S = TM2.stepAux q (stVar v (S k) s) (update S k (stWrite v (S k) s))
  | StAct.push f => rfl
  | StAct.peek f => by unfold stWrite; 

Proof state:
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
q : Stmt₂
v : σ
S : (k : K) → List (Γ k)
f : σ → Option (Γ k) → σ
⊢ TM2.stepAux (stRun (StAct.peek f) q) v S =
    TM2.stepAux q (stVar v (S k) (StAct.peek f))
      (update S k
        (match StAct.peek f with
        | StAct.push f => f v :: S k
        | StAct.peek a => S k
        | StAct.pop a => List.tail (S k)))

Next tactic:
rw [Function.update_eq_self]
theorem step_run {k : K} (q : Stmt₂) (v : σ) (S : ∀ k, List (Γ k)) : ∀ s : StAct₂ k,
    TM2.stepAux (stRun s q) v S = TM2.stepAux q (stVar v (S k) s) (update S k (stWrite v (S k) s))
  | StAct.push f => rfl
  | StAct.peek f => by unfold stWrite; rw [Function.update_eq_self]; 

Proof state:
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
q : Stmt₂
v : σ
S : (k : K) → List (Γ k)
f : σ → Option (Γ k) → σ
⊢ TM2.stepAux (stRun (StAct.peek f) q) v S = TM2.stepAux q (stVar v (S k) (StAct.peek f)) S

Next tactic:
rfl
theorem trNormal_run {k : K} (s : StAct₂ k) (q : Stmt₂) :
    trNormal (stRun s q) = goto fun _ _ ↦ go k s q := by
  

Proof state:
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
s : StAct k
q : Stmt₂
⊢ trNormal (stRun s q) = goto fun x x => go k s q

Next tactic:
cases s
theorem trNormal_run {k : K} (s : StAct₂ k) (q : Stmt₂) :
    trNormal (stRun s q) = goto fun _ _ ↦ go k s q := by
  cases s <;> 

Proof state:
case push
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
q : Stmt₂
a✝ : σ → Γ k
⊢ trNormal (stRun (StAct.push a✝) q) = goto fun x x => go k (StAct.push a✝) q

Next tactic:
rfl
theorem trNormal_run {k : K} (s : StAct₂ k) (q : Stmt₂) :
    trNormal (stRun s q) = goto fun _ _ ↦ go k s q := by
  cases s <;> 

Proof state:
case peek
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
q : Stmt₂
a✝ : σ → Option (Γ k) → σ
⊢ trNormal (stRun (StAct.peek a✝) q) = goto fun x x => go k (StAct.peek a✝) q

Next tactic:
rfl
theorem trNormal_run {k : K} (s : StAct₂ k) (q : Stmt₂) :
    trNormal (stRun s q) = goto fun _ _ ↦ go k s q := by
  cases s <;> 

Proof state:
case pop
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
q : Stmt₂
a✝ : σ → Option (Γ k) → σ
⊢ trNormal (stRun (StAct.pop a✝) q) = goto fun x x => go k (StAct.pop a✝) q

Next tactic:
rfl
theorem trStmts₁_run {k : K} {s : StAct₂ k} {q : Stmt₂} :
    trStmts₁ (stRun s q) = {go k s q, ret q} ∪ trStmts₁ q := by
  

Proof state:
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
s : StAct k
q : Stmt₂
⊢ trStmts₁ (stRun s q) = {go k s q, ret q} ∪ trStmts₁ q

Next tactic:
cases s
theorem trStmts₁_run {k : K} {s : StAct₂ k} {q : Stmt₂} :
    trStmts₁ (stRun s q) = {go k s q, ret q} ∪ trStmts₁ q := by
  cases s <;> 

Proof state:
case push
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
q : Stmt₂
a✝ : σ → Γ k
⊢ trStmts₁ (stRun (StAct.push a✝) q) = {go k (StAct.push a✝) q, ret q} ∪ trStmts₁ q

Next tactic:
simp only [trStmts₁]
theorem trStmts₁_run {k : K} {s : StAct₂ k} {q : Stmt₂} :
    trStmts₁ (stRun s q) = {go k s q, ret q} ∪ trStmts₁ q := by
  cases s <;> 

Proof state:
case peek
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
q : Stmt₂
a✝ : σ → Option (Γ k) → σ
⊢ trStmts₁ (stRun (StAct.peek a✝) q) = {go k (StAct.peek a✝) q, ret q} ∪ trStmts₁ q

Next tactic:
simp only [trStmts₁]
theorem trStmts₁_run {k : K} {s : StAct₂ k} {q : Stmt₂} :
    trStmts₁ (stRun s q) = {go k s q, ret q} ∪ trStmts₁ q := by
  cases s <;> 

Proof state:
case pop
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
q : Stmt₂
a✝ : σ → Option (Γ k) → σ
⊢ trStmts₁ (stRun (StAct.pop a✝) q) = {go k (StAct.pop a✝) q, ret q} ∪ trStmts₁ q

Next tactic:
simp only [trStmts₁]
theorem tr_respects_aux₂ {k : K} {q : Stmt₂₁} {v : σ} {S : ∀ k, List (Γ k)}
    {L : ListBlank (∀ k, Option (Γ k))}
    (hL : ∀ k, L.map (proj k) = ListBlank.mk ((S k).map some).reverse) (o : StAct₂ k) :
    let v' := stVar v (S k) o
    let Sk' := stWrite v (S k) o
    let S' := update S k Sk'
    ∃ L' : ListBlank (∀ k, Option (Γ k)),
      (∀ k, L'.map (proj k) = ListBlank.mk ((S' k).map some).reverse) ∧
        TM1.stepAux (trStAct q o) v
            ((Tape.move Dir.right)^[(S k).length] (Tape.mk' ∅ (addBottom L))) =
          TM1.stepAux q v' ((Tape.move Dir.right)^[(S' k).length] (Tape.mk' ∅ (addBottom L'))) := by
  

Proof state:
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
q : TM1.Stmt Γ' Λ' σ
v : σ
S : (k : K) → List (Γ k)
L : ListBlank ((k : K) → Option (Γ k))
hL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))
o : StAct k
⊢ let v' := stVar v (S k) o;
  let Sk' := stWrite v (S k) o;
  let S' := update S k Sk';
  ∃ L',
    (∀ (k : K), ListBlank.map (proj k) L' = ListBlank.mk (List.reverse (List.map some (S' k)))) ∧
      TM1.stepAux (trStAct q o) v ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))) =
        TM1.stepAux q v' ((Tape.move Dir.right)^[List.length (S' k)] (Tape.mk' ∅ (addBottom L')))

Next tactic:
dsimp only
theorem tr_respects_aux₂ {k : K} {q : Stmt₂₁} {v : σ} {S : ∀ k, List (Γ k)}
    {L : ListBlank (∀ k, Option (Γ k))}
    (hL : ∀ k, L.map (proj k) = ListBlank.mk ((S k).map some).reverse) (o : StAct₂ k) :
    let v' := stVar v (S k) o
    let Sk' := stWrite v (S k) o
    let S' := update S k Sk'
    ∃ L' : ListBlank (∀ k, Option (Γ k)),
      (∀ k, L'.map (proj k) = ListBlank.mk ((S' k).map some).reverse) ∧
        TM1.stepAux (trStAct q o) v
            ((Tape.move Dir.right)^[(S k).length] (Tape.mk' ∅ (addBottom L))) =
          TM1.stepAux q v' ((Tape.move Dir.right)^[(S' k).length] (Tape.mk' ∅ (addBottom L'))) := by
  dsimp only; 

Proof state:
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
q : TM1.Stmt Γ' Λ' σ
v : σ
S : (k : K) → List (Γ k)
L : ListBlank ((k : K) → Option (Γ k))
hL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))
o : StAct k
⊢ ∃ L',
    (∀ (k_1 : K),
        ListBlank.map (proj k_1) L' =
          ListBlank.mk (List.reverse (List.map some (update S k (stWrite v (S k) o) k_1)))) ∧
      TM1.stepAux (trStAct q o) v ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))) =
        TM1.stepAux q (stVar v (S k) o)
          ((Tape.move Dir.right)^[List.length (update S k (stWrite v (S k) o) k)] (Tape.mk' ∅ (addBottom L')))

Next tactic:
simp
theorem tr_respects_aux₂ {k : K} {q : Stmt₂₁} {v : σ} {S : ∀ k, List (Γ k)}
    {L : ListBlank (∀ k, Option (Γ k))}
    (hL : ∀ k, L.map (proj k) = ListBlank.mk ((S k).map some).reverse) (o : StAct₂ k) :
    let v' := stVar v (S k) o
    let Sk' := stWrite v (S k) o
    let S' := update S k Sk'
    ∃ L' : ListBlank (∀ k, Option (Γ k)),
      (∀ k, L'.map (proj k) = ListBlank.mk ((S' k).map some).reverse) ∧
        TM1.stepAux (trStAct q o) v
            ((Tape.move Dir.right)^[(S k).length] (Tape.mk' ∅ (addBottom L))) =
          TM1.stepAux q v' ((Tape.move Dir.right)^[(S' k).length] (Tape.mk' ∅ (addBottom L'))) := by
  dsimp only; simp; 

Proof state:
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
q : TM1.Stmt Γ' Λ' σ
v : σ
S : (k : K) → List (Γ k)
L : ListBlank ((k : K) → Option (Γ k))
hL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))
o : StAct k
⊢ ∃ L',
    (∀ (k_1 : K),
        ListBlank.map (proj k_1) L' =
          ListBlank.mk (List.reverse (List.map some (update S k (stWrite v (S k) o) k_1)))) ∧
      TM1.stepAux (trStAct q o) v ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))) =
        TM1.stepAux q (stVar v (S k) o)
          ((Tape.move Dir.right)^[List.length (stWrite v (S k) o)] (Tape.mk' ∅ (addBottom L')))

Next tactic:
cases o
theorem tr_respects_aux₂ {k : K} {q : Stmt₂₁} {v : σ} {S : ∀ k, List (Γ k)}
    {L : ListBlank (∀ k, Option (Γ k))}
    (hL : ∀ k, L.map (proj k) = ListBlank.mk ((S k).map some).reverse) (o : StAct₂ k) :
    let v' := stVar v (S k) o
    let Sk' := stWrite v (S k) o
    let S' := update S k Sk'
    ∃ L' : ListBlank (∀ k, Option (Γ k)),
      (∀ k, L'.map (proj k) = ListBlank.mk ((S' k).map some).reverse) ∧
        TM1.stepAux (trStAct q o) v
            ((Tape.move Dir.right)^[(S k).length] (Tape.mk' ∅ (addBottom L))) =
          TM1.stepAux q v' ((Tape.move Dir.right)^[(S' k).length] (Tape.mk' ∅ (addBottom L'))) := by
  dsimp only; simp; cases o <;> 

Proof state:
case push
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
q : TM1.Stmt Γ' Λ' σ
v : σ
S : (k : K) → List (Γ k)
L : ListBlank ((k : K) → Option (Γ k))
hL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))
a✝ : σ → Γ k
⊢ ∃ L',
    (∀ (k_1 : K),
        ListBlank.map (proj k_1) L' =
          ListBlank.mk (List.reverse (List.map some (update S k (stWrite v (S k) (StAct.push a✝)) k_1)))) ∧
      TM1.stepAux (trStAct q (StAct.push a✝)) v ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))) =
        TM1.stepAux q (stVar v (S k) (StAct.push a✝))
          ((Tape.move Dir.right)^[List.length (stWrite v (S k) (StAct.push a✝))] (Tape.mk' ∅ (addBottom L')))

Next tactic:
simp only [stWrite, stVar, trStAct, TM1.stepAux]
theorem tr_respects_aux₂ {k : K} {q : Stmt₂₁} {v : σ} {S : ∀ k, List (Γ k)}
    {L : ListBlank (∀ k, Option (Γ k))}
    (hL : ∀ k, L.map (proj k) = ListBlank.mk ((S k).map some).reverse) (o : StAct₂ k) :
    let v' := stVar v (S k) o
    let Sk' := stWrite v (S k) o
    let S' := update S k Sk'
    ∃ L' : ListBlank (∀ k, Option (Γ k)),
      (∀ k, L'.map (proj k) = ListBlank.mk ((S' k).map some).reverse) ∧
        TM1.stepAux (trStAct q o) v
            ((Tape.move Dir.right)^[(S k).length] (Tape.mk' ∅ (addBottom L))) =
          TM1.stepAux q v' ((Tape.move Dir.right)^[(S' k).length] (Tape.mk' ∅ (addBottom L'))) := by
  dsimp only; simp; cases o <;> 

Proof state:
case peek
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
q : TM1.Stmt Γ' Λ' σ
v : σ
S : (k : K) → List (Γ k)
L : ListBlank ((k : K) → Option (Γ k))
hL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))
a✝ : σ → Option (Γ k) → σ
⊢ ∃ L',
    (∀ (k_1 : K),
        ListBlank.map (proj k_1) L' =
          ListBlank.mk (List.reverse (List.map some (update S k (stWrite v (S k) (StAct.peek a✝)) k_1)))) ∧
      TM1.stepAux (trStAct q (StAct.peek a✝)) v ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))) =
        TM1.stepAux q (stVar v (S k) (StAct.peek a✝))
          ((Tape.move Dir.right)^[List.length (stWrite v (S k) (StAct.peek a✝))] (Tape.mk' ∅ (addBottom L')))

Next tactic:
simp only [stWrite, stVar, trStAct, TM1.stepAux]
theorem tr_respects_aux₂ {k : K} {q : Stmt₂₁} {v : σ} {S : ∀ k, List (Γ k)}
    {L : ListBlank (∀ k, Option (Γ k))}
    (hL : ∀ k, L.map (proj k) = ListBlank.mk ((S k).map some).reverse) (o : StAct₂ k) :
    let v' := stVar v (S k) o
    let Sk' := stWrite v (S k) o
    let S' := update S k Sk'
    ∃ L' : ListBlank (∀ k, Option (Γ k)),
      (∀ k, L'.map (proj k) = ListBlank.mk ((S' k).map some).reverse) ∧
        TM1.stepAux (trStAct q o) v
            ((Tape.move Dir.right)^[(S k).length] (Tape.mk' ∅ (addBottom L))) =
          TM1.stepAux q v' ((Tape.move Dir.right)^[(S' k).length] (Tape.mk' ∅ (addBottom L'))) := by
  dsimp only; simp; cases o <;> 

Proof state:
case pop
K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
q : TM1.Stmt Γ' Λ' σ
v : σ
S : (k : K) → List (Γ k)
L : ListBlank ((k : K) → Option (Γ k))
hL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))
a✝ : σ → Option (Γ k) → σ
⊢ ∃ L',
    (∀ (k_1 : K),
        ListBlank.map (proj k_1) L' =
          ListBlank.mk (List.reverse (List.map some (update S k (stWrite v (S k) (StAct.pop a✝)) k_1)))) ∧
      TM1.stepAux (trStAct q (StAct.pop a✝)) v ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))) =
        TM1.stepAux q (stVar v (S k) (StAct.pop a✝))
          ((Tape.move Dir.right)^[List.length (stWrite v (S k) (StAct.pop a✝))] (Tape.mk' ∅ (addBottom L')))

Next tactic:
simp only [stWrite, stVar, trStAct, TM1.stepAux]