@[irreducible]
Inner loop for Fin.foldl
. Fin.foldl.loop n f x i = f (f (f x i) ...) (n-1)
Equations
- Fin.foldl.loop n f x i = if h : i < n then Fin.foldl.loop n f (f x ⟨i, h⟩) (i + 1) else x
Instances For
@[irreducible]
Inner loop for Fin.foldr
. Fin.foldr.loop n f i x = f 0 (f ... (f (i-1) x))
Equations
- Fin.foldr.loop n f ⟨0, property⟩ x = x
- Fin.foldr.loop n f ⟨i.succ, h⟩ x = Fin.foldr.loop n f ⟨i, ⋯⟩ (f ⟨i, h⟩ x)