AFTD Auto-Formalizing Theoretical Domains

good_slopes_missing_prime165

theoremverified

For a permutation modulo 165 and each prime divisor p, some residue modulo p is not attained by any good slope.

Statement

theorem good_slopes_missing_prime165 (p : ℕ) [NeZero p] (hp : p = 3 ∨ p = 5 ∨ p = 11) (hd : p ∣ 165) (f : Equiv.Perm (ZMod 165)) : ∃ a : ZMod p, ∀ m ∈ good_slopes 165 f, ZMod.castHom hd (ZMod p) m ≠ a
Source
The prime-residue part of arXiv:2611.01465, Theorem 3.1, specialized to 165.
Verified
18 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2
  • good_slopesGiven a natural number n with n ≠ 0 (via [NeZero n]) and a permutation f of ℤ/nℤ, good_slopes n f is the finite set (Finset) of elements m…
  • good_slopes_missing_prime_squarefreeLet n be squarefree and nonzero, let the prime p divide n, and let f be a permutation modulo n. Then some residue modulo p is missed by…
Used by 1

The proof, explained

The theorem is proved by applying a general result for squarefree moduli (`good_slopes_missing_prime_squarefree`) to n = 165 and each prime divisor p ∈ {3, 5, 11}. A helper lemma first establishes that 165 is squarefree by showing that 3, 5, and 11 are prime and pairwise coprime. For any p in {3, 5, 11}, primality is verified by exhaustive case analysis, after which the general theorem immediately yields a missing residue class modulo p.

  1. The natural number 165 is squarefree.

    The primes 3, 5, and 11 are verified by numerical computation (`norm_num`). Since 3 and 5 are coprime, their product 15 is squarefree by `Nat.squarefree_mul`. Coprimality of 15 and 11 then implies that their product (3 * 5) * 11 = 165 is squarefree, again by `Nat.squarefree_mul`.

    lines 1–9

    uses Nat.squarefree_mul

    private theorem in962_missing_squarefree165 : Squarefree 165 := by
      have hp3 : Nat.Prime 3 := by norm_num
      have hp5 : Nat.Prime 5 := by norm_num
      have hp11 : Nat.Prime 11 := by norm_num
      have h : Squarefree ((3*5)*11 : ℕ) :=
        (Nat.squarefree_mul (by norm_num)).2
          ⟨(Nat.squarefree_mul (by norm_num)).2 ⟨hp3.squarefree, hp5.squarefree⟩,
           hp11.squarefree⟩
      exact h
  2. The divisor p is prime.

    We perform a case split on the hypothesis hp : p = 3 ∨ p = 5 ∨ p = 11. In each of the three branches, primality of the explicit constant (3, 5, or 11) is decided by computation (`decide`).

    lines 11–12

    theorem good_slopes_missing_prime165 (p : ℕ) [NeZero p] (hp : p = 3 ∨ p = 5 ∨ p = 11) (hd : p ∣ 165) (f : Equiv.Perm (ZMod 165)) : ∃ a : ZMod p, ∀ m ∈ good_slopes 165 f, ZMod.castHom hd (ZMod p) m ≠ a := by
      have hprime : Nat.Prime p := by rcases hp with rfl | rfl | rfl <;> decide
  3. There exists a residue modulo p that is not attained by any good slope of f modulo p.

    We invoke the general theorem `good_slopes_missing_prime_squarefree` with modulus 165, the prime divisor p, the lemma `in962_missing_squarefree165` showing that 165 is squarefree, the primality proof `hprime`, the divisibility hypothesis `hd`, and the permutation `f`.

    line 13

    uses good_slopes_missing_prime_squarefree, in962_missing_squarefree165

      exact good_slopes_missing_prime_squarefree 165 p in962_missing_squarefree165 hprime hd f
Nat.squarefree_mul
A product of two coprime natural numbers is squarefree if and only if both factors are squarefree.
in962_missing_squarefree165
The natural number 165 is squarefree.
good_slopes_missing_prime_squarefree
For any squarefree positive integer n, prime divisor p of n, and permutation f of ℤ/nℤ, there exists a residue modulo p not attained by any good slope of f.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

private theorem in962_missing_squarefree165 : Squarefree 165 := by  have hp3 : Nat.Prime 3 := by norm_num  have hp5 : Nat.Prime 5 := by norm_num  have hp11 : Nat.Prime 11 := by norm_num  have h : Squarefree ((3*5)*11 : ℕ) :=    (Nat.squarefree_mul (by norm_num)).2      ⟨(Nat.squarefree_mul (by norm_num)).2 ⟨hp3.squarefree, hp5.squarefree⟩,       hp11.squarefree⟩  exact htheorem good_slopes_missing_prime165 (p : ℕ) [NeZero p] (hp : p = 3 ∨ p = 5 ∨ p = 11) (hd : p ∣ 165) (f : Equiv.Perm (ZMod 165)) : ∃ a : ZMod p, ∀ m ∈ good_slopes 165 f, ZMod.castHom hd (ZMod p) m ≠ a := by  have hprime : Nat.Prime p := by rcases hp with rfl | rfl | rfl <;> decide  exact good_slopes_missing_prime_squarefree 165 p in962_missing_squarefree165 hprime hd f
See it in the graphDiscuss this resultChallenge it