The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V09. Commutative algebra I: ideals, polynomials, factorization

Mathlib.Algebra.MonoidAlgebra.Degree

66 declarations and 11 deprecated aliases. Mathlib docs · Source

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 degrees.

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 in WithBot A,
  • AddMonoidAlgebra.infDegree: the inf-degree taking values in WithTop 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 ⊥, if f = 0;
  • the inf-degree is the minimum of the exponents of the monomials that appear with non-zero coefficient in f, or ⊤, if f = 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, via OrderDual).

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.

theorem AddMonoidAlgebra.Monic.congr_simp E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  (D D_1 : A → B),
  D = D_1 →
    ∀ [inst_3 : Nonempty A] (f f_1 : AddMonoidAlgebra R A),
      f = f_1 → AddMonoidAlgebra.Monic D f = AddMonoidAlgebra.Monic D_1 f_1

theorem AddMonoidAlgebra.leadingCoeff.congr_simp E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  (D D_1 : A → B),
  D = D_1 →
    ∀ [inst_3 : Nonempty A] (f f_1 : AddMonoidAlgebra R A),
      f = f_1 → AddMonoidAlgebra.leadingCoeff D f = AddMonoidAlgebra.leadingCoeff D_1 f_1

theorem AddMonoidAlgebra.sup_support_coeff_add_le E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : SemilatticeSup B] [inst_1 : OrderBot B] [inst_2 : Semiring R]
  (degb : A → B) (f g : AddMonoidAlgebra R A),
  (f + g).coeff.support.sup degb ≤ f.coeff.support.sup degb ⊔ g.coeff.support.sup degb

theorem AddMonoidAlgebra.le_inf_support_coeff_add E1 #

∀ {R : Type u_1} {A : Type u_3} {T : Type u_4} [inst : SemilatticeInf T] [inst_1 : OrderTop T] [inst_2 : Semiring R]
  (degt : A → T) (f g : AddMonoidAlgebra R A),
  f.coeff.support.inf degt ⊓ g.coeff.support.inf degt ≤ (f + g).coeff.support.inf degt

theorem AddMonoidAlgebra.sup_support_coeff_mul_le E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : SemilatticeSup B] [inst_1 : OrderBot B] [inst_2 : Semiring R]
  [inst_3 : Add A] [inst_4 : Add B] [AddLeftMono B] [AddRightMono B] {degb : A → B},
  (∀ (a b : A), degb (a + b) ≤ degb a + degb b) →
    ∀ (f g : AddMonoidAlgebra R A), (f * g).coeff.support.sup degb ≤ f.coeff.support.sup degb + g.coeff.support.sup degb

theorem AddMonoidAlgebra.le_inf_support_coeff_mul E1 #

∀ {R : Type u_1} {A : Type u_3} {T : Type u_4} [inst : SemilatticeInf T] [inst_1 : OrderTop T] [inst_2 : Semiring R]
  [inst_3 : Add A] [inst_4 : Add T] [AddLeftMono T] [AddRightMono T] {degt : A → T},
  (∀ (a b : A), degt a + degt b ≤ degt (a + b)) →
    ∀ (f g : AddMonoidAlgebra R A), f.coeff.support.inf degt + g.coeff.support.inf degt ≤ (f * g).coeff.support.inf degt

theorem AddMonoidAlgebra.sup_support_list_prod_le E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : SemilatticeSup B] [inst_1 : OrderBot B] [inst_2 : Semiring R]
  [inst_3 : AddMonoid A] [inst_4 : AddMonoid B] [AddLeftMono B] [AddRightMono B] {degb : A → B},
  degb 0 ≤ 0 →
    (∀ (a b : A), degb (a + b) ≤ degb a + degb b) →
      ∀ (l : List (AddMonoidAlgebra R A)),
        l.prod.coeff.support.sup degb ≤ (List.map (fun f ↦ f.coeff.support.sup degb) l).sum

theorem AddMonoidAlgebra.le_inf_support_list_prod E1 #

∀ {R : Type u_1} {A : Type u_3} {T : Type u_4} [inst : SemilatticeInf T] [inst_1 : OrderTop T] [inst_2 : Semiring R]
  [inst_3 : AddMonoid A] [inst_4 : AddMonoid T] [AddLeftMono T] [AddRightMono T] {degt : A → T},
  0 ≤ degt 0 →
    (∀ (a b : A), degt a + degt b ≤ degt (a + b)) →
      ∀ (l : List (AddMonoidAlgebra R A)),
        (List.map (fun f ↦ f.coeff.support.inf degt) l).sum ≤ l.prod.coeff.support.inf degt

