Division of add_monoid_algebra
by monomials #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file is most important for when G = ℕ
(polynomials) or G = σ →₀ ℕ
(multivariate
polynomials).
In order to apply in maximal generality (such as for laurent_polynomial
s), this uses
∃ d, g' = g + d
in many places instead of g ≤ g'
.
Main definitions #
add_monoid_algebra.div_of x g
: dividesx
by the monomialadd_monoid_algebra.of k G g
add_monoid_algebra.mod_of x g
: the remainder upon dividingx
by the monomialadd_monoid_algebra.of k G g
.
Main results #
add_monoid_algebra.div_of_add_mod_of
,add_monoid_algebra.mod_of_add_div_of
:div_of
andmod_of
are well-behaved as quotient and remainder operators.
Implementation notes #
∃ d, g' = g + d
is used as opposed to some other permutation up to commutativity in order to match
the definition of semigroup_has_dvd
. The results in this file could be duplicated for
monoid_algebra
by using g ∣ g'
, but this can't be done automatically, and in any case is not
likely to be very useful.
Divide by of' k G g
, discarding terms not divisible by this.
Equations
- x.div_of g = ⇑(finsupp.comap_domain.add_monoid_hom _) x
A bundled version of add_monoid_algebra.div_of
.
Equations
- add_monoid_algebra.div_of_hom = {to_fun := λ (g : multiplicative G), {to_fun := λ (x : add_monoid_algebra k G), x.div_of (⇑multiplicative.to_add g), map_zero' := _, map_add' := _}, map_one' := _, map_mul' := _}
The remainder upon division by of' k G g
.