applicativeNum : Num a => Applicative f => Num (f a)depFunNum : {k : Fin n -> Type} -> Num ((i : Fin n) -> k i)applicativeNeg : Neg a => Applicative f => Neg (f a)depFunNeg : {k : Fin n -> Type} -> Neg ((i : Fin n) -> k i)applicativeAbs : Abs a => Applicative f => Abs (f a)applicativeFromDouble : FromDouble a => Applicative f => FromDouble (f a)depFunFromDouble : {k : Fin n -> Type} -> FromDouble ((i : Fin n) -> k i)applicativeFractional : Fractional a => Applicative f => Fractional (f a)interface Exp : Type -> TypeInterface for the Exponential
We also include minus infinity because of the necessity to compute
causal masks within the attention mechanism.
For rules that `exp` should satisfy, see https://arxiv.org/abs/1911.04790
We also have
`exp . log = id`, `log . exp = id`, `exp minusInfinity = 0`...
MkExpexp : a -> alog : a -> aminusInfinity : aExp a => AllC TensorMonoid shape => Exp (Tensor shape a)Exp Doubleexp : Exp a => a -> alog : Exp a => a -> aminusInfinity : Exp a => aapplicativeExp : Exp a => Applicative f => Exp (f a)interface Sqrt : Type -> TypeMkSqrtsqrt : a -> aSqrt DoubleSqrt ()Sqrt a => Sqrt b => Sqrt (a, b)Sqrt a => Sqrt b => Sqrt (DPair a (const b))sqrt : Sqrt a => a -> aapplicativeSqrt : Sqrt a => Applicative f => Sqrt (f a)