Finitely generated ideals in commutative rings.

- data CommutativeRing a => Ideal a = Id [a]
- zeroIdeal :: CommutativeRing a => Ideal a
- isPrincipal :: CommutativeRing a => Ideal a -> Bool
- fromId :: CommutativeRing a => Ideal a -> [a]
- eval :: CommutativeRing a => a -> Ideal a -> a
- addId :: (CommutativeRing a, Eq a) => Ideal a -> Ideal a -> Ideal a
- mulId :: (CommutativeRing a, Eq a) => Ideal a -> Ideal a -> Ideal a
- isSameIdeal :: (CommutativeRing a, Eq a) => (Ideal a -> Ideal a -> (Ideal a, [[a]], [[a]])) -> Ideal a -> Ideal a -> Bool
- zeroIdealWitnesses :: CommutativeRing a => [a] -> [a] -> (Ideal a, [[a]], [[a]])

# Documentation

data CommutativeRing a => Ideal a Source

Ideals characterized by their list of generators.

Id [a] |

(CommutativeRing a, Show a) => Show (Ideal a) | |

(CommutativeRing a, Arbitrary a, Eq a) => Arbitrary (Ideal a) |

zeroIdeal :: CommutativeRing a => Ideal aSource

The zero ideal.

isPrincipal :: CommutativeRing a => Ideal a -> BoolSource

Test if an ideal is principal.

fromId :: CommutativeRing a => Ideal a -> [a]Source

eval :: CommutativeRing a => a -> Ideal a -> aSource

Evaluate the ideal at a certain point.

isSameIdeal :: (CommutativeRing a, Eq a) => (Ideal a -> Ideal a -> (Ideal a, [[a]], [[a]])) -> Ideal a -> Ideal a -> BoolSource

Test if an operations compute the correct ideal. The operation should give a witness that the comuted ideal contains the same elements.

If [ x_1, ..., x_n ] `op` [ y_1, ..., y_m ] = [ z_1, ..., z_l ]

Then the witness should give that

z_k = a_k1 * x_1 + ... + a_kn * x_n = b_k1 * y_1 + ... + b_km * y_m

This is used to check that the intersection computed is correct.

zeroIdealWitnesses :: CommutativeRing a => [a] -> [a] -> (Ideal a, [[a]], [[a]])Source

Compute witnesses for two lists for the zero ideal. This is used when computing the intersection of two ideals.