Theorems · Theorem · number theory
Nat.eq_sq_add_sq_iff_eq_sq_mul
∀ {n : ℕ}, (∃ x y, n = x ^ 2 + y ^ 2) ↔ ∃ a b, n = a ^ 2 * b ∧ IsSquare (-1)A natural number n is a sum of two squares if and only if n = a^2 * b with natural
numbers a and b such that -1 is a square modulo b.
- Defined in
- Mathlib.NumberTheory.SumTwoSquares
- Cited by
- 1 results in Mathlib
- Foundations
- Depth 152 from the axioms · uses propext, Classical.choice, Quot.sound
Around this declaration
Dashed lines are statement dependencies; solid lines are citations in proofs.
Cites9
Mathlib declarations this one mentions in its statement or cites explicitly in its proof. Plumbing is filtered out.
- add_zeroproof · cited by 2,707
- MulZeroClass.zero_mulproof · cited by 1,625
- ZModstatement and proof · cited by 1,024
- zero_powproof · cited by 361
- two_ne_zeroproof · cited by 251
- neg_eq_zeroproof · cited by 171
- IsSquarestatement and proof · cited by 132
- ZMod.isSquare_neg_one_of_eq_sq_add_sq_of_coprimeproof · cited by 1
- Nat.eq_sq_add_sq_of_isSquare_mod_neg_oneproof · cited by 1
Cited by1
Results whose statement or proof uses this declaration.
- Nat.eq_sq_add_sq_iffproof · cited by 0