m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
⊢ SatisfiesM (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
    (mapIdxM.map as f (size as) 0 (_ : size as + 0 = size as + 0) #[])
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
⊢ SatisfiesM (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
    (mapIdxM as f)
simp [mapIdxM]
no goals
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
⊢ SatisfiesM (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
    (mapIdxM.map as f (size as) 0 (_ : size as + 0 = size as + 0) #[])
exact go rfl (fun.) h0
case zero
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
bs : Array β
j : Nat
h : Nat.zero + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
this : j = size as
⊢ SatisfiesM (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
    (pure bs)
case zero
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
bs : Array β
j : Nat
h : Nat.zero + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
⊢ SatisfiesM (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
    (pure bs)
have := (Nat.zero_add _).symm.trans h
no goals
case zero
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
bs : Array β
j : Nat
h : Nat.zero + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
this : j = size as
⊢ SatisfiesM (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
    (pure bs)
exact .pure ⟨this ▸ hm, h₁ ▸ this, fun _ _ => h₂ ..⟩
case succ
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
i✝ : Nat
ih :
  ∀ {bs : Array β} {j : Nat} {h : i✝ + j = size as},
    j = size bs →
      (∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]) →
        motive j →
          SatisfiesM
            (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
            (mapIdxM.map as f i✝ j h bs)
bs : Array β
j : Nat
h : Nat.succ i✝ + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
b : β
hb : p { val := j, isLt := (_ : j < size as) } b ∧ motive ({ val := j, isLt := (_ : j < size as) }.val + 1)
i : Nat
hi : i < size as
hi' : i < size (push bs b)
⊢ p { val := i, isLt := hi } (push bs b)[i]
case succ
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
i : Nat
ih :
  ∀ {bs : Array β} {j : Nat} {h : i + j = size as},
    j = size bs →
      (∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]) →
        motive j →
          SatisfiesM
            (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
            (mapIdxM.map as f i j h bs)
bs : Array β
j : Nat
h : Nat.succ i + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
⊢ SatisfiesM (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i]) do
    let __do_lift ← f { val := j, isLt := (_ : j < size as) } as[j]
    mapIdxM.map as f i (j + 1) (_ : i + (j + 1) = size as) (push bs __do_lift)
refine (hs _ (by exact hm)).bind fun b hb => ih (by simp [h₁]) (fun i hi hi' => ?_) hb.2
case succ
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
i✝ : Nat
ih :
  ∀ {bs : Array β} {j : Nat} {h : i✝ + j = size as},
    j = size bs →
      (∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]) →
        motive j →
          SatisfiesM
            (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
            (mapIdxM.map as f i✝ j h bs)
bs : Array β
j : Nat
h : Nat.succ i✝ + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
b : β
hb : p { val := j, isLt := (_ : j < size as) } b ∧ motive ({ val := j, isLt := (_ : j < size as) }.val + 1)
i : Nat
hi : i < size as
hi'✝ : i < size (push bs b)
hi' : i < size bs + 1
⊢ p { val := i, isLt := hi } (push bs b)[i]
case succ
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
i✝ : Nat
ih :
  ∀ {bs : Array β} {j : Nat} {h : i✝ + j = size as},
    j = size bs →
      (∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]) →
        motive j →
          SatisfiesM
            (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
            (mapIdxM.map as f i✝ j h bs)
bs : Array β
j : Nat
h : Nat.succ i✝ + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
b : β
hb : p { val := j, isLt := (_ : j < size as) } b ∧ motive ({ val := j, isLt := (_ : j < size as) }.val + 1)
i : Nat
hi : i < size as
hi' : i < size (push bs b)
⊢ p { val := i, isLt := hi } (push bs b)[i]
simp at hi'
case succ
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
i✝ : Nat
ih :
  ∀ {bs : Array β} {j : Nat} {h : i✝ + j = size as},
    j = size bs →
      (∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]) →
        motive j →
          SatisfiesM
            (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
            (mapIdxM.map as f i✝ j h bs)
bs : Array β
j : Nat
h : Nat.succ i✝ + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
b : β
hb : p { val := j, isLt := (_ : j < size as) } b ∧ motive ({ val := j, isLt := (_ : j < size as) }.val + 1)
i : Nat
hi : i < size as
hi'✝ : i < size (push bs b)
hi' : i < size bs + 1
⊢ p { val := i, isLt := hi } (if h : i < size bs then bs[i] else b)
case succ
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
i✝ : Nat
ih :
  ∀ {bs : Array β} {j : Nat} {h : i✝ + j = size as},
    j = size bs →
      (∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]) →
        motive j →
          SatisfiesM
            (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
            (mapIdxM.map as f i✝ j h bs)
bs : Array β
j : Nat
h : Nat.succ i✝ + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
b : β
hb : p { val := j, isLt := (_ : j < size as) } b ∧ motive ({ val := j, isLt := (_ : j < size as) }.val + 1)
i : Nat
hi : i < size as
hi'✝ : i < size (push bs b)
hi' : i < size bs + 1
⊢ p { val := i, isLt := hi } (push bs b)[i]
simp [get_push]
case succ.inl
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
i✝ : Nat
ih :
  ∀ {bs : Array β} {j : Nat} {h : i✝ + j = size as},
    j = size bs →
      (∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]) →
        motive j →
          SatisfiesM
            (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
            (mapIdxM.map as f i✝ j h bs)
bs : Array β
j : Nat
h : Nat.succ i✝ + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
b : β
hb : p { val := j, isLt := (_ : j < size as) } b ∧ motive ({ val := j, isLt := (_ : j < size as) }.val + 1)
i : Nat
hi : i < size as
hi'✝ : i < size (push bs b)
hi' : i < size bs + 1
h✝ : i < size bs
⊢ p { val := i, isLt := hi } bs[i]

case succ.inr
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
i✝ : Nat
ih :
  ∀ {bs : Array β} {j : Nat} {h : i✝ + j = size as},
    j = size bs →
      (∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]) →
        motive j →
          SatisfiesM
            (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
            (mapIdxM.map as f i✝ j h bs)
bs : Array β
j : Nat
h : Nat.succ i✝ + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
b : β
hb : p { val := j, isLt := (_ : j < size as) } b ∧ motive ({ val := j, isLt := (_ : j < size as) }.val + 1)
i : Nat
hi : i < size as
hi'✝ : i < size (push bs b)
hi' : i < size bs + 1
h✝ : ¬i < size bs
⊢ p { val := i, isLt := hi } b
case succ
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
i✝ : Nat
ih :
  ∀ {bs : Array β} {j : Nat} {h : i✝ + j = size as},
    j = size bs →
      (∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]) →
        motive j →
          SatisfiesM
            (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
            (mapIdxM.map as f i✝ j h bs)
bs : Array β
j : Nat
h : Nat.succ i✝ + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
b : β
hb : p { val := j, isLt := (_ : j < size as) } b ∧ motive ({ val := j, isLt := (_ : j < size as) }.val + 1)
i : Nat
hi : i < size as
hi'✝ : i < size (push bs b)
hi' : i < size bs + 1
⊢ p { val := i, isLt := hi } (if h : i < size bs then bs[i] else b)
split
no goals
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
i : Nat
ih :
  ∀ {bs : Array β} {j : Nat} {h : i + j = size as},
    j = size bs →
      (∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]) →
        motive j →
          SatisfiesM
            (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
            (mapIdxM.map as f i j h bs)
bs : Array β
j : Nat
h : Nat.succ i + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
⊢ motive { val := j, isLt := (_ : j < size as) }.val
exact hm
no goals
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
i : Nat
ih :
  ∀ {bs : Array β} {j : Nat} {h : i + j = size as},
    j = size bs →
      (∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]) →
        motive j →
          SatisfiesM
            (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
            (mapIdxM.map as f i j h bs)
bs : Array β
j : Nat
h : Nat.succ i + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
b : β
hb : p { val := j, isLt := (_ : j < size as) } b ∧ motive ({ val := j, isLt := (_ : j < size as) }.val + 1)
⊢ j + 1 = size (push bs b)
simp [h₁]
no goals
case succ.inl
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
i✝ : Nat
ih :
  ∀ {bs : Array β} {j : Nat} {h : i✝ + j = size as},
    j = size bs →
      (∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]) →
        motive j →
          SatisfiesM
            (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
            (mapIdxM.map as f i✝ j h bs)
bs : Array β
j : Nat
h : Nat.succ i✝ + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
b : β
hb : p { val := j, isLt := (_ : j < size as) } b ∧ motive ({ val := j, isLt := (_ : j < size as) }.val + 1)
i : Nat
hi : i < size as
hi'✝ : i < size (push bs b)
hi' : i < size bs + 1
h✝ : i < size bs
⊢ p { val := i, isLt := hi } bs[i]
next h => exact h₂ _ _ h
no goals
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
i✝ : Nat
ih :
  ∀ {bs : Array β} {j : Nat} {h : i✝ + j = size as},
    j = size bs →
      (∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]) →
        motive j →
          SatisfiesM
            (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
            (mapIdxM.map as f i✝ j h bs)
bs : Array β
j : Nat
h✝ : Nat.succ i✝ + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
b : β
hb : p { val := j, isLt := (_ : j < size as) } b ∧ motive ({ val := j, isLt := (_ : j < size as) }.val + 1)
i : Nat
hi : i < size as
hi'✝ : i < size (push bs b)
hi' : i < size bs + 1
h : i < size bs
⊢ p { val := i, isLt := hi } bs[i]
exact h₂ _ _ h
no goals
case succ.inr
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
i✝ : Nat
ih :
  ∀ {bs : Array β} {j : Nat} {h : i✝ + j = size as},
    j = size bs →
      (∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]) →
        motive j →
          SatisfiesM
            (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
            (mapIdxM.map as f i✝ j h bs)
bs : Array β
j : Nat
h : Nat.succ i✝ + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
b : β
hb : p { val := j, isLt := (_ : j < size as) } b ∧ motive ({ val := j, isLt := (_ : j < size as) }.val + 1)
i : Nat
hi : i < size as
hi'✝ : i < size (push bs b)
hi' : i < size bs + 1
h✝ : ¬i < size bs
⊢ p { val := i, isLt := hi } b
next h => cases h₁.symm ▸ (Nat.le_or_eq_of_le_succ hi').resolve_left h; exact hb.1
case refl
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
i : Nat
ih :
  ∀ {bs : Array β} {j : Nat} {h : i + j = size as},
    j = size bs →
      (∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]) →
        motive j →
          SatisfiesM
            (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
            (mapIdxM.map as f i j h bs)
bs : Array β
j : Nat
h✝ : Nat.succ i + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
b : β
hb : p { val := j, isLt := (_ : j < size as) } b ∧ motive ({ val := j, isLt := (_ : j < size as) }.val + 1)
hi : j < size as
hi'✝ : j < size (push bs b)
hi' : j < size bs + 1
h : ¬j < size bs
⊢ p { val := j, isLt := hi } b
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
i✝ : Nat
ih :
  ∀ {bs : Array β} {j : Nat} {h : i✝ + j = size as},
    j = size bs →
      (∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]) →
        motive j →
          SatisfiesM
            (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
            (mapIdxM.map as f i✝ j h bs)
bs : Array β
j : Nat
h✝ : Nat.succ i✝ + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
b : β
hb : p { val := j, isLt := (_ : j < size as) } b ∧ motive ({ val := j, isLt := (_ : j < size as) }.val + 1)
i : Nat
hi : i < size as
hi'✝ : i < size (push bs b)
hi' : i < size bs + 1
h : ¬i < size bs
⊢ p { val := i, isLt := hi } b
cases h₁.symm ▸ (Nat.le_or_eq_of_le_succ hi').resolve_left h
no goals
case refl
m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
as : Array α
f : Fin (size as) → α → m β
motive : Nat → Prop
h0 : motive 0
p : Fin (size as) → β → Prop
hs : ∀ (i : Fin (size as)), motive i.val → SatisfiesM (fun x => p i x ∧ motive (i.val + 1)) (f i as[i])
i : Nat
ih :
  ∀ {bs : Array β} {j : Nat} {h : i + j = size as},
    j = size bs →
      (∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]) →
        motive j →
          SatisfiesM
            (fun arr => motive (size as) ∧ ∃ eq, ∀ (i : Nat) (h : i < size as), p { val := i, isLt := h } arr[i])
            (mapIdxM.map as f i j h bs)
bs : Array β
j : Nat
h✝ : Nat.succ i + j = size as
h₁ : j = size bs
h₂ : ∀ (i : Nat) (h : i < size as) (h' : i < size bs), p { val := i, isLt := h } bs[i]
hm : motive j
b : β
hb : p { val := j, isLt := (_ : j < size as) } b ∧ motive ({ val := j, isLt := (_ : j < size as) }.val + 1)
hi : j < size as
hi'✝ : j < size (push bs b)
hi' : j < size bs + 1
h : ¬j < size bs
⊢ p { val := j, isLt := hi } b
exact hb.1