ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
File: Mathlib/NumberTheory/SumFourSquares.lean

full_name: euler_four_squares
code: /-- **Euler's four-square identity**. -/
theorem euler_four_squares {R : Type*} [CommRing R] (a b c d x y z w : R) :
    (a * x - b * y - c * z - d * w) ^ 2 + (a * y + b * x + c * w - d * z) ^ 2 +
      (a * z - b * w + c * x + d * y) ^ 2 + (a * w + b * z - c * y + d * x) ^ 2 =
      (a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2) 
goal: (a * x - b * y - c * z - d * w) ^ 2 + (a * y + b * x + c * w - d * z) ^ 2 + (a * z - b * w + c * x + d * y) ^ 2 +
    (a * w + b * z - c * y + d * x) ^ 2 =
  (a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2)

full_name: Nat.euler_four_squares
code: /-- **Euler's four-square identity**, a version for natural numbers. -/
theorem Nat.euler_four_squares (a b c d x y z w : ℕ) :
    ((a : ℤ) * x - b * y - c * z - d * w).natAbs ^ 2 +
      ((a : ℤ) * y + b * x + c * w - d * z).natAbs ^ 2 +
      ((a : ℤ) * z - b * w + c * x + d * y).natAbs ^ 2 +
      ((a : ℤ) * w + b * z - c * y + d * x).natAbs ^ 2 =
      (a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2) 
goal: (↑a * ↑x - ↑b * ↑y - ↑c * ↑z - ↑d * ↑w).natAbs ^ 2 + (↑a * ↑y + ↑b * ↑x + ↑c * ↑w - ↑d * ↑z).natAbs ^ 2 +
      (↑a * ↑z - ↑b * ↑w + ↑c * ↑x + ↑d * ↑y).natAbs ^ 2 +
    (↑a * ↑w + ↑b * ↑z - ↑c * ↑y + ↑d * ↑x).natAbs ^ 2 =
  (a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2)

full_name: Int.sq_add_sq_of_two_mul_sq_add_sq
code: theorem sq_add_sq_of_two_mul_sq_add_sq {m x y : ℤ} (h : 2 * m = x ^ 2 + y ^ 2) :
    m = ((x - y) / 2) ^ 2 + ((x + y) / 2) ^ 2 
goal: m = ((x - y) / 2) ^ 2 + ((x + y) / 2) ^ 2

full_name: Int.lt_of_sum_four_squares_eq_mul
code: theorem lt_of_sum_four_squares_eq_mul {a b c d k m : ℕ}
    (h : a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = k * m)
    (ha : 2 * a < m) (hb : 2 * b < m) (hc : 2 * c < m) (hd : 2 * d < m) :
    k < m 
goal: k < m

full_name: Int.exists_sq_add_sq_add_one_eq_mul
code: theorem exists_sq_add_sq_add_one_eq_mul (p : ℕ) [hp : Fact p.Prime] :
    ∃ (a b k : ℕ), 0 < k ∧ k < p ∧ a ^ 2 + b ^ 2 + 1 = k * p 
goal: ∃ a b k, 0 < k ∧ k < p ∧ a ^ 2 + b ^ 2 + 1 = k * p

full_name: _private.Mathlib.NumberTheory.SumFourSquares.0.Nat.sum_four_squares_of_two_mul_sum_four_squares
code: private theorem sum_four_squares_of_two_mul_sum_four_squares {m a b c d : ℤ}
    (h : a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = 2 * m) :
    ∃ w x y z : ℤ, w ^ 2 + x ^ 2 + y ^ 2 + z ^ 2 = m 
goal: ∃ w x y z, w ^ 2 + x ^ 2 + y ^ 2 + z ^ 2 = m

full_name: Nat.Prime.sum_four_squares
code: /-- Lagrange's **four squares theorem** for a prime number. Use `Nat.sum_four_squares` instead. -/
protected theorem Prime.sum_four_squares {p : ℕ} (hp : p.Prime) :
    ∃ a b c d : ℕ, a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = p 