theorem AddMonoidAlgebra.sup_support_pow_le E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : SemilatticeSup B] [inst_1 : OrderBot B] [inst_2 : Semiring R]
  [inst_3 : AddMonoid A] [inst_4 : AddMonoid B] [AddLeftMono B] [AddRightMono B] {degb : A → B},
  degb 0 ≤ 0 →
    (∀ (a b : A), degb (a + b) ≤ degb a + degb b) →
      ∀ (n : ℕ) (f : AddMonoidAlgebra R A), (f ^ n).coeff.support.sup degb ≤ n • f.coeff.support.sup degb

theorem AddMonoidAlgebra.le_inf_support_pow E1 #

∀ {R : Type u_1} {A : Type u_3} {T : Type u_4} [inst : SemilatticeInf T] [inst_1 : OrderTop T] [inst_2 : Semiring R]
  [inst_3 : AddMonoid A] [inst_4 : AddMonoid T] [AddLeftMono T] [AddRightMono T] {degt : A → T},
  0 ≤ degt 0 →
    (∀ (a b : A), degt a + degt b ≤ degt (a + b)) →
      ∀ (n : ℕ) (f : AddMonoidAlgebra R A), n • f.coeff.support.inf degt ≤ (f ^ n).coeff.support.inf degt

theorem AddMonoidAlgebra.sup_support_coeff_multisetProd_le E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : SemilatticeSup B] [inst_1 : OrderBot B] [inst_2 : CommSemiring R]
  [inst_3 : AddCommMonoid A] [inst_4 : AddCommMonoid B] [AddLeftMono B] [AddRightMono B] {degb : A → B},
  degb 0 ≤ 0 →
    (∀ (a b : A), degb (a + b) ≤ degb a + degb b) →
      ∀ (m : Multiset (AddMonoidAlgebra R A)),
        m.prod.coeff.support.sup degb ≤ (Multiset.map (fun f ↦ f.coeff.support.sup degb) m).sum

theorem AddMonoidAlgebra.le_inf_support_coeff_multisetProd E1 #

∀ {R : Type u_1} {A : Type u_3} {T : Type u_4} [inst : SemilatticeInf T] [inst_1 : OrderTop T] [inst_2 : CommSemiring R]
  [inst_3 : AddCommMonoid A] [inst_4 : AddCommMonoid T] [AddLeftMono T] [AddRightMono T] {degt : A → T},
  0 ≤ degt 0 →
    (∀ (a b : A), degt a + degt b ≤ degt (a + b)) →
      ∀ (m : Multiset (AddMonoidAlgebra R A)),
        (Multiset.map (fun f ↦ f.coeff.support.inf degt) m).sum ≤ m.prod.coeff.support.inf degt

theorem AddMonoidAlgebra.sup_support_coeff_finsetProd_le E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} {ι : Type u_6} [inst : SemilatticeSup B] [inst_1 : OrderBot B]
  [inst_2 : CommSemiring R] [inst_3 : AddCommMonoid A] [inst_4 : AddCommMonoid B] [AddLeftMono B] [AddRightMono B]
  {degb : A → B},
  degb 0 ≤ 0 →
    (∀ (a b : A), degb (a + b) ≤ degb a + degb b) →
      ∀ (s : Finset ι) (f : ι → AddMonoidAlgebra R A),
        (∏ i ∈ s, f i).coeff.support.sup degb ≤ ∑ i ∈ s, (f i).coeff.support.sup degb

theorem AddMonoidAlgebra.le_inf_support_coeff_finsetProd E1 #

∀ {R : Type u_1} {A : Type u_3} {T : Type u_4} {ι : Type u_6} [inst : SemilatticeInf T] [inst_1 : OrderTop T]
  [inst_2 : CommSemiring R] [inst_3 : AddCommMonoid A] [inst_4 : AddCommMonoid T] [AddLeftMono T] [AddRightMono T]
  {degt : A → T},
  0 ≤ degt 0 →
    (∀ (a b : A), degt a + degt b ≤ degt (a + b)) →
      ∀ (s : Finset ι) (f : ι → AddMonoidAlgebra R A),
        ∑ i ∈ s, (f i).coeff.support.inf degt ≤ (∏ i ∈ s, f i).coeff.support.inf degt

