Lemmas about the sup
and inf
of the support of AddMonoidAlgebra
#
TODO #
The current plan is to state and prove lemmas about Finset.sup (Finsupp.support f) D
with a
"generic" degree/weight function D
from the grading Type A
to a somewhat ordered Type B
.
Next, the general lemmas get specialized for some yet-to-be-defined degree
s.
sup-degree and inf-degree of an AddMonoidAlgebra
#
Let R
be a semiring and let A
be a SemilatticeSup
.
For an element f : R[A]
, this file defines
AddMonoidAlgebra.supDegree
: the sup-degree taking values inWithBot A
,AddMonoidAlgebra.infDegree
: the inf-degree taking values inWithTop A
.
If the grading type A
is a linearly ordered additive monoid, then these two notions of degree
coincide with the standard one:
- the sup-degree is the maximum of the exponents of the monomials that appear with non-zero
coefficient in
f
, or⊥
, iff = 0
; - the inf-degree is the minimum of the exponents of the monomials that appear with non-zero
coefficient in
f
, or⊤
, iff = 0
.
The main results are
AddMonoidAlgebra.supDegree_mul_le
: the sup-degree of a product is at most the sum of the sup-degrees,AddMonoidAlgebra.le_infDegree_mul
: the inf-degree of a product is at least the sum of the inf-degrees,AddMonoidAlgebra.supDegree_add_le
: the sup-degree of a sum is at most the sup of the sup-degrees,AddMonoidAlgebra.le_infDegree_add
: the inf-degree of a sum is at least the inf of the inf-degrees.
Implementation notes #
The current plan is to state and prove lemmas about Finset.sup (Finsupp.support f) D
with a
"generic" degree/weight function D
from the grading Type A
to a somewhat ordered Type B
.
Next, the general lemmas get specialized twice:
- once for
supDegree
(essentially a simple application) and - once for
infDegree
(a simple application, viaOrderDual
).
These final lemmas are the ones that likely get used the most. The generic lemmas about
Finset.support.sup
may not be used directly much outside of this file.
To see this in action, you can look at the triple
(sup_support_mul_le, maxDegree_mul_le, le_minDegree_mul)
.
In this section, we use degb
and degt
to denote "degree functions" on A
with values in
a type with bot or top respectively.
Shorthands for special cases #
Note that these definitions are reducible, in order to make it easier to apply the more generic lemmas above.
Let R
be a semiring, let A
be an AddZeroClass
, let B
be an OrderBot
,
and let D : A → B
be a "degree" function.
For an element f : R[A]
, the element supDegree f : B
is the supremum of all the elements in the
support of f
, or ⊥
if f
is zero.
Often, the Type B
is WithBot A
,
If, further, A
has a linear order, then this notion coincides with the usual one,
using the maximum of the exponents.
If A := σ →₀ ℕ
then R[A] = MvPolynomial σ R
, and if we equip σ
with a linear order then
the induced linear order on Lex A
equips MvPolynomial
ring with a
monomial order (i.e. a linear order on A
, the
type of (monic) monomials in R[A]
, that respects addition). We make use of this monomial order
by taking D := toLex
, and different monomial orders could be accessed via different type
synonyms once they are added.
Equations
- AddMonoidAlgebra.supDegree D f = f.support.sup D
Instances For
If D
is an injection into a linear order B
, the leading coefficient of f : R[A]
is the
nonzero coefficient of highest degree according to D
, or 0 if f = 0
. In general, it is defined
to be the coefficient at an inverse image of supDegree f
(if such exists).
Equations
- AddMonoidAlgebra.leadingCoeff D f = f (Function.invFun D (AddMonoidAlgebra.supDegree D f))
Instances For
An element f : R[A]
is monic if its leading coefficient is one.
Equations
- AddMonoidAlgebra.Monic D f = (AddMonoidAlgebra.leadingCoeff D f = 1)
Instances For
Let R
be a semiring, let A
be an AddZeroClass
, let T
be an OrderTop
,
and let D : A → T
be a "degree" function.
For an element f : R[A]
, the element infDegree f : T
is the infimum of all the elements in the
support of f
, or ⊤
if f
is zero.
Often, the Type T
is WithTop A
,
If, further, A
has a linear order, then this notion coincides with the usual one,
using the minimum of the exponents.
Equations
- AddMonoidAlgebra.infDegree D f = f.support.inf D