Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
9d1a7b1
feat: add continuous Weyl criterion on finite tori
DomTheDeveloper Jul 22, 2026
62ab606
feat(OEIS): formalize A261865 density statement
DomTheDeveloper Jul 22, 2026
6550ee3
proof(OEIS): remove the interval conversion axiom
DomTheDeveloper Jul 22, 2026
74a15d1
Add square-factor reduction for A261865
DomTheDeveloper Jul 22, 2026
6f7cb91
Normalize A261865 square-factor reduction
DomTheDeveloper Jul 22, 2026
8463734
Fix square-factor simplification
DomTheDeveloper Jul 22, 2026
a845c11
noop
DomTheDeveloper Jul 22, 2026
b2ad1c9
Remove accidental empty marker
DomTheDeveloper Jul 22, 2026
e100c0f
noop
DomTheDeveloper Jul 22, 2026
ba0ca25
Remove accidental marker
DomTheDeveloper Jul 22, 2026
ec7dc4b
noop
DomTheDeveloper Jul 22, 2026
ead4d61
Remove accidental marker
DomTheDeveloper Jul 22, 2026
d13da75
Add temporary AXLE audit for A261865 development
DomTheDeveloper Jul 22, 2026
4877612
Develop squarefree radical independence for A261865
DomTheDeveloper Jul 22, 2026
2331262
Extend temporary AXLE audit to radical independence
DomTheDeveloper Jul 22, 2026
fc21fba
Add eigencharacter independence infrastructure
DomTheDeveloper Jul 22, 2026
41a0b9d
Add squarefree radical independence theorem
DomTheDeveloper Jul 22, 2026
92937cb
Import squarefree radical independence for A261865
DomTheDeveloper Jul 22, 2026
c847976
Use trace proof for squarefree radical independence
DomTheDeveloper Jul 22, 2026
60b2650
Remove superseded Galois character experiment
DomTheDeveloper Jul 22, 2026
acfd9b3
Add reciprocal squarefree radical independence
DomTheDeveloper Jul 22, 2026
cef9281
Prove Weyl equidistribution for torus rotations
DomTheDeveloper Jul 22, 2026
0a306b9
Fix Fourier mode norm calculation
DomTheDeveloper Jul 22, 2026
64670b8
Prove squarefree descent and reciprocal-radical independence
DomTheDeveloper Jul 22, 2026
df7be74
Characterize A261865 values by squarefree coordinates
DomTheDeveloper Jul 22, 2026
b2caf39
Add empirical probability bridge for torus rotations
DomTheDeveloper Jul 22, 2026
e6c1615
Add measurable arc geometry on the unit additive circle
DomTheDeveloper Jul 22, 2026
16cfbd6
Add finite torus rectangle geometry
DomTheDeveloper Jul 22, 2026
167174d
Relate circle arcs to fractional parts
DomTheDeveloper Jul 22, 2026
25e147e
Add real-valued Haar measures for circle arcs
DomTheDeveloper Jul 22, 2026
cdf94ed
Add real-valued Haar measure for torus rectangles
DomTheDeveloper Jul 22, 2026
4235282
Add empirical-measure density transfer
DomTheDeveloper Jul 22, 2026
691e7d4
Add finite-product continuity-set lemmas
DomTheDeveloper Jul 22, 2026
25befc8
Add measurable terminal arcs on the unit circle
DomTheDeveloper Jul 22, 2026
a30fa5b
Prove density of finite torus terminal boxes
DomTheDeveloper Jul 22, 2026
27aacc8
Add full A261865 density proof candidate
DomTheDeveloper Jul 22, 2026
4052caa
audit(OEIS): add exact A261865 theorem axiom check
DomTheDeveloper Jul 22, 2026
f6f6e6f
ci(OEIS): audit complete A261865 solution theorem
DomTheDeveloper Jul 22, 2026
b961443
Fix interior maximality in A261865 product continuity lemma
DomTheDeveloper Jul 22, 2026
21b9fab
Fix complement membership in A261865 continuity set proof
DomTheDeveloper Jul 22, 2026
ff31ca2
Fix terminal-box product factorization
DomTheDeveloper Jul 22, 2026
a66165b
Fix Fourier character addition rewrite
DomTheDeveloper Jul 22, 2026
fce14b0
Fix zero-index exclusion in A261865 orbit event
DomTheDeveloper Jul 22, 2026
445d9e3
Make the A261865 catalog theorem sorry-free
DomTheDeveloper Jul 22, 2026
de4d673
Audit the exact numbered A261865 theorem
DomTheDeveloper Jul 22, 2026
8976ec1
Audit the complete sorry-free A261865 module chain
DomTheDeveloper Jul 22, 2026
b620630
Harden the squarefree-radical rationality contradiction
DomTheDeveloper Jul 22, 2026
d1f8144
Normalize the Fourier zero-frequency condition
DomTheDeveloper Jul 22, 2026
a7545f0
Fix the geometric-series average bound
DomTheDeveloper Jul 22, 2026
6f05943
Finish denominator cancellation in the Weyl bound
DomTheDeveloper Jul 22, 2026
a69b30c
Fix pinned AddCircle representative identity
DomTheDeveloper Jul 22, 2026
46cbbd6
Fix ENNReal subtraction API in A261865 arc mass
DomTheDeveloper Jul 22, 2026
7769c91
Fix terminal arc measure via null sphere removal
DomTheDeveloper Jul 22, 2026
ab029dc
ci: run A261865 exact audit on ubuntu-slim
DomTheDeveloper Jul 22, 2026
a47b31b
Fix pinned Mathlib closed-ball identity name
DomTheDeveloper Jul 22, 2026
992bbdb
ci: run focused A261865 audit on ARM Ubuntu
DomTheDeveloper Jul 22, 2026
ebc309e
ci: expose focused A261865 ARM audit on PR
DomTheDeveloper Jul 22, 2026
d0660ab
ci: run focused A261865 audit on ubuntu-slim
DomTheDeveloper Jul 22, 2026
2070c24
ci: add independent macOS A261865 audit
DomTheDeveloper Jul 22, 2026
4058c9a
ci: run A261865 AXLE foundation audit on ubuntu-slim
DomTheDeveloper Jul 22, 2026
105aa05
Fix pinned measure-difference lemma in A261865 arc proof
DomTheDeveloper Jul 22, 2026
f4002bf
Fix Weyl closure approximation orientation
DomTheDeveloper Jul 22, 2026
bb74acc
Align torus volume with Fourier Haar normalization
DomTheDeveloper Jul 22, 2026
140c6c3
Supply finiteness to pinned measure_compl
DomTheDeveloper Jul 22, 2026
e4064a0
Fix pinned reciprocal inequality in A261865 solution
DomTheDeveloper Jul 22, 2026
043ac13
Correct the endpoint order in the circle sphere lemma
DomTheDeveloper Jul 22, 2026
d09f71e
Restore pinned Mathlib circle measure names
DomTheDeveloper Jul 22, 2026
5b3ccda
Use the same finite index set on both sides of the Fourier character …
DomTheDeveloper Jul 22, 2026
8fe2da8
Simplify circle boundary measure via Mathlib AE ball theorem
DomTheDeveloper Jul 22, 2026
4478d22
Import additive-circle AE ball theorem
DomTheDeveloper Jul 22, 2026
c447fb5
ci: restore supported runner for A261865 audit
DomTheDeveloper Jul 22, 2026
6eb3db9
Register standard unit-circle volume as probability
DomTheDeveloper Jul 22, 2026
b7900bd
Fix Fourier character induction motive
DomTheDeveloper Jul 22, 2026
842aaf6
Fix minimal-polynomial equality orientation
DomTheDeveloper Jul 22, 2026
0268884
Make square witness factorization rewrite direct
DomTheDeveloper Jul 22, 2026
eecdbc4
ci: apply first A261865 Lean repair batch
DomTheDeveloper Jul 22, 2026
024bf36
Fix A261865 foundation proofs after AXLE diagnostics
github-actions[bot] Jul 22, 2026
343bcaf
ci: apply second A261865 Lean repair batch
DomTheDeveloper Jul 22, 2026
7a073b9
Finish A261865 foundation fixes from AXLE diagnostics
github-actions[bot] Jul 22, 2026
8f77b5e
ci: apply final A261865 foundation repairs
DomTheDeveloper Jul 22, 2026
46ea247
Close remaining A261865 foundation errors
github-actions[bot] Jul 22, 2026
91bb24f
ci: repair A261865 circle and reciprocal radical modules
DomTheDeveloper Jul 22, 2026
705c912
Fix A261865 circle and reciprocal radical compatibility
github-actions[bot] Jul 22, 2026
66c65be
Fix finite product continuity-set compatibility
DomTheDeveloper Jul 22, 2026
fef3aa0
Fix A261865 empirical measure compatibility
DomTheDeveloper Jul 22, 2026
7ee7cf4
ci: close residual A261865 support-module errors
DomTheDeveloper Jul 22, 2026
1cbf55d
Close residual A261865 support-module errors
github-actions[bot] Jul 22, 2026
4974967
ci: apply focused A261865 foundation repairs
DomTheDeveloper Jul 22, 2026
a230d03
ci: trigger A261865 foundation repair
DomTheDeveloper Jul 22, 2026
1761292
ci: close remaining A261865 empirical errors
DomTheDeveloper Jul 22, 2026
f5d289e
Close remaining A261865 empirical compatibility errors
github-actions[bot] Jul 22, 2026
38ce5aa
ci: close final A261865 support-module mismatch
DomTheDeveloper Jul 22, 2026
7e90ad2
Close final A261865 empirical measure mismatch
github-actions[bot] Jul 22, 2026
01a99ab
ci: repair A261865 terminal-box and base dependencies
DomTheDeveloper Jul 22, 2026
4411d3f
Fix A261865 terminal-box and base compatibility
github-actions[bot] Jul 22, 2026
0559a98
ci: repair A261865 base arithmetic and terminal-box nonnegativity
DomTheDeveloper Jul 22, 2026
7c3ef58
Fix A261865 base casts and terminal-box nonnegativity
github-actions[bot] Jul 22, 2026
025f2c4
ci: close final A261865 base arithmetic goals
DomTheDeveloper Jul 22, 2026
eaf4b28
ci: trigger corrected final A261865 repair
DomTheDeveloper Jul 22, 2026
064330b
Close final A261865 base arithmetic goals
DomTheDeveloper Jul 22, 2026
1470a19
Fix A261865 solution subtype and event proofs
DomTheDeveloper Jul 22, 2026
441ced8
Mark A261865 catalog theorem solved
DomTheDeveloper Jul 22, 2026
d149fdf
Import Formal Conjectures metadata syntax for A261865
DomTheDeveloper Jul 22, 2026
b7b7bda
Use fork-compatible A261865 category metadata
DomTheDeveloper Jul 22, 2026
ca4f649
Restore A261865 catalog attributes and solved status
DomTheDeveloper Jul 22, 2026
9ebc044
Keep proof wrapper free of unavailable fork metadata
DomTheDeveloper Jul 22, 2026
a6b4035
Add canonical solved metadata to A261865 theorem
DomTheDeveloper Jul 22, 2026
3ba32ab
Move A261865 axiom prints outside module mode
DomTheDeveloper Jul 22, 2026
796f5e8
Separate A261865 proof module from catalog metadata
DomTheDeveloper Jul 22, 2026
d205a65
Remove temporary A261865 audit trigger
DomTheDeveloper Jul 23, 2026
4852f1e
Remove temporary A261865 AXLE workflow
DomTheDeveloper Jul 23, 2026
f6fd9d9
Remove temporary A261865 final-audit workflow
DomTheDeveloper Jul 23, 2026
ba5352b
Remove temporary A261865 autofix workflow
DomTheDeveloper Jul 23, 2026
8f1a1c1
Remove temporary A261865 macOS workflow
DomTheDeveloper Jul 23, 2026
813d75b
Remove temporary A261865 repair workflow
DomTheDeveloper Jul 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions FormalConjectures/OEIS/261865.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/-
Copyright 2026 The Formal Conjectures Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
module

