Documentation

HexNumberFieldTower.Arithmetic

Boolean zero test on fixed mixed-radix coordinates.

Equations
Instances For

    Additive identity.

    Equations
    Instances For
      @[instance_reducible]
      Equations

      The coordinate zero is the rational embedding of zero.

      @[simp]

      Zero exposes the all-zero fixed-width coordinate array.

      The Boolean coordinate test recognizes exactly the tower zero.

      Multiplicative identity.

      Equations
      Instances For
        @[instance_reducible]
        Equations

        The coordinate one is the rational embedding of one.

        @[simp]

        Addition exposes its fixed-width coordinate result.

        @[simp]

        Subtraction exposes its fixed-width coordinate result.

        @[simp]

        Negation exposes its fixed-width coordinate result.

        theorem Hex.NumberTower.sub_eq_add_neg {T : NumberTower} (a b : T.Elem) :
        a - b = a + -b

        Coordinate subtraction is addition of the coordinatewise negation.

        theorem Hex.NumberTower.add_neg_self {T : NumberTower} (a : T.Elem) :
        a + -a = 0

        Coordinatewise negation is an additive inverse.

        def Hex.NumberTower.mul {T : NumberTower} (a b : T.Elem) :

        Recursive convolution and monic reduction.

        Equations
        Instances For
          @[simp]

          Multiplication exposes its fixed-width recursively reduced coordinates.

          Recursive extended-gcd inversion, totalized by 0⁻¹ = 0.

          Equations
          Instances For
            @[simp]

            Recursive inversion exposes its fixed-width extended-gcd coordinates.

            def Hex.NumberTower.div {T : NumberTower} (a b : T.Elem) :

            Tower division.

            Equations
            Instances For
              def Hex.NumberTower.smul {T : NumberTower} (q : Rat) (a : T.Elem) :

              Rational scalar multiplication acts on every mixed-radix coordinate.

              Equations
              Instances For

                Natural powers by repeated tower multiplication.

                Equations
                Instances For

                  Integer powers from natural powers and inversion, with 0⁻¹ = 0.

                  Equations
                  Instances For
                    @[instance_reducible]
                    Equations
                    @[instance_reducible]
                    Equations
                    @[instance_reducible, instance 90]
                    Equations
                    @[simp]
                    theorem Hex.NumberTower.coeffs_smul {T : NumberTower} (q : Rat) (a : T.Elem) :
                    coeffs (q a) = Array.map (fun (c : Rat) => q * c) (coeffs a)

                    Rational scalar multiplication exposes coordinatewise multiplication.

                    @[reducible, inline]

                    Dense univariate polynomials over a fixed tower.

                    Equations
                    Instances For