dsimp [mapIdx'.go, Array.push, concat]
case cons
α : Type u
β : Type v
γ : Type w
a : α
as : List α
f : Fin (length as + 1) → α → β
b : β
a' : α
tl : List α
IH :
  ∀ (acc : Array β) (h : length tl + (Array.size acc + 1) = length as + 1),
    mapIdx'.go (a :: as) f tl { data := b :: acc.data } h =
      b :: mapIdx'.go as (f ∘ Fin.succ) tl acc (_ : length tl + Array.size acc = length as)
acc : Array β
h : length (a' :: tl) + (Array.size acc + 1) = length as + 1
⊢ mapIdx'.go (a :: as) f (a' :: tl) { data := b :: acc.data } h =
    b :: mapIdx'.go as (f ∘ Fin.succ) (a' :: tl) acc (_ : length (a' :: tl) + Array.size acc = length as)
case cons
α : Type u
β : Type v
γ : Type w
a : α
as : List α
f : Fin (length as + 1) → α → β
b : β
a' : α
tl : List α
IH :
  ∀ (acc : Array β) (h : length tl + (Array.size acc + 1) = length as + 1),
    mapIdx'.go (a :: as) f tl { data := b :: acc.data } h =
      b :: mapIdx'.go as (f ∘ Fin.succ) tl acc (_ : length tl + Array.size acc = length as)
acc : Array β
h : length (a' :: tl) + (Array.size acc + 1) = length as + 1
⊢ mapIdx'.go (a :: as) f tl
      {
        data :=
          b ::
            concat acc.data
              (f
                { val := Array.size { data := b :: acc.data },
                  isLt := (_ : Array.size { data := b :: acc.data } < length (a :: as)) }
                a') }
      (_ :
        length tl +
            Array.size
              {
                data :=
                  b ::
                    concat acc.data
                      (f
                        { val := Array.size { data := b :: acc.data },
                          isLt := (_ : Array.size { data := b :: acc.data } < length (a :: as)) }
                        a') } =
          Nat.succ (length as)) =
    b ::
      mapIdx'.go as (f ∘ Fin.succ) tl
        {
          data :=
            concat acc.data
              (f { val := Array.size acc + 1, isLt := (_ : Nat.succ (Array.size acc) < Nat.succ (length as)) } a') }
        (_ :
          length tl +
              Array.size
                {
                  data :=
                    concat acc.data
                      (f { val := Array.size acc + 1, isLt := (_ : Nat.succ (Array.size acc) < Nat.succ (length as)) }
                        a') } =
            length as)