abbrev AddMonoidAlgebra.supDegree E1 #

{R : Type u_1} →
  {A : Type u_3} →
    {B : Type u_5} →
      [inst : Semiring R] → [inst_1 : SemilatticeSup B] → [OrderBot B] → (A → B) → AddMonoidAlgebra R A → B

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.

theorem AddMonoidAlgebra.supDegree_add_le E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : SemilatticeSup B] [inst_2 : OrderBot B]
  {D : A → B} {f g : AddMonoidAlgebra R A},
  AddMonoidAlgebra.supDegree D (f + g) ≤ AddMonoidAlgebra.supDegree D f ⊔ AddMonoidAlgebra.supDegree D g

theorem AddMonoidAlgebra.supDegree_neg E0 #

∀ {R' : Type u_2} {A : Type u_3} {B : Type u_5} [inst : Ring R'] [inst_1 : SemilatticeSup B] [inst_2 : OrderBot B]
  {D : A → B} {f : AddMonoidAlgebra R' A}, AddMonoidAlgebra.supDegree D (-f) = AddMonoidAlgebra.supDegree D f

theorem AddMonoidAlgebra.supDegree_sub_le E1 #

∀ {R' : Type u_2} {A : Type u_3} {B : Type u_5} [inst : Ring R'] [inst_1 : SemilatticeSup B] [inst_2 : OrderBot B]
  {D : A → B} {f g : AddMonoidAlgebra R' A},
  AddMonoidAlgebra.supDegree D (f - g) ≤ AddMonoidAlgebra.supDegree D f ⊔ AddMonoidAlgebra.supDegree D g

theorem AddMonoidAlgebra.supDegree_sum_le E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : SemilatticeSup B] [inst_2 : OrderBot B]
  {D : A → B} {ι : Type u_7} {s : Finset ι} {f : ι → AddMonoidAlgebra R A},
  AddMonoidAlgebra.supDegree D (∑ i ∈ s, f i) ≤ s.sup fun i ↦ AddMonoidAlgebra.supDegree D (f i)

theorem AddMonoidAlgebra.supDegree_single_ne_zero E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : SemilatticeSup B] [inst_2 : OrderBot B]
  {D : A → B} (a : A) {r : R}, r ≠ 0 → AddMonoidAlgebra.supDegree D (AddMonoidAlgebra.single a r) = D a

theorem AddMonoidAlgebra.supDegree_single E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : SemilatticeSup B] [inst_2 : OrderBot B]
  {D : A → B} (a : A) (r : R), AddMonoidAlgebra.supDegree D (AddMonoidAlgebra.single a r) = if r = 0 then ⊥ else D a

theorem AddMonoidAlgebra.coeff_eq_zero_of_not_le_supDegree E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : SemilatticeSup B] [inst_2 : OrderBot B]
  {D : A → B} {p : AddMonoidAlgebra R A} {a : A}, ¬D a ≤ AddMonoidAlgebra.supDegree D p → p.coeff a = 0

theorem AddMonoidAlgebra.supDegree_withBot_some_comp E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : SemilatticeSup B] [inst_2 : OrderBot B]
  {D : A → B} {s : AddMonoidAlgebra R A},
  s.coeff.support.Nonempty → AddMonoidAlgebra.supDegree (WithBot.some ∘ D) s = ↑(AddMonoidAlgebra.supDegree D s)

theorem AddMonoidAlgebra.supDegree_eq_of_isMaxOn E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : SemilatticeSup B] [inst_2 : OrderBot B]
  {D : A → B} {p : AddMonoidAlgebra R A} {a : A},
  a ∈ p.coeff.support → IsMaxOn D (↑p.coeff.support) a → AddMonoidAlgebra.supDegree D p = D a

theorem AddMonoidAlgebra.supDegree_zero E0 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : SemilatticeSup B] [inst_2 : OrderBot B]
  {D : A → B}, AddMonoidAlgebra.supDegree D 0 = ⊥

