FormalConjecturesForMathlib/Algebra/Ring/PythagorasNumber.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
7 declarations, 0 contain sorry, 0 declared as axioms
Pythagoras numbers
The Pythagoras number $p(R)$ of $R$ is the least $p$ such that every sum of squares in $R$ is a sum of $p$ squares; see [Pfister1995] for fields and [CDLR1982] for rings. This file defines:
IsSumSqOfLength n a:ais a sum ofnsquares, a counted refinement of Mathlib'sIsSumSq;pythagorasBounds R: the set ofpsuch that every sum of squares inRis a sum ofpsquares.
The Pythagoras number of R is p exactly when IsLeast (pythagorasBounds R) p. The set
pythagorasBounds R can be empty, in which case the Pythagoras number is infinite; by [CDLR1982]
this happens for $\mathbb{R}[X, Y]$. No numeric invariant is defined here, so that no convention
for the infinite case is needed.
The definitions and the correspondence with IsSumSq need only [AddCommMonoid R] [Mul R]; the
AddCommMonoid is what the sum ∑ i : Fin n requires, since IsSumSq itself assumes only
[Mul R] [Add R] [Zero R]. Padding a sum of squares with zeros needs 0 * 0 = 0, so
IsSumSqOfLength.of_le and mem_pythagorasBounds_of_le are stated for a
NonUnitalNonAssocSemiring.
References
- [CDLR1982] M. D. Choi, Z. D. Dai, T. Y. Lam, B. Reznick, The Pythagoras number of some affine algebras and local algebras, J. reine angew. Math. 336 (1982), 45–82.
- [Pfister1995] A. Pfister, Quadratic forms with applications to algebraic geometry and topology, London Math. Soc. Lecture Note Ser. 217, Cambridge University Press, 1995.
Imported by 1 file
- def
IsSumSqOfLengthIsSumSqOfLength n ameans thatais a sum ofnsquares line 59 sourceSource documentation
IsSumSqOfLength n ameans thatais a sum ofnsquares.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Mul,NatProof uses:
Exists,Fin,Eq,Finset.sum,Finset.univ,HMul.hMul2 instances, coercions and auxiliary constants left out.
def IsSumSqOfLength (n : ℕ) (a : R) : Prop := …
- def
pythagorasBoundsThe set ofpsuch that every sum of squares inRis a sum ofpsquares line 65 sourceSource documentation
The set of
psuch that every sum of squares inRis a sum ofpsquares. Its least element, when it exists, is the Pythagoras number ofR.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Mul,Set,NatProof uses:
Set.ofPred,IsSumSq, IsSumSqOfLength7 instances, coercions and auxiliary constants left out.
def pythagorasBounds : Set ℕ := …
- theorem
IsSumSqOfLength.isSumSqline 68 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Mul,Nat, IsSumSqOfLength,IsSumSqProof uses:
Fin,Eq,Finset.sum,Finset.univ,HMul.hMul,Nat.recAux,OfNat.ofNat,of_eq_true,HAdd.hAdd,Eq.mpr,Fin.succ,id,congrArg,Fin.sum_univ_succ,IsSumSq.sq_add,Eq.symm26 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- theorem
IsSumSq.exists_isSumSqOfLengthline 76 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Mul,IsSumSq,Exists,Nat, IsSumSqOfLengthProof uses:
IsSumSq.rec,Exists.intro,OfNat.ofNat,Fin,Eq,Finset.sum,Finset.univ,HMul.hMul,of_eq_true,Eq.trans,True,congrArg,HSMul.hSMul,Finset.card,EmptyCollection.emptyCollection,Finset,Finset.sum_congr,Finset.univ_eq_empty,Membership.mem,Eq.refland 12 more32 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
- theorem
isSumSq_iff_exists_isSumSqOfLengthline 85 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Mul,Iff,IsSumSq,Exists,Nat, IsSumSqOfLengthProof uses:
Iff.intro, IsSumSq.exists_isSumSqOfLength, IsSumSqOfLength.isSumSq15 instances, coercions and auxiliary constants left out.
- theorem
IsSumSqOfLength.of_lePadding with zeros: a sum ofpsquares is a sum ofqsquares for everyq ≥ pline 95 sourceSource documentation
Padding with zeros: a sum of
psquares is a sum ofqsquares for everyq ≥ p.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NonUnitalNonAssocSemiring,Nat,LE.le, IsSumSqOfLengthProof uses:
Fin,Eq,Finset.sum,Finset.univ,HMul.hMul,HAdd.hAdd,Exists,Nat.exists_eq_add_of_le,Exists.intro,Fin.append,OfNat.ofNat,of_eq_true,Eq.trans,True,congrArg,Fin.castAdd,Fin.natAdd,Fin.sum_univ_add,congr,Finset.sum_congrand 10 more25 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
theorem IsSumSqOfLength.of_le {p q : ℕ} (hpq : p ≤ q) {a : R} (h : IsSumSqOfLength p a) : IsSumSqOfLength q a := by …Mentions: IsSumSqOfLength
- theorem
mem_pythagorasBounds_of_leline 101 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NonUnitalNonAssocSemiring,Nat,LE.le,Membership.mem,Set, pythagorasBoundsProof uses:
IsSumSq, IsSumSqOfLength.of_le17 instances, coercions and auxiliary constants left out.