Rebuild a polynomial under a different monomial comparator.
Equations
- Hex.MvPoly.reorder cmp' p = Hex.MvPoly.ofTerms p.termsList
Instances For
Rename variables, adding exponents in fibres and combining all resulting term collisions.
Equations
- Hex.MvPoly.rename cmp' f p = Hex.MvPoly.foldTerms (fun (acc : Hex.MvPoly k R cmp') (m : Hex.Mono n) (c : R) => acc.addMonomial (Hex.Mono.rename f m) c) 0 p
Instances For
Incrementing a monomial raises the selected variable degree by one.
Decrementing the selected exponent reverses succAt.
predAt yields a monomial exactly when the source is its successor at
the selected variable.
Formal derivative with respect to variable i.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Homogeneous component of total degree d.
Equations
- Hex.MvPoly.homogeneousComponent d p = Hex.MvPoly.restrictBy (fun (m : Hex.Mono n) => decide (m.degree = d)) p
Instances For
General substitution, mapping coefficients through f and variables
through g.
Equations
- Hex.MvPoly.bind f g p = Hex.MvPoly.foldTerms (fun (acc : Hex.MvPoly k S targetCmp) (m : Hex.Mono n) (c : R) => acc + Hex.MvPoly.C (f c) * Hex.Mono.prod g m) 0 p
Instances For
General substitution is the ordered sum of mapped coefficient-monomial terms.
Substitute polynomials for variables without changing the coefficient type.
Equations
- Hex.MvPoly.subst f p = Hex.MvPoly.bind id f p
Instances For
Compatibility spelling for same-coefficient substitution.
Equations
- Hex.MvPoly.bind₁ f p = Hex.MvPoly.subst f p
Instances For
Reconstruct a polynomial by summing its ordered term iteration.
Equations
Instances For
Reconstructing from the ordered term iterator recovers the polynomial.
Reordering a polynomial preserves every coefficient.
Renaming variables sums coefficients whose target monomials coincide.
A derivative coefficient is the successor coefficient scaled by its corresponding exponent.
A homogeneous component keeps exactly the terms of the requested total degree.
Substitution evaluates each source monomial at the replacement polynomials and sums the results.
Renaming is substitution by the target variables.
Partial evaluation is substitution by constants at assigned variables and variables at unassigned ones.