theorem AddMonoidAlgebra.ne_zero_of_supDegree_ne_bot E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : SemilatticeSup B] [inst_2 : OrderBot B]
  {D : A → B} {p : AddMonoidAlgebra R A}, AddMonoidAlgebra.supDegree D p ≠ ⊥ → p ≠ 0

theorem AddMonoidAlgebra.ne_zero_of_not_supDegree_le E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : SemilatticeSup B] [inst_2 : OrderBot B]
  {D : A → B} {p : AddMonoidAlgebra R A} {b : B}, ¬AddMonoidAlgebra.supDegree D p ≤ b → p ≠ 0

theorem AddMonoidAlgebra.supDegree_eq_of_max E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : SemilatticeSup B] [inst_2 : OrderBot B]
  {D : A → B} {p : AddMonoidAlgebra R A} [inst_3 : AddZeroClass A] {b : B},
  b ∈ Set.range D →
    Function.invFun D b ∈ p.coeff.support → (∀ a ∈ p.coeff.support, D a ≤ b) → AddMonoidAlgebra.supDegree D p = b

theorem AddMonoidAlgebra.supDegree_mul_le E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : SemilatticeSup B] [inst_2 : OrderBot B]
  {D : A → B} {p q : AddMonoidAlgebra R A} [inst_3 : AddZeroClass A] [inst_4 : Add B],
  (∀ (a1 a2 : A), D (a1 + a2) = D a1 + D a2) →
    ∀ [AddLeftMono B] [AddRightMono B],
      AddMonoidAlgebra.supDegree D (p * q) ≤ AddMonoidAlgebra.supDegree D p + AddMonoidAlgebra.supDegree D q

theorem AddMonoidAlgebra.supDegree_prod_le E1 #

∀ {R : Type u_7} {A : Type u_8} {B : Type u_9} [inst : CommSemiring R] [inst_1 : AddCommMonoid A]
  [inst_2 : AddCommMonoid B] [inst_3 : SemilatticeSup B] [inst_4 : OrderBot B] [AddLeftMono B] {D : A → B},
  D 0 = 0 →
    (∀ (a1 a2 : A), D (a1 + a2) = D a1 + D a2) →
      ∀ {ι : Type u_10} {s : Finset ι} {f : ι → AddMonoidAlgebra R A},
        AddMonoidAlgebra.supDegree D (∏ i ∈ s, f i) ≤ ∑ i ∈ s, AddMonoidAlgebra.supDegree D (f i)

theorem AddMonoidAlgebra.coeff_add_of_supDegree_le E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : SemilatticeSup B] [inst_2 : OrderBot B]
  {D : A → B} {p q : AddMonoidAlgebra R A} [inst_3 : AddZeroClass A] [inst_4 : Add B],
  (∀ (a1 a2 : A), D (a1 + a2) = D a1 + D a2) →
    ∀ [AddLeftStrictMono B] [AddRightStrictMono B],
      Function.Injective D →
        ∀ {ap aq : A},
          AddMonoidAlgebra.supDegree D p ≤ D ap →
            AddMonoidAlgebra.supDegree D q ≤ D aq → (p * q).coeff (ap + aq) = p.coeff ap * q.coeff aq

def AddMonoidAlgebra.leadingCoeff E1 #

{R : Type u_1} →
  {A : Type u_3} →
    {B : Type u_5} →
      [inst : Semiring R] → [inst_1 : LinearOrder B] → [OrderBot B] → (A → B) → [Nonempty A] → AddMonoidAlgebra R A → R

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).

def AddMonoidAlgebra.Monic E1 #

{R : Type u_1} →
  {A : Type u_3} →
    {B : Type u_5} →
      [inst : Semiring R] →
        [inst_1 : LinearOrder B] → [OrderBot B] → (A → B) → [Nonempty A] → AddMonoidAlgebra R A → Prop

An element f : R[A] is monic if its leading coefficient is one.

theorem AddMonoidAlgebra.leadingCoeff_single E0 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {D : A → B} [inst_3 : Nonempty A],
  Function.Injective D → ∀ (a : A) (r : R), AddMonoidAlgebra.leadingCoeff D (AddMonoidAlgebra.single a r) = r

theorem AddMonoidAlgebra.leadingCoeff_zero E0 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {D : A → B} [inst_3 : Nonempty A], AddMonoidAlgebra.leadingCoeff D 0 = 0