goal: ∃ a b c d, a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = p

full_name: Nat.sum_four_squares
code: /-- **Four squares theorem** -/
theorem sum_four_squares (n : ℕ) : ∃ a b c d : ℕ, a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = n 
goal: ∃ a b c d, a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = n
File: Mathlib/NumberTheory/PrimeCounting.lean

full_name: Nat.primeCounting'
code: /-- A variant of the traditional prime counting function which gives the number of primes
*strictly* less than the input. More convenient for avoiding off-by-one errors.
-/
def primeCounting' : ℕ → ℕ 
goal: ℕ → ℕ

full_name: Nat.primeCounting
code: /-- The prime counting function: Returns the number of primes less than or equal to the input. -/
def primeCounting (n : ℕ) : ℕ 
goal: ℕ

full_name: Nat._aux_Mathlib_NumberTheory_PrimeCounting___unexpand_Nat_primeCounting_1
code: @[inherit_doc] scoped notation "π" => Nat.primeCounting
goal: Lean.PrettyPrinter.Unexpander

full_name: Nat._aux_Mathlib_NumberTheory_PrimeCounting___macroRules_Nat_termπ_1
code: @[inherit_doc] scoped notation "π" => Nat.primeCounting
goal: Lean.Macro

full_name: Nat._aux_Mathlib_NumberTheory_PrimeCounting___unexpand_Nat_primeCounting'_1
code: @[inherit_doc] scoped notation "π'" => Nat.primeCounting'
goal: Lean.PrettyPrinter.Unexpander

full_name: Nat._aux_Mathlib_NumberTheory_PrimeCounting___macroRules_Nat_termπ'_1
code: @[inherit_doc] scoped notation "π'" => Nat.primeCounting'
goal: Lean.Macro

full_name: Nat.monotone_primeCounting'
code: theorem monotone_primeCounting' : Monotone primeCounting' 
goal: Monotone Nat.primeCounting'

full_name: Nat.monotone_primeCounting
code: theorem monotone_primeCounting : Monotone primeCounting 
goal: Monotone Nat.primeCounting

full_name: Nat.primeCounting'_nth_eq
code: @[simp]
theorem primeCounting'_nth_eq (n : ℕ) : π' (nth Prime n) = n 
goal: (Nat.nth Nat.Prime n).primeCounting' = n

full_name: Nat.prime_nth_prime
code: @[simp]
theorem prime_nth_prime (n : ℕ) : Prime (nth Prime n) 
goal: Nat.Prime (Nat.nth Nat.Prime n)

full_name: Nat.primesBelow_card_eq_primeCounting'
code: /-- The cardinality of the finset `primesBelow n` equals the counting function
`primeCounting'` at `n`. -/
lemma primesBelow_card_eq_primeCounting' (n : ℕ) : n.primesBelow.card = primeCounting' n 
goal: n.primesBelow.card = n.primeCounting'

full_name: Nat.primeCounting'_add_le
code: /-- A linear upper bound on the size of the `primeCounting'` function -/
theorem primeCounting'_add_le {a k : ℕ} (h0 : 0 < a) (h1 : a < k) (n : ℕ) :
    π' (k + n) ≤ π' k + Nat.totient a * (n / a + 1) 
goal: (k + n).primeCounting' ≤ k.primeCounting' + a.totient * (n / a + 1)

full_name: Nat.zeroth_prime_eq_two
code: @[simp]
theorem zeroth_prime_eq_two : nth Prime 0 = 2 
goal: Nat.nth Nat.Prime 0 = 2

full_name: Nat.add_two_le_nth_prime
code: /-- The `n`th prime is greater or equal to `n + 2`. -/
lemma add_two_le_nth_prime (n : ℕ) : n + 2 ≤ nth Prime n 
goal: n + 2 ≤ Nat.nth Nat.Prime n
File: Mathlib/NumberTheory/MaricaSchoenheim.lean

full_name: Nat.GrahamConjecture
code: /-- Statement of Graham's conjecture (which is now a theorem in the literature).

