l3lab/ntp-mathlib huggingface dataset:
theorem mem_get_of_ne_zero : ∀ {n : ℕ} {as : List α}, get n as ≠ default → get n as ∈ as
  | _, [], h1 => by exfalso; apply h1; rw [get_nil]
  | 0, a :: as, _ => by rw [mem_cons]; 

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
x✝ : get 0 (a :: as) ≠ default
⊢ get 0 (a :: as) = a ∨ get 0 (a :: as) ∈ as

Next tactic:
exact Or.inl rfl
theorem mem_get_of_ne_zero : ∀ {n : ℕ} {as : List α}, get n as ≠ default → get n as ∈ as
  | _, [], h1 => by exfalso; apply h1; rw [get_nil]
  | 0, a :: as, _ => by rw [mem_cons]; exact Or.inl rfl
  | n + 1, a :: as, h1 => by
    

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
n : ℕ
a : α
as : List α
h1 : get (n + 1) (a :: as) ≠ default
⊢ get (n + 1) (a :: as) ∈ a :: as

Next tactic:
rw [mem_cons]
theorem mem_get_of_ne_zero : ∀ {n : ℕ} {as : List α}, get n as ≠ default → get n as ∈ as
  | _, [], h1 => by exfalso; apply h1; rw [get_nil]
  | 0, a :: as, _ => by rw [mem_cons]; exact Or.inl rfl
  | n + 1, a :: as, h1 => by
    rw [mem_cons]; 

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
n : ℕ
a : α
as : List α
h1 : get (n + 1) (a :: as) ≠ default
⊢ get (n + 1) (a :: as) = a ∨ get (n + 1) (a :: as) ∈ as

Next tactic:
unfold get
theorem mem_get_of_ne_zero : ∀ {n : ℕ} {as : List α}, get n as ≠ default → get n as ∈ as
  | _, [], h1 => by exfalso; apply h1; rw [get_nil]
  | 0, a :: as, _ => by rw [mem_cons]; exact Or.inl rfl
  | n + 1, a :: as, h1 => by
    rw [mem_cons]; unfold get
    

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
n : ℕ
a : α
as : List α
h1 : get (n + 1) (a :: as) ≠ default
⊢ get (Nat.add n 0) as = a ∨ get (Nat.add n 0) as ∈ as

Next tactic:
apply Or.inr (mem_get_of_ne_zero _)
theorem mem_get_of_ne_zero : ∀ {n : ℕ} {as : List α}, get n as ≠ default → get n as ∈ as
  | _, [], h1 => by exfalso; apply h1; rw [get_nil]
  | 0, a :: as, _ => by rw [mem_cons]; exact Or.inl rfl
  | n + 1, a :: as, h1 => by
    rw [mem_cons]; unfold get
    apply Or.inr (mem_get_of_ne_zero _)
    

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
n : ℕ
a : α
as : List α
h1 : get (n + 1) (a :: as) ≠ default
⊢ get (Nat.add n 0) as ≠ default

Next tactic:
apply h1
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
m : ℕ
h1 : m ≠ 0
⊢ get m (as {0 ↦ a}) = get m as

Next tactic:
cases m
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    

Proof state:
case zero
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
h1 : Nat.zero ≠ 0
⊢ get Nat.zero (as {0 ↦ a}) = get Nat.zero as
case succ
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
n✝ : ℕ
h1 : Nat.succ n✝ ≠ 0
⊢ get (Nat.succ n✝) (as {0 ↦ a}) = get (Nat.succ n✝) as

Next tactic:
contradiction
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    

Proof state:
case succ
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
n✝ : ℕ
h1 : Nat.succ n✝ ≠ 0
⊢ get (Nat.succ n✝) (as {0 ↦ a}) = get (Nat.succ n✝) as

Next tactic:
cases as
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> 

Proof state:
case succ.nil
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
n✝ : ℕ
h1 : Nat.succ n✝ ≠ 0
⊢ get (Nat.succ n✝) ([] {0 ↦ a}) = get (Nat.succ n✝) []

Next tactic:
simp only [set, get, get_nil]
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> 

Proof state:
case succ.cons
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
n✝ : ℕ
h1 : Nat.succ n✝ ≠ 0
head✝ : α
tail✝ : List α
⊢ get (Nat.succ n✝) ((head✝ :: tail✝) {0 ↦ a}) = get (Nat.succ n✝) (head✝ :: tail✝)

Next tactic:
simp only [set, get, get_nil]
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
k m : ℕ
h1 : m ≠ k + 1
⊢ get m (as {k + 1 ↦ a}) = get m as

Next tactic:
cases as
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> 

Proof state:
case nil
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : m ≠ k + 1
⊢ get m ([] {k + 1 ↦ a}) = get m []

Next tactic:
cases m
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> 

Proof state:
case cons
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : m ≠ k + 1
head✝ : α
tail✝ : List α
⊢ get m ((head✝ :: tail✝) {k + 1 ↦ a}) = get m (head✝ :: tail✝)

Next tactic:
cases m
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    

