Documentation

HexRealRootsMathlib.LiteralChain

A positive three-term Sturm recurrence C left * a = quotient * b - C right * c.

Equations
Instances For

    Recurrences for a chain of length at least two, ending in a unit.

    The recursive shape is convenient both for a compiled array checker to build and for the soundness proof to consume: each constructor adds exactly one supplied three-term identity.

    Instances For
      theorem Sturm.Replay.first_coprime {a b : Polynomial } {rest : List (Polynomial )} (h : Replay a b rest) :

      The first two entries of a replay are coprime.

      theorem Sturm.Replay.pair_coprime {x y : Polynomial } {rest : List (Polynomial )} (h : Replay x y rest) (i : ) (a b : Polynomial ) :
      (x :: y :: rest)[i]? = some a(x :: y :: rest)[i + 1]? = some bIsCoprime a b

      Every consecutive pair in a replay is coprime.

      theorem Sturm.Replay.triple {x y : Polynomial } {rest : List (Polynomial )} (h : Replay x y rest) (i : ) (a b c : Polynomial ) :
      (x :: y :: rest)[i]? = some a(x :: y :: rest)[i + 1]? = some b(x :: y :: rest)[i + 2]? = some cReplayStep a b c

      Every consecutive triple in a replay has its supplied positive recurrence.

      theorem Sturm.Replay.last_unit {x y : Polynomial } {rest : List (Polynomial )} (h : Replay x y rest) (q : Polynomial ) :
      (x :: y :: rest).getLast? = some qIsUnit q

      The last entry of a replay is a unit.

      theorem Sturm.isChain_of_replay {f s₁ : Polynomial } {rest : List (Polynomial )} (hrep : Replay f s₁ rest) (hnz : qf :: s₁ :: rest, q 0) (δ : ) ( : 0 < δ) (hderiv : Polynomial.derivative f = Polynomial.C δ * s₁) :
      IsSturmChain f (f :: s₁ :: rest)

      A literal positive recurrence replay gives all generalized Sturm-chain axioms. Nonvanishing is kept explicit because a unit terminal and recurrence identities alone permit a zero entry immediately before a unit.

      theorem Sturm.squarefree_of_replay {f s₁ : Polynomial } {rest : List (Polynomial )} (hrep : Replay f s₁ rest) (δ : ) ( : 0 < δ) (hderiv : Polynomial.derivative f = Polynomial.C δ * s₁) :

      A literal positive recurrence replay proves squarefreeness by genuine polynomial coprimality of the head and its derivative.

      An integer-polynomial instance of a positive three-term recurrence.

      Equations
      Instances For

        A literal integer-polynomial recurrence chain ending in a nonzero constant.

        Instances For

          Cast a literal integer replay to the abstract real-polynomial replay.

          theorem HexRealRootsMathlib.ZReplay.isChain {f s₁ : Hex.ZPoly} {rest : List Hex.ZPoly} (hrep : ZReplay f s₁ rest) (hnz : qf :: s₁ :: rest, q 0) (δ : ) ( : 0 < δ) (hderiv : Hex.DensePoly.derivative f = Hex.DensePoly.scale δ s₁) :

          Checked literal integer identities imply a generalized Sturm chain for the real cast.

          theorem HexRealRootsMathlib.ZReplay.squarefree {f s₁ : Hex.ZPoly} {rest : List Hex.ZPoly} (hrep : ZReplay f s₁ rest) (δ : ) ( : 0 < δ) (hderiv : Hex.DensePoly.derivative f = Hex.DensePoly.scale δ s₁) :

          Checked literal integer identities prove squarefreeness of the real cast.

          The multiset of real roots of f in a half-open dyadic interval.

          Equations
          Instances For

            A literal chain's finite variation drop is the exact number of roots in a half-open dyadic interval. This reads the supplied chain directly and never calls the executable chain builder.

            A literal chain's variation drop at infinity is the exact total number of real roots.

            theorem HexRealRootsMathlib.ZReplay.count_eq_card_roots {f s₁ : Hex.ZPoly} {rest : List Hex.ZPoly} (hrep : ZReplay f s₁ rest) (hnz : qf :: s₁ :: rest, q 0) (δ : ) ( : 0 < δ) (hderiv : Hex.DensePoly.derivative f = Hex.DensePoly.scale δ s₁) (I : Hex.DyadicInterval) :
            (Hex.sturmVarAt (f :: s₁ :: rest).toArray I.lower) - (Hex.sturmVarAt (f :: s₁ :: rest).toArray I.upper) = (Literal.rootsIn (toPolyℝ f) I).card

            A checked integer replay gives the exact literal count on an interval.

            The array consumed by the executable variation reader is the array conversion of the replay list, so no separate list/array alignment proof is required.

            theorem HexRealRootsMathlib.ZReplay.total_eq_card_roots {f s₁ : Hex.ZPoly} {rest : List Hex.ZPoly} (hrep : ZReplay f s₁ rest) (hnz : qf :: s₁ :: rest, q 0) (δ : ) ( : 0 < δ) (hderiv : Hex.DensePoly.derivative f = Hex.DensePoly.scale δ s₁) :
            (Hex.sturmVarNegInf (f :: s₁ :: rest).toArray) - (Hex.sturmVarPosInf (f :: s₁ :: rest).toArray) = (toPolyℝ f).roots.card

            A checked integer replay gives the exact total literal root count.