unfold mapIdxM
α : Type u
m : Type v → Type w
inst✝¹ : Monad m
β : Type v
inst✝ : LawfulMonad m
a : α
x : Array α
f : Fin (size x + 1) → α → m β
⊢ mapIdxM (cons a x) f = do
    let b ← f { val := 0, isLt := (_ : 0 < Nat.succ (size x)) } a
    let y ← mapIdxM x (f ∘ Fin.succ)
    pure (cons b y)
α : Type u
m : Type v → Type w
inst✝¹ : Monad m
β : Type v
inst✝ : LawfulMonad m
a : α
x : Array α
f : Fin (size x + 1) → α → m β
⊢ mapIdxM.map (cons a x) f (size (cons a x)) 0 (_ : size (cons a x) + 0 = size (cons a x) + 0)
      (mkEmpty (size (cons a x))) =
    do
    let b ← f { val := 0, isLt := (_ : 0 < Nat.succ (size x)) } a
    let y ← mapIdxM.map x (f ∘ Fin.succ) (size x) 0 (_ : size x + 0 = size x + 0) (mkEmpty (size x))
    pure (cons b y)