Graham's conjecture states that if $0 < a_1 < \dots a_n$ are integers, then
$\max_{i, j} \frac{a_i}{\gcd(a_i, a_j)} \ge n$. -/
def GrahamConjecture (n : ℕ) (f : ℕ → ℕ) : Prop 
goal: Prop

full_name: Nat.grahamConjecture_of_squarefree
code: /-- The special case of Graham's conjecture where all numbers are squarefree. -/
lemma grahamConjecture_of_squarefree {n : ℕ} (f : ℕ → ℕ) (hf' : ∀ k < n, Squarefree (f k)) :
    GrahamConjecture n f 
goal: n.GrahamConjecture f
File: Mathlib/NumberTheory/NumberField/EquivReindex.lean

full_name: NumberField.equivReindex
code: /-- An equivalence between the set of embeddings of `K` into `ℂ` and the
  index set of the chosen basis of the ring of integers of `K`. -/
abbrev equivReindex : (K →+* ℂ) ≃ (ChooseBasisIndex ℤ (𝓞 K)) 
goal: (K →+* ℂ) ≃ Module.Free.ChooseBasisIndex ℤ (NumberField.RingOfIntegers K)

full_name: NumberField.basisMatrix
code: /-- The basis matrix for the embeddings of `K` into `ℂ`. This matrix is formed by
  taking the lattice basis vectors of `K` and reindexing them according to the
  equivalence `equivReindex`, then transposing the resulting matrix. -/
abbrev basisMatrix : Matrix (K →+* ℂ) (K →+* ℂ) ℂ 
goal: Matrix (K →+* ℂ) (K →+* ℂ) ℂ

full_name: NumberField.det_of_basisMatrix_non_zero
code: theorem det_of_basisMatrix_non_zero : (basisMatrix K).det ≠ 0 
goal: (NumberField.basisMatrix K).det ≠ 0

full_name: NumberField.instInvertibleMatrixRingHomComplexBasisMatrix
code: instance : Invertible (basisMatrix K) 
goal: Invertible (NumberField.basisMatrix K)

full_name: NumberField.canonicalEmbedding_eq_basisMatrix_mulVec
code: theorem canonicalEmbedding_eq_basisMatrix_mulVec (α : K) :
    canonicalEmbedding K α = (basisMatrix K).transpose.mulVec
      (fun i ↦ (((integralBasis K).reindex (equivReindex K).symm).repr α i : ℂ)) 
goal: (NumberField.canonicalEmbedding K) α =
  (NumberField.basisMatrix K).transpose.mulVec fun i =>
    ↑((((NumberField.integralBasis K).reindex (NumberField.equivReindex K).symm).repr α) i)

full_name: NumberField.inverse_basisMatrix_mulVec_eq_repr
code: theorem inverse_basisMatrix_mulVec_eq_repr (α : 𝓞 K) :
    ∀ i, ((basisMatrix K).transpose)⁻¹.mulVec (fun j =>
      canonicalEmbedding K (algebraMap (𝓞 K) K α) j) i =
      ((integralBasis K).reindex (equivReindex K).symm).repr α i 
goal: (NumberField.basisMatrix K).transpose⁻¹.mulVec
    (fun j => (NumberField.canonicalEmbedding K) ((algebraMap (NumberField.RingOfIntegers K) K) α) j) i =
  ↑((((NumberField.integralBasis K).reindex (NumberField.equivReindex K).symm).repr ↑α) i)
File: Mathlib/NumberTheory/Ostrowski.lean

full_name: Rat.MulRingNorm.eq_on_nat_iff_eq_on_Int
code: /-- Values of a multiplicative norm of the rationals coincide on ℕ if and only if they coincide
on `ℤ`. -/
lemma eq_on_nat_iff_eq_on_Int : (∀ n : ℕ , f n = g n) ↔ (∀ n : ℤ , f n = g n) 
goal: (∀ (n : ℕ), f ↑n = g ↑n) ↔ ∀ (n : ℤ), f ↑n = g ↑n

full_name: Rat.MulRingNorm.eq_on_nat_iff_eq
code: /-- Values of a multiplicative norm of the rationals are determined by the values on the natural
numbers. -/
lemma eq_on_nat_iff_eq : (∀ n : ℕ , f n = g n) ↔ f = g 
goal: (∀ (n : ℕ), f ↑n = g ↑n) ↔ f = g

full_name: Rat.MulRingNorm.equiv_on_nat_iff_equiv
code: /-- The equivalence class of a multiplicative norm on the rationals is determined by its values on
the natural numbers. -/
lemma equiv_on_nat_iff_equiv : (∃ c : ℝ, 0 < c ∧ (∀ n : ℕ , (f n) ^ c = g n)) ↔
    f.equiv g 
goal: (∃ c, 0 < c ∧ ∀ (n : ℕ), f ↑n ^ c = g ↑n) ↔ f.equiv g

full_name: Rat.MulRingNorm.mulRingNorm_padic
code: /-- The mulRingNorm corresponding to the p-adic norm on `ℚ`. -/
def mulRingNorm_padic (p : ℕ) [Fact p.Prime] : MulRingNorm ℚ 
goal: MulRingNorm ℚ

full_name: Rat.MulRingNorm.mulRingNorm_eq_padic_norm
code: @[simp] lemma mulRingNorm_eq_padic_norm (p : ℕ) [Fact p.Prime] (r : ℚ) :
  mulRingNorm_padic p r = padicNorm p r 
goal: (Rat.MulRingNorm.mulRingNorm_padic p) r = ↑(padicNorm p r)

full_name: Rat.MulRingNorm.exists_minimal_nat_zero_lt_mulRingNorm_lt_one
code: /-- There exists a minimal positive integer with absolute value smaller than 1. -/
lemma exists_minimal_nat_zero_lt_mulRingNorm_lt_one : ∃ p : ℕ, (0 < f p ∧ f p < 1) ∧
    ∀ m : ℕ, 0 < f m ∧ f m < 1 → p ≤ m 
goal: ∃ p, (0 < f ↑p ∧ f ↑p < 1) ∧ ∀ (m : ℕ), 0 < f ↑m ∧ f ↑m < 1 → p ≤ m

full_name: Rat.MulRingNorm.is_prime_of_minimal_nat_zero_lt_mulRingNorm_lt_one
code: /-- The minimal positive integer with absolute value smaller than 1 is a prime number.-/
lemma is_prime_of_minimal_nat_zero_lt_mulRingNorm_lt_one : p.Prime 
goal: Nat.Prime p

full_name: Rat.MulRingNorm.mulRingNorm_eq_one_of_not_dvd
code: /-- A natural number not divible by `p` has absolute value 1. -/
lemma mulRingNorm_eq_one_of_not_dvd {m : ℕ} (hpm : ¬ p ∣ m) : f m = 1 
goal: f ↑m = 1

full_name: Rat.MulRingNorm.exists_pos_mulRingNorm_eq_pow_neg
code: /-- The absolute value of `p` is `p ^ (-t)` for some positive real number `t`. -/
lemma exists_pos_mulRingNorm_eq_pow_neg : ∃ t : ℝ, 0 < t ∧ f p = p ^ (-t) 
goal: ∃ t, 0 < t ∧ f ↑p = ↑p ^ (-t)

full_name: Rat.MulRingNorm.mulRingNorm_equiv_padic_of_bounded
code: /-- If `f` is bounded and not trivial, then it is equivalent to a p-adic absolute value. -/
theorem mulRingNorm_equiv_padic_of_bounded :
    ∃! p, ∃ (hp : Fact (p.Prime)), MulRingNorm.equiv f (mulRingNorm_padic p) 
goal: ∃! p, ∃ (hp : Fact (Nat.Prime p)), f.equiv (Rat.MulRingNorm.mulRingNorm_padic p)
File: Mathlib/NumberTheory/NumberField/ClassNumber.lean

full_name: NumberField.RingOfIntegers.instFintypeClassGroup
code: noncomputable instance instFintypeClassGroup : Fintype (ClassGroup (𝓞 K)) 
goal: Fintype (ClassGroup (NumberField.RingOfIntegers K))

full_name: NumberField.classNumber
code: /-- The class number of a number field is the (finite) cardinality of the class group. -/
noncomputable def classNumber : ℕ 
goal: ℕ

full_name: NumberField.classNumber_eq_one_iff
code: /-- The class number of a number field is `1` iff the ring of integers is a PID. -/
theorem classNumber_eq_one_iff : classNumber K = 1 ↔ IsPrincipalIdealRing (𝓞 K) 
goal: NumberField.classNumber K = 1 ↔ IsPrincipalIdealRing (NumberField.RingOfIntegers K)

full_name: NumberField.exists_ideal_in_class_of_norm_le
code: theorem exists_ideal_in_class_of_norm_le (C : ClassGroup (𝓞 K)) :
    ∃ I : (Ideal (𝓞 K))⁰, ClassGroup.mk0 I = C ∧
      Ideal.absNorm (I : Ideal (𝓞 K)) ≤ (4 / π) ^ NrComplexPlaces K *
        ((finrank ℚ K).factorial / (finrank ℚ K) ^ (finrank ℚ K) * Real.sqrt |discr K|) 
goal: ∃ I,
  ClassGroup.mk0 I = C ∧
    ↑(Ideal.absNorm ↑I) ≤
      (4 / Real.pi) ^ NumberField.InfinitePlace.NrComplexPlaces K *
        (↑(FiniteDimensional.finrank ℚ K).factorial / ↑(FiniteDimensional.finrank ℚ K) ^ FiniteDimensional.finrank ℚ K *
          √|↑(NumberField.discr K)|)

full_name: RingOfIntegers.isPrincipalIdealRing_of_abs_discr_lt
code: theorem _root_.RingOfIntegers.isPrincipalIdealRing_of_abs_discr_lt
    (h : |discr K| < (2 * (π / 4) ^ NrComplexPlaces K *
      ((finrank ℚ K) ^ (finrank ℚ K) / (finrank ℚ K).factorial)) ^ 2) :
    IsPrincipalIdealRing (𝓞 K) 
goal: IsPrincipalIdealRing (NumberField.RingOfIntegers K)

full_name: Rat.classNumber_eq
code: theorem classNumber_eq : NumberField.classNumber ℚ = 1 
goal: NumberField.classNumber ℚ = 1
File: Mathlib/NumberTheory/NumberField/FractionalIdeal.lean

full_name: NumberField.instFreeIntSubtypeMemSubmoduleRingOfIntegersCoeToSubmodule
code: instance (I : FractionalIdeal (𝓞 K)⁰ K) : Module.Free ℤ I 
goal: Module.Free ℤ ↥↑I

full_name: NumberField.instFiniteIntSubtypeMemSubmoduleRingOfIntegersCoeToSubmodule
code: instance (I : FractionalIdeal (𝓞 K)⁰ K) : Module.Finite ℤ I 
goal: Module.Finite ℤ ↥↑I

full_name: NumberField.instIsLocalizedModuleIntNonZeroDivisorsSubtypeMemSubmoduleRingOfIntegersCoeToSubmoduleValFractionalIdealRestrictScalarsSubtype
code: instance (I : (FractionalIdeal (𝓞 K)⁰ K)ˣ) :
    IsLocalizedModule ℤ⁰ ((Submodule.subtype (I : Submodule (𝓞 K) K)).restrictScalars ℤ) 
goal: IsLocalizedModule (nonZeroDivisors ℤ) (↑ℤ (↑↑I).subtype)

full_name: NumberField.fractionalIdealBasis
code: /-- A `ℤ`-basis of a fractional ideal. -/
noncomputable def fractionalIdealBasis (I : FractionalIdeal (𝓞 K)⁰ K) :
    Basis (Free.ChooseBasisIndex ℤ I) ℤ I 
goal: Basis (Module.Free.ChooseBasisIndex ℤ ↥↑I) ℤ ↥↑I

full_name: NumberField.basisOfFractionalIdeal
code: /-- A `ℚ`-basis of `K` that spans `I` over `ℤ`, see `mem_span_basisOfFractionalIdeal` below. -/
noncomputable def basisOfFractionalIdeal (I : (FractionalIdeal (𝓞 K)⁰ K)ˣ) :
    Basis (Free.ChooseBasisIndex ℤ I) ℚ K 
goal: Basis (Module.Free.ChooseBasisIndex ℤ ↥↑↑I) ℚ K

full_name: NumberField.basisOfFractionalIdeal_apply
code: theorem basisOfFractionalIdeal_apply (I : (FractionalIdeal (𝓞 K)⁰ K)ˣ)
    (i : Free.ChooseBasisIndex ℤ I) :
    basisOfFractionalIdeal K I i = fractionalIdealBasis K I.1 i 
goal: (NumberField.basisOfFractionalIdeal K I) i = ↑((NumberField.fractionalIdealBasis K ↑I) i)

full_name: NumberField.mem_span_basisOfFractionalIdeal
code: theorem mem_span_basisOfFractionalIdeal {I : (FractionalIdeal (𝓞 K)⁰ K)ˣ} {x : K} :
    x ∈ Submodule.span ℤ (Set.range (basisOfFractionalIdeal K I)) ↔ x ∈ (I : Set K) 
goal: x ∈ Submodule.span ℤ (Set.range ⇑(NumberField.basisOfFractionalIdeal K I)) ↔ x ∈ ↑↑I

full_name: NumberField.fractionalIdeal_rank
code: theorem fractionalIdeal_rank (I : (FractionalIdeal (𝓞 K)⁰ K)ˣ) :
    finrank ℤ I = finrank ℤ (𝓞 K) 
goal: FiniteDimensional.finrank ℤ ↥↑↑I = FiniteDimensional.finrank ℤ (NumberField.RingOfIntegers K)

full_name: NumberField.det_basisOfFractionalIdeal_eq_absNorm
code: /-- The absolute value of the determinant of the base change from `integralBasis` to
`basisOfFractionalIdeal I` is equal to the norm of `I`. -/
theorem det_basisOfFractionalIdeal_eq_absNorm  (I : (FractionalIdeal (𝓞 K)⁰ K)ˣ)
    (e : (Free.ChooseBasisIndex ℤ (𝓞 K)) ≃ (Free.ChooseBasisIndex ℤ I)) :
    |(integralBasis K).det ((basisOfFractionalIdeal K I).reindex e.symm)| =
      FractionalIdeal.absNorm I.1 
goal: |(NumberField.integralBasis K).det ⇑((NumberField.basisOfFractionalIdeal K I).reindex e.symm)| =
  FractionalIdeal.absNorm ↑I
File: Mathlib/NumberTheory/NumberField/Units/Regulator.lean

full_name: NumberField.Units.regulator
code: /-- The regulator of a number fied `K`. -/
def regulator : ℝ 
goal: ℝ

full_name: NumberField.Units.regulator_ne_zero
code: theorem regulator_ne_zero : regulator K ≠ 0 
goal: NumberField.Units.regulator K ≠ 0

full_name: NumberField.Units.regulator_pos
code: theorem regulator_pos : 0 < regulator K 
goal: 0 < NumberField.Units.regulator K

full_name: NumberField.Units.regulator_eq_det'
code: theorem regulator_eq_det' (e : {w : InfinitePlace K // w ≠ w₀} ≃ Fin (rank K)) :
    regulator K = |(Matrix.of fun i ↦ (logEmbedding K) (fundSystem K (e i))).det| 
goal: NumberField.Units.regulator K =
  |(Matrix.of fun i => (NumberField.Units.logEmbedding K) (NumberField.Units.fundSystem K (e i))).det|

full_name: NumberField.Units.abs_det_eq_abs_det
code: /-- Let `u : Fin (rank K) → (𝓞 K)ˣ` be a family of units and let `w₁` and `w₂` be two infinite
places. Then, the two square matrices with entries `(mult w * log w (u i))_i, {w ≠ w_i}`, `i = 1,2`,
have the same determinant in absolute value. -/
theorem abs_det_eq_abs_det (u : Fin (rank K) → (𝓞 K)ˣ)
    {w₁ w₂ : InfinitePlace K} (e₁ : {w // w ≠ w₁} ≃ Fin (rank K))
    (e₂ : {w // w ≠ w₂} ≃ Fin (rank K)) :
    |(Matrix.of fun i w : {w // w ≠ w₁} ↦ (mult w.val : ℝ) * (w.val (u (e₁ i) : K)).log).det| =
    |(Matrix.of fun i w : {w // w ≠ w₂} ↦ (mult w.val : ℝ) * (w.val (u (e₂ i) : K)).log).det| 
goal: |(Matrix.of fun i w => ↑(↑w).mult * Real.log (↑w ((algebraMap (𝓞 K) K) ↑(u (e₁ i))))).det| =
  |(Matrix.of fun i w => ↑(↑w).mult * Real.log (↑w ((algebraMap (𝓞 K) K) ↑(u (e₂ i))))).det|

full_name: NumberField.Units.regulator_eq_det
code: /-- For any infinite place `w'`, the regulator is equal to the absolute value of the determinant
of the matrix `(mult w * log w (fundSystem K i)))_i, {w ≠ w'}`. -/
theorem regulator_eq_det (w' : InfinitePlace K) (e : {w // w ≠ w'} ≃ Fin (rank K)) :
    regulator K =
      |(Matrix.of fun i w : {w // w ≠ w'} ↦ (mult w.val : ℝ) *
        Real.log (w.val (fundSystem K (e i) : K))).det| 
goal: NumberField.Units.regulator K =
  |(Matrix.of fun i w => ↑(↑w).mult * Real.log (↑w ((algebraMap (𝓞 K) K) ↑(NumberField.Units.fundSystem K (e i))))).det|
File: Mathlib/NumberTheory/Wilson.lean

full_name: ZMod.wilsons_lemma
code: /-- **Wilson's Lemma**: the product of `1`, ..., `p-1` is `-1` modulo `p`. -/
@[simp]
theorem wilsons_lemma : ((p - 1)! : ZMod p) = -1 
goal: ↑(p - 1)! = -1

full_name: ZMod.prod_Ico_one_prime
code: @[simp]
theorem prod_Ico_one_prime : ∏ x ∈ Ico 1 p, (x : ZMod p) = -1 
goal: ∏ x ∈ Finset.Ico 1 p, ↑x = -1

full_name: Nat.prime_of_fac_equiv_neg_one
code: /-- For `n ≠ 1`, `(n-1)!` is congruent to `-1` modulo `n` only if n is prime. -/
theorem prime_of_fac_equiv_neg_one (h : ((n - 1)! : ZMod n) = -1) (h1 : n ≠ 1) : Prime n 
goal: Nat.Prime n

full_name: Nat.prime_iff_fac_equiv_neg_one
code: /-- **Wilson's Theorem**: For `n ≠ 1`, `(n-1)!` is congruent to `-1` modulo `n` iff n is prime. -/
theorem prime_iff_fac_equiv_neg_one (h : n ≠ 1) : Prime n ↔ ((n - 1)! : ZMod n) = -1 
goal: Nat.Prime n ↔ ↑(n - 1)! = -1
File: Mathlib/NumberTheory/NumberField/Norm.lean

full_name: Algebra.coe_norm_int
code: theorem Algebra.coe_norm_int : (Algebra.norm ℤ x : ℚ) = Algebra.norm ℚ (x : K) 
goal: ↑((Algebra.norm ℤ) x) = (Algebra.norm ℚ) ↑x

full_name: Algebra.coe_trace_int
code: theorem Algebra.coe_trace_int : (Algebra.trace ℤ _ x : ℚ) = Algebra.trace ℚ K (x : K) 
goal: ↑((Algebra.trace ℤ (𝓞 K)) x) = (Algebra.trace ℚ K) ↑x

full_name: RingOfIntegers.norm
code: /-- `Algebra.norm` as a morphism betwen the rings of integers. -/
noncomputable def norm [Algebra.IsSeparable K L] : 𝓞 L →* 𝓞 K 
goal: 𝓞 L →* 𝓞 K

full_name: RingOfIntegers.coe_norm
code: @[simp] lemma coe_norm [Algebra.IsSeparable K L] (x : 𝓞 L) :
  norm K x = Algebra.norm K (x : L) 
goal: ↑((RingOfIntegers.norm K) x) = (Algebra.norm K) ↑x

full_name: RingOfIntegers.coe_algebraMap_norm
code: theorem coe_algebraMap_norm [Algebra.IsSeparable K L] (x : 𝓞 L) :
    (algebraMap (𝓞 K) (𝓞 L) (norm K x) : L) = algebraMap K L (Algebra.norm K (x : L)) 
goal: ↑((algebraMap (𝓞 K) (𝓞 L)) ((RingOfIntegers.norm K) x)) = (algebraMap K L) ((Algebra.norm K) ↑x)

full_name: RingOfIntegers.algebraMap_norm_algebraMap
code: theorem algebraMap_norm_algebraMap [Algebra.IsSeparable K L] (x : 𝓞 K) :
    algebraMap _ K (norm K (algebraMap (𝓞 K) (𝓞 L) x)) =
      Algebra.norm K (algebraMap K L (algebraMap _ _ x)) 
goal: (algebraMap (𝓞 K) K) ((RingOfIntegers.norm K) ((algebraMap (𝓞 K) (𝓞 L)) x)) =
  (Algebra.norm K) ((algebraMap K L) ((algebraMap (𝓞 K) K) x))

full_name: RingOfIntegers.norm_algebraMap
code: theorem norm_algebraMap [Algebra.IsSeparable K L] (x : 𝓞 K) :
    norm K (algebraMap (𝓞 K) (𝓞 L) x) = x ^ finrank K L 
goal: (RingOfIntegers.norm K) ((algebraMap (𝓞 K) (𝓞 L)) x) = x ^ FiniteDimensional.finrank K L

full_name: RingOfIntegers.isUnit_norm_of_isGalois
code: theorem isUnit_norm_of_isGalois [IsGalois K L] {x : 𝓞 L} : IsUnit (norm K x) ↔ IsUnit x 
goal: IsUnit ((RingOfIntegers.norm K) x) ↔ IsUnit x

full_name: RingOfIntegers.dvd_norm
code: /-- If `L/K` is a finite Galois extension of fields, then, for all `(x : 𝓞 L)` we have that
`x ∣ algebraMap (𝓞 K) (𝓞 L) (norm K x)`. -/
theorem dvd_norm [IsGalois K L] (x : 𝓞 L) : x ∣ algebraMap (𝓞 K) (𝓞 L) (norm K x) 
goal: x ∣ (algebraMap (𝓞 K) (𝓞 L)) ((RingOfIntegers.norm K) x)

full_name: RingOfIntegers.norm_norm
code: theorem norm_norm [Algebra.IsSeparable K L] [Algebra F L] [Algebra.IsSeparable F L]
    [FiniteDimensional F L] [IsScalarTower K F L] (x : 𝓞 L) : norm K (norm F x) = norm K x 
goal: (RingOfIntegers.norm K) ((RingOfIntegers.norm F) x) = (RingOfIntegers.norm K) x

full_name: RingOfIntegers.isUnit_norm
code: theorem isUnit_norm [CharZero K] {x : 𝓞 F} : IsUnit (norm K x) ↔ IsUnit x 
goal: IsUnit ((RingOfIntegers.norm K) x) ↔ IsUnit x