public import FormalConjectures.OEIS.«261865Solution»

@[expose] public section

/-!
# OEIS A261865 / Peter Kagey's Problem 13

For a positive integer `n`, OEIS A261865 is the least positive integer `k`
for which a positive integer multiple of `√k` lies strictly between `n` and
`n + 1`.

For every squarefree `j ≥ 2`, the indices where `j` is the least successful
radicand have density

`(1 / √j) * ∏_{2 ≤ s < j, Squarefree s} (1 - 1 / √s)`.
-/

namespace OeisA261865

/--
**Peter Kagey's Problem 13 / OEIS A261865.**

For every squarefree `j ≥ 2`, the set of positive indices where the least
successful radicand is `j` has the stated natural density.

The mathematical proof and Lean development were produced by
ProofOrchestrator, using OpenAI GPT-5.6 Thinking, under Dominic Dabish's
supervision.
-/
theorem density_formula (j : ℕ) (hj : 2 ≤ j) (hsq : Squarefree j) :
{n : ℕ | 0 < n ∧ IsValue n j}.HasDensity (predictedDensity j) :=
density_formula_solution j hj hsq

end OeisA261865
30 changes: 30 additions & 0 deletions FormalConjectures/OEIS/261865FinalAudit.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/-
Copyright 2026 The Formal Conjectures Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/