theorem AddMonoidAlgebra.Monic.ne_zero E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p : AddMonoidAlgebra R A} {D : A → B} [inst_3 : Nonempty A] [Nontrivial R], AddMonoidAlgebra.Monic D p → p ≠ 0

theorem AddMonoidAlgebra.monic_one E0 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {D : A → B} [inst_3 : AddZeroClass A], Function.Injective D → AddMonoidAlgebra.Monic D 1

theorem AddMonoidAlgebra.exists_supDegree_mem_support E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p : AddMonoidAlgebra R A} (D : A → B), p ≠ 0 → ∃ a ∈ p.coeff.support, AddMonoidAlgebra.supDegree D p = D a

theorem AddMonoidAlgebra.supDegree_mem_range E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p : AddMonoidAlgebra R A} (D : A → B), p ≠ 0 → AddMonoidAlgebra.supDegree D p ∈ Set.range D

theorem AddMonoidAlgebra.supDegree_sum_lt E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {D : A → B} {ι : Type u_7} {s : Finset ι} {f : ι → AddMonoidAlgebra R A},
  s.Nonempty →
    ∀ {b : B}, (∀ i ∈ s, AddMonoidAlgebra.supDegree D (f i) < b) → AddMonoidAlgebra.supDegree D (∑ i ∈ s, f i) < b

theorem AddMonoidAlgebra.supDegree_add_eq_left E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p q : AddMonoidAlgebra R A} {D : A → B} [inst_3 : AddZeroClass A],
  AddMonoidAlgebra.supDegree D q < AddMonoidAlgebra.supDegree D p →
    AddMonoidAlgebra.supDegree D (p + q) = AddMonoidAlgebra.supDegree D p

theorem AddMonoidAlgebra.supDegree_add_eq_right E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p q : AddMonoidAlgebra R A} {D : A → B} [inst_3 : AddZeroClass A],
  AddMonoidAlgebra.supDegree D p < AddMonoidAlgebra.supDegree D q →
    AddMonoidAlgebra.supDegree D (p + q) = AddMonoidAlgebra.supDegree D q

theorem AddMonoidAlgebra.leadingCoeff_add_eq_left E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p q : AddMonoidAlgebra R A} {D : A → B} [inst_3 : AddZeroClass A],
  AddMonoidAlgebra.supDegree D q < AddMonoidAlgebra.supDegree D p →
    AddMonoidAlgebra.leadingCoeff D (p + q) = AddMonoidAlgebra.leadingCoeff D p

theorem AddMonoidAlgebra.leadingCoeff_add_eq_right E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p q : AddMonoidAlgebra R A} {D : A → B} [inst_3 : AddZeroClass A],
  AddMonoidAlgebra.supDegree D p < AddMonoidAlgebra.supDegree D q →
    AddMonoidAlgebra.leadingCoeff D (p + q) = AddMonoidAlgebra.leadingCoeff D q

theorem AddMonoidAlgebra.supDegree_mem_support E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p : AddMonoidAlgebra R A} {D : A → B} [inst_3 : AddZeroClass A],
  Function.Injective D → p ≠ 0 → Function.invFun D (AddMonoidAlgebra.supDegree D p) ∈ p.coeff.support

theorem AddMonoidAlgebra.leadingCoeff_eq_zero E0 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p : AddMonoidAlgebra R A} {D : A → B} [inst_3 : AddZeroClass A],
  Function.Injective D → (AddMonoidAlgebra.leadingCoeff D p = 0 ↔ p = 0)

theorem AddMonoidAlgebra.leadingCoeff_ne_zero E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p : AddMonoidAlgebra R A} {D : A → B} [inst_3 : AddZeroClass A],
  Function.Injective D → (AddMonoidAlgebra.leadingCoeff D p ≠ 0 ↔ p ≠ 0)

theorem AddMonoidAlgebra.supDegree_sub_lt_of_leadingCoeff_eq E0 #

∀ {A : Type u_3} {B : Type u_5} [inst : LinearOrder B] [inst_1 : OrderBot B] {D : A → B} [inst_2 : AddZeroClass A],
  Function.Injective D →
    ∀ {R : Type u_8} [inst_3 : Ring R] {p q : AddMonoidAlgebra R A},
      AddMonoidAlgebra.supDegree D p = AddMonoidAlgebra.supDegree D q →
        AddMonoidAlgebra.leadingCoeff D p = AddMonoidAlgebra.leadingCoeff D q →
          AddMonoidAlgebra.supDegree D (p - q) < AddMonoidAlgebra.supDegree D p ∨ p = q

