Documentation

HexNumberField.PolyQuot

Canonical rational-polynomial remainder modulo p.

Equations
Instances For

    Package a rational polynomial after canonical modular reduction.

    Equations
    Instances For
      theorem Hex.PolyQuot.ext {p : ZPoly} {x : SimpleRoot p} {a b : PolyQuot p x} (h : a.coeffs = b.coeffs) :
      a = b

      Fixed-presentation elements are equal when their canonical coordinates are equal.

      theorem Hex.PolyQuot.ext_iff {p : ZPoly} {x : SimpleRoot p} {a b : PolyQuot p x} :
      a = b a.coeffs = b.coeffs

      Equality is exactly equality of canonical coordinate polynomials; the generated iff form of Hex.PolyQuot.ext.

      theorem Hex.PolyQuot.eq_iff_coeffs {p : ZPoly} {x : SimpleRoot p} {a b : PolyQuot p x} :
      a = b a.coeffs = b.coeffs

      Equality is exactly equality of canonical coordinate polynomials.

      @[instance_reducible]
      Equations
      def Hex.PolyQuot.isZero {p : ZPoly} {x : SimpleRoot p} (a : PolyQuot p x) :

      Boolean zero test on canonical coordinates.

      Equations
      Instances For
        @[instance_reducible]
        instance Hex.PolyQuot.instZero {p : ZPoly} {x : SimpleRoot p} :
        Equations
        @[instance_reducible]
        instance Hex.PolyQuot.instOne {p : ZPoly} {x : SimpleRoot p} :
        Equations
        def Hex.PolyQuot.add {p : ZPoly} {x : SimpleRoot p} (a b : PolyQuot p x) :

        Reduced coordinate addition.

        Equations
        Instances For
          @[instance_reducible]
          instance Hex.PolyQuot.instAdd {p : ZPoly} {x : SimpleRoot p} :
          Equations
          def Hex.PolyQuot.sub {p : ZPoly} {x : SimpleRoot p} (a b : PolyQuot p x) :

          Reduced coordinate subtraction.

          Equations
          Instances For
            @[instance_reducible]
            instance Hex.PolyQuot.instSub {p : ZPoly} {x : SimpleRoot p} :
            Equations
            def Hex.PolyQuot.neg {p : ZPoly} {x : SimpleRoot p} (a : PolyQuot p x) :

            Reduced coordinate negation.

            Equations
            Instances For
              @[instance_reducible]
              instance Hex.PolyQuot.instNeg {p : ZPoly} {x : SimpleRoot p} :
              Equations
              def Hex.PolyQuot.mul {p : ZPoly} {x : SimpleRoot p} (a b : PolyQuot p x) :

              Reduced coordinate multiplication.

              Equations
              Instances For
                @[instance_reducible]
                instance Hex.PolyQuot.instMul {p : ZPoly} {x : SimpleRoot p} :
                Equations
                def Hex.PolyQuot.smul {p : ZPoly} {x : SimpleRoot p} (c : Rat) (a : PolyQuot p x) :

                Rational scalar action followed by canonical reduction.

                Equations
                Instances For
                  @[instance_reducible]
                  Equations
                  def Hex.PolyQuot.ofRat {p : ZPoly} {x : SimpleRoot p} (q : Rat) :

                  The rational constant q in reduced coordinates.

                  Equations
                  Instances For
                    def Hex.PolyQuot.ofSquare (p : ZPoly) (s : DyadicSquare) (f : DensePoly Rat) (hw : atomWitness p s := by decide) (hp : (mahlerPrec p) s.prec := by decide) :

                    The element of ℚ(root of pisolated bys) with coordinates f. This is the self-contained form Repr emits: every argument is printable data, and the two root side conditions are decide-discharged auto-params of SimpleRoot.ofSquare.

                    Equations
                    Instances For
                      @[instance_reducible]

                      A rational polynomial denotes its reduction, so #p[0, 0, 2] names the element 2x² when the expected type is PolyQuot p x.

                      Equations
                      @[instance_reducible]
                      Equations
                      @[instance_reducible]
                      Equations
                      @[instance_reducible, instance 90]
                      instance Hex.PolyQuot.instOfNatHAddNatOfNat {p : ZPoly} {x : SimpleRoot p} (n : Nat) :
                      OfNat (PolyQuot p x) (n + 2)
                      Equations

                      Inversion in a checked irreducible presentation, with 0⁻¹ = 0. The one-sided extended gcd tracks only the Bezout coefficient used for the inverse; the constant-gcd check is a defensive executable guard whose failure is unreachable under checked irreducibility.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        def Hex.PolyQuot.div {p : ZPoly} {x : SimpleRoot p} [p.CheckedIrreducible] (a b : PolyQuot p x) :

                        Division in a checked irreducible presentation.

                        Equations
                        Instances For
                          @[irreducible]
                          def Hex.PolyQuot.natPow {p : ZPoly} {x : SimpleRoot p} (a : PolyQuot p x) :
                          NatPolyQuot p x

                          Natural powers by repeated squaring using executable fixed-presentation multiplication.

                          Equations
                          Instances For
                            @[instance_reducible]
                            instance Hex.PolyQuot.instPowNat {p : ZPoly} {x : SimpleRoot p} :
                            Equations

                            Integer powers assembled from executable multiplication and inversion.

                            Equations
                            Instances For

                              Refine a fixed-field generator representative once and evaluate canonical coordinates on its disc. The checked driver's none fallback retains the original representative and therefore still returns a sound ball; the companion proves that branch unreachable and proves the requested radius.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                theorem Hex.PolyQuot.approx_root {p : ZPoly} {x : SimpleRoot p} (a : PolyQuot p x) (rep : RefinedIsolation p) (h : SimpleRoot.mk rep = x) (prec : Int) :
                                SimpleRoot.mk (a.approx rep h prec).fst = x

                                The representative returned by Hex.PolyQuot.approx denotes the input root, so callers can pass it directly to their next approximation request.