Maximum total degree of a supported monomial, or zero for the zero polynomial.
Equations
- p.totalDegree = Hex.MvPoly.foldTerms (fun (d : Nat) (m : Hex.Mono n) (x : R) => max d m.degree) 0 p
Instances For
Maximum exponent of variable i, or zero for the zero polynomial.
Equations
- Hex.MvPoly.degreeOf i p = Hex.MvPoly.foldTerms (fun (d : Nat) (m : Hex.Mono n) (x : R) => max d (Hex.Mono.degreeOf i m)) 0 p
Instances For
Total degree is the maximum monomial degree in ordered term iteration.
Per-variable degree is the maximum exponent in ordered term iteration.
Coordinatewise maximum of all supported exponent vectors.
Equations
- p.degrees = Hex.MvPoly.foldTerms (fun (d m : Hex.Mono n) (x : R) => d.lcm m) Hex.Mono.zero p
Instances For
The coordinatewise degree vector is a fold over the canonical terms.
Variables are the support of the coordinatewise degree vector.
Greatest supported term in the polynomial's monomial order.
Equations
- p.leadingTerm = p.maxTerm?
Instances For
The leading term is the maximum entry of the canonical term map.
A leading term is exactly a stored coefficient whose monomial bounds every monomial in the canonical support.
The coefficient recorded by a leading term is the public coefficient at its monomial.
Every supported monomial is at most the leading monomial.
Greatest supported monomial in the polynomial's monomial order.
Equations
Instances For
The leading monomial is the monomial projection of the leading term.
Compatibility spelling for leadingMono.
Equations
Instances For
The compatibility spelling agrees with leadingMono.
Coefficient of the greatest supported monomial, or zero for the zero polynomial.
Equations
- p.leadingCoeff = match p.leadingTerm with | none => 0 | some term => term.snd
Instances For
The leading coefficient is the coefficient projection of the leading term, defaulting to zero.
Retain exactly the terms whose monomials satisfy keep.
Equations
- Hex.MvPoly.restrictBy keep p = { termsInternal := Std.ExtTreeMap.filter (fun (m : Hex.Mono n) (x : R) => keep m) p.termsInternal, nonzeroInternal := ⋯ }
Instances For
Retain the terms whose exponent of i is at most bound.
Equations
- Hex.MvPoly.restrictDegree i bound p = Hex.MvPoly.restrictBy (fun (m : Hex.Mono n) => decide (Hex.Mono.degreeOf i m ≤ bound)) p
Instances For
Per-variable restriction is restriction by the corresponding exponent bound.
Retain the terms whose total degree is at most bound.
Equations
- Hex.MvPoly.restrictTotalDegree bound p = Hex.MvPoly.restrictBy (fun (m : Hex.Mono n) => decide (m.degree ≤ bound)) p
Instances For
Total-degree restriction is restriction by the monomial degree bound.
Restriction keeps exactly the coefficients whose monomials satisfy the predicate.
The zero polynomial has total degree zero.
Every variable has degree zero in the zero polynomial.
The coordinatewise degree vector of zero is the zero monomial.
No variable occurs in the zero polynomial.
The zero polynomial has no leading term.
The zero polynomial has no leading monomial.
The compatibility leading-monomial spelling returns none on zero.
The zero polynomial has leading coefficient zero.