Documentation

TauCeti.NumberTheory.BinaryQuadraticForm.Content

Content and primitive forms of fixed discriminant #

The content of an integral binary quadratic form is the nonnegative gcd of its three coefficients. Dividing by it gives a primitive form whenever the original form is nonzero. The content is also the gcd of all represented values, which makes it invariant under proper integral changes of variables. Scaling the form multiplies its content by the absolute value of the scalar and its discriminant by the scalar's square. Dividing a nonzero integer vector by its gcd gives coprime coordinates and divides every represented value by the square of that gcd.

The invariance of discriminant and primitivity packages primitive forms of a fixed discriminant in the subaction primitiveForms D, stable under SL(2, ℤ). This gives the carrier for proper-equivalence and orbit constructions among forms of that discriminant. Intersecting with the positive definite forms gives PosDefProperClass n, the proper equivalence classes of primitive positive definite forms of discriminant -n.

Two forms (a, B, a'C) and (a', B, aC) sharing the middle coefficient have Dirichlet composition (aa', B, C), of the same discriminant B² - 4aa'C; if both are primitive so is the composition (isPrimitive_mk_mul_of_isPrimitive). The principal form of discriminant D ≡ 0, 1 mod 4 is x² + δxy + ((δ - D)/4)y² with δ = D mod 2 (principalForm); it is primitive of discriminant D, and positive definite when D < 0.

References #

theorem TauCeti.BinaryQuadraticForm.exists_isCoprime_eval_eq_gcd_sq_mul (f : BinaryQuadraticForm ℤ) (x y : ℤ) (hxy : x ≠ 0 ∨ y ≠ 0) :
∃ (u : ℤ) (v : ℤ), IsCoprime u v ∧ x = u * ↑(x.gcd y) ∧ y = v * ↑(x.gcd y) ∧ f.eval x y = ↑(x.gcd y) ^ 2 * f.eval u v

Dividing a nonzero integer vector by its gcd gives coprime coordinates and scales its represented value by the square of the gcd.

The nonnegative gcd of the three coefficients of an integral binary quadratic form.

Instances For

    The content is the gcd of the leading coefficient and the gcd of the other two.

    @[simp]

    The zero form has content zero.

    An integral binary quadratic form is primitive when its coefficients have gcd one.

    Instances For

      Primitivity is equivalent to content one.

      @[simp]

      The zero form is not primitive.

      A primitive integral form is nonzero.

      The coefficients of an integral form have a Bézout relation for its content.

      The coefficients of a primitive form have an integral Bézout relation.

      The coefficients of a primitive form generate the unit ideal of every commutative ring R.

      A natural number divides the content exactly when it divides all three coefficients.

      The content divides the leading coefficient.

      The content divides the middle coefficient.

      The content divides the last coefficient.

      An integral Bézout relation among the coefficients makes the form primitive.

      @[simp]

      Content zero occurs exactly for the form with all coefficients zero.

      Every nonzero binary quadratic form has positive content.

      @[simp]

      The content of a scalar multiple is the absolute scalar times the original content.

      @[simp]

      Natural scalar multiplication multiplies the content by that scalar.

      @[simp]

      Negation preserves the content.

      Divide all three coefficients by the content. The zero form has zero primitive part.

      Instances For
        @[simp]

        The leading coefficient of the primitive part.

        @[simp]

        The middle coefficient of the primitive part.

        @[simp]

        The last coefficient of the primitive part.

        @[simp]

        The primitive part of the zero form is zero.

        @[simp]

        The original form is its content times its primitive part, including for the zero form.

        @[simp]

        A form has zero primitive part exactly when the form itself is zero.

        The primitive part of a nonzero form has content one.

        @[simp]

        A primitive form is its own primitive part.

        A scalar multiple of a primitive form has content the absolute scalar.

        Primitive normalization of a scalar multiple retains only the sign of the scalar. The formula also holds when either the scalar or the form is zero.

        For a primitive form, scalar normalization retains the sign times the form itself.

        @[simp]

        Primitive normalization commutes with negation.

        The decomposition into positive content and a primitive form is unique.

        A form's discriminant is the square of its content times its primitive discriminant.

        Divisibility of every represented value is equivalent to divisibility of the content.

        @[simp]

        Proper integral changes of variables preserve the content.

        @[simp]

        Primitivity is preserved by proper integral changes of variables.

        Primitive forms of fixed discriminant, with the proper special-linear action.

        Instances For
          @[simp]

          Membership in the primitive fixed-discriminant forms.

          @[simp]

          A form is primitive positive definite of discriminant -n exactly when it has discriminant -n, positive leading coefficient and coprime coefficients.

          @[reducible, inline]

          The proper equivalence classes of primitive positive definite forms of discriminant -n.

          Instances For

            Taking primitive parts commutes with proper integral changes of variables.

            @[simp]

            The discriminant of a primitive part is invariant under proper changes of variables.

            Dirichlet composition of united forms #

            theorem TauCeti.BinaryQuadraticForm.discrim_mk_mul_left (a a' B C : ℤ) :
            { a := a, b := B, c := a' * C }.discrim = { a := a * a', b := B, c := C }.discrim

            The forms (a, B, a'C) and (aa', B, C) have the same discriminant B² - 4aa'C.

            theorem TauCeti.BinaryQuadraticForm.discrim_mk_mul_right (a a' B C : ℤ) :
            { a := a', b := B, c := a * C }.discrim = { a := a * a', b := B, c := C }.discrim

            The forms (a', B, aC) and (aa', B, C) have the same discriminant B² - 4aa'C.

            theorem TauCeti.BinaryQuadraticForm.isPrimitive_mk_mul_of_isPrimitive {a a' B C : ℤ} (hf : { a := a, b := B, c := a' * C }.IsPrimitive) (hg : { a := a', b := B, c := a * C }.IsPrimitive) :
            { a := a * a', b := B, c := C }.IsPrimitive

            The Dirichlet composition of primitive united forms is primitive. If (a, B, a'C) and (a', B, aC) are primitive, then so is (aa', B, C).

            The principal form #

            The principal form of discriminant D, x² + δxy + ((δ - D)/4)y² with δ = D mod 2. For D ≡ 0, 1 mod 4 it has discriminant D (discrim_principalForm).

            Instances For
              @[simp]

              The leading coefficient of the principal form is 1.

              @[simp]

              The middle coefficient of the principal form is D mod 2.

              @[simp]

              The last coefficient of the principal form is (D mod 2 - D) / 4.

              The principal form of discriminant D ≡ 0, 1 mod 4 has discriminant D.

              The principal form is a primitive form of discriminant D ≡ 0, 1 mod 4.

              The principal form of discriminant -n is primitive positive definite.