AFTD Auto-Formalizing Theoretical Domains

odd_squarefree_indicator_prime_sq

theoremverified

For any prime natural number $p$ with $p \neq 2$, the odd square-free indicator of $p^2$ is equal to $0$.

Statement

theorem odd_squarefree_indicator_prime_sq (p : ℕ) (hp : p.Prime) (hp2 : p ≠ 2) :
    odd_squarefree_indicator (p ^ 2) = 0
Source
arXiv:2611.05898, An Asymptotic for E. P. Stein Numbers, Definition 2.1
Verified
09 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • odd_squarefree_indicatorThe integer-valued odd square-free indicator $\mu^*(d) \in \mathbb{Z}$, for a natural number $d$, is defined to be $1$ if for every prime…

Read back from the Lean

For any natural number $p$, if $p$ is prime and $p \neq 2$, then odd_squarefree_indicator (p ^ 2) equals 0 (as an integer).

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

By definition, the odd square-free indicator of an integer is $1$ if no square of an odd prime divides it, and $0$ otherwise. To show that the indicator of $p^2$ is $0$, it suffices to show that this defining condition is false. Assuming the condition holds for $p^2$ and instantiating it with $p$ itself—which is prime and odd ($p \\neq 2$)—yields $\\neg(p^2 \\mid p^2)$, contradicting the reflexivity of divisibility.

  1. It suffices to show that the condition defining the indicator fails for $p^2$.

    Unfolding the definition of `odd_squarefree_indicator`, the indicator of $p^2$ is defined as `if ∀ q, q.Prime → q ≠ 2 → ¬(q^2 ∣ p^2) then 1 else 0`. By `if_neg`, this expression equals $0$ provided that the condition is false, that is, ¬(∀ q, q.Prime → q ≠ 2 → ¬(q^2 ∣ p^2)).

    lines 4–5

    uses if_neg

      simp only [odd_squarefree_indicator]
      rw [if_neg]
  2. The defining condition fails, completing the proof.

    Assume for contradiction that the condition holds, so every prime $q \\neq 2$ satisfies $\\neg(q^2 \\mid p^2)$. Instantiating this universal hypothesis with $q = p$, which is prime by assumption `hp` and not equal to $2$ by assumption `hp2`, yields $\\neg(p^2 \\mid p^2)$. This directly contradicts the fact that $p^2 \\mid p^2$ by reflexivity of divisibility (`dvd_rfl`), producing `False`.

    lines 6–7

    uses dvd_rfl

      intro h
      exact h p hp hp2 dvd_rfl
if_neg
If a proposition $c$ is false, then the conditional expression `if c then t else e` evaluates to `e`.
dvd_rfl
Divisibility is reflexive: any element divides itself ($a \\mid a$).

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

/-- The odd square-free indicator of the square of an odd prime is 0. -/theorem odd_squarefree_indicator_prime_sq (p : ℕ) (hp : p.Prime) (hp2 : p ≠ 2) :    odd_squarefree_indicator (p ^ 2) = 0 := by  simp only [odd_squarefree_indicator]  rw [if_neg]  intro h  exact h p hp hp2 dvd_rfl
See it in the graphDiscuss this resultChallenge it