FormalConjectures/OEIS/224515.lean

GitHub source file

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:

Imports (1)
  1. def OeisA224515.a 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$ line 57 source

    Source 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 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, which is legitimate as shown by the theorem exists_xor_sq_eq below.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat

    Proof uses: HPow.hPow, HAdd.hAdd, HMul.hMul, OfNat.ofNat, InfSet.sInf, Set.ofPred, Eq, Nat.xor

    10 instances, coercions and auxiliary constants left out.

    noncomputable def a (n : ℕ) : ℕ :=
    …
  2. lemma OeisA224515.A224515_eq line 65 source

    standard 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.a

    Proof 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.intro

    34 instances, coercions and auxiliary constants left out.

    Tactic trace: 11 steps

    Open to load the checked before-and-after goal states.

  3. lemma OeisA224515.a_0 line 77 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Eq, Nat, OeisA224515.a, OfNat.ofNat

    Proof 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

    13 instances, coercions and auxiliary constants left out.

    Tactic trace: 4 steps

    Open to load the checked before-and-after goal states.

  4. lemma OeisA224515.a_1 line 82 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Eq, Nat, OeisA224515.a, OfNat.ofNat

    Proof 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.rawCast and 4 more

    19 instances, coercions and auxiliary constants left out.

    Tactic trace: 5 steps

    Open to load the checked before-and-after goal states.

  5. lemma OeisA224515.a_2 line 87 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Eq, Nat, OeisA224515.a, OfNat.ofNat

    Proof 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.rawCast and 4 more

    19 instances, coercions and auxiliary constants left out.

    Tactic trace: 5 steps

    Open to load the checked before-and-after goal states.

  6. lemma OeisA224515.a_3 line 92 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Eq, Nat, OeisA224515.a, OfNat.ofNat

    Proof 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.rawCast and 4 more

    19 instances, coercions and auxiliary constants left out.

    Tactic trace: 5 steps

    Open to load the checked before-and-after goal states.

  7. lemma OeisA224515.a_4 line 97 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Eq, Nat, OeisA224515.a, OfNat.ofNat

    Proof 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.rawCast and 4 more

    19 instances, coercions and auxiliary constants left out.

    Tactic trace: 5 steps

    Open to load the checked before-and-after goal states.

  8. theorem OeisA224515.exists_xor_sq_eq sorry line 110 source

    depends on sorry what this means

    Statement uses: Nat, Exists, Eq, Nat.xor, HPow.hPow, OfNat.ofNat, HAdd.hAdd, HMul.hMul

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    18 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.