theorem AddMonoidAlgebra.supDegree_leadingCoeff_sum_eq E0 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {D : A → B} {ι : Type u_7} {s : Finset ι} {i : ι} {f : ι → AddMonoidAlgebra R A} [inst_3 : AddZeroClass A],
  i ∈ s →
    (∀ j ∈ s, j ≠ i → AddMonoidAlgebra.supDegree D (f j) < AddMonoidAlgebra.supDegree D (f i)) →
      AddMonoidAlgebra.supDegree D (∑ j ∈ s, f j) = AddMonoidAlgebra.supDegree D (f i) ∧
        AddMonoidAlgebra.leadingCoeff D (∑ j ∈ s, f j) = AddMonoidAlgebra.leadingCoeff D (f i)

theorem AddMonoidAlgebra.sum_ne_zero_of_injOn_supDegree' E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {D : A → B} {ι : Type u_7} {s : Finset ι} {f : ι → AddMonoidAlgebra R A} [inst_3 : AddZeroClass A],
  (∃ i ∈ s, f i ≠ 0) → Set.InjOn (AddMonoidAlgebra.supDegree D ∘ f) ↑s → ∑ i ∈ s, f i ≠ 0

theorem AddMonoidAlgebra.sum_ne_zero_of_injOn_supDegree E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {D : A → B} {ι : Type u_7} {s : Finset ι} {f : ι → AddMonoidAlgebra R A} [inst_3 : AddZeroClass A],
  s.Nonempty → (∀ i ∈ s, f i ≠ 0) → Set.InjOn (AddMonoidAlgebra.supDegree D ∘ f) ↑s → ∑ i ∈ s, f i ≠ 0

theorem AddMonoidAlgebra.coeff_supDegree_add_supDegree E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p q : AddMonoidAlgebra R A} {D : A → B} [inst_3 : AddZeroClass A] [inst_4 : Add B] [AddLeftStrictMono B]
  [AddRightStrictMono B],
  Function.Injective D →
    (∀ (a1 a2 : A), D (a1 + a2) = D a1 + D a2) →
      (p * q).coeff (Function.invFun D (AddMonoidAlgebra.supDegree D p + AddMonoidAlgebra.supDegree D q)) =
        AddMonoidAlgebra.leadingCoeff D p * AddMonoidAlgebra.leadingCoeff D q

theorem AddMonoidAlgebra.supDegree_mul E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p q : AddMonoidAlgebra R A} {D : A → B} [inst_3 : AddZeroClass A] [inst_4 : Add B] [AddLeftStrictMono B]
  [AddRightStrictMono B],
  Function.Injective D →
    (∀ (a1 a2 : A), D (a1 + a2) = D a1 + D a2) →
      AddMonoidAlgebra.leadingCoeff D p * AddMonoidAlgebra.leadingCoeff D q ≠ 0 →
        p ≠ 0 →
          q ≠ 0 → AddMonoidAlgebra.supDegree D (p * q) = AddMonoidAlgebra.supDegree D p + AddMonoidAlgebra.supDegree D q

theorem AddMonoidAlgebra.Monic.supDegree_mul_of_ne_zero_left E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p q : AddMonoidAlgebra R A} {D : A → B} [inst_3 : AddZeroClass A] [inst_4 : Add B] [AddLeftStrictMono B]
  [AddRightStrictMono B],
  Function.Injective D →
    (∀ (a1 a2 : A), D (a1 + a2) = D a1 + D a2) →
      AddMonoidAlgebra.Monic D q →
        p ≠ 0 → AddMonoidAlgebra.supDegree D (p * q) = AddMonoidAlgebra.supDegree D p + AddMonoidAlgebra.supDegree D q

theorem AddMonoidAlgebra.Monic.supDegree_mul_of_ne_zero_right E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p q : AddMonoidAlgebra R A} {D : A → B} [inst_3 : AddZeroClass A] [inst_4 : Add B] [AddLeftStrictMono B]
  [AddRightStrictMono B],
  Function.Injective D →
    (∀ (a1 a2 : A), D (a1 + a2) = D a1 + D a2) →
      AddMonoidAlgebra.Monic D p →
        q ≠ 0 → AddMonoidAlgebra.supDegree D (p * q) = AddMonoidAlgebra.supDegree D p + AddMonoidAlgebra.supDegree D q