import FormalConjectures.OEIS.«261865»

namespace OeisA261865

/-- Exact-statement audit wrapper for Peter Kagey's Problem 13 / OEIS A261865. -/
theorem density_formula_final_audit (j : ℕ) (hj : 2 ≤ j) (hsq : Squarefree j) :
{n : ℕ | 0 < n ∧ IsValue n j}.HasDensity (predictedDensity j) :=
density_formula j hj hsq

#print axioms density_formula_solution
#print axioms density_formula
#print axioms density_formula_final_audit

end OeisA261865
160 changes: 160 additions & 0 deletions FormalConjectures/OEIS/261865Solution.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
/-
Copyright 2026 The Formal Conjectures Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
module

public import FormalConjectures.OEIS.A261865Base
public import FormalConjecturesForMathlib.Analysis.Equidistribution.TerminalBox

@[expose] public section

open Filter
open scoped BigOperators Topology

namespace OeisA261865

/-- The reciprocal-square-root rotation parameters lie strictly between zero and one. -/
theorem alpha_pos_of_two_le {s : ℕ} (hs : 2 ≤ s) : 0 < alpha s := by
unfold alpha
exact one_div_pos.mpr (Real.sqrt_pos.2 (by positivity))

theorem alpha_lt_one_of_two_le {s : ℕ} (hs : 2 ≤ s) : alpha s < 1 := by
have hspos : (0 : ℝ) < s := by positivity
have hsqrtpos : (0 : ℝ) < Real.sqrt (s : ℝ) := Real.sqrt_pos.2 hspos
have hsqrtsq : (Real.sqrt (s : ℝ)) ^ 2 = (s : ℝ) := Real.sq_sqrt hspos.le
have hsqrtone : 1 < Real.sqrt (s : ℝ) := by
nlinarith [show (2 : ℝ) ≤ s by exact_mod_cast hs]
unfold alpha
exact (div_lt_one hsqrtpos).2 hsqrtone

