α : Type u_1
a : Array α
n : Nat
d : α
⊢ (if h : n < size a then a[n] else d) = Option.getD (if h : n < size a then some a[n] else none) d
α : Type u_1
a : Array α
n : Nat
d : α
⊢ getD a n d = Option.getD (get? a n) d
simp [get?, getD]
no goals
α : Type u_1
a : Array α
n : Nat
d : α
⊢ (if h : n < size a then a[n] else d) = Option.getD (if h : n < size a then some a[n] else none) d
split <;> simp