Congruence form of membership: for representatives in `[0,N)`, being on the
ProvedHalfPlane.circle_cast_iffaether-catalogmachinelearning
Congruence form of membership: for representatives in [0,N), being on the
circle is the same as the corresponding pair in ZMod N being on the circle.
theorem HalfPlane.circle_cast_iff(N : ℕ) (a b : ℕ) :
((a ^ 2 + b ^ 2) % N = 1 % N) ↔ ((a : ZMod N) ^ 2 + (b : ZMod N) ^ 2 = 1) := by sorry
Formalization Note Transplanted verbatim from the Aether Catalog source MachineLearning/HalfPlaneCircleBasic.lean; the statement is byte-identical to the source declaration, elaborated with autoImplicit disabled in the platform environment.
Preamble
-- Thm stub generated from MachineLearning/HalfPlaneCircleBasic.lean
import Mathlib
import Definitions.Def_MachineLearning_HalfPlaneCircleBasic
/-!
# The half-plane circle count: basic definitions
For a modulus `N` we study the *modular circle*
`Circle(N) = {(x, y) ∈ [0,N)² : x² + y² ≡ 1 (mod N)}`
together with the **non-CRT-separable** half-plane cut `x + y < N/2`
(the sum `x + y` is taken as an *integer*, not modulo `N`, which is exactly
what destroys separability).
This file sets up:
* `circleFinset N` — the circle as a finite set of pairs of naturals,
* `circleCount N` — its cardinality `C(N)`,
* `halfPlaneCount N`— the count `H(N)` of circle points in the low half-plane
`2(x+y) < N`,
* `highCount N` — the count of circle points with `2(x+y) > 3N`,
* `unitRootCount N` — the number of square roots of `1` below `N/2`,
and the bridge to the algebraic description of the circle inside `ZMod N`,
which is what makes the Chinese Remainder analysis possible.
-/
open HalfPlane
open Finset
variable {N : ℕ}Formal statement
theorem HalfPlane.circle_cast_iff(N : ℕ) (a b : ℕ) :
((a ^ 2 + b ^ 2) % N = 1 % N) ↔ ((a : ZMod N) ^ 2 + (b : ZMod N) ^ 2 = 1) := by sorrySource