theorem AddMonoidAlgebra.Monic.supDegree_mul E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p q : AddMonoidAlgebra R A} {D : A → B} [inst_3 : AddZeroClass A] [inst_4 : Add B] [AddLeftStrictMono B]
  [AddRightStrictMono B],
  Function.Injective D →
    (∀ (a1 a2 : A), D (a1 + a2) = D a1 + D a2) →
      ⊥ + ⊥ = ⊥ →
        AddMonoidAlgebra.Monic D p →
          AddMonoidAlgebra.Monic D q →
            AddMonoidAlgebra.supDegree D (p * q) = AddMonoidAlgebra.supDegree D p + AddMonoidAlgebra.supDegree D q

theorem AddMonoidAlgebra.leadingCoeff_mul E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p q : AddMonoidAlgebra R A} {D : A → B} [inst_3 : AddZeroClass A] [inst_4 : Add B] [AddLeftStrictMono B]
  [AddRightStrictMono B] [NoZeroDivisors R],
  Function.Injective D →
    (∀ (a1 a2 : A), D (a1 + a2) = D a1 + D a2) →
      AddMonoidAlgebra.leadingCoeff D (p * q) = AddMonoidAlgebra.leadingCoeff D p * AddMonoidAlgebra.leadingCoeff D q

theorem AddMonoidAlgebra.Monic.leadingCoeff_mul_eq_left E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p q : AddMonoidAlgebra R A} {D : A → B} [inst_3 : AddZeroClass A] [inst_4 : Add B] [AddLeftStrictMono B]
  [AddRightStrictMono B],
  Function.Injective D →
    (∀ (a1 a2 : A), D (a1 + a2) = D a1 + D a2) →
      AddMonoidAlgebra.Monic D q → AddMonoidAlgebra.leadingCoeff D (p * q) = AddMonoidAlgebra.leadingCoeff D p

theorem AddMonoidAlgebra.Monic.leadingCoeff_mul_eq_right E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p q : AddMonoidAlgebra R A} {D : A → B} [inst_3 : AddZeroClass A] [inst_4 : Add B] [AddLeftStrictMono B]
  [AddRightStrictMono B],
  Function.Injective D →
    (∀ (a1 a2 : A), D (a1 + a2) = D a1 + D a2) →
      AddMonoidAlgebra.Monic D p → AddMonoidAlgebra.leadingCoeff D (p * q) = AddMonoidAlgebra.leadingCoeff D q

theorem AddMonoidAlgebra.Monic.mul E1 #

∀ {R : Type u_1} {A : Type u_3} {B : Type u_5} [inst : Semiring R] [inst_1 : LinearOrder B] [inst_2 : OrderBot B]
  {p q : AddMonoidAlgebra R A} {D : A → B} [inst_3 : AddZeroClass A] [inst_4 : Add B] [AddLeftStrictMono B]
  [AddRightStrictMono B],
  Function.Injective D →
    (∀ (a1 a2 : A), D (a1 + a2) = D a1 + D a2) →
      AddMonoidAlgebra.Monic D p → AddMonoidAlgebra.Monic D q → AddMonoidAlgebra.Monic D (p * q)

theorem AddMonoidAlgebra.Monic.pow E1 #

∀ {R : Type u_1} [inst : Semiring R] {A : Type u_8} {B : Type u_9} [inst_1 : AddMonoid A] [inst_2 : AddMonoid B]
  [inst_3 : LinearOrder B] [inst_4 : OrderBot B] [AddLeftStrictMono B] [AddRightStrictMono B] {D : A → B}
  {p : AddMonoidAlgebra R A} {n : ℕ},
  (∀ (a1 a2 : A), D (a1 + a2) = D a1 + D a2) →
    Function.Injective D → AddMonoidAlgebra.Monic D p → AddMonoidAlgebra.Monic D (p ^ n)

theorem AddMonoidAlgebra.Monic.supDegree_pow E1 #

