Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Congruence for units of order ppp modulo pnp^npn (Lema 4.5.2)

Proved
Castro2006.lema_4_5_2

by LG · Nov 18, 2026 · Mathlib 0df444a (Lean v4.33.1)

congruencesnumber-theory

Let ppp be prime, aaa an integer, n≥2n\ge2n≥2, with ap≡1(modpn)a^p\equiv1\pmod{p^n}ap≡1(modpn) but a≢1(modpn)a\not\equiv1\pmod{p^n}a≡1(modpn). If ppp is odd then a≡1(modpn−1)a\equiv1\pmod{p^{n-1}}a≡1(modpn−1); if p=2p=2p=2 then a≡±1(mod2n−1)a\equiv\pm1\pmod{2^{n-1}}a≡±1(mod2n−1).

Preamble
import Mathlib
Formal statement
namespace Castro2006
theorem lema_4_5_2 {p : ℕ} (hp : p.Prime) (a : ℤ) (n : ℕ) (hn : 2 ≤ n)
    (hap : a ^ p ≡ 1 [ZMOD p ^ n]) (ha1 : ¬(a ≡ 1 [ZMOD p ^ n])) :
    (p ≠ 2 → a ≡ 1 [ZMOD p ^ (n - 1)]) ∧
    (p = 2 → (a ≡ 1 [ZMOD 2 ^ (n - 1)] ∨ a ≡ -1 [ZMOD 2 ^ (n - 1)])) := by sorry
end Castro2006
Source
https://web.archive.org/web/20070509023602/http://www.mat.ibilce.unesp.br/posgraduacao/dissertacoes/dissertacao_Francielle.pdf
Read-back

What the Lean code literally says, in plain math · Qwen (same-model blind pass; not an independent sub-agent)

Let ppp be prime, aaa an integer, and nnn a natural number with n≥2n\ge2n≥2. Assume ap≡1(modpn)a^{p}\equiv1\pmod{p^{n}}ap≡1(modpn) but a≢1(modpn)a\not\equiv1\pmod{p^{n}}a≡1(modpn) (integer congruences, Int.ModEq). The conclusion is a conjunction of two implications: (i) if p≠2p\ne2p=2 then a≡1(modp n−1)a\equiv1\pmod{p^{\,n-1}}a≡1(modpn−1); (ii) if p=2p=2p=2 then a≡1(mod2 n−1)a\equiv1\pmod{2^{\,n-1}}a≡1(mod2n−1) or a≡−1(mod2 n−1)a\equiv-1\pmod{2^{\,n-1}}a≡−1(mod2n−1). Because n≥2n\ge2n≥2, the exponent n−1n-1n−1 is at least 111, so no truncated natural subtraction occurs. The statement does not mention the auxiliary quantity d(a)d(a)d(a) (the largest ddd with a≡1(modpd)a\equiv1\pmod{p^d}a≡1(modpd)); it packages the two cases as the single disjunction a≡±1(mod2n−1)a\equiv\pm1\pmod{2^{n-1}}a≡±1(mod2n−1) when p=2p=2p=2.

Human review
  • Endorsed by Shuze Chen · Nov 18, 2026

    Confirmed by the moderator at approval.

  • Endorsed by LG · Nov 18, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me