Computable monomials #
Monomials of the form X₀ᵃ * X₁ᵇ * ... * Xₖᶻ. These are represented as vectors of natural numbers,
where each element corresponds to the exponent of a variable.
Main definitions #
CPoly.CMvMonomial n: The type of monomials innvariables, implemented asVector ℕ n.
Monomial in n variables.
#v[e₀, e₁, e₂]denotes X₀^e₀ * X₁^e₁ * X₂^e₂
Equations
- CPoly.CMvMonomial n = Vector ℕ n
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
Equations
Extend a monomial to a larger number of variables by padding with zeros.
Equations
- CPoly.CMvMonomial.extend n' m = cast ⋯ (Vector.append m (Vector.replicate (n' - n) 0))
Instances For
The total degree of a monomial (sum of all exponents).
Equations
- m.totalDegree = Vector.sum m
Instances For
The degree of the $i$-th variable in the monomial.
Equations
- m.degreeOf i = Vector.get m i
Instances For
The zero monomial (all exponents are zero).
Equations
Instances For
Equations
Monomial multiplication (adds exponents element-wise).
Equations
Instances For
Equations
Check if $m_1$ divides $m_2$ (true if all exponents of $m_1$ are $\le$ those of $m_2$).
Instances For
Equations
- CPoly.CMvMonomial.instDvd = { dvd := fun (m₁ m₂ : CPoly.CMvMonomial n) => m₁.divides m₂ = true }
The monomial division $m_1 / m_2$ (subtracts exponents element-wise).
The result makes sense assuming m₂ | m₁.
Equations
- m₁.div m₂ = Vector.zipWith Nat.sub m₁ m₂
Instances For
Equations
Equations
- CPoly.CMvMonomial.equivFinsupp = { toFun := CPoly.CMvMonomial.toFinsupp, invFun := CPoly.CMvMonomial.ofFinsupp, left_inv := ⋯, right_inv := ⋯ }
Instances For
Equations
Instances For
Equations
- CPoly.MonoR.instDvd = { dvd := fun (t₁ t₂ : CPoly.MonoR n R) => t₁.divides t₂ = true }
Equations
Equations
- CPoly.MonoR.evalMonomial vals m = ∏ i : Fin n, vals i ^ Vector.get m i
Instances For
Alias of CPoly.CMvMonomial.toFinsupp.
Convert a CMvMonomial to a Finsupp.
Equations
Instances For
Alias of CPoly.CMvMonomial.ofFinsupp.
Convert a Finsupp to a CMvMonomial.