/-- The distinguished element `j` as an element of the relevant-radicand subtype. -/
noncomputable def distinguishedRadicand (j : ℕ) : relevantRadicands j :=
⟨j, by simp⟩

/-- The generic terminal-box event is exactly the A261865 least-radicand event. -/
theorem orbit_mem_terminalBox_iff (n j : ℕ) (hj : 2 ≤ j) :
n • (fun s : relevantRadicands j => (alpha s.1 : UnitAddCircle)) ∈
UnitAddTorus.terminalBox (distinguishedRadicand j)
(fun s : relevantRadicands j => alpha s.1) ↔
0 < n ∧ IsValue n j := by
classical
have hge : ∀ s : relevantRadicands j, 2 ≤ s.1 := by
intro s
rcases mem_relevantRadicands.mp s.2 with hsj | hs
· simpa [hsj] using hj
· exact hs.1
have ha0 : ∀ s : relevantRadicands j, 0 < alpha s.1 :=
fun s => alpha_pos_of_two_le (hge s)
have ha1 : ∀ s : relevantRadicands j, alpha s.1 < 1 :=
fun s => alpha_lt_one_of_two_le (hge s)
rw [UnitAddTorus.nsmul_mem_terminalBox_iff (distinguishedRadicand j)
(fun s : relevantRadicands j => alpha s.1) ha0 ha1 n]
constructor
· rintro ⟨hjhit, hmiss⟩
have hnpos : 0 < n := by
by_contra hn
have hnzero : n = 0 := Nat.eq_zero_of_not_pos hn
subst n
norm_num at hjhit
linarith [ha1 (distinguishedRadicand j)]
refine ⟨hnpos, (isValue_iff_coordinateConditions n j hj).2 ?_⟩
refine ⟨by simpa [distinguishedRadicand] using hjhit, ?_⟩
intro s hs hcoord
let sr : relevantRadicands j :=
⟨s, mem_relevantRadicands.mpr (Or.inr (mem_squarefreeBelow.mp hs))⟩
have hne : sr ≠ distinguishedRadicand j := by
intro h
have : s = j := congrArg Subtype.val h
exact (mem_squarefreeBelow.mp hs).2.1.ne this
exact hmiss sr hne (by simpa [sr] using hcoord)
· rintro ⟨hnpos, hvalue⟩
obtain ⟨hjhit, hsmall⟩ := (isValue_iff_coordinateConditions n j hj).1 hvalue
refine ⟨by simpa [distinguishedRadicand] using hjhit, ?_⟩
intro s hne hcoord
have hsne : s.1 ≠ j := by
intro h
apply hne
apply Subtype.ext
simpa [distinguishedRadicand] using h
have hsbelow : s.1 ∈ squarefreeBelow j := by
rcases mem_relevantRadicands.mp s.2 with hs | hs
· exact (hsne hs).elim
· exact mem_squarefreeBelow.mpr hs
exact hsmall s.1 hsbelow (by simpa using hcoord)

