AFTD Auto-Formalizing Theoretical Domains

good_slopes_unit_cover_mod165

theoremverified

For every permutation modulo 165, a unit c exists such that adding c to each good slope yields a unit modulo 165.

Statement

theorem good_slopes_unit_cover_mod165 (f : Equiv.Perm (ZMod 165)) : ∃ c : ZMod 165, IsUnit c ∧ ∀ m ∈ good_slopes 165 f, IsUnit (m+c)
Source
The modulus-165 instance of arXiv:2611.01465, Theorem 3.1(i), for OP-1027.
Verified
18 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3
  • 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_prime165For a permutation modulo 165 and each prime divisor p, some residue modulo p is not attained by any good slope.
  • good_slopes_unit_cover_squarefreeFor every nonzero squarefree modulus and permutation, some unit can be added to all its good slopes to make them units.
Used by 1

The proof, explained

The theorem is proved by applying the general result `good_slopes_unit_cover_squarefree`, which guarantees the existence of such an invertible shift c for any permutation over ℤ/nℤ whenever n is squarefree. Modulo 165, squarefreeness follows from factoring 165 = 3 * 5 * 11 into pairwise coprime primes and repeatedly applying `Nat.squarefree_mul`.

  1. The numbers 3, 5, and 11 are prime natural numbers.

    We establish that each of 3, 5, and 11 is prime by direct arithmetic evaluation (`norm_num`).

    lines 2–4

      have hp3 : Nat.Prime 3 := by norm_num
      have hp5 : Nat.Prime 5 := by norm_num
      have hp11 : Nat.Prime 11 := by norm_num
  2. The integer 165 is squarefree.

    Since 3 and 5 are prime, they are squarefree. Because 3 and 5 are coprime (verified by `norm_num`), their product 15 is squarefree by `Nat.squarefree_mul`. Similarly, 15 and 11 are coprime and 11 is prime (hence squarefree), so applying `Nat.squarefree_mul` again shows that (3 * 5) * 11 = 165 is squarefree.

    lines 5–9

    uses Nat.squarefree_mul

      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
  3. There exists a unit c modulo 165 such that m + c is a unit modulo 165 for every good slope m of f.

    We apply the general theorem `good_slopes_unit_cover_squarefree` with modulus n = 165, the lemma `in962_cover_squarefree165` establishing that 165 is squarefree, and the given permutation f.

    line 12

    uses good_slopes_unit_cover_squarefree, in962_cover_squarefree165

      exact good_slopes_unit_cover_squarefree 165 in962_cover_squarefree165 f
Nat.squarefree_mul
A product of two coprime natural numbers is squarefree if and only if both factors are squarefree.
good_slopes_unit_cover_squarefree
For any squarefree modulus n and any permutation f of ℤ/nℤ, there exists an invertible element c modulo n such that m + c is invertible modulo n for every good slope m of f.
in962_cover_squarefree165
The natural number 165 is squarefree.

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_cover_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_unit_cover_mod165 (f : Equiv.Perm (ZMod 165)) : ∃ c : ZMod 165, IsUnit c ∧ ∀ m ∈ good_slopes 165 f, IsUnit (m+c) := by  exact good_slopes_unit_cover_squarefree 165 in962_cover_squarefree165 f
See it in the graphDiscuss this resultChallenge it