Documentation

TauCeti.Data.Nat.ExactDivisor

Exact divisors of a natural number #

Q is an exact divisor of N when Q ∣ N and Q is coprime to the complementary divisor N / Q; equivalently, N = Q · M with Q and M sharing no prime. Such a Q collects the full power of each prime it contains, so the exact divisors of N are exactly the products of the maximal prime powers p ^ (N.factorization p), and they form a Boolean algebra under the subsets of N.primeFactors. The notion is also called a unitary or Hall divisor.

The classical notation is Q ‖ N, which cannot be used here: ‖ ‖ is norm notation, and in the same corner of the library p ^ r ‖ n means exact p-adic divisibility — that r is the full exponent of p, a statement about the pair (p, r) rather than about the single number p ^ r. The notation introduced instead is Q ∥ N, with the parallel bars ∥ in place of the double vertical line ‖; it is scoped, so it never competes with the ∥ of AffineSubspace.Parallel.

Main definitions #

Notation #

Main results #

Q is an exact divisor of N: it divides N and is coprime to the complementary divisor N / Q. Written Q ‖ N in the literature and Q ∥ N here; see the module docstring for the change of bars.

  • dvd : Q ∣ N

    An exact divisor is a divisor.

  • coprime : Q.Coprime (N / Q)

    An exact divisor is coprime to its complementary divisor.

