FormalConjectures/OEIS/224515.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
8 declarations, 1 contain sorry, 0 declared as axioms
Existence of integers $k$ with $k^2 \operatorname{XOR} (k+1)^2 = (2n+1)^2$
a: $a(n) = \text{least } k \text{ such that } \sqrt{k^2 \operatorname{XOR} (k+1)^2} = 2n+1$,
$a(n) = -1 \text{ if there is no such } k$.
This is equivalent to finding the smallest $k \in \mathbb{N}$
such that $k^2 \oplus (k+1)^2 = (2n+1)^2$.
We use the set infimum ($\operatorname{sInf}$) to denote the least element
of the set of natural numbers satisfying the condition.
Since Mathlib's sInf on a subset of ℕ gives a result in ℕ, this definition
is only completely faithful to the OEIS when the set is non-empty.
The OEIS definition implies that the set of k's is non-empty for all n.
References:
- A224515
- arxiv/2605.22763 Advancing Mathematics Research with AI-Driven Formal Proof Search by George Tsoukalas et al.
Imports (1)
- def
OeisA224515.aa: $a(n) = \text{least } k \text{ such that } \sqrt{k^2 \operatorname{XOR} (k+1)^2} = 2n+1$, $a(n) = -1 \text{ if there is no such } k$ line 57 sourceSource documentation
a: $a(n) = \text{least } k \text{ such that } \sqrt{k^2 \operatorname{XOR} (k+1)^2} = 2n+1$, $a(n) = -1 \text{ if there is no such } k$. This is equivalent to finding the smallest $k \in \mathbb{N}$ such that $k^2 \oplus (k+1)^2 = (2n+1)^2$. We use the set infimum ($\operatorname{sInf}$) to denote the least element of the set of natural numbers satisfying the condition. Since Mathlib's
sInfon a subset ofℕgives a result inℕ, this definition is only completely faithful to the OEIS when the set is non-empty. The OEIS definition implies that the set of k's is non-empty for all n, which is legitimate as shown by the theoremexists_xor_sq_eqbelow.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
HPow.hPow,HAdd.hAdd,HMul.hMul,OfNat.ofNat,InfSet.sInf,Set.ofPred,Eq,Nat.xor10 instances, coercions and auxiliary constants left out.
noncomputable def a (n : ℕ) : ℕ := …
- lemma
OeisA224515.A224515_eqline 65 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Nat.xor,HPow.hPow,OfNat.ofNat,HAdd.hAdd,HMul.hMul,LT.lt,Ne, OeisA224515.aProof uses:
id,InfSet.sInf,Set.ofPred,csInf_eq_of_forall_ge_of_forall_gt_exists_lt,Exists.intro,Membership.mem,Set,Decidable.byContradiction,LE.le,Not,And,And.intro34 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
- lemma
OeisA224515.a_0line 77 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, OeisA224515.a,OfNat.ofNatProof uses: OeisA224515.A224515_eq,
of_decide_eq_true,Nat.xor,HPow.hPow,HAdd.hAdd,HMul.hMul,id,Bool,Decidable.decide,Bool.true,Eq.refl,LT.lt13 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
OeisA224515.a_1line 82 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, OeisA224515.a,OfNat.ofNatProof uses: OeisA224515.A224515_eq,
of_decide_eq_true,Nat.xor,HPow.hPow,HAdd.hAdd,HMul.hMul,id,Bool,Decidable.decide,Bool.true,Eq.refl,LT.lt,dite,Ne,LE.le,Eq.symm,le_antisymm,Nat.ge_of_not_lt,Mathlib.Tactic.IntervalCases.of_lt_right,Nat.rawCastand 4 more19 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- lemma
OeisA224515.a_2line 87 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, OeisA224515.a,OfNat.ofNatProof uses: OeisA224515.A224515_eq,
of_decide_eq_true,Nat.xor,HPow.hPow,HAdd.hAdd,HMul.hMul,id,Bool,Decidable.decide,Bool.true,Eq.refl,LT.lt,dite,Ne,LE.le,Eq.symm,le_antisymm,Nat.ge_of_not_lt,Mathlib.Tactic.IntervalCases.of_lt_right,Nat.rawCastand 4 more19 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- lemma
OeisA224515.a_3line 92 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, OeisA224515.a,OfNat.ofNatProof uses: OeisA224515.A224515_eq,
of_decide_eq_true,Nat.xor,HPow.hPow,HAdd.hAdd,HMul.hMul,id,Bool,Decidable.decide,Bool.true,Eq.refl,LT.lt,dite,Ne,LE.le,Eq.symm,le_antisymm,Nat.ge_of_not_lt,Mathlib.Tactic.IntervalCases.of_lt_right,Nat.rawCastand 4 more19 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- lemma
OeisA224515.a_4line 97 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, OeisA224515.a,OfNat.ofNatProof uses: OeisA224515.A224515_eq,
of_decide_eq_true,Nat.xor,HPow.hPow,HAdd.hAdd,HMul.hMul,id,Bool,Decidable.decide,Bool.true,Eq.refl,LT.lt,dite,Ne,LE.le,Eq.symm,le_antisymm,Nat.ge_of_not_lt,Mathlib.Tactic.IntervalCases.of_lt_right,Nat.rawCastand 4 more19 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- theorem
OeisA224515.exists_xor_sq_eqsorry line 110 sourcedepends on sorry what this means
Statement uses:
Nat,Exists,Eq,Nat.xor,HPow.hPow,OfNat.ofNat,HAdd.hAdd,HMul.hMulProof 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.