Flint2-0.1.0.5: Haskell bindings for the flint library for number theory

Data.Number.Flint.UFD

Description

# Unique factorization domain

Specifically, a UFD is an integral domain (a nontrivial commutative ring in which the product of any two non-zero elements is non-zero) in which every non-zero non-unit element can be written as a product of prime elements (or irreducible elements), uniquely up to order and units.

# Documentation

class Num a => UFD a where Source #

Minimal complete definition

factor

Methods

factor :: a -> [(a, Int)] Source #

factor x

Factor x into prime factors $$x = p_1^{e_1}\ldots p_n^{e_n}$$ with the representation $$[(p_1, e_1) \ldots (p_n, e_n)]$$

unfactor :: [(a, Int)] -> a Source #

unfactor f

Find x which has the unique factorization f.

#### Instances

Instances details
 Source # Instance detailsDefined in Data.Number.Flint.Fmpz.Instances Methodsfactor :: Fmpz -> [(Fmpz, Int)] Source #unfactor :: [(Fmpz, Int)] -> Fmpz Source # Source # Instance detailsDefined in Data.Number.Flint.Fmpz.Poly.Instances Methodsfactor :: FmpzPoly -> [(FmpzPoly, Int)] Source #unfactor :: [(FmpzPoly, Int)] -> FmpzPoly Source # Source # Instance detailsDefined in Data.Number.Flint.NMod.Poly.Instances Methodsfactor :: NModPoly -> [(NModPoly, Int)] Source #unfactor :: [(NModPoly, Int)] -> NModPoly Source #