@[specialize]
Equations
- Nat.foldAux f s 0 x = x
- Nat.foldAux f s (Nat.succ n) x = Nat.foldAux f s n (f (s - Nat.succ n) x)
@[inline]
Equations
- Nat.foldRev f n init = (fun loop => loop n init) (Nat.foldRev.loop f)
@[specialize]
Equations
- Nat.foldRev.loop f 0 x = x
- Nat.foldRev.loop f (Nat.succ n) x = Nat.foldRev.loop f n (f n x)
@[specialize]
Equations
- Nat.anyAux f s 0 = false
- Nat.anyAux f s (Nat.succ n) = (f (s - Nat.succ n) || Nat.anyAux f s n)
@[inline]
Equations
- Nat.repeat f n a = (fun loop => loop n a) (Nat.repeat.loop f)
@[specialize]
Equations
- Nat.repeat.loop f 0 x = x
- Nat.repeat.loop f (Nat.succ n) x = Nat.repeat.loop f n (f x)
Equations
Equations
Equations
Equations
Equations
Equations
@[inline]
Equations
- Prod.foldI f i a = Nat.foldAux f i.snd (i.snd - i.fst) a