Proof state:
case nil.zero
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
h1 : Nat.zero ≠ k + 1
⊢ get Nat.zero ([] {k + 1 ↦ a}) = get Nat.zero []
case nil.succ
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k n✝ : ℕ
h1 : Nat.succ n✝ ≠ k + 1
⊢ get (Nat.succ n✝) ([] {k + 1 ↦ a}) = get (Nat.succ n✝) []
case cons.zero
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
h1 : Nat.zero ≠ k + 1
⊢ get Nat.zero ((head✝ :: tail✝) {k + 1 ↦ a}) = get Nat.zero (head✝ :: tail✝)
case cons.succ
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
n✝ : ℕ
h1 : Nat.succ n✝ ≠ k + 1
⊢ get (Nat.succ n✝) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ n✝) (head✝ :: tail✝)

Next tactic:
case nil =>
      simp only [set, get]
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
h1 : Nat.zero ≠ k + 1
⊢ get Nat.zero ([] {k + 1 ↦ a}) = get Nat.zero []

Next tactic:
case nil =>
      simp only [set, get]
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
h1 : Nat.zero ≠ k + 1
⊢ get Nat.zero ([] {k + 1 ↦ a}) = get Nat.zero []

Next tactic:
simp only [set, get]
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      simp only [set, get]
    

Proof state:
case nil.succ
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k n✝ : ℕ
h1 : Nat.succ n✝ ≠ k + 1
⊢ get (Nat.succ n✝) ([] {k + 1 ↦ a}) = get (Nat.succ n✝) []
case cons.zero
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
h1 : Nat.zero ≠ k + 1
⊢ get Nat.zero ((head✝ :: tail✝) {k + 1 ↦ a}) = get Nat.zero (head✝ :: tail✝)
case cons.succ
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
n✝ : ℕ
h1 : Nat.succ n✝ ≠ k + 1
⊢ get (Nat.succ n✝) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ n✝) (head✝ :: tail✝)

Next tactic:
case nil m =>
      have h3 : get m (nil {k ↦ a}) = default := by
        rw [get_set_eq_of_ne k m, get_nil]
        intro hc
        apply h1
        simp [hc]
      apply h3
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      simp only [set, get]
    

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : Nat.succ m ≠ k + 1
⊢ get (Nat.succ m) ([] {k + 1 ↦ a}) = get (Nat.succ m) []

Next tactic:
case nil m =>
      have h3 : get m (nil {k ↦ a}) = default := by
        rw [get_set_eq_of_ne k m, get_nil]
        intro hc
        apply h1
        simp [hc]
      apply h3
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      simp only [set, get]
    case nil m =>
      

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : Nat.succ m ≠ k + 1
⊢ get (Nat.succ m) ([] {k + 1 ↦ a}) = get (Nat.succ m) []

Next tactic:
have h3 : get m (nil {k ↦ a}) = default := by
        rw [get_set_eq_of_ne k m, get_nil]
        intro hc
        apply h1
        simp [hc]
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      simp only [set, get]
    case nil m =>
      have h3 : get m (nil {k ↦ a}) = default := by
        

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : Nat.succ m ≠ k + 1
⊢ get m ([] {k ↦ a}) = default

Next tactic:
rw [get_set_eq_of_ne k m, get_nil]
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      simp only [set, get]
    case nil m =>
      have h3 : get m (nil {k ↦ a}) = default := by
        rw [get_set_eq_of_ne k m, get_nil]
        

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : Nat.succ m ≠ k + 1
⊢ m ≠ k

Next tactic:
intro hc
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      simp only [set, get]
    case nil m =>
      have h3 : get m (nil {k ↦ a}) = default := by
        rw [get_set_eq_of_ne k m, get_nil]
        intro hc
        

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : Nat.succ m ≠ k + 1
hc : m = k
⊢ False

Next tactic:
apply h1
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      simp only [set, get]
    case nil m =>
      have h3 : get m (nil {k ↦ a}) = default := by
        rw [get_set_eq_of_ne k m, get_nil]
        intro hc
        apply h1
        

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : Nat.succ m ≠ k + 1
hc : m = k
⊢ Nat.succ m = k + 1

Next tactic:
simp [hc]
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      simp only [set, get]
    case nil m =>
      have h3 : get m (nil {k ↦ a}) = default := by
        rw [get_set_eq_of_ne k m, get_nil]
        intro hc
        apply h1
        simp [hc]
      

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : Nat.succ m ≠ k + 1
h3 : get m ([] {k ↦ a}) = default
⊢ get (Nat.succ m) ([] {k + 1 ↦ a}) = get (Nat.succ m) []

Next tactic:
apply h3
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      simp only [set, get]
    case nil m =>
      have h3 : get m (nil {k ↦ a}) = default := by
        rw [get_set_eq_of_ne k m, get_nil]
        intro hc
        apply h1
        simp [hc]
      apply h3
    

Proof state:
case cons.zero
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
h1 : Nat.zero ≠ k + 1
⊢ get Nat.zero ((head✝ :: tail✝) {k + 1 ↦ a}) = get Nat.zero (head✝ :: tail✝)
case cons.succ
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
n✝ : ℕ
h1 : Nat.succ n✝ ≠ k + 1
⊢ get (Nat.succ n✝) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ n✝) (head✝ :: tail✝)

