A univariate polynomial over R as a canonical sorted array of
(exponent, coefficient) terms, ascending in exponent. Exponents are
Nat, so degrees like 10^6 cost nothing to store; only toDense
materialises a coefficient vector.
Per design principle 10, consumers read terms through the API
(coeff, support, numTerms, degree?, leadingCoeff, and the
ordered toTerms and foldTerms), not directly, so the representation
can change.
Constructor
Hex.SparsePoly.mk.{u}
Fields
terms : Array (ℕ × R)
The stored (exponent, coefficient) terms in strictly increasing
exponent order, with no zero coefficients.
canonical : Hex.SparsePolyCanonical self.terms
Proof that terms is canonical.