Skip to content

algebra(Poly): evaluation, factor theorem, divisibility and root counting - #1232

Open
bgregoir wants to merge 1 commit into
mainfrom
poly-roots
Open

bgregoir wants to merge 1 commit into
mainfrom
poly-roots

Conversation

@bgregoir

Copy link
Copy Markdown
Contributor

Adds polynomial evaluation, the factor theorem, divisibility and root counting to theories/algebra/Poly.ec, following mathcomp (algebra/poly.v) with peval for horner and deg (degree + 1) for size.

PolyComRing (coefficients in a commutative ring)

  • evaluation lemmas: pevalC, peval0, peval1, pevalX, pevalD, pevalN, pevalB, pevalZ, peval_sum, pevalMX, pevalMXn, pevalXn, pevalM, peval_exp, pevalXsubC;
  • remainder theorem peval_factor;
  • roots: root0, rootC, rootX, rootN, root_XsubC, factor_theorem;
  • divisibility of polynomials, as a clone of Ideal.IdealComRing, and root_factor_theorem : root p a <=> (X - polyC a) %| p.

Poly (coefficients in an integral domain)

  • rootM, rootZ, factor_theorem_deg;
  • roots_finite: the roots of a nonzero polynomial form a list of size < deg p;
  • max_poly_roots : p <> poly0 => all (root p) rs => uniq rs => size rs < deg p;
  • the probability that a nonzero polynomial vanishes at a sampled point: mu_root_le (bound (deg p - 1) * max mu1) and mu_root_uni (uniform distribution).

PolyReduce now reuses the divisibility clone inherited from PolyComRing instead of its own copy, so its names move from PolyReduce.PIdeal.* to PolyReduce.BasePoly.PIdeal.*; nothing else in the repository refers to them.

No new axioms. The motivation is the Poly1305 almost-Δ-universal bound, assumed as an axiom in examples/ChaChaPoly.

…ting

Following mathcomp (algebra/poly.v), with `peval` for `horner` and `deg`
(degree + 1) for `size`:
- PolyComRing: evaluation lemmas (pevalC, pevalD, pevalM, peval_exp,
  pevalXsubC, ...), the remainder theorem (peval_factor), root lemmas
  (root0, rootC, rootX, rootN, root_XsubC), factor_theorem, divisibility
  of polynomials (clone of Ideal.IdealComRing) and root_factor_theorem;
- Poly (integral domain): rootM, rootZ, factor_theorem_deg, roots_finite,
  max_poly_roots, and the probability that a nonzero polynomial vanishes
  at a sampled point (mu_root_le, mu_root_uni).

PolyReduce reuses the divisibility clone inherited from PolyComRing
instead of its own copy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant