Theorems · Definition · number theory
legendreSym
(p : ℕ) → [Fact (Nat.Prime p)] → ℤ → ℤ
The Legendre symbol of a : ℤ and a prime p, legendreSym p a,
is an integer defined as
* 0 if a is 0 modulo p;
* 1 if a is a nonzero square modulo p
* -1 otherwise.
Note the order of the arguments! The advantage of the order chosen here is
that legendreSym p is a multiplicative function ℤ → ℤ.
- Cited by
- 51 results in Mathlib
- Foundations
- Depth 144 from the axioms · uses propext, Classical.choice, Quot.sound
- Assumes
- Fact
Around this declaration
Dashed lines are statement dependencies; solid lines are citations in proofs.
Cites5
Mathlib declarations this one mentions in its statement or cites explicitly in its proof. Plumbing is filtered out.
- DFunLike.coeproof · cited by 62,936
- Factstatement and proof · cited by 2,726
- Nat.Primestatement and proof · cited by 2,059
- ZModproof · cited by 1,024
- quadraticCharproof · cited by 34
Cited by53
Results whose statement or proof uses this declaration.
- jacobiSymproof · cited by 44
- jacobiSym.mul_leftproof · cited by 8
- jacobiSym.one_leftproof · cited by 5
- jacobiSym.value_atstatement and proof · cited by 4
- jacobiSym.zero_rightproof · cited by 4
- jacobiSym.eq_zero_iff_not_coprimeproof · cited by 3
- jacobiSym.mod_leftproof · cited by 3
- legendreSym.eq_powstatement and proof · cited by 3
- legendreSym.eq_zero_iffstatement · cited by 3
- legendreSym.quadratic_reciprocity'statement and proof · cited by 3
- jacobiSym.legendreSym.to_jacobiSymstatement and proof · cited by 3
- jacobiSym.mul_right'proof · cited by 2