constructive-algebra-0.1.4: A library of constructive algebra.

Algebra.Zn

Description

Integers modulo n parametrised by the n. This also has type-level primality testing used for instantiating integral domain and field type classes. The primality testing is very slow, but it seem to be working fine for relatively small numbers.

Synopsis

Documentation

newtype Zn n Source

The phantom type n represents which modulo to work in.

Constructors

Zn Integer 

Instances

Eq (Zn n) 
Nat n => Num (Zn n) 
Ord (Zn n) 
Show (Zn n) 
Nat n => Arbitrary (Zn n) 
Nat n => Ring (Zn n) 
Nat n => CommutativeRing (Zn n) 
(Prime n True, Nat n) => IntegralDomain (Zn n) 
(Prime n True, Nat n) => Field (Zn n)