Instances For

    Q is an exact divisor of N: it divides N and is coprime to the complementary divisor N / Q. Written Q ‖ N in the literature and Q ∥ N here; see the module docstring for the change of bars.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      An exact divisor is nonzero. 0 is only a divisor of 0, whose complementary divisor is again 0, and Nat.Coprime 0 0 is false.

      theorem TauCeti.Nat.IsExactDivisor.pos {N Q : ℕ} (h : IsExactDivisor Q N) :
      0 < Q

      An exact divisor is positive.

      @[simp]

      The defining conditions of an exact divisor, as a rewrite rule.

      theorem TauCeti.Nat.IsExactDivisor.div {N Q : ℕ} (h : IsExactDivisor Q N) (hN : N ≠ 0) :

      The complementary divisor is exact. For N ≠ 0, N / Q is again an exact divisor of N, whose own complement is Q again (Nat.div_div_self). At N = 0 this fails: 1 is an exact divisor of 0, but 0 / 1 = 0 is not.

      1 is an exact divisor of every N.

      A nonzero N is an exact divisor of itself: the complementary divisor is 1. This is the case of the Fricke operator inside the Atkin–Lehner family.

      theorem TauCeti.Nat.IsExactDivisor.mul {N Q R : ℕ} (hQ : IsExactDivisor Q N) (hR : IsExactDivisor R N) (hQR : Q.Coprime R) :

      Coprime exact divisors multiply. The exact divisors of N are therefore closed under coprime products, which is how the family generated by the maximal prime powers of N is built up.

      The Boolean-algebra structure #

      The only exact divisor of 0 is 1. The complementary divisor of Q in 0 is 0 again, and Nat.Coprime Q 0 says Q = 1. This is what lets the closure properties below carry no N ≠ 0 hypothesis.

      Exactness, read on the factorization. For N ≠ 0, a divisor Q of N is exact exactly when at every prime its exponent is either 0 or the full exponent of N. In this form the closure properties below become statements about the exponents of gcd and of a quotient, namely about min and truncated subtraction.

      theorem TauCeti.Nat.IsExactDivisor.gcd {N Q R : ℕ} (hQ : IsExactDivisor Q N) (hR : IsExactDivisor R N) :

      Exact divisors are closed under gcd. At each prime the exponent of gcd Q R is the minimum of two exponents each of which is 0 or the full exponent of N.

      theorem TauCeti.Nat.IsExactDivisor.div_gcd {N Q R : ℕ} (hQ : IsExactDivisor Q N) (hR : IsExactDivisor R N) :
      IsExactDivisor (Q / Q.gcd R) N

      The quotient of an exact divisor by a gcd with another one is exact. At each prime the exponent of Q / gcd Q R is 0 unless Q carries the full exponent of N there and R carries none, in which case it is again that full exponent.

      theorem TauCeti.Nat.IsExactDivisor.coprime_div_gcd {N Q R : ℕ} (hQ : IsExactDivisor Q N) (hR : IsExactDivisor R N) :
      (Q / Q.gcd R).Coprime R

      Q / gcd Q R is coprime to R. A prime dividing the quotient carries the full exponent of N in Q and none of it in R; this is the step where the exactness of both divisors is used, and it fails for divisors in general (Q = 4, R = 2).

      theorem TauCeti.Nat.IsExactDivisor.mul_div_gcd_sq {N Q R : ℕ} (hQ : IsExactDivisor Q N) (hR : IsExactDivisor R N) :
      IsExactDivisor (Q * R / Q.gcd R ^ 2) N

      The symmetric difference of two exact divisors is exact. Q * R / gcd (Q, R) ^ 2 is the product of the coprime exact divisors Q / gcd (Q, R) and R / gcd (Q, R); under the identification of exact divisors with subsets of N.primeFactors it is the symmetric difference, which is why it is the composition law of the Atkin–Lehner family.

      Exact divisors from sets of primes #

      The exact divisor of N supported on a set of primes: the product ∏ p ∈ s, p ^ v_p(N) of the maximal prime powers of N at the primes of s. For s ⊆ N.primeFactors this is the exact divisor of N whose prime factors are exactly s (TauCeti.Nat.isExactDivisor_prodPrimePow, TauCeti.Nat.primeFactors_prodPrimePow), and every exact divisor arises this way (TauCeti.Nat.IsExactDivisor.prodPrimePow_primeFactors).

      Equations
      Instances For
        @[simp]

        The empty set cuts out the exact divisor 1.

        @[simp]
        theorem TauCeti.Nat.prodPrimePow_insert {N : ℕ} {s : Finset ℕ} {q : ℕ} (hq : q ∉ s) :

        Adjoining a prime multiplies by its maximal power: ∏ p ∈ insert q s, p ^ v_p(N) is q ^ v_q(N) times the product over s, for q ∉ s.

        The exponents of ∏ p ∈ s, p ^ v_p(N): the full exponent of N at the primes of s, and 0 elsewhere.

        A finite set cuts out an exact divisor. Indices outside N.primeFactors have exponent zero and contribute 1, while the remaining product consists of maximal prime powers of N.

        The prime factors of ∏ p ∈ s, p ^ v_p(N) are s, so distinct subsets of N.primeFactors cut out distinct exact divisors.

        The maximal prime powers are exact divisors. This also holds when the exponent is zero, in which case the power is 1. These generate the family: every exact divisor is a product of them (TauCeti.Nat.IsExactDivisor.prodPrimePow_primeFactors).

        theorem TauCeti.Nat.coprime_primePow_prodPrimePow {N : ℕ} {s : Finset ℕ} {p : ℕ} (hps : p ∉ s) :

        A maximal prime power is prime to the product over the other primes: p ^ v_p(N) is coprime to ∏ q ∈ s, q ^ v_q(N) for p ∉ s.

        An exact divisor of N only involves primes of N.

        Every exact divisor is the product of the maximal prime powers it contains: the exponents of an exact divisor are those of N at the primes dividing it. This is the prime-power generation of the Atkin–Lehner family.

        The exact-divisor group #

        The exact divisors of N, bundled as a group. Multiplication is symmetric difference: the value of Q * R is Q R / gcd(Q, R)². Every element is its own inverse, and the identity is the exact divisor 1.

        • val : ℕ

          The underlying natural-number divisor.

        • property : IsExactDivisor self.val N

          The underlying value is an exact divisor of N.

        Instances For
          theorem TauCeti.Nat.ExactDivisor.ext {N : ℕ} {Q R : ExactDivisor N} (h : Q.val = R.val) :
          Q = R

          Two exact divisors are equal when their underlying natural numbers are equal.

          @[instance_reducible]
          Equations
          @[instance_reducible]

          Multiplication of exact divisors is symmetric difference, with underlying value Q * R / gcd(Q, R) ^ 2.

          Equations
          @[instance_reducible]

          Inversion is the identity because every exact divisor is self-inverse under symmetric difference.

          Equations
          @[simp]

          The identity exact divisor has underlying value 1.

          @[simp]
          theorem TauCeti.Nat.ExactDivisor.val_mul {N : ℕ} (Q R : ExactDivisor N) :
          (Q * R).val = Q.val * R.val / Q.val.gcd R.val ^ 2

          Multiplication of exact divisors is symmetric difference: its underlying value is Q R / gcd(Q, R)².

          @[simp]

          Every exact divisor is its own inverse.

          An exact divisor of N is determined by the set of primes dividing it.

          Prime factors turn exact-divisor multiplication into symmetric difference.

          @[instance_reducible]

          Exact divisors form a Boolean commutative group under symmetric-difference multiplication; the identity is 1 and every element is its own inverse.

          Equations
          • One or more equations did not get rendered due to their size.

          The exact divisors of N are exactly the subsets of N.primeFactors. An exact divisor goes to the set of primes dividing it, and a subset s comes back as the product ∏ p ∈ s, p ^ v_p(N) of maximal prime powers. Since primeFactors_mul carries multiplication to symmetric difference and val_inv makes every element its own inverse, this identifies the group of exact divisors with the Boolean group of subsets of N.primeFactors — abstractly (ℤ/2) ^ ω(N), generated by the maximal prime powers p ^ v_p(N).

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            @[simp]

            primeFactorsEquiv sends an exact divisor to its set of prime factors.

            @[simp]

            primeFactorsEquiv recovers an exact divisor from a set of primes as a product of maximal prime powers.