Divisor equivalences, factor pairs, and shifted-index sums #
For N ≠ 0, the divisors d of N with a = N + d (respectively a = N - d) are at most one,
and such a divisor exists exactly when a - N divides N (respectively N - a divides a).
These lemmas evaluate the corresponding indicator sums over N.divisors.
Nat.sum_divisorsAntidiagonal_ite_dvd regroups a sum over the factor pairs (a, b) of n,
restricted to a ∣ m, as a sum over the divisors of gcd(m, n).
Int.pos_pos_mul_eq_of_mem_divisorsAntidiagonal_toNat and
Int.prodMk_toNat_mem_divisorsAntidiagonal_toNat identify the pairs of
n.toNat.divisorsAntidiagonal, for an integer n, with the factorisations of n into two positive
integers.
Nat.sum_divisorsAntidiagonal_filter_sub evaluates differences over the factor pairs with
strictly increasing factors. Nat.injOn_add_divisorsAntidiagonal_filter_lt and
Int.isSquare_sq_sub_four_mul_iff_exists_mem_divisorsAntidiagonal identify those factor pairs
by their sum and by a positive square discriminant.
TauCeti.nontrivialDivisorEquiv identifies divisors greater than one with the subtype of
N.divisors omitting the unit divisor.
Regrouping a sum over the factor pairs (a, b) of n ≠ 0, restricted to a ∣ m, by the
divisors d of gcd(m, n): the pair (d, n / d) contributes f d (m * n / d ^ 2), since
(n / d) * (m / d) = m * n / d ^ 2.
On the factor pairs with increasing factors, subtracting the value at the smaller factor from that at the larger factor is the full divisor sum minus the sum at the minimum factor.
A factor pair with strictly increasing factors is determined by its sum.