File: Mathlib/RingTheory/Discriminant.lean

full_name: Algebra.discr
code: /-- Given an `A`-algebra `B` and `b`, an `ι`-indexed family of elements of `B`, we define
`discr A ι b` as the determinant of `traceMatrix A ι b`. -/
-- Porting note: using `[DecidableEq ι]` instead of `by classical...` did not work in
-- mathlib3.
noncomputable def discr (A : Type u) {B : Type v} [CommRing A] [CommRing B] [Algebra A B]
    [Fintype ι] (b : ι → B) 
goal: A

full_name: Algebra.discr_def
code: theorem discr_def [Fintype ι] (b : ι → B) : discr A b = (traceMatrix A b).det 
goal: Algebra.discr A b = (Algebra.traceMatrix A b).det

full_name: Algebra.discr_eq_discr_of_algEquiv
code: /-- Mapping a family of vectors along an `AlgEquiv` preserves the discriminant. -/
theorem discr_eq_discr_of_algEquiv [Fintype ι] (b : ι → B) (f : B ≃ₐ[A] C) :
    Algebra.discr A b = Algebra.discr A (f ∘ b) 
goal: Algebra.discr A b = Algebra.discr A (⇑f ∘ b)

full_name: Algebra.discr_reindex
code: @[simp]
theorem discr_reindex (b : Basis ι A B) (f : ι ≃ ι') : discr A (b ∘ ⇑f.symm) = discr A b 
goal: Algebra.discr A (⇑b ∘ ⇑f.symm) = Algebra.discr A ⇑b

full_name: Algebra.discr_zero_of_not_linearIndependent
code: /-- If `b` is not linear independent, then `Algebra.discr A b = 0`. -/
theorem discr_zero_of_not_linearIndependent [IsDomain A] {b : ι → B}
    (hli : ¬LinearIndependent A b) : discr A b = 0 
goal: Algebra.discr A b = 0

full_name: Algebra.discr_of_matrix_vecMul
code: /-- Relation between `Algebra.discr A ι b` and
`Algebra.discr A (b ᵥ* P.map (algebraMap A B))`. -/
theorem discr_of_matrix_vecMul (b : ι → B) (P : Matrix ι ι A) :
    discr A (b ᵥ* P.map (algebraMap A B)) = P.det ^ 2 * discr A b 
goal: Algebra.discr A (b ᵥ* P.map ⇑(algebraMap A B)) = P.det ^ 2 * Algebra.discr A b

full_name: Algebra.discr_of_matrix_mulVec
code: /-- Relation between `Algebra.discr A ι b` and
`Algebra.discr A ((P.map (algebraMap A B)) *ᵥ b)`. -/
theorem discr_of_matrix_mulVec (b : ι → B) (P : Matrix ι ι A) :
    discr A (P.map (algebraMap A B) *ᵥ b) = P.det ^ 2 * discr A b 
goal: Algebra.discr A (P.map ⇑(algebraMap A B) *ᵥ b) = P.det ^ 2 * Algebra.discr A b

full_name: Algebra.discr_not_zero_of_basis
code: /-- If `b` is a basis of a finite separable field extension `L/K`, then `Algebra.discr K b ≠ 0`. -/
theorem discr_not_zero_of_basis [Algebra.IsSeparable K L] (b : Basis ι K L) :
    discr K b ≠ 0 
goal: Algebra.discr K ⇑b ≠ 0

full_name: Algebra.discr_isUnit_of_basis
code: /-- If `b` is a basis of a finite separable field extension `L/K`,
  then `Algebra.discr K b` is a unit. -/
theorem discr_isUnit_of_basis [Algebra.IsSeparable K L] (b : Basis ι K L) : IsUnit (discr K b) 
goal: IsUnit (Algebra.discr K ⇑b)

full_name: Algebra.discr_eq_det_embeddingsMatrixReindex_pow_two
code: /-- If `L/K` is a field extension and `b : ι → L`, then `discr K b` is the square of the
determinant of the matrix whose `(i, j)` coefficient is `σⱼ (b i)`, where `σⱼ : L →ₐ[K] E` is the
embedding in an algebraically closed field `E` corresponding to `j : ι` via a bijection
`e : ι ≃ (L →ₐ[K] E)`. -/
theorem discr_eq_det_embeddingsMatrixReindex_pow_two
    [Algebra.IsSeparable K L] (e : ι ≃ (L →ₐ[K] E)) :
    algebraMap K E (discr K b) = (embeddingsMatrixReindex K E b e).det ^ 2 
goal: (algebraMap K E) (Algebra.discr K b) = (Algebra.embeddingsMatrixReindex K E b e).det ^ 2

full_name: Algebra.discr_powerBasis_eq_prod
code: /-- The discriminant of a power basis. -/
theorem discr_powerBasis_eq_prod (e : Fin pb.dim ≃ (L →ₐ[K] E)) [Algebra.IsSeparable K L] :
    algebraMap K E (discr K pb.basis) =
      ∏ i : Fin pb.dim, ∏ j ∈ Ioi i, (e j pb.gen - e i pb.gen) ^ 2 
goal: (algebraMap K E) (Algebra.discr K ⇑pb.basis) = ∏ i : Fin pb.dim, ∏ j ∈ Finset.Ioi i, ((e j) pb.gen - (e i) pb.gen) ^ 2

full_name: Algebra.discr_powerBasis_eq_prod'
code: /-- A variation of `Algebra.discr_powerBasis_eq_prod`. -/
theorem discr_powerBasis_eq_prod' [Algebra.IsSeparable K L] (e : Fin pb.dim ≃ (L →ₐ[K] E)) :
    algebraMap K E (discr K pb.basis) =
      ∏ i : Fin pb.dim, ∏ j ∈ Ioi i, -((e j pb.gen - e i pb.gen) * (e i pb.gen - e j pb.gen)) 
goal: (algebraMap K E) (Algebra.discr K ⇑pb.basis) =
  ∏ i : Fin pb.dim, ∏ j ∈ Finset.Ioi i, -(((e j) pb.gen - (e i) pb.gen) * ((e i) pb.gen - (e j) pb.gen))

full_name: Algebra._aux_Mathlib_RingTheory_Discriminant___macroRules_Algebra_termN_1
code: local notation "n" => finrank K L
goal: Lean.Macro

full_name: Algebra._aux_Mathlib_RingTheory_Discriminant___unexpand_FiniteDimensional_finrank_1
code: local notation "n" => finrank K L
goal: Lean.PrettyPrinter.Unexpander

full_name: Algebra.discr_powerBasis_eq_prod''
code: /-- A variation of `Algebra.discr_powerBasis_eq_prod`. -/
theorem discr_powerBasis_eq_prod'' [Algebra.IsSeparable K L] (e : Fin pb.dim ≃ (L →ₐ[K] E)) :
    algebraMap K E (discr K pb.basis) =
      (-1) ^ (n * (n - 1) / 2) *
        ∏ i : Fin pb.dim, ∏ j ∈ Ioi i, (e j pb.gen - e i pb.gen) * (e i pb.gen - e j pb.gen) 
goal: (algebraMap K E) (Algebra.discr K ⇑pb.basis) =
  (-1) ^ (FiniteDimensional.finrank K L * (FiniteDimensional.finrank K L - 1) / 2) *
    ∏ i : Fin pb.dim, ∏ j ∈ Finset.Ioi i, ((e j) pb.gen - (e i) pb.gen) * ((e i) pb.gen - (e j) pb.gen)

full_name: Algebra.discr_powerBasis_eq_norm
code: /-- Formula for the discriminant of a power basis using the norm of the field extension. -/
-- Porting note: `(minpoly K pb.gen).derivative` does not work anymore.
theorem discr_powerBasis_eq_norm [Algebra.IsSeparable K L] :
    discr K pb.basis =
      (-1) ^ (n * (n - 1) / 2) *
      norm K (aeval pb.gen (derivative (R := K) (minpoly K pb.gen))) 
goal: Algebra.discr K ⇑pb.basis =
  (-1) ^ (FiniteDimensional.finrank K L * (FiniteDimensional.finrank K L - 1) / 2) *
    (Algebra.norm K) ((Polynomial.aeval pb.gen) (Polynomial.derivative (minpoly K pb.gen)))

full_name: Algebra.discr_isIntegral
code: /-- If `K` and `L` are fields and `IsScalarTower R K L`, and `b : ι → L` satisfies
` ∀ i, IsIntegral R (b i)`, then `IsIntegral R (discr K b)`. -/
theorem discr_isIntegral {b : ι → L} (h : ∀ i, IsIntegral R (b i)) : IsIntegral R (discr K b) 
goal: IsIntegral R (Algebra.discr K b)

full_name: Algebra.discr_mul_isIntegral_mem_adjoin
code: /-- Let `K` be the fraction field of an integrally closed domain `R` and let `L` be a finite
separable extension of `K`. Let `B : PowerBasis K L` be such that `IsIntegral R B.gen`.
Then for all, `z : L` that are integral over `R`, we have
`(discr K B.basis) • z ∈ adjoin R ({B.gen} : Set L)`. -/
theorem discr_mul_isIntegral_mem_adjoin [Algebra.IsSeparable K L] [IsIntegrallyClosed R]
    [IsFractionRing R K] {B : PowerBasis K L} (hint : IsIntegral R B.gen) {z : L}
    (hz : IsIntegral R z) : discr K B.basis • z ∈ adjoin R ({B.gen} : Set L) 
goal: Algebra.discr K ⇑B.basis • z ∈ Algebra.adjoin R {B.gen}

full_name: Algebra.discr_eq_discr
code: /-- Two (finite) ℤ-bases have the same discriminant. -/
theorem discr_eq_discr [Fintype ι] (b : Basis ι ℤ A) (b' : Basis ι ℤ A) :
    Algebra.discr ℤ b = Algebra.discr ℤ b' 
goal: Algebra.discr ℤ ⇑b = Algebra.discr ℤ ⇑b'