FormalConjectures/Arxiv/2607.05739/TanArctanSum.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1
19 declarations, 6 contain sorry, 0 declared as axioms
Integer values of $\tan(\arctan 1 + \arctan 2 + \cdots + \arctan n)$
References:
- arxiv/2607.05739 Integer values of $\tan(\arctan 1+\arctan 2+\cdots+\arctan n)$ are rare by Ken Ono
- [AMM08] T. Amdeberhan, L. A. Medina, and V. H. Moll, Arithmetical properties of a sequence arising from an arctangent sum, J. Number Theory 128 (2008), no. 6, 1807-1846.
- TanArctan, a Lean formalisation of the three
results of [Ono26], MIT licensed. Its
P,A,Bandxare the definitions used here.
Imports (1)
- def
Arxiv.«2607.05739».gaussProd$Z_n = \prod_{k=1}^n (1 + ik)$, in the Gaussian integers line 40 sourceSource documentation
$Z_n = \prod_{k=1}^n (1 + ik)$, in the Gaussian integers.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,GaussianIntProof uses:
Finset.prod,Neg.neg,Int,OfNat.ofNat,Finset.Icc,Zsqrtd.mk8 instances, coercions and auxiliary constants left out.
def gaussProd (n : ℕ) : GaussianInt := ∏ k ∈ Finset.Icc 1 n, (⟨1, (k : ℤ)⟩ : GaussianInt)
- def
Arxiv.«2607.05739».A$A_n = \operatorname{Re} Z_n$ line 43 sourceSource documentation
$A_n = \operatorname{Re} Z_n$.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,IntProof uses:
Zsqrtd.re,Neg.neg,OfNat.ofNat, Arxiv.«2607.05739».gaussProd2 instances, coercions and auxiliary constants left out.
def A (n : ℕ) : ℤ := (gaussProd n).re
Mentions: Arxiv.«2607.05739».gaussProd
- def
Arxiv.«2607.05739».B$B_n = \operatorname{Im} Z_n$ line 46 sourceSource documentation
$B_n = \operatorname{Im} Z_n$.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,IntProof uses:
Zsqrtd.im,Neg.neg,OfNat.ofNat, Arxiv.«2607.05739».gaussProd2 instances, coercions and auxiliary constants left out.
def B (n : ℕ) : ℤ := (gaussProd n).im
Mentions: Arxiv.«2607.05739».gaussProd
- def
Arxiv.«2607.05739».x$x_n = \tan\left(\sum_{k=1}^n \arctan k\right) = B_n / A_n$ line 49 sourceSource documentation
$x_n = \tan\left(\sum_{k=1}^n \arctan k\right) = B_n / A_n$.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,RatProof uses:
HDiv.hDiv, Arxiv.«2607.05739».B, Arxiv.«2607.05739».A4 instances, coercions and auxiliary constants left out.
noncomputable def x (n : ℕ) : ℚ := (B n : ℚ) / (A n : ℚ)
Mentions: Arxiv.«2607.05739».B, Arxiv.«2607.05739».A
- def
Arxiv.«2607.05739».IsIntegerValue$x_n$ takes an integer value line 57 sourceSource documentation
$x_n$ takes an integer value.
Stated as $A_n \mid B_n$ rather than as
∃ m : ℤ, x n = m, so that it still says the right thing if $A_n$ were ever $0$. There $x_n$ is a pole of the tangent rather than an integer, but(B n : ℚ) / 0is0in Lean and would count as one. The two agree whenever $A_n \neq 0$, which holds for every $n \leq 3000$.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Dvd.dvd,Int, Arxiv.«2607.05739».A, Arxiv.«2607.05739».B1 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
def IsIntegerValue (n : ℕ) : Prop := A n ∣ B n
Mentions: Arxiv.«2607.05739».A, Arxiv.«2607.05739».B
- instance
Arxiv.«2607.05739».(instance at line 59)line 59 source - theorem
Arxiv.«2607.05739».tan_arctan_sum_not_integerConjecture (Amdeberhan-Medina-Moll, 2008) sorry line 67 sourceSource documentation
Conjecture (Amdeberhan-Medina-Moll, 2008). For every integer $n \geq 5$, the value $$x_n = \tan(\arctan 1 + \arctan 2 + \cdots + \arctan n)$$ is not an integer.
depends on sorry what this means
Statement uses:
Iff,True,Nat,LE.le,OfNat.ofNat,Not, Arxiv.«2607.05739».IsIntegerValueProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous4 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem tan_arctan_sum_not_integer : answer(sorry) ↔ ∀ n : ℕ, 5 ≤ n → ¬ IsIntegerValue n := by …Mentions: Arxiv.«2607.05739».IsIntegerValue
- theorem
Arxiv.«2607.05739».x_succ$x_n$ satisfies $x_1 = 1$ and $x_n = \dfrac{x_{n-1} + n}{1 - n x_{n-1}}$, which is the tangent addition formula sorry line 74 sourceSource documentation
$x_n$ satisfies $x_1 = 1$ and $x_n = \dfrac{x_{n-1} + n}{1 - n x_{n-1}}$, which is the tangent addition formula.
depends on sorry what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Eq,Rat, Arxiv.«2607.05739».x,HAdd.hAdd,HDiv.hDiv,HSub.hSub,HMul.hMulProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous28 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem x_succ (n : ℕ) (hn : 1 ≤ n) : x (n + 1) = (x n + (n + 1)) / (1 - (n + 1) * x n) := by …Mentions: Arxiv.«2607.05739».x
- theorem
Arxiv.«2607.05739».x_eq_tan_sum_arctan$x_n$ is the tangent of the partial sum of arctangents it is named for sorry line 80 sourceSource documentation
$x_n$ is the tangent of the partial sum of arctangents it is named for.
depends on sorry what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Eq,Real, Arxiv.«2607.05739».x,Real.tan,Finset.sum,Finset.Icc,Real.arctanProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous18 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem x_eq_tan_sum_arctan (n : ℕ) (hn : 1 ≤ n) : (x n : ℝ) = Real.tan (∑ k ∈ Finset.Icc 1 n, Real.arctan k) := by …Mentions: Arxiv.«2607.05739».x
- def
Arxiv.«2607.05739».omega$\omega_n = A_n^2 + B_n^2 = \prod_{k=1}^n (1 + k^2)$, the norm of $Z_n$ line 85 sourceSource documentation
$\omega_n = A_n^2 + B_n^2 = \prod_{k=1}^n (1 + k^2)$, the norm of $Z_n$.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
HAdd.hAdd,HPow.hPow,Int.natAbs, Arxiv.«2607.05739».A,OfNat.ofNat, Arxiv.«2607.05739».B7 instances, coercions and auxiliary constants left out.
def omega (n : ℕ) : ℕ := (A n).natAbs ^ 2 + (B n).natAbs ^ 2
Mentions: Arxiv.«2607.05739».A, Arxiv.«2607.05739».B
- def
Arxiv.«2607.05739».kernelThe squarefree kernel $K_n$ of $\omega_n$: the product of the primes dividing it to an odd power, so1when there are none line 89 sourceSource documentation
The squarefree kernel $K_n$ of $\omega_n$: the product of the primes dividing it to an odd power, so
1when there are none.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Finset.prod,Finset.filter,Odd,Finsupp,Nat.factorization, Arxiv.«2607.05739».omega,Nat.primeFactors7 instances, coercions and auxiliary constants left out.
def kernel (n : ℕ) : ℕ := …
- def
Arxiv.«2607.05739».angleSum$a_n = \sum_{k=1}^n \arctan(1/k)$ line 93 sourceSource documentation
$a_n = \sum_{k=1}^n \arctan(1/k)$.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,RealProof uses:
Finset.sum,Finset.Icc,OfNat.ofNat,Real.arctan,HDiv.hDiv11 instances, coercions and auxiliary constants left out.
noncomputable def angleSum (n : ℕ) : ℝ := ∑ k ∈ Finset.Icc 1 n, Real.arctan (1 / (k : ℝ))
- def
Arxiv.«2607.05739».exceptionalThe exceptional set $E = \{n \geq 5 : |x_n| > n/2 + 1\}$ line 97 sourceSource documentation
The exceptional set $E = \{n \geq 5 : |x_n| > n/2 + 1\}$. An index with $A_n = 0$ is a pole of the tangent rather than a large value, and is counted in, reading $|x_n|$ as infinite.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Set,NatProof uses:
Set.ofPred,And,LE.le,OfNat.ofNat,Or,Eq,Int, Arxiv.«2607.05739».A,LT.lt,Rat,HAdd.hAdd,HDiv.hDiv,abs, Arxiv.«2607.05739».x13 instances, coercions and auxiliary constants left out.
def exceptional : Set ℕ := {n | 5 ≤ n ∧ (A n = 0 ∨ ((n : ℚ) / 2 + 1 < |x n|))} …Mentions: Arxiv.«2607.05739».A, Arxiv.«2607.05739».x
- theorem
Arxiv.«2607.05739».kernel_dvd_of_eq_intCastsorry line 105 sourcedepends on sorry what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Ne,Int, Arxiv.«2607.05739».A,Eq,Rat, Arxiv.«2607.05739».x,And,Dvd.dvd, Arxiv.«2607.05739».kernel,HAdd.hAdd,HPow.hPow,LT.lt,Real,Real.sqrt,HSub.hSub,absProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous48 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
Arxiv.«2607.05739».exists_near_half_pisorry line 114 sourcedepends on sorry what this means
Statement uses:
Nat,Membership.mem,Set, Arxiv.«2607.05739».exceptional,Exists,Int,LT.lt,Real,abs,HSub.hSub, Arxiv.«2607.05739».angleSum,HMul.hMul,HDiv.hDiv,Real.pi,OfNat.ofNatProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous38 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
Arxiv.«2607.05739».exceptional_ncard_lesorry line 122 sourcedepends on sorry what this means
Statement uses:
Exists,Real,Nat,And,LT.lt,OfNat.ofNat,LE.le,Set.ncard,Inter.inter,Set, Arxiv.«2607.05739».exceptional,Set.Icc,HMul.hMul,Real.logProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous24 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
Arxiv.«2607.05739».isIntegerValue_of_le_fourThe four integer values the conjecture leaves out line 128 sourceSource documentation
The four integer values the conjecture leaves out.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
And, Arxiv.«2607.05739».IsIntegerValue,OfNat.ofNat,NatProof uses:
And.intro,of_decide_eq_true,id,Eq,Bool,Decidable.decide,Bool.true,Eq.refl3 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
theorem isIntegerValue_of_le_four : IsIntegerValue 1 ∧ IsIntegerValue 2 ∧ IsIntegerValue 3 ∧ IsIntegerValue 4 := by …Mentions: Arxiv.«2607.05739».IsIntegerValue
- theorem
Arxiv.«2607.05739».x_values$x_1 = 1$, $x_2 = -3$, $x_3 = 0$, $x_4 = 4$ line 134 sourceSource documentation
$x_1 = 1$, $x_2 = -3$, $x_3 = 0$, $x_4 = 4$.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
And,Eq,Rat, Arxiv.«2607.05739».x,OfNat.ofNat,Nat,Neg.negProof uses:
And.intro,Eq.mpr,HDiv.hDiv, Arxiv.«2607.05739».B, Arxiv.«2607.05739».A,id,congrArg,Arxiv.«2607.05739».x.eq_1,Zsqrtd.re,Int, Arxiv.«2607.05739».gaussProd,Arxiv.«2607.05739».A.eq_1,Zsqrtd.im,Arxiv.«2607.05739».B.eq_1,of_eq_true,Eq.trans,True,congrFun',congr,Zsqrtd.mkand 62 more107 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
theorem x_values : x 1 = 1 ∧ x 2 = -3 ∧ x 3 = 0 ∧ x 4 = 4 := by …
Mentions: Arxiv.«2607.05739».x
- theorem
Arxiv.«2607.05739».not_isIntegerValue_of_mem_Icc_five_tenThe conjecture holds at the first few values it covers line 139 sourceSource documentation
The conjecture holds at the first few values it covers.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Membership.mem,Finset,Finset.Icc,OfNat.ofNat,Not, Arxiv.«2607.05739».IsIntegerValueProof uses:
of_decide_eq_true,id,Eq,Bool,Decidable.decide,Bool.true,Eq.refl13 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem not_isIntegerValue_of_mem_Icc_five_ten : ∀ n ∈ Finset.Icc 5 10, ¬ IsIntegerValue n := by …Mentions: Arxiv.«2607.05739».IsIntegerValue