∀ {R : Type u_1} [inst : Semiring R] {A : Type u_8} {B : Type u_9} [inst_1 : AddMonoid A] [inst_2 : AddMonoid B]
  [inst_3 : LinearOrder B] [inst_4 : OrderBot B] [AddLeftStrictMono B] [AddRightStrictMono B] {D : A → B}
  {p : AddMonoidAlgebra R A} {n : ℕ},
  D 0 = 0 →
    (∀ (a1 a2 : A), D (a1 + a2) = D a1 + D a2) →
      Function.Injective D →
        ∀ [Nontrivial R],
          AddMonoidAlgebra.Monic D p → AddMonoidAlgebra.supDegree D (p ^ n) = n • AddMonoidAlgebra.supDegree D p

abbrev AddMonoidAlgebra.infDegree E1 #

{R : Type u_1} →
  {A : Type u_3} →
    {T : Type u_4} →
      [inst : Semiring R] → [inst_1 : SemilatticeInf T] → [OrderTop T] → (A → T) → AddMonoidAlgebra R A → T

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.

theorem AddMonoidAlgebra.le_infDegree_add E1 #

∀ {R : Type u_1} {A : Type u_3} {T : Type u_4} [inst : Semiring R] [inst_1 : SemilatticeInf T] [inst_2 : OrderTop T]
  (D : A → T) (f g : AddMonoidAlgebra R A),
  AddMonoidAlgebra.infDegree D f ⊓ AddMonoidAlgebra.infDegree D g ≤ AddMonoidAlgebra.infDegree D (f + g)

theorem AddMonoidAlgebra.infDegree_withTop_some_comp E1 #

∀ {R : Type u_1} {A : Type u_3} {T : Type u_4} [inst : Semiring R] [inst_1 : SemilatticeInf T] [inst_2 : OrderTop T]
  {D : A → T} {s : AddMonoidAlgebra R A},
  s.coeff.support.Nonempty → AddMonoidAlgebra.infDegree (WithTop.some ∘ D) s = ↑(AddMonoidAlgebra.infDegree D s)

theorem AddMonoidAlgebra.le_infDegree_mul E1 #

∀ {R : Type u_1} {A : Type u_3} {T : Type u_4} [inst : Semiring R] [inst_1 : SemilatticeInf T] [inst_2 : OrderTop T]
  [inst_3 : AddZeroClass A] [inst_4 : Add T] [AddLeftMono T] [AddRightMono T] (D : A →ₙ+ T)
  (f g : AddMonoidAlgebra R A),
  AddMonoidAlgebra.infDegree (⇑D) f + AddMonoidAlgebra.infDegree (⇑D) g ≤ AddMonoidAlgebra.infDegree (⇑D) (f * g)

Deprecated aliases

NameNew nameSince
AddMonoidAlgebra.apply_add_of_supDegree_leAddMonoidAlgebra.coeff_add_of_supDegree_le2026-06-18
AddMonoidAlgebra.apply_eq_zero_of_not_le_supDegreeAddMonoidAlgebra.coeff_eq_zero_of_not_le_supDegree2026-06-18
AddMonoidAlgebra.apply_supDegree_add_supDegreeAddMonoidAlgebra.coeff_supDegree_add_supDegree2026-06-18
AddMonoidAlgebra.le_inf_support_addAddMonoidAlgebra.le_inf_support_coeff_add2026-06-18
AddMonoidAlgebra.le_inf_support_finsetProdAddMonoidAlgebra.le_inf_support_coeff_finsetProd2026-06-18
AddMonoidAlgebra.le_inf_support_mulAddMonoidAlgebra.le_inf_support_coeff_mul2026-06-18
AddMonoidAlgebra.le_inf_support_multiset_prodAddMonoidAlgebra.le_inf_support_coeff_multisetProd2026-06-18
AddMonoidAlgebra.sup_support_add_leAddMonoidAlgebra.sup_support_coeff_add_le2026-06-18
AddMonoidAlgebra.sup_support_finsetProd_leAddMonoidAlgebra.sup_support_coeff_finsetProd_le2026-06-18
AddMonoidAlgebra.sup_support_mul_leAddMonoidAlgebra.sup_support_coeff_mul_le2026-06-18
AddMonoidAlgebra.sup_support_multiset_prod_leAddMonoidAlgebra.sup_support_coeff_multisetProd_le2026-06-18