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

Algebra.Structures.FieldOfFractions

Description

The field of fractions over a GCD domain. The reason that it is an GCD domain is that we only want to work over reduced quotients.

Synopsis

Documentation

newtype GCDDomain a => FieldOfFractions a Source

Field of fractions

Constructors

F (a, a) 

toFieldOfFractions :: GCDDomain a => a -> FieldOfFractions aSource

Embed a value in the field of fractions.

fromFieldOfFractions :: (GCDDomain a, Eq a) => FieldOfFractions a -> aSource

Extract a value from the field of fractions. This is only possible if the divisor is one.

reduce :: (GCDDomain a, Eq a) => FieldOfFractions a -> FieldOfFractions aSource

Reduce an element.