Next tactic:
case zero =>
      simp only [set, get]
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      simp only [set, get]
    case nil m =>
      have h3 : get m (nil {k ↦ a}) = default := by
        rw [get_set_eq_of_ne k m, get_nil]
        intro hc
        apply h1
        simp [hc]
      apply h3
    

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
h1 : Nat.zero ≠ k + 1
⊢ get Nat.zero ((head✝ :: tail✝) {k + 1 ↦ a}) = get Nat.zero (head✝ :: tail✝)

Next tactic:
case zero =>
      simp only [set, get]
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      simp only [set, get]
    case nil m =>
      have h3 : get m (nil {k ↦ a}) = default := by
        rw [get_set_eq_of_ne k m, get_nil]
        intro hc
        apply h1
        simp [hc]
      apply h3
    case zero =>
      

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
h1 : Nat.zero ≠ k + 1
⊢ get Nat.zero ((head✝ :: tail✝) {k + 1 ↦ a}) = get Nat.zero (head✝ :: tail✝)

Next tactic:
simp only [set, get]
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      simp only [set, get]
    case nil m =>
      have h3 : get m (nil {k ↦ a}) = default := by
        rw [get_set_eq_of_ne k m, get_nil]
        intro hc
        apply h1
        simp [hc]
      apply h3
    case zero =>
      simp only [set, get]
    

Proof state:
case cons.succ
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
n✝ : ℕ
h1 : Nat.succ n✝ ≠ k + 1
⊢ get (Nat.succ n✝) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ n✝) (head✝ :: tail✝)

Next tactic:
case _ _ m =>
      apply get_set_eq_of_ne k m
      intro hc
      apply h1
      simp [hc]
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      simp only [set, get]
    case nil m =>
      have h3 : get m (nil {k ↦ a}) = default := by
        rw [get_set_eq_of_ne k m, get_nil]
        intro hc
        apply h1
        simp [hc]
      apply h3
    case zero =>
      simp only [set, get]
    

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
m : ℕ
h1 : Nat.succ m ≠ k + 1
⊢ get (Nat.succ m) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ m) (head✝ :: tail✝)

Next tactic:
case _ _ m =>
      apply get_set_eq_of_ne k m
      intro hc
      apply h1
      simp [hc]
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      simp only [set, get]
    case nil m =>
      have h3 : get m (nil {k ↦ a}) = default := by
        rw [get_set_eq_of_ne k m, get_nil]
        intro hc
        apply h1
        simp [hc]
      apply h3
    case zero =>
      simp only [set, get]
    case _ _ m =>
      

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
m : ℕ
h1 : Nat.succ m ≠ k + 1
⊢ get (Nat.succ m) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ m) (head✝ :: tail✝)

Next tactic:
apply get_set_eq_of_ne k m
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      simp only [set, get]
    case nil m =>
      have h3 : get m (nil {k ↦ a}) = default := by
        rw [get_set_eq_of_ne k m, get_nil]
        intro hc
        apply h1
        simp [hc]
      apply h3
    case zero =>
      simp only [set, get]
    case _ _ m =>
      apply get_set_eq_of_ne k m
      

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
m : ℕ
h1 : Nat.succ m ≠ k + 1
⊢ m ≠ k

Next tactic:
intro hc
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      simp only [set, get]
    case nil m =>
      have h3 : get m (nil {k ↦ a}) = default := by
        rw [get_set_eq_of_ne k m, get_nil]
        intro hc
        apply h1
        simp [hc]
      apply h3
    case zero =>
      simp only [set, get]
    case _ _ m =>
      apply get_set_eq_of_ne k m
      intro hc
      

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
m : ℕ
h1 : Nat.succ m ≠ k + 1
hc : m = k
⊢ False

Next tactic:
apply h1
theorem get_set_eq_of_ne {a : α} :
    ∀ {as : List α} (k : ℕ) (m : ℕ), m ≠ k → get m (as {k ↦ a}) = get m as
  | as, 0, m, h1 => by
    cases m
    contradiction
    cases as <;> simp only [set, get, get_nil]
  | as, k + 1, m, h1 => by
    -- porting note : I somewhat rearranged the case split
    cases as <;> cases m
    case nil =>
      simp only [set, get]
    case nil m =>
      have h3 : get m (nil {k ↦ a}) = default := by
        rw [get_set_eq_of_ne k m, get_nil]
        intro hc
        apply h1
        simp [hc]
      apply h3
    case zero =>
      simp only [set, get]
    case _ _ m =>
      apply get_set_eq_of_ne k m
      intro hc
      apply h1
      

Proof state:
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
m : ℕ
h1 : Nat.succ m ≠ k + 1
hc : m = k
⊢ Nat.succ m = k + 1

Next tactic:
simp [hc]
theorem get_map {f : α → β} :
    ∀ {n : ℕ} {as : List α}, n < as.length → get n (as.map f) = f (get n as)
  | _, [], h => by 

Proof state:
α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
x✝ : ℕ
h : x✝ < length []
⊢ get x✝ (map f []) = f (get x✝ [])

Next tactic:
cases h