arithmoi icon indicating copy to clipboard operation
arithmoi copied to clipboard

Type-level Totient function

Open Bodigrim opened this issue 5 years ago • 0 comments

I've been thinking recently about implementing something along these lines:

type family Totient (m :: Nat) :: Nat

totientNat :: Integral a => SFactors a m -> (() :- KnownNat (Totient m))

power :: Mod m -> Mod (Totient m) -> Mod m 

discreteLog :: CyclicGroup Integer m -> PritimiveRoot m -> MultMod m -> Mod (Totient m)

Bodigrim avatar Feb 22 '20 16:02 Bodigrim