/-- The subtype product over all relevant radicands except `j` is the advertised product over
`squarefreeBelow j`. -/
theorem product_erase_distinguished (j : ℕ) :
∏ s ∈ (Finset.univ.erase (distinguishedRadicand j)), (1 - alpha s.1) =
∏ s ∈ squarefreeBelow j, (1 - alpha s) := by
classical
refine Finset.prod_bij (fun s _ => s.1) ?_ ?_ ?_ ?_
· intro s hs
have hne : s ≠ distinguishedRadicand j := Finset.ne_of_mem_erase hs
rcases mem_relevantRadicands.mp s.2 with hsj | hsj
· exfalso
apply hne
apply Subtype.ext
simpa [distinguishedRadicand] using hsj
· exact mem_squarefreeBelow.mpr hsj
· intro a ha b hb hab
exact Subtype.ext hab
· intro s hs
let sr : relevantRadicands j :=
⟨s, mem_relevantRadicands.mpr (Or.inr (mem_squarefreeBelow.mp hs))⟩
have hne : sr ≠ distinguishedRadicand j := by
intro h
have : s = j := congrArg Subtype.val h
exact (mem_squarefreeBelow.mp hs).2.1.ne this
exact ⟨sr, Finset.mem_erase.mpr ⟨hne, Finset.mem_univ sr⟩, rfl⟩
· intro s hs
rfl

/-- Axiom-free proof candidate for Peter Kagey's Problem 13 / OEIS A261865. -/
theorem density_formula_solution (j : ℕ) (hj : 2 ≤ j) (hsq : Squarefree j) :
{n : ℕ | 0 < n ∧ IsValue n j}.HasDensity (predictedDensity j) := by
classical
have hge : ∀ s ∈ relevantRadicands j, 2 ≤ s := by
intro s hs
rcases mem_relevantRadicands.mp hs with rfl | hs
· exact hj
· exact hs.1
have hsqR : ∀ s ∈ relevantRadicands j, Squarefree s := by
intro s hs
rcases mem_relevantRadicands.mp hs with rfl | hs
· exact hsq
· exact hs.2.2
have ha0 : ∀ s : relevantRadicands j, 0 < alpha s.1 :=
fun s => alpha_pos_of_two_le (hge s.1 s.2)
have ha1 : ∀ s : relevantRadicands j, alpha s.1 < 1 :=
fun s => alpha_lt_one_of_two_le (hge s.1 s.2)
have hrel : UnitAddTorus.NoIntegerRelation
(fun s : relevantRadicands j => alpha s.1) :=
noIntegerRelation_alpha (relevantRadicands j) hge hsqR
have hgeneric := UnitAddTorus.hasDensity_terminalBox
(distinguishedRadicand j) (fun s : relevantRadicands j => alpha s.1) ha0 ha1 hrel
have hevent :
{n : ℕ | n • (fun s : relevantRadicands j => (alpha s.1 : UnitAddCircle)) ∈
UnitAddTorus.terminalBox (distinguishedRadicand j)
(fun s : relevantRadicands j => alpha s.1)} =
{n : ℕ | 0 < n ∧ IsValue n j} := by
ext n
exact orbit_mem_terminalBox_iff n j hj
rw [hevent] at hgeneric
convert hgeneric using 1
rw [predictedDensity, product_erase_distinguished]
rfl

end OeisA261865
Loading
Loading