AFTD Auto-Formalizing Theoretical Domains

odd_squarefree_indicator_one

theoremverified

The odd square-free indicator of $1$ is equal to $1$.

Statement

theorem odd_squarefree_indicator_one : odd_squarefree_indicator 1 = 1
Source
arXiv:2611.05898, An Asymptotic for E. P. Stein Numbers, Definition 2.1
Verified
09 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3
  • 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…
  • TotalPreorderA total preorder: a preorder where ≤ is total (complete). This is weaker than LinearOrder — it does NOT require antisymmetry or…
  • LinearOrder.toTotalPreorderEvery LinearOrder is a TotalPreorder.

Read back from the Lean

The value of odd_squarefree_indicator evaluated at 1 is equal to 1.

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

The indicator $\text{odd\_squarefree\_indicator}(1)$ is defined by a case distinction: it equals $1$ if no square of an odd prime divides $1$, and $0$ otherwise. When this condition holds, the equation reduces to $1 = 1$, which is trivially true. The alternative branch is impossible because any prime divisor $p$ satisfies $p \ge 2$, which implies $p^2 \ge 4 > 1$, contradicting the requirement that $p^2 \mid 1$.

  1. Unfolding the definition of `odd_squarefree_indicator 1`, the equation holds when the square-free condition is satisfied.

    Unfolding `odd_squarefree_indicator 1` yields an if-then-else expression checking whether every odd prime has a square not dividing $1$. Splitting into cases on this condition (`split_ifs with h`), the positive branch evaluates the indicator to $1$, leaving $1 = 1$, which holds immediately by reflexivity (`rfl`).

    lines 3–5

      unfold odd_squarefree_indicator
      split_ifs with h
      · rfl
  2. In the remaining branch where the condition is assumed to fail, it suffices to derive a contradiction from the existence of an odd prime $p$ such that $p^2 \mid 1$.

    In the negative branch, the indicator evaluates to $0$, producing the false assumption $0 = 1$. By the principle of explosion (`exfalso`), it suffices to refute the negation of the condition (`apply h`). We then introduce an arbitrary prime $p$, the assumption $p \neq 2$, and the assumption $p^2 \mid 1$, with the goal of deriving a contradiction.

    lines 6–8

      · exfalso
        apply h
        intro p hp hp2 hp_sq
  3. No prime $p$ can satisfy $p^2 \mid 1$, completing the contradiction.

    Since $1 > 0$ and $p^2 \mid 1$, we have $p^2 \le 1$ by `Nat.le_of_dvd` and `Nat.one_pos`. On the other hand, since $p$ is prime, $p \ge 2$. Non-linear arithmetic (`nlinarith`) closes the goal because $p \ge 2$ implies $p^2 \ge 4$, which contradicts $p^2 \le 1$.

    lines 9–11

    uses Nat.le_of_dvd, Nat.one_pos

        have : p ^ 2 ≤ 1 := Nat.le_of_dvd Nat.one_pos hp_sq
        have hp_ge : 2 ≤ p := hp.two_le
        nlinarith
Nat.le_of_dvd
A positive natural number is greater than or equal to any of its natural divisors: if $0 < n$ and $m \mid n$, then $m \le n$.
Nat.one_pos
The natural number $1$ is strictly positive ($0 < 1$).

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 1 is 1. -/theorem odd_squarefree_indicator_one : odd_squarefree_indicator 1 = 1 := by  unfold odd_squarefree_indicator  split_ifs with h  · rfl  · exfalso    apply h    intro p hp hp2 hp_sq    have : p ^ 2 ≤ 1 := Nat.le_of_dvd Nat.one_pos hp_sq    have hp_ge : 2 ≤ p := hp.two_le    nlinarith
See it in the graphDiscuss this resultChallenge it