Documentation

HexPoly.Lcm

Normalize a nonzero polynomial to leading coefficient 1; keep 0 fixed.

Equations
Instances For

    Normalization preserves the stored size.

    Normalizing a nonzero polynomial produces a monic polynomial.

    Normalization of a nonzero polynomial is nonzero.

    theorem Hex.DensePoly.xgcd_bezout_field {F : Type u} [Lean.Grind.Field F] [DecidableEq F] (p q : DensePoly F) :
    have r := p.xgcd q; r.left * p + r.right * q = r.gcd
    theorem Hex.DensePoly.monicize_dvd_of_dvd {F : Type u} [Lean.Grind.Field F] [DecidableEq F] {g p : DensePoly F} (hg : g 0) (hgp : g p) :
    theorem Hex.DensePoly.divMod_mul_field {F : Type u} [Lean.Grind.Field F] [DecidableEq F] (a q : DensePoly F) (hq : q 0) :
    ((a * q).divMod q).fst = a
    theorem Hex.DensePoly.monic_ne_zero {F : Type u} [Lean.Grind.Field F] [DecidableEq F] {p : DensePoly F} (hp : p.Monic) :
    p 0

    A monic polynomial over a nontrivial field is nonzero.

    theorem Hex.DensePoly.mul_monic {F : Type u} [Lean.Grind.Field F] [DecidableEq F] {p q : DensePoly F} (hp : p.Monic) (hq : q.Monic) :
    (p * q).Monic

    The product of two monic polynomials is monic.

    theorem Hex.DensePoly.monic_dvd_antisymm {F : Type u} [Lean.Grind.Field F] [DecidableEq F] {p q : DensePoly F} (hp : p.Monic) (hq : q.Monic) (hpq : p q) (hqp : q p) :
    p = q

    Two monic polynomials dividing one another are equal.

    theorem Hex.DensePoly.commonProduct_dvd {F : Type u} [Lean.Grind.Field F] [DecidableEq F] (running incoming common left right bezoutLeft bezoutRight result r : DensePoly F) (hincomingNe : incoming 0) (hrunning : running = common * left) (hincoming : incoming = common * right) (hbezout : bezoutLeft * running + bezoutRight * incoming = common) (hresult : result = left * incoming) (hrunDvd : running r) (hinDvd : incoming r) :
    result r

    A Bézout-certified product of coprime cofactors divides every common multiple of the two inputs.

    The monic least common multiple of p and q, and 0 if either input is zero.

    Equations
    Instances For
      @[simp]
      @[simp]

      The left input divides the least common multiple.

      The right input divides the least common multiple.

      theorem Hex.DensePoly.lcm_dvd {F : Type u} [Lean.Grind.Field F] [DecidableEq F] (p q r : DensePoly F) (hp : p r) (hq : q r) :
      p.lcm q r

      The executable lcm divides every common multiple.

      Least common multiples are normalized, including the zero cases.

      theorem Hex.DensePoly.lcm_ne_zero {F : Type u} [Lean.Grind.Field F] [DecidableEq F] {p q : DensePoly F} (hp : p 0) (hq : q 0) :
      p.lcm q 0

      An lcm of nonzero polynomials is nonzero.

      theorem Hex.DensePoly.lcm_monic {F : Type u} [Lean.Grind.Field F] [DecidableEq F] {p q : DensePoly F} (hp : p 0) (hq : q 0) :
      (p.lcm q).Monic

      An lcm of nonzero polynomials is monic.

      Fold least common multiples, using 1 for the empty family.

      Equations
      Instances For
        theorem Hex.DensePoly.dvd_lcmList_of_mem {F : Type u} [Lean.Grind.Field F] [DecidableEq F] {p : DensePoly F} {xs : List (DensePoly F)} (hp : p xs) :

        A member of a list divides its folded least common multiple.

        theorem Hex.DensePoly.lcmList_dvd {F : Type u} [Lean.Grind.Field F] [DecidableEq F] (xs : List (DensePoly F)) (r : DensePoly F) (h : ∀ (p : DensePoly F), p xsp r) :

        The folded LCM divides every common multiple of the list.

        theorem Hex.DensePoly.lcmList_monic {F : Type u} [Lean.Grind.Field F] [DecidableEq F] (xs : List (DensePoly F)) (h : ∀ (p : DensePoly F), p xsp 0) :

        A list of nonzero polynomials has a monic folded LCM.