Theorem: Batteries.AssocList.forIn_eq
File: .lake/packages/batteries/Batteries/Data/AssocList.lean

Proof steps:
state_before: m : Type u_1 → Type u_2
α : Type u_3
β : Type u_4
δ : Type u_1
inst✝ : Monad m
l : AssocList α β
init : δ
f : α × β → δ → m (ForInStep δ)
⊢ forIn l init f = forIn l.toList init f
state_after: m : Type u_1 → Type u_2
α : Type u_3
β : Type u_4
δ : Type u_1
inst✝ : Monad m
l : AssocList α β
init : δ
f : α × β → δ → m (ForInStep δ)
⊢ l.forIn init f = List.forIn.loop f l.toList init
tactic: simp [forIn, List.forIn]
state_before: m : Type u_1 → Type u_2
α : Type u_3
β : Type u_4
δ : Type u_1
inst✝ : Monad m
l : AssocList α β
init : δ
f : α × β → δ → m (ForInStep δ)
⊢ l.forIn init f = List.forIn.loop f l.toList init
state_after: case cons
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_4
δ : Type u_1
inst✝ : Monad m
f : α × β → δ → m (ForInStep δ)
key✝ : α
value✝ : β
tail✝ : AssocList α β
tail_ih✝ : ∀ (init : δ), tail✝.forIn init f = List.forIn.loop f tail✝.toList init
init : δ
⊢ (do
      let __do_lift ← f (key✝, value✝) init
      match __do_lift with
        | ForInStep.done d => pure d
        | ForInStep.yield d => tail✝.forIn d f) =
    do
    let __do_lift ← f (key✝, value✝) init
    match __do_lift with
      | ForInStep.done d => pure d
      | ForInStep.yield b => List.forIn.loop f tail✝.toList b
tactic: induction l generalizing init <;> simp [AssocList.forIn, List.forIn.loop]
state_before: case cons
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_4
δ : Type u_1
inst✝ : Monad m
f : α × β → δ → m (ForInStep δ)
key✝ : α
value✝ : β
tail✝ : AssocList α β
tail_ih✝ : ∀ (init : δ), tail✝.forIn init f = List.forIn.loop f tail✝.toList init
init : δ
⊢ (do
      let __do_lift ← f (key✝, value✝) init
      match __do_lift with
        | ForInStep.done d => pure d
        | ForInStep.yield d => tail✝.forIn d f) =
    do
    let __do_lift ← f (key✝, value✝) init
    match __do_lift with
      | ForInStep.done d => pure d
      | ForInStep.yield b => List.forIn.loop f tail✝.toList b
state_after: case cons.e_a
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_4
δ : Type u_1
inst✝ : Monad m
f : α × β → δ → m (ForInStep δ)
key✝ : α
value✝ : β
tail✝ : AssocList α β
tail_ih✝ : ∀ (init : δ), tail✝.forIn init f = List.forIn.loop f tail✝.toList init
init : δ
⊢ (fun __do_lift =>
      match __do_lift with
      | ForInStep.done d => pure d
      | ForInStep.yield d => tail✝.forIn d f) =
    fun __do_lift =>
    match __do_lift with
    | ForInStep.done d => pure d
    | ForInStep.yield b => List.forIn.loop f tail✝.toList b
tactic: congr
state_before: case cons.e_a
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_4
δ : Type u_1
inst✝ : Monad m
f : α × β → δ → m (ForInStep δ)
key✝ : α
value✝ : β
tail✝ : AssocList α β
tail_ih✝ : ∀ (init : δ), tail✝.forIn init f = List.forIn.loop f tail✝.toList init
init : δ
⊢ (fun __do_lift =>
      match __do_lift with
      | ForInStep.done d => pure d
      | ForInStep.yield d => tail✝.forIn d f) =
    fun __do_lift =>
    match __do_lift with
    | ForInStep.done d => pure d
    | ForInStep.yield b => List.forIn.loop f tail✝.toList b
state_after: case cons.e_a.h
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_4
δ : Type u_1
inst✝ : Monad m
f : α × β → δ → m (ForInStep δ)
key✝ : α
value✝ : β
tail✝ : AssocList α β
tail_ih✝ : ∀ (init : δ), tail✝.forIn init f = List.forIn.loop f tail✝.toList init
init : δ
a : ForInStep δ
⊢ (match a with
    | ForInStep.done d => pure d
    | ForInStep.yield d => tail✝.forIn d f) =
    match a with
    | ForInStep.done d => pure d
    | ForInStep.yield b => List.forIn.loop f tail✝.toList b
tactic: funext a
state_before: case cons.e_a.h
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_4
δ : Type u_1
inst✝ : Monad m
f : α × β → δ → m (ForInStep δ)
key✝ : α
value✝ : β
tail✝ : AssocList α β
tail_ih✝ : ∀ (init : δ), tail✝.forIn init f = List.forIn.loop f tail✝.toList init
init : δ
a : ForInStep δ
⊢ (match a with
    | ForInStep.done d => pure d
    | ForInStep.yield d => tail✝.forIn d f) =
    match a with
    | ForInStep.done d => pure d
    | ForInStep.yield b => List.forIn.loop f tail✝.toList b
state_after: no goals
tactic: split <;> simp [*]