Expand description
Fields, prime fields, sparse and dense polynomials, and sparse echelon forms: the shared foundation beneath Groebner bases, sparse interpolation and linear system reduction.
Re-exports§
pub use modp::Primes;
Modules§
- crt
- Chinese remaindering and Wang’s rational number reconstruction.
- dense
- Dense Gaussian elimination over any field, for the small square systems that sparse methods bottom out in. Matrices are rows of equal length.
- interp
- Incremental interpolation.
- lehmer
- Lehmer’s Euclidean algorithm for big integer gcds and rational reconstruction.
- modp
- Arithmetic on bare
u64residues modulo a primep < 2^64, for inner loops that keep the modulus out of the element. - sample
- Deterministic sampling and black boxes: every point is named by a key, so reruns and snapshots reproduce and callers that share a key share evaluations.
Structs§
- Echelon
- An incremental row echelon form: monic rows keyed by their leading column, optionally recording which pivots each row was reduced by, over a dense scratch row that grows on demand.
- Fp
- An element of
GF(p)for a primep < 2^64chosen at runtime. - Gf
- An element of
GF(P)for a primePfixed at compile time. - Monomial
- An exponent vector in one shared allocation, with its total degree cached.
- Parse
Error - Parse
FpError - Poly
- A sparse multivariate polynomial: nonzero terms in strictly descending
order. - RatFunc
- A univariate rational function
num / denin lowest terms withdenmonic: the fieldF(a), coefficients for polynomials with a parameter. - Ring
- Variable names and an order: enough to read and write polynomials.
- Uni
- A dense univariate polynomial by ascending power, without trailing zeros.
Enums§
- Lead
- Which end of a row leads:
Lowfor F4 matrices whose columns ascend with descending monomials,Highfor Laporta systems that eliminate the most complex unknown first. - Order
- A monomial order on exponent vectors, variable 0 most significant.
Traits§
- Field
- A field given by its operators. Every type with these operations is one, so
BigRational,crate::Fp,crate::Gfand user extensions such asQ(sqrt(m))need no wrapper. - Modular
- A prime field of word-sized residues, for code that drops to bare
u64arithmetic inmodpon its inner loops.
Functions§
- combination
sum h[i] * gens[i], the polynomial a certificate claims.- nat
nas a field element, by doubling.- pow
x^eby repeated squaring.