fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
toAddSubmonoid_injective : Function.Injective (toAddSubmonoid : NonUnitalSubsemiring R → AddSubmonoid R) | _, _, h => ext (SetLike.ext_iff.mp h :)
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean
toAddSubmonoid_injective
null
protected mk' (s : Set R) (sg : Subsemigroup R) (hg : ↑sg = s) (sa : AddSubmonoid R) (ha : ↑sa = s) : NonUnitalSubsemiring R where carrier := s zero_mem' := by subst ha; exact sa.zero_mem add_mem' := by subst ha; exact sa.add_mem mul_mem' := by subst hg; exact sg.mul_mem @[simp]
def
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean
mk'
Construct a `NonUnitalSubsemiring R` from a set `s`, a subsemigroup `sg`, and an additive submonoid `sa` such that `x ∈ s ↔ x ∈ sg ↔ x ∈ sa`.
coe_mk' {s : Set R} {sg : Subsemigroup R} (hg : ↑sg = s) {sa : AddSubmonoid R} (ha : ↑sa = s) : (NonUnitalSubsemiring.mk' s sg hg sa ha : Set R) = s := rfl @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean
coe_mk'
null
mem_mk' {s : Set R} {sg : Subsemigroup R} (hg : ↑sg = s) {sa : AddSubmonoid R} (ha : ↑sa = s) {x : R} : x ∈ NonUnitalSubsemiring.mk' s sg hg sa ha ↔ x ∈ s := Iff.rfl @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean
mem_mk'
null
mk'_toSubsemigroup {s : Set R} {sg : Subsemigroup R} (hg : ↑sg = s) {sa : AddSubmonoid R} (ha : ↑sa = s) : (NonUnitalSubsemiring.mk' s sg hg sa ha).toSubsemigroup = sg := SetLike.coe_injective hg.symm @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean
mk'_toSubsemigroup
null
mk'_toAddSubmonoid {s : Set R} {sg : Subsemigroup R} (hg : ↑sg = s) {sa : AddSubmonoid R} (ha : ↑sa = s) : (NonUnitalSubsemiring.mk' s sg hg sa ha).toAddSubmonoid = sa := SetLike.coe_injective ha.symm
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean
mk'_toAddSubmonoid
null
@[simp, norm_cast] coe_zero : ((0 : s) : R) = (0 : R) := rfl @[simp, norm_cast]
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean
coe_zero
null
coe_add (x y : s) : ((x + y : s) : R) = (x + y : R) := rfl @[simp, norm_cast]
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean
coe_add
null
coe_mul (x y : s) : ((x * y : s) : R) = (x * y : R) := rfl /-! Note: currently, there are no ordered versions of non-unital rings. -/ @[simp high]
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean
coe_mul
null
mem_toSubsemigroup {s : NonUnitalSubsemiring R} {x : R} : x ∈ s.toSubsemigroup ↔ x ∈ s := Iff.rfl @[simp high]
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean
mem_toSubsemigroup
null
coe_toSubsemigroup (s : NonUnitalSubsemiring R) : (s.toSubsemigroup : Set R) = s := rfl @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean
coe_toSubsemigroup
null
mem_toAddSubmonoid {s : NonUnitalSubsemiring R} {x : R} : x ∈ s.toAddSubmonoid ↔ x ∈ s := Iff.rfl @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean
mem_toAddSubmonoid
null
coe_toAddSubmonoid (s : NonUnitalSubsemiring R) : (s.toAddSubmonoid : Set R) = s := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean
coe_toAddSubmonoid
null
codRestrict (f : F) (s : S') (h : ∀ x, f x ∈ s) : R →ₙ+* s where toFun n := ⟨f n, h n⟩ map_mul' x y := Subtype.eq (map_mul f x y) map_add' x y := Subtype.eq (map_add f x y) map_zero' := Subtype.eq (map_zero f)
def
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean
codRestrict
The non-unital subsemiring `R` of the non-unital semiring `R`. -/ instance : Top (NonUnitalSubsemiring R) := ⟨{ (⊤ : Subsemigroup R), (⊤ : AddSubmonoid R) with }⟩ @[simp] theorem mem_top (x : R) : x ∈ (⊤ : NonUnitalSubsemiring R) := Set.mem_univ x @[simp] theorem coe_top : ((⊤ : NonUnitalSubsemiring R) : Set R) = Set.univ := rfl end NonUnitalSubsemiring namespace NonUnitalRingHom open NonUnitalSubsemiring variable [NonUnitalNonAssocSemiring S] variable {F : Type*} [FunLike F R S] [NonUnitalRingHomClass F R S] variable (f : F) end NonUnitalRingHom namespace NonUnitalSubsemiring -- should we define this as the range of the zero homomorphism? instance : Bot (NonUnitalSubsemiring R) := ⟨{ carrier := {0} add_mem' := fun _ _ => by simp_all zero_mem' := Set.mem_singleton 0 mul_mem' := fun _ _ => by simp_all }⟩ instance : Inhabited (NonUnitalSubsemiring R) := ⟨⊥⟩ theorem coe_bot : ((⊥ : NonUnitalSubsemiring R) : Set R) = {0} := rfl theorem mem_bot {x : R} : x ∈ (⊥ : NonUnitalSubsemiring R) ↔ x = 0 := Set.mem_singleton_iff /-- The inf of two non-unital subsemirings is their intersection. -/ instance : Min (NonUnitalSubsemiring R) := ⟨fun s t => { s.toSubsemigroup ⊓ t.toSubsemigroup, s.toAddSubmonoid ⊓ t.toAddSubmonoid with carrier := s ∩ t }⟩ @[simp] theorem coe_inf (p p' : NonUnitalSubsemiring R) : ((p ⊓ p' : NonUnitalSubsemiring R) : Set R) = (p : Set R) ∩ p' := rfl @[simp] theorem mem_inf {p p' : NonUnitalSubsemiring R} {x : R} : x ∈ p ⊓ p' ↔ x ∈ p ∧ x ∈ p' := Iff.rfl end NonUnitalSubsemiring namespace NonUnitalRingHom variable {F : Type*} [FunLike F R S] variable [NonUnitalNonAssocSemiring S] [NonUnitalRingHomClass F R S] {S' : Type*} [SetLike S' S] [NonUnitalSubsemiringClass S' S] {s : NonUnitalSubsemiring R} open NonUnitalSubsemiringClass NonUnitalSubsemiring /-- Restriction of a non-unital ring homomorphism to a non-unital subsemiring of the codomain.
eqSlocus (f g : F) : NonUnitalSubsemiring R := { (f : R →ₙ* S).eqLocus (g : R →ₙ* S), (f : R →+ S).eqLocusM g with carrier := { x | f x = g x } }
def
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean
eqSlocus
The non-unital subsemiring of elements `x : R` such that `f x = g x`
inclusion {S T : NonUnitalSubsemiring R} (h : S ≤ T) : S →ₙ+* T := codRestrict (subtype S) _ fun x => h x.2
def
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean
inclusion
The non-unital ring homomorphism associated to an inclusion of non-unital subsemirings.
PowerBasis.norm_gen_eq_coeff_zero_minpoly (pb : PowerBasis R S) : norm R pb.gen = (-1) ^ pb.dim * coeff (minpoly R pb.gen) 0 := by rw [norm_eq_matrix_det pb.basis, det_eq_sign_charpoly_coeff, charpoly_leftMulMatrix, Fintype.card_fin]
theorem
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
PowerBasis.norm_gen_eq_coeff_zero_minpoly
Given `pb : PowerBasis K S`, then the norm of `pb.gen` is `(-1) ^ pb.dim * coeff (minpoly K pb.gen) 0`.
PowerBasis.norm_gen_eq_prod_roots [Algebra R F] (pb : PowerBasis R S) (hf : (minpoly R pb.gen).Splits (algebraMap R F)) : algebraMap R F (norm R pb.gen) = ((minpoly R pb.gen).aroots F).prod := by haveI := Module.nontrivial R F have := minpoly.monic pb.isIntegral_gen rw [PowerBasis.norm_gen_eq_coeff_zero_minpoly, ← pb.natDegree_minpoly, RingHom.map_mul, ← coeff_map, prod_roots_eq_coeff_zero_of_monic_of_splits (this.map _) ((splits_id_iff_splits _).2 hf), this.natDegree_map, map_pow, ← mul_assoc, ← mul_pow] simp only [map_neg, map_one, neg_mul, neg_neg, one_pow, one_mul]
theorem
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
PowerBasis.norm_gen_eq_prod_roots
Given `pb : PowerBasis R S`, then the norm of `pb.gen` is `((minpoly R pb.gen).aroots F).prod`.
@[simp] norm_zero [Nontrivial S] [Module.Free R S] [Module.Finite R S] : norm R (0 : S) = 0 := by nontriviality rw [norm_apply, coe_lmul_eq_mul, map_zero, LinearMap.det_zero' (Module.Free.chooseBasis R S)] @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
norm_zero
null
norm_eq_zero_iff [IsDomain R] [IsDomain S] [Module.Free R S] [Module.Finite R S] {x : S} : norm R x = 0 ↔ x = 0 := by constructor swap · rintro rfl; exact norm_zero · let b := Module.Free.chooseBasis R S let decEq := Classical.decEq (Module.Free.ChooseBasisIndex R S) rw [norm_eq_matrix_det b, ← Matrix.exists_mulVec_eq_zero_iff] rintro ⟨v, v_ne, hv⟩ rw [← b.equivFun.apply_symm_apply v, b.equivFun_symm_apply, b.equivFun_apply, leftMulMatrix_mulVec_repr] at hv refine (mul_eq_zero.mp (b.ext_elem fun i => ?_)).resolve_right (show ∑ i, v i • b i ≠ 0 from ?_) · simpa only [LinearEquiv.map_zero, Pi.zero_apply] using congr_fun hv i · contrapose! v_ne with sum_eq apply b.equivFun.symm.injective rw [b.equivFun_symm_apply, sum_eq, LinearEquiv.map_zero]
theorem
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
norm_eq_zero_iff
null
norm_ne_zero_iff [IsDomain R] [IsDomain S] [Module.Free R S] [Module.Finite R S] {x : S} : norm R x ≠ 0 ↔ x ≠ 0 := not_iff_not.mpr norm_eq_zero_iff
theorem
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
norm_ne_zero_iff
null
@[simp] norm_eq_zero_iff' [IsDomain R] [IsDomain S] [Module.Free R S] [Module.Finite R S] {x : S} : LinearMap.det (LinearMap.mul R S x) = 0 ↔ x = 0 := norm_eq_zero_iff
theorem
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
norm_eq_zero_iff'
This is `Algebra.norm_eq_zero_iff` composed with `Algebra.norm_apply`.
norm_eq_zero_iff_of_basis [IsDomain R] [IsDomain S] (b : Basis ι R S) {x : S} : Algebra.norm R x = 0 ↔ x = 0 := by haveI : Module.Free R S := Module.Free.of_basis b haveI : Module.Finite R S := Module.Finite.of_basis b exact norm_eq_zero_iff
theorem
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
norm_eq_zero_iff_of_basis
null
norm_ne_zero_iff_of_basis [IsDomain R] [IsDomain S] (b : Basis ι R S) {x : S} : Algebra.norm R x ≠ 0 ↔ x ≠ 0 := not_iff_not.mpr (norm_eq_zero_iff_of_basis b)
theorem
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
norm_ne_zero_iff_of_basis
null
norm_eq_norm_adjoin [FiniteDimensional K L] [Algebra.IsSeparable K L] (x : L) : norm K x = norm K (AdjoinSimple.gen K x) ^ finrank K⟮x⟯ L := by letI := Algebra.isSeparable_tower_top_of_isSeparable K K⟮x⟯ L let pbL := Field.powerBasisOfFiniteOfSeparable K⟮x⟯ L let pbx := IntermediateField.adjoin.powerBasis (Algebra.IsSeparable.isIntegral K x) rw [← AdjoinSimple.algebraMap_gen K x, norm_eq_matrix_det (pbx.basis.smulTower pbL.basis) _, smulTower_leftMulMatrix_algebraMap, det_blockDiagonal, AdjoinSimple.algebraMap_gen, norm_eq_matrix_det pbx.basis] simp only [Finset.card_fin, Finset.prod_const] congr rw [← PowerBasis.finrank]
theorem
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
norm_eq_norm_adjoin
null
_root_.IntermediateField.AdjoinSimple.norm_gen_eq_one {x : L} (hx : ¬IsIntegral K x) : norm K (AdjoinSimple.gen K x) = 1 := by rw [norm_eq_one_of_not_exists_basis] contrapose! hx obtain ⟨s, ⟨b⟩⟩ := hx refine .of_mem_of_fg K⟮x⟯.toSubalgebra ?_ x ?_ · exact (Submodule.fg_iff_finiteDimensional _).mpr (.of_fintype_basis b) · exact IntermediateField.subset_adjoin K _ (Set.mem_singleton x)
theorem
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
_root_.IntermediateField.AdjoinSimple.norm_gen_eq_one
null
_root_.IntermediateField.AdjoinSimple.norm_gen_eq_prod_roots (x : L) (hf : (minpoly K x).Splits (algebraMap K F)) : (algebraMap K F) (norm K (AdjoinSimple.gen K x)) = ((minpoly K x).aroots F).prod := by have injKxL := (algebraMap K⟮x⟯ L).injective by_cases hx : IsIntegral K x; swap · simp [minpoly.eq_zero hx, IntermediateField.AdjoinSimple.norm_gen_eq_one hx, aroots_def] rw [← adjoin.powerBasis_gen hx, PowerBasis.norm_gen_eq_prod_roots] <;> rw [adjoin.powerBasis_gen hx, ← minpoly.algebraMap_eq injKxL] <;> simp only [AdjoinSimple.algebraMap_gen _ _, hf]
theorem
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
_root_.IntermediateField.AdjoinSimple.norm_gen_eq_prod_roots
null
norm_eq_prod_embeddings_gen [Algebra R F] (pb : PowerBasis R S) (hE : (minpoly R pb.gen).Splits (algebraMap R F)) (hfx : IsSeparable R pb.gen) : algebraMap R F (norm R pb.gen) = (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).prod fun σ => σ pb.gen := by letI := Classical.decEq F rw [PowerBasis.norm_gen_eq_prod_roots pb hE] rw [@Fintype.prod_equiv (S →ₐ[R] F) _ _ (PowerBasis.AlgHom.fintype pb) _ _ pb.liftEquiv' (fun σ => σ pb.gen) (fun x => x) ?_] · rw [Finset.prod_mem_multiset, Finset.prod_eq_multiset_prod, Multiset.toFinset_val, Multiset.dedup_eq_self.mpr, Multiset.map_id] · exact nodup_roots (.map hfx) · intro x; rfl · intro σ; simp only [PowerBasis.liftEquiv'_apply_coe]
theorem
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
norm_eq_prod_embeddings_gen
null
norm_eq_prod_roots [Algebra.IsSeparable K L] [FiniteDimensional K L] {x : L} (hF : (minpoly K x).Splits (algebraMap K F)) : algebraMap K F (norm K x) = ((minpoly K x).aroots F).prod ^ finrank K⟮x⟯ L := by rw [norm_eq_norm_adjoin K x, map_pow, IntermediateField.AdjoinSimple.norm_gen_eq_prod_roots _ hF]
theorem
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
norm_eq_prod_roots
null
prod_embeddings_eq_finrank_pow [Algebra L F] [IsScalarTower K L F] [IsAlgClosed E] [Algebra.IsSeparable K F] [FiniteDimensional K F] (pb : PowerBasis K L) : ∏ σ : F →ₐ[K] E, σ (algebraMap L F pb.gen) = ((@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).prod fun σ : L →ₐ[K] E => σ pb.gen) ^ finrank L F := by haveI : FiniteDimensional L F := FiniteDimensional.right K L F haveI : Algebra.IsSeparable L F := Algebra.isSeparable_tower_top_of_isSeparable K L F letI : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb rw [Fintype.prod_equiv algHomEquivSigma (fun σ : F →ₐ[K] E => _) fun σ => σ.1 pb.gen, ← Finset.univ_sigma_univ, Finset.prod_sigma, ← Finset.prod_pow] · refine Finset.prod_congr rfl fun σ _ => ?_ letI : Algebra L E := σ.toRingHom.toAlgebra simp_rw [Finset.prod_const] congr exact AlgHom.card L F E · intro σ simp only [algHomEquivSigma, Equiv.coe_fn_mk, AlgHom.restrictDomain, AlgHom.comp_apply, IsScalarTower.coe_toAlgHom'] variable (K)
theorem
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
prod_embeddings_eq_finrank_pow
null
norm_eq_prod_embeddings [FiniteDimensional K L] [Algebra.IsSeparable K L] [IsAlgClosed E] (x : L) : algebraMap K E (norm K x) = ∏ σ : L →ₐ[K] E, σ x := by have hx := Algebra.IsSeparable.isIntegral K x rw [norm_eq_norm_adjoin K x, RingHom.map_pow, ← adjoin.powerBasis_gen hx, norm_eq_prod_embeddings_gen E (adjoin.powerBasis hx) (IsAlgClosed.splits_codomain _)] · exact (prod_embeddings_eq_finrank_pow L (L := K⟮x⟯) E (adjoin.powerBasis hx)).symm · haveI := Algebra.isSeparable_tower_bot_of_isSeparable K K⟮x⟯ L exact Algebra.IsSeparable.isSeparable K _
theorem
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
norm_eq_prod_embeddings
For `L/K` a finite separable extension of fields and `E` an algebraically closed extension of `K`, the norm (down to `K`) of an element `x` of `L` is equal to the product of the images of `x` over all the `K`-embeddings `σ` of `L` into `E`.
norm_eq_prod_automorphisms [FiniteDimensional K L] [IsGalois K L] (x : L) : algebraMap K L (norm K x) = ∏ σ : L ≃ₐ[K] L, σ x := by apply FaithfulSMul.algebraMap_injective L (AlgebraicClosure L) rw [map_prod (algebraMap L (AlgebraicClosure L))] rw [← Fintype.prod_equiv (Normal.algHomEquivAut K (AlgebraicClosure L) L)] · rw [← norm_eq_prod_embeddings _ _ x, ← IsScalarTower.algebraMap_apply] · intro σ simp only [Normal.algHomEquivAut, AlgHom.restrictNormal', Equiv.coe_fn_mk, AlgEquiv.coe_ofBijective, AlgHom.restrictNormal_commutes, algebraMap_self, RingHom.id_apply]
theorem
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
norm_eq_prod_automorphisms
null
isIntegral_norm [Algebra R L] [Algebra R K] [IsScalarTower R K L] [Algebra.IsSeparable K L] [FiniteDimensional K L] {x : L} (hx : IsIntegral R x) : IsIntegral R (norm K x) := by have hx' : IsIntegral K x := hx.tower_top rw [← isIntegral_algebraMap_iff (algebraMap K (AlgebraicClosure L)).injective, norm_eq_prod_roots] · refine (IsIntegral.multiset_prod fun y hy => ?_).pow _ rw [mem_roots_map (minpoly.ne_zero hx')] at hy use minpoly R x, minpoly.monic hx rw [← aeval_def] at hy ⊢ exact minpoly.aeval_of_isScalarTower R x y hy · apply IsAlgClosed.splits_codomain
theorem
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
isIntegral_norm
null
norm_eq_of_algEquiv [Ring T] [Algebra R T] (e : S ≃ₐ[R] T) (x) : Algebra.norm R (e x) = Algebra.norm R x := by simp_rw [Algebra.norm_apply, ← LinearMap.det_conj _ e.toLinearEquiv]; congr; ext; simp
lemma
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
norm_eq_of_algEquiv
null
norm_eq_of_ringEquiv {A B C : Type*} [CommRing A] [CommRing B] [Ring C] [Algebra A C] [Algebra B C] (e : A ≃+* B) (he : (algebraMap B C).comp e = algebraMap A C) (x : C) : e (Algebra.norm A x) = Algebra.norm B x := by classical by_cases h : ∃ s : Finset C, Nonempty (Basis s B C) · obtain ⟨s, ⟨b⟩⟩ := h letI : Algebra A B := RingHom.toAlgebra e letI : IsScalarTower A B C := IsScalarTower.of_algebraMap_eq' he.symm rw [Algebra.norm_eq_matrix_det b, Algebra.norm_eq_matrix_det (b.mapCoeffs e.symm (by simp [Algebra.smul_def, ← he])), e.map_det] congr ext i j simp [leftMulMatrix_apply, LinearMap.toMatrix_apply] rw [norm_eq_one_of_not_exists_basis _ h, norm_eq_one_of_not_exists_basis, map_one] intro ⟨s, ⟨b⟩⟩ exact h ⟨s, ⟨b.mapCoeffs e (by simp [Algebra.smul_def, ← he])⟩⟩
lemma
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
norm_eq_of_ringEquiv
null
norm_eq_of_equiv_equiv {A₁ B₁ A₂ B₂ : Type*} [CommRing A₁] [Ring B₁] [CommRing A₂] [Ring B₂] [Algebra A₁ B₁] [Algebra A₂ B₂] (e₁ : A₁ ≃+* A₂) (e₂ : B₁ ≃+* B₂) (he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp ↑e₂ (algebraMap A₁ B₁)) (x) : Algebra.norm A₁ x = e₁.symm (Algebra.norm A₂ (e₂ x)) := by letI := (RingHom.comp (e₂ : B₁ →+* B₂) (algebraMap A₁ B₁)).toAlgebra' ?_ · let e' : B₁ ≃ₐ[A₁] B₂ := { e₂ with commutes' := fun _ ↦ rfl } rw [← Algebra.norm_eq_of_ringEquiv e₁ he, ← Algebra.norm_eq_of_algEquiv e'] simp [e'] intro c x apply e₂.symm.injective simp only [RingHom.coe_comp, RingHom.coe_coe, Function.comp_apply, map_mul, RingEquiv.symm_apply_apply, commutes]
lemma
RingTheory
[ "Mathlib.RingTheory.Norm.Defs", "Mathlib.FieldTheory.PrimitiveElement", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/RingTheory/Norm/Basic.lean
norm_eq_of_equiv_equiv
null
@[stacks 0BIF "Norm"] noncomputable norm : S →* R := LinearMap.det.comp (lmul R S).toRingHom.toMonoidHom
def
RingTheory
[ "Mathlib.LinearAlgebra.Determinant" ]
Mathlib/RingTheory/Norm/Defs.lean
norm
The norm of an element `s` of an `R`-algebra is the determinant of `(*) s`.
norm_apply (x : S) : norm R x = LinearMap.det (lmul R S x) := rfl @[simp]
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Determinant" ]
Mathlib/RingTheory/Norm/Defs.lean
norm_apply
null
norm_self : Algebra.norm R = MonoidHom.id R := by ext simp [norm_apply]
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Determinant" ]
Mathlib/RingTheory/Norm/Defs.lean
norm_self
null
norm_eq_one_of_not_exists_basis (h : ¬∃ s : Finset S, Nonempty (Basis s R S)) (x : S) : norm R x = 1 := by rw [norm_apply, LinearMap.det]; split_ifs <;> trivial variable {R}
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Determinant" ]
Mathlib/RingTheory/Norm/Defs.lean
norm_eq_one_of_not_exists_basis
null
norm_eq_one_of_not_module_finite (h : ¬Module.Finite R S) (x : S) : norm R x = 1 := by refine norm_eq_one_of_not_exists_basis _ (mt ?_ h) _ rintro ⟨s, ⟨b⟩⟩ exact Module.Finite.of_basis b
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Determinant" ]
Mathlib/RingTheory/Norm/Defs.lean
norm_eq_one_of_not_module_finite
null
norm_eq_matrix_det [Fintype ι] [DecidableEq ι] (b : Basis ι R S) (s : S) : norm R s = Matrix.det (Algebra.leftMulMatrix b s) := by rw [norm_apply, ← LinearMap.det_toMatrix b, ← toMatrix_lmul_eq]; rfl
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Determinant" ]
Mathlib/RingTheory/Norm/Defs.lean
norm_eq_matrix_det
null
norm_algebraMap_of_basis [Fintype ι] (b : Basis ι R S) (x : R) : norm R (algebraMap R S x) = x ^ Fintype.card ι := by haveI := Classical.decEq ι rw [norm_apply, ← det_toMatrix b, lmul_algebraMap] convert @det_diagonal _ _ _ _ _ fun _ : ι => x · ext (i j); rw [toMatrix_lsmul] · rw [Finset.prod_const, Finset.card_univ]
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Determinant" ]
Mathlib/RingTheory/Norm/Defs.lean
norm_algebraMap_of_basis
If `x` is in the base ring `K`, then the norm is `x ^ [L : K]`.
@[simp] protected norm_algebraMap {L : Type*} [Ring L] [Algebra K L] (x : K) : norm K (algebraMap K L x) = x ^ finrank K L := by by_cases H : ∃ s : Finset L, Nonempty (Basis s K L) · rw [norm_algebraMap_of_basis H.choose_spec.some, finrank_eq_card_basis H.choose_spec.some] · rw [norm_eq_one_of_not_exists_basis K H, finrank_eq_zero_of_not_exists_basis, pow_zero] assumption_mod_cast
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Determinant" ]
Mathlib/RingTheory/Norm/Defs.lean
norm_algebraMap
If `x` is in the base field `K`, then the norm is `x ^ [L : K]`. (If `L` is not finite-dimensional over `K`, then `norm = 1 = x ^ 0 = x ^ (finrank L K)`.)
auxMat : Matrix m m S := of fun i j ↦ if j = k then if i = k then 1 else 0 else if i = k then -M k j else if i = j then M k k else 0
def
RingTheory
[ "Mathlib.LinearAlgebra.Matrix.Block", "Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff", "Mathlib.RingTheory.Norm.Defs", "Mathlib.RingTheory.PolynomialAlgebra" ]
Mathlib/RingTheory/Norm/Transitivity.lean
auxMat
Given a ((m-1)+1)x((m-1)+1) block matrix `M = [[A,b],[c,d]]`, `auxMat M k` is the auxiliary matrix `[[dI,0],[-c,1]]`. `k` corresponds to the last row/column of the matrix.
auxMat_blockTriangular : (auxMat M k).BlockTriangular (· ≠ k) := fun i j lt ↦ by simp_rw [lt_iff_not_ge, le_Prop_eq, Classical.not_imp, not_not] at lt rw [auxMat, of_apply, if_pos lt.2, if_neg lt.1]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Matrix.Block", "Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff", "Mathlib.RingTheory.Norm.Defs", "Mathlib.RingTheory.PolynomialAlgebra" ]
Mathlib/RingTheory/Norm/Transitivity.lean
auxMat_blockTriangular
`aux M k` is lower triangular.
auxMat_toSquareBlock_ne : (auxMat M k).toSquareBlock (· ≠ k) True = M k k • 1 := by ext i j simp [auxMat, toSquareBlock_def, if_neg (of_eq_true i.2), if_neg (of_eq_true j.2), Matrix.one_apply, Subtype.ext_iff]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Matrix.Block", "Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff", "Mathlib.RingTheory.Norm.Defs", "Mathlib.RingTheory.PolynomialAlgebra" ]
Mathlib/RingTheory/Norm/Transitivity.lean
auxMat_toSquareBlock_ne
null
auxMat_toSquareBlock_eq : (auxMat M k).toSquareBlock (· ≠ k) False = 1 := by ext ⟨i, hi⟩ ⟨j, hj⟩ rw [eq_iff_iff, iff_false, not_not] at hi hj simp [auxMat, toSquareBlock_def, if_pos hi, if_pos hj, Matrix.one_apply, if_pos (hj ▸ hi)] variable [Fintype m]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Matrix.Block", "Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff", "Mathlib.RingTheory.Norm.Defs", "Mathlib.RingTheory.PolynomialAlgebra" ]
Mathlib/RingTheory/Norm/Transitivity.lean
auxMat_toSquareBlock_eq
null
mul_auxMat_blockTriangular : (M * auxMat M k).BlockTriangular (· = k) := fun i j lt ↦ by simp_rw [lt_iff_not_ge, le_Prop_eq, Classical.not_imp] at lt simp_rw [Matrix.mul_apply, auxMat, of_apply, if_neg lt.2, mul_ite, mul_neg, mul_zero] rw [Finset.sum_ite, Finset.filter_eq', if_pos (Finset.mem_univ _), Finset.sum_singleton, Finset.sum_ite_eq', if_pos, lt.1, mul_comm, neg_add_cancel] exact Finset.mem_filter.mpr ⟨Finset.mem_univ _, lt.2⟩
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Matrix.Block", "Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff", "Mathlib.RingTheory.Norm.Defs", "Mathlib.RingTheory.PolynomialAlgebra" ]
Mathlib/RingTheory/Norm/Transitivity.lean
mul_auxMat_blockTriangular
`M * aux M k` is upper triangular.
mul_auxMat_corner : (M * auxMat M k) k k = M k k := by simp [Matrix.mul_apply, auxMat]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Matrix.Block", "Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff", "Mathlib.RingTheory.Norm.Defs", "Mathlib.RingTheory.PolynomialAlgebra" ]
Mathlib/RingTheory/Norm/Transitivity.lean
mul_auxMat_corner
The lower-right corner of `M * aux M k` is the same as the corner of `M`.
mul_auxMat_toSquareBlock_eq : (M * auxMat M k).toSquareBlock (· = k) True = M k k • 1 := by ext ⟨i, hi⟩ ⟨j, hj⟩ rw [eq_iff_iff, iff_true] at hi hj simp [toSquareBlock_def, hi, hj, mul_auxMat_corner] set_option quotPrecheck false in
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Matrix.Block", "Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff", "Mathlib.RingTheory.Norm.Defs", "Mathlib.RingTheory.PolynomialAlgebra" ]
Mathlib/RingTheory/Norm/Transitivity.lean
mul_auxMat_toSquareBlock_eq
null
noncomputable cornerAddX : Matrix m m S[X] := (diagonal fun i ↦ if i = k then X else 0) + M.map C variable [Fintype n] (f : S →+* Matrix n n R) omit [Fintype m] in
def
RingTheory
[ "Mathlib.LinearAlgebra.Matrix.Block", "Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff", "Mathlib.RingTheory.Norm.Defs", "Mathlib.RingTheory.PolynomialAlgebra" ]
Mathlib/RingTheory/Norm/Transitivity.lean
cornerAddX
The upper-left block of `M * aux M k`. -/ scoped notation "mulAuxMatBlock" => (M * auxMat M k).toSquareBlock (· = k) False lemma det_mul_corner_pow : M.det * M k k ^ (Fintype.card m - 1) = M k k * (mulAuxMatBlock).det := by trans (M * auxMat M k).det · simp [det_mul, (auxMat_blockTriangular M k).det_fintype, auxMat_toSquareBlock_ne, auxMat_toSquareBlock_eq] rw [(mul_auxMat_blockTriangular M k).det_fintype, Fintype.prod_Prop, mul_auxMat_toSquareBlock_eq] simp_rw [det_smul_of_tower, eq_iff_iff, iff_true, Fintype.card_unique, pow_one, det_one, smul_eq_mul, mul_one] -- `Decidable (P = Q)` diamond induced by `Prop.linearOrder`, which is classical, when `P` and `Q` -- are themselves decidable. convert rfl /-- A matrix with X added to the corner.
polyToMatrix_cornerAddX : f.polyToMatrix (cornerAddX M k k k) = (-f (M k k)).charmatrix := by simp [cornerAddX, Matrix.add_apply, charmatrix, RingHom.polyToMatrix, - AlgEquiv.symm_toRingEquiv, map_neg]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Matrix.Block", "Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff", "Mathlib.RingTheory.Norm.Defs", "Mathlib.RingTheory.PolynomialAlgebra" ]
Mathlib/RingTheory/Norm/Transitivity.lean
polyToMatrix_cornerAddX
null
eval_zero_det_det : eval 0 (f.polyToMatrix (cornerAddX M k).det).det = (f M.det).det := by rw [← coe_evalRingHom, RingHom.map_det, ← RingHom.comp_apply, evalRingHom_mapMatrix_comp_polyToMatrix, f.comp_apply, RingHom.map_det] congr; ext; simp [cornerAddX, diagonal, apply_ite]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Matrix.Block", "Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff", "Mathlib.RingTheory.Norm.Defs", "Mathlib.RingTheory.PolynomialAlgebra" ]
Mathlib/RingTheory/Norm/Transitivity.lean
eval_zero_det_det
null
eval_zero_comp_det : eval 0 (comp m m n n R[X] <| (cornerAddX M k).map f.polyToMatrix).det = (comp m m n n R <| M.map f).det := by simp_rw [← coe_evalRingHom, RingHom.map_det, ← compRingEquiv_apply, ← RingEquiv.coe_toRingHom, ← RingHom.mapMatrix_apply, ← RingHom.comp_apply, ← RingHom.comp_assoc, evalRingHom_mapMatrix_comp_compRingEquiv, RingHom.comp_assoc, RingHom.mapMatrix_comp, evalRingHom_mapMatrix_comp_polyToMatrix, ← RingHom.mapMatrix_comp, RingHom.comp_apply] congr with i j simp [cornerAddX, diagonal, apply_ite]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Matrix.Block", "Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff", "Mathlib.RingTheory.Norm.Defs", "Mathlib.RingTheory.PolynomialAlgebra" ]
Mathlib/RingTheory/Norm/Transitivity.lean
eval_zero_comp_det
null
comp_det_mul_pow : ((M.map f).comp m m n n R).det * (f (M k k)).det ^ (Fintype.card m - 1) = (f (M k k)).det * (((mulAuxMatBlock).map f).comp _ _ n n R).det := by trans (((M * auxMat M k).map f).comp m m n n R).det · simp_rw [← f.mapMatrix_apply, ← compRingEquiv_apply, map_mul, det_mul, f.mapMatrix_apply, compRingEquiv_apply, ((auxMat_blockTriangular M k).map f).comp.det_fintype, Fintype.prod_Prop, comp_toSquareBlock (b := (· ≠ k)), det_reindex_self, map_toSquareBlock, auxMat_toSquareBlock_eq, auxMat_toSquareBlock_ne, smul_one_eq_diagonal, ← diagonal_one, diagonal_map (map_zero _), comp_diagonal, det_reindex_self] simp · simp_rw [((mul_auxMat_blockTriangular M k).map f).comp.det_fintype, Fintype.prod_Prop, comp_toSquareBlock (b := (· = k)), det_reindex_self, map_toSquareBlock, mul_auxMat_toSquareBlock_eq, smul_one_eq_diagonal, diagonal_map (map_zero _), comp_diagonal, det_reindex_self] simp variable {M f} in
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Matrix.Block", "Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff", "Mathlib.RingTheory.Norm.Defs", "Mathlib.RingTheory.PolynomialAlgebra" ]
Mathlib/RingTheory/Norm/Transitivity.lean
comp_det_mul_pow
null
det_det_aux (ih : ∀ M, (f (det M)).det = ((M.map f).comp {a // (a = k) = False} _ n n R).det) : ((f M.det).det - ((M.map f).comp m m n n R).det) * (f (M k k)).det ^ (Fintype.card m - 1) = 0 := by rw [sub_mul, comp_det_mul_pow, ← det_pow, ← map_pow, ← det_mul, ← map_mul, det_mul_corner_pow, map_mul, det_mul, ih, sub_self]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.Matrix.Block", "Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff", "Mathlib.RingTheory.Norm.Defs", "Mathlib.RingTheory.PolynomialAlgebra" ]
Mathlib/RingTheory/Norm/Transitivity.lean
det_det_aux
null
Matrix.det_det [Fintype m] [Fintype n] (f : S →+* Matrix n n R) : (f M.det).det = ((M.map f).comp m m n n R).det := by induction l : Fintype.card m generalizing R S m with | zero => rw [Fintype.card_eq_zero_iff] at l simp_rw [Matrix.det_isEmpty, map_one, det_one] | succ l ih => have ⟨k⟩ := Fintype.card_pos_iff.mp (Nat.lt_of_sub_eq_succ l) let f' := f.polyToMatrix let M' := cornerAddX M k have : (f' M'.det).det = ((M'.map f').comp m m n n R[X]).det := by refine sub_eq_zero.mp <| mem_nonZeroDivisors_iff_right.mp (pow_mem ?_ _) _ (det_det_aux k fun M ↦ ih _ _ <| by grind [Fintype.card_subtype_compl, Fintype.card_unique]) rw [polyToMatrix_cornerAddX, ← charpoly] exact (Matrix.charpoly_monic _).mem_nonZeroDivisors rw [← eval_zero_det_det, congr_arg (eval 0) this, eval_zero_comp_det] variable [Algebra R S] [Module.Free R S]
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Matrix.Block", "Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff", "Mathlib.RingTheory.Norm.Defs", "Mathlib.RingTheory.PolynomialAlgebra" ]
Mathlib/RingTheory/Norm/Transitivity.lean
Matrix.det_det
The main result in Silvester's paper *Determinants of Block Matrices*: the determinant of a block matrix with commuting, equal-sized, square blocks can be computed by taking determinants twice in a row: first take the determinant over the commutative ring generated by the blocks (`S` here), then take the determinant over the base ring.
LinearMap.det_restrictScalars [AddCommGroup A] [Module R A] [Module S A] [IsScalarTower R S A] [Module.Free S A] {f : A →ₗ[S] A} : (f.restrictScalars R).det = Algebra.norm R f.det := by classical nontriviality R nontriviality A have := Module.nontrivial S A let ⟨ιS, bS⟩ := Module.Free.exists_basis (R := R) (M := S) let ⟨ιA, bA⟩ := Module.Free.exists_basis (R := S) (M := A) have := bS.index_nonempty have := bA.index_nonempty cases fintypeOrInfinite ιS; swap · rw [Algebra.norm_eq_one_of_not_module_finite (Module.not_finite_of_infinite_basis bS), det_eq_one_of_not_module_finite (Module.not_finite_of_infinite_basis (bS.smulTower bA))] cases fintypeOrInfinite ιA; swap · rw [det_eq_one_of_not_module_finite (Module.not_finite_of_infinite_basis bA), map_one, det_eq_one_of_not_module_finite (Module.not_finite_of_infinite_basis (bS.smulTower bA))] rw [Algebra.norm_eq_matrix_det bS, ← AlgHom.coe_toRingHom, ← det_toMatrix bA, det_det, ← det_toMatrix (bS.smulTower' bA), restrictScalars_toMatrix, RingHom.coe_coe]
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Matrix.Block", "Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff", "Mathlib.RingTheory.Norm.Defs", "Mathlib.RingTheory.PolynomialAlgebra" ]
Mathlib/RingTheory/Norm/Transitivity.lean
LinearMap.det_restrictScalars
null
Algebra.norm_norm {A} [Ring A] [Algebra R A] [Algebra S A] [IsScalarTower R S A] [Module.Free S A] {a : A} : norm R (norm S a) = norm R a := by rw [norm_apply S, norm_apply R a, ← LinearMap.det_restrictScalars]; rfl
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Matrix.Block", "Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff", "Mathlib.RingTheory.Norm.Defs", "Mathlib.RingTheory.PolynomialAlgebra" ]
Mathlib/RingTheory/Norm/Transitivity.lean
Algebra.norm_norm
Let A/S/R be a tower of finite free tower of rings (with R and S commutative). Then $\text{Norm}_{A/R} = \text{Norm}_{A/S} \circ \text{Norm}_{S/R}$.
@[simp] zero_oreDiv' (s : S) : (0 : R) /ₒ s = 0 := by rw [OreLocalization.zero_def, oreDiv_eq_iff] exact ⟨s, 1, by simp [Submonoid.smul_def]⟩
theorem
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
zero_oreDiv'
null
subsingleton_iff : Subsingleton R[S⁻¹] ↔ 0 ∈ S := by rw [← subsingleton_iff_zero_eq_one, OreLocalization.one_def, OreLocalization.zero_def, oreDiv_eq_iff] simp
theorem
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
subsingleton_iff
null
nontrivial_iff : Nontrivial R[S⁻¹] ↔ 0 ∉ S := by rw [← not_subsingleton_iff_nontrivial, subsingleton_iff]
theorem
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
nontrivial_iff
null
private add'' (r₁ : X) (s₁ : S) (r₂ : X) (s₂ : S) : X[S⁻¹] := (oreDenom (s₁ : R) s₂ • r₁ + oreNum (s₁ : R) s₂ • r₂) /ₒ (oreDenom (s₁ : R) s₂ * s₁)
def
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
add''
null
private add''_char (r₁ : X) (s₁ : S) (r₂ : X) (s₂ : S) (rb : R) (sb : R) (hb : sb * s₁ = rb * s₂) (h : sb * s₁ ∈ S) : add'' r₁ s₁ r₂ s₂ = (sb • r₁ + rb • r₂) /ₒ ⟨sb * s₁, h⟩ := by simp only [add''] have ha := ore_eq (s₁ : R) s₂ generalize oreNum (s₁ : R) s₂ = ra at * generalize oreDenom (s₁ : R) s₂ = sa at * rw [oreDiv_eq_iff] rcases oreCondition sb sa with ⟨rc, sc, hc⟩ have : sc * rb * s₂ = rc * ra * s₂ := by rw [mul_assoc rc, ← ha, ← mul_assoc, ← hc, mul_assoc, mul_assoc, hb] rcases ore_right_cancel _ _ s₂ this with ⟨sd, hd⟩ use sd * sc use sd * rc simp only [smul_add, smul_smul, Submonoid.smul_def, Submonoid.coe_mul] constructor · rw [mul_assoc _ _ rb, hd, mul_assoc, hc, mul_assoc, mul_assoc] · rw [mul_assoc, ← mul_assoc (sc : R), hc, mul_assoc, mul_assoc] attribute [local instance] OreLocalization.oreEqv
theorem
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
add''_char
null
private add' (r₂ : X) (s₂ : S) : X[S⁻¹] → X[S⁻¹] := (--plus tilde Quotient.lift fun r₁s₁ : X × S => add'' r₁s₁.1 r₁s₁.2 r₂ s₂) <| by rintro ⟨r₁', s₁'⟩ ⟨r₁, s₁⟩ ⟨sb, rb, hb, hb'⟩ rcases oreCondition (s₁' : R) s₂ with ⟨rc, sc, hc⟩ rcases oreCondition rb sc with ⟨rd, sd, hd⟩ dsimp at * rw [add''_char _ _ _ _ rc sc hc (sc * s₁').2] have : sd * sb * s₁ = rd * rc * s₂ := by rw [mul_assoc, hb', ← mul_assoc, hd, mul_assoc, hc, ← mul_assoc] rw [add''_char _ _ _ _ (rd * rc : R) (sd * sb) this (sd * sb * s₁).2] rw [mul_smul, ← Submonoid.smul_def sb, hb, smul_smul, hd, oreDiv_eq_iff] use 1 use rd simp only [mul_smul, smul_add, one_smul, OneMemClass.coe_one, one_mul, true_and] rw [this, hc, mul_assoc]
def
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
add'
null
@[irreducible] private add : X[S⁻¹] → X[S⁻¹] → X[S⁻¹] := fun x => Quotient.lift (fun rs : X × S => add' rs.1 rs.2 x) (by rintro ⟨r₁, s₁⟩ ⟨r₂, s₂⟩ ⟨sb, rb, hb, hb'⟩ induction x with | _ r₃ s₃ change add'' _ _ _ _ = add'' _ _ _ _ dsimp only at * rcases oreCondition (s₃ : R) s₂ with ⟨rc, sc, hc⟩ rcases oreCondition rc sb with ⟨rd, sd, hd⟩ have : rd * rb * s₁ = sd * sc * s₃ := by rw [mul_assoc, ← hb', ← mul_assoc, ← hd, mul_assoc, ← hc, mul_assoc] rw [add''_char _ _ _ _ rc sc hc (sc * s₃).2] rw [add''_char _ _ _ _ _ _ this.symm (sd * sc * s₃).2] refine oreDiv_eq_iff.mpr ?_ simp only [smul_add] use sd, 1 simp only [one_smul, one_mul, mul_smul, ← hb, Submonoid.smul_def, ← mul_assoc, and_true] simp only [smul_smul, hd])
def
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
add
The addition on the Ore localization.
oreDiv_add_oreDiv {r r' : X} {s s' : S} : r /ₒ s + r' /ₒ s' = (oreDenom (s : R) s' • r + oreNum (s : R) s' • r') /ₒ (oreDenom (s : R) s' * s) := by with_unfolding_all rfl
theorem
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
oreDiv_add_oreDiv
null
oreDiv_add_char' {r r' : X} (s s' : S) (rb : R) (sb : R) (h : sb * s = rb * s') (h' : sb * s ∈ S) : r /ₒ s + r' /ₒ s' = (sb • r + rb • r') /ₒ ⟨sb * s, h'⟩ := by with_unfolding_all exact add''_char r s r' s' rb sb h h'
theorem
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
oreDiv_add_char'
null
oreDiv_add_char {r r' : X} (s s' : S) (rb : R) (sb : S) (h : sb * s = rb * s') : r /ₒ s + r' /ₒ s' = (sb • r + rb • r') /ₒ (sb * s) := oreDiv_add_char' s s' rb sb h (sb * s).2
theorem
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
oreDiv_add_char
A characterization of the addition on the Ore localization, allowing for arbitrary Ore numerator and Ore denominator.
oreDivAddChar' (r r' : X) (s s' : S) : Σ' r'' : R, Σ' s'' : S, s'' * s = r'' * s' ∧ r /ₒ s + r' /ₒ s' = (s'' • r + r'' • r') /ₒ (s'' * s) := ⟨oreNum (s : R) s', oreDenom (s : R) s', ore_eq (s : R) s', oreDiv_add_oreDiv⟩ @[simp]
def
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
oreDivAddChar'
Another characterization of the addition on the Ore localization, bundling up all witnesses and conditions into a sigma type.
add_oreDiv {r r' : X} {s : S} : r /ₒ s + r' /ₒ s = (r + r') /ₒ s := by simp [oreDiv_add_char s s 1 1 (by simp)]
theorem
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
add_oreDiv
null
protected add_assoc (x y z : X[S⁻¹]) : x + y + z = x + (y + z) := by induction x with | _ r₁ s₁ induction y with | _ r₂ s₂ induction z with | _ r₃ s₃ rcases oreDivAddChar' r₁ r₂ s₁ s₂ with ⟨ra, sa, ha, ha'⟩; rw [ha']; clear ha' rcases oreDivAddChar' (sa • r₁ + ra • r₂) r₃ (sa * s₁) s₃ with ⟨rc, sc, hc, q⟩; rw [q]; clear q simp only [smul_add, add_assoc] simp_rw [← add_oreDiv, ← OreLocalization.expand'] congr 2 · rw [OreLocalization.expand r₂ s₂ ra (ha.symm ▸ (sa * s₁).2)]; congr; ext; exact ha · rw [OreLocalization.expand r₃ s₃ rc (hc.symm ▸ (sc * (sa * s₁)).2)]; congr; ext; exact hc @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
add_assoc
null
zero_oreDiv (s : S) : (0 : X) /ₒ s = 0 := by rw [OreLocalization.zero_def, oreDiv_eq_iff] exact ⟨s, 1, by simp⟩
theorem
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
zero_oreDiv
null
protected zero_add (x : X[S⁻¹]) : 0 + x = x := by induction x rw [← zero_oreDiv, add_oreDiv]; simp
theorem
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
zero_add
null
protected add_zero (x : X[S⁻¹]) : x + 0 = x := by induction x rw [← zero_oreDiv, add_oreDiv]; simp @[irreducible]
theorem
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
add_zero
null
private nsmul : ℕ → X[S⁻¹] → X[S⁻¹] := nsmulRec
def
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
nsmul
null
protected smul_zero (x : R[S⁻¹]) : x • (0 : X[S⁻¹]) = 0 := by induction x with | _ r s rw [OreLocalization.zero_def, smul_div_one, smul_zero, zero_oreDiv, zero_oreDiv]
theorem
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
smul_zero
null
protected smul_add (z : R[S⁻¹]) (x y : X[S⁻¹]) : z • (x + y) = z • x + z • y := by induction x with | _ r₁ s₁ induction y with | _ r₂ s₂ induction z with | _ r₃ s₃ rcases oreDivAddChar' r₁ r₂ s₁ s₂ with ⟨ra, sa, ha, ha'⟩; rw [ha']; clear ha'; norm_cast at ha rw [OreLocalization.expand' r₁ s₁ sa] rw [OreLocalization.expand r₂ s₂ ra (by rw [← ha]; apply SetLike.coe_mem)] rw [← Subtype.coe_eq_of_eq_mk ha] repeat rw [oreDiv_smul_oreDiv] simp only [smul_add, add_oreDiv]
theorem
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
smul_add
null
protected add_comm (x y : X[S⁻¹]) : x + y = y + x := by induction x with | _ r s induction y with | _ r' s' rcases oreDivAddChar' r r' s s' with ⟨ra, sa, ha, ha'⟩ rw [ha', oreDiv_add_char' s' s _ _ ha.symm (ha ▸ (sa * s).2), add_comm] congr; ext; exact ha
theorem
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
add_comm
null
instAddCommMonoidOreLocalization : AddCommMonoid X[S⁻¹] where add_comm := OreLocalization.add_comm
instance
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
instAddCommMonoidOreLocalization
null
@[irreducible] protected neg : X[S⁻¹] → X[S⁻¹] := liftExpand (fun (r : X) (s : S) => -r /ₒ s) fun r t s ht => by beta_reduce rw [← smul_neg, ← OreLocalization.expand]
def
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
neg
Negation on the Ore localization is defined via negation on the numerator.
instNegOreLocalization : Neg X[S⁻¹] := ⟨OreLocalization.neg⟩ @[simp]
instance
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
instNegOreLocalization
null
protected neg_def (r : X) (s : S) : -(r /ₒ s) = -r /ₒ s := by with_unfolding_all rfl
theorem
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
neg_def
null
protected neg_add_cancel (x : X[S⁻¹]) : -x + x = 0 := by induction x with | _ r s; simp
theorem
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
neg_add_cancel
null
@[irreducible] protected zsmul : ℤ → X[S⁻¹] → X[S⁻¹] := zsmulRec unseal OreLocalization.zsmul in
def
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
zsmul
`zsmul` of `OreLocalization`
instAddGroupOreLocalization : AddGroup X[S⁻¹] where neg_add_cancel := OreLocalization.neg_add_cancel zsmul := OreLocalization.zsmul
instance
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.DistribMulAction", "Mathlib.GroupTheory.OreLocalization.Basic", "Mathlib.Algebra.GroupWithZero.Defs" ]
Mathlib/RingTheory/OreLocalization/Basic.lean
instAddGroupOreLocalization
null
cardinalMk (hS : S ≤ nonZeroDivisorsLeft R) : #(OreLocalization S R) = #R := le_antisymm (cardinalMk_le S) (mk_le_of_injective (numeratorHom_inj hS))
theorem
RingTheory
[ "Mathlib.GroupTheory.OreLocalization.Cardinality", "Mathlib.RingTheory.OreLocalization.Ring" ]
Mathlib/RingTheory/OreLocalization/Cardinality.lean
cardinalMk
null
nontrivial_of_nonZeroDivisorsLeft [Nontrivial R] (hS : S ≤ nonZeroDivisorsLeft R) : Nontrivial R[S⁻¹] := nontrivial_iff.mpr (fun e ↦ one_ne_zero <| hS e 1 (zero_mul _))
theorem
RingTheory
[ "Mathlib.Algebra.GroupWithZero.NonZeroDivisors", "Mathlib.RingTheory.OreLocalization.Basic" ]
Mathlib/RingTheory/OreLocalization/NonZeroDivisors.lean
nontrivial_of_nonZeroDivisorsLeft
null
nontrivial_of_nonZeroDivisorsRight [Nontrivial R] (hS : S ≤ nonZeroDivisorsRight R) : Nontrivial R[S⁻¹] := nontrivial_iff.mpr (fun e ↦ one_ne_zero <| hS e 1 (mul_zero _))
theorem
RingTheory
[ "Mathlib.Algebra.GroupWithZero.NonZeroDivisors", "Mathlib.RingTheory.OreLocalization.Basic" ]
Mathlib/RingTheory/OreLocalization/NonZeroDivisors.lean
nontrivial_of_nonZeroDivisorsRight
null
nontrivial_of_nonZeroDivisors [Nontrivial R] (hS : S ≤ R⁰) : Nontrivial R[S⁻¹] := nontrivial_of_nonZeroDivisorsLeft (hS.trans inf_le_left) variable [Nontrivial R] [OreSet R⁰]
theorem
RingTheory
[ "Mathlib.Algebra.GroupWithZero.NonZeroDivisors", "Mathlib.RingTheory.OreLocalization.Basic" ]
Mathlib/RingTheory/OreLocalization/NonZeroDivisors.lean
nontrivial_of_nonZeroDivisors
null
nontrivial : Nontrivial R[R⁰⁻¹] := nontrivial_of_nonZeroDivisors (refl R⁰) variable [NoZeroDivisors R] open Classical in
instance
RingTheory
[ "Mathlib.Algebra.GroupWithZero.NonZeroDivisors", "Mathlib.RingTheory.OreLocalization.Basic" ]
Mathlib/RingTheory/OreLocalization/NonZeroDivisors.lean
nontrivial
null
@[irreducible] protected noncomputable inv : R[R⁰⁻¹] → R[R⁰⁻¹] := liftExpand (fun r s => if hr : r = (0 : R) then (0 : R[R⁰⁻¹]) else s /ₒ ⟨r, mem_nonZeroDivisors_of_ne_zero hr⟩) (by intro r t s hst by_cases hr : r = 0 · simp [hr] · by_cases ht : t = 0 · exfalso apply nonZeroDivisors.coe_ne_zero ⟨_, hst⟩ simp [ht] · simp only [hr, ht, dif_neg, not_false_iff, or_self_iff, mul_eq_zero, smul_eq_mul] apply OreLocalization.expand)
def
RingTheory
[ "Mathlib.Algebra.GroupWithZero.NonZeroDivisors", "Mathlib.RingTheory.OreLocalization.Basic" ]
Mathlib/RingTheory/OreLocalization/NonZeroDivisors.lean
inv
The inversion of Ore fractions for a ring without zero divisors, satisfying `0⁻¹ = 0` and `(r /ₒ r')⁻¹ = r' /ₒ r` for `r ≠ 0`.
noncomputable inv' : Inv R[R⁰⁻¹] := ⟨OreLocalization.inv⟩ open Classical in
instance
RingTheory
[ "Mathlib.Algebra.GroupWithZero.NonZeroDivisors", "Mathlib.RingTheory.OreLocalization.Basic" ]
Mathlib/RingTheory/OreLocalization/NonZeroDivisors.lean
inv'
null
protected inv_def {r : R} {s : R⁰} : (r /ₒ s)⁻¹ = if hr : r = (0 : R) then (0 : R[R⁰⁻¹]) else s /ₒ ⟨r, mem_nonZeroDivisors_of_ne_zero hr⟩ := by with_unfolding_all rfl
theorem
RingTheory
[ "Mathlib.Algebra.GroupWithZero.NonZeroDivisors", "Mathlib.RingTheory.OreLocalization.Basic" ]
Mathlib/RingTheory/OreLocalization/NonZeroDivisors.lean
inv_def
null
protected mul_inv_cancel (x : R[R⁰⁻¹]) (h : x ≠ 0) : x * x⁻¹ = 1 := by induction x with | _ r s rw [OreLocalization.inv_def, OreLocalization.one_def] have hr : r ≠ 0 := by rintro rfl simp at h simp only [hr] with_unfolding_all apply OreLocalization.mul_inv ⟨r, _⟩
theorem
RingTheory
[ "Mathlib.Algebra.GroupWithZero.NonZeroDivisors", "Mathlib.RingTheory.OreLocalization.Basic" ]
Mathlib/RingTheory/OreLocalization/NonZeroDivisors.lean
mul_inv_cancel
null
protected inv_zero : (0 : R[R⁰⁻¹])⁻¹ = 0 := by rw [OreLocalization.zero_def, OreLocalization.inv_def] simp
theorem
RingTheory
[ "Mathlib.Algebra.GroupWithZero.NonZeroDivisors", "Mathlib.RingTheory.OreLocalization.Basic" ]
Mathlib/RingTheory/OreLocalization/NonZeroDivisors.lean
inv_zero
null
oreSetOfCancelMonoidWithZero {R : Type*} [CancelMonoidWithZero R] {S : Submonoid R} (oreNum : R → S → R) (oreDenom : R → S → S) (ore_eq : ∀ (r : R) (s : S), oreDenom r s * r = oreNum r s * s) : OreSet S := { ore_right_cancel := fun _ _ s h => ⟨s, mul_eq_mul_left_iff.mpr (mul_eq_mul_right_iff.mp h)⟩ oreNum oreDenom ore_eq }
def
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Algebra.GroupWithZero.Basic", "Mathlib.Algebra.Ring.Regular", "Mathlib.GroupTheory.OreLocalization.OreSet" ]
Mathlib/RingTheory/OreLocalization/OreSet.lean
oreSetOfCancelMonoidWithZero
Cancellability in monoids with zeros can act as a replacement for the `ore_right_cancel` condition of an ore set.
oreSetOfNoZeroDivisors {R : Type*} [Ring R] [NoZeroDivisors R] {S : Submonoid R} (oreNum : R → S → R) (oreDenom : R → S → S) (ore_eq : ∀ (r : R) (s : S), oreDenom r s * r = oreNum r s * s) : OreSet S := letI : CancelMonoidWithZero R := NoZeroDivisors.toCancelMonoidWithZero oreSetOfCancelMonoidWithZero oreNum oreDenom ore_eq
def
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Algebra.GroupWithZero.Basic", "Mathlib.Algebra.Ring.Regular", "Mathlib.GroupTheory.OreLocalization.OreSet" ]
Mathlib/RingTheory/OreLocalization/OreSet.lean
oreSetOfNoZeroDivisors
In rings without zero divisors, the first (cancellability) condition is always fulfilled, it suffices to give a proof for the Ore condition itself.
nonempty_oreSet_iff {R : Type*} [Monoid R] {S : Submonoid R} : Nonempty (OreSet S) ↔ (∀ (r₁ r₂ : R) (s : S), r₁ * s = r₂ * s → ∃ s' : S, s' * r₁ = s' * r₂) ∧ (∀ (r : R) (s : S), ∃ (r' : R) (s' : S), s' * r = r' * s) := by constructor · exact fun ⟨_⟩ ↦ ⟨ore_right_cancel, fun r s ↦ ⟨oreNum r s, oreDenom r s, ore_eq r s⟩⟩ · intro ⟨H, H'⟩ choose r' s' h using H' exact ⟨H, r', s', h⟩
lemma
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Algebra.GroupWithZero.Basic", "Mathlib.Algebra.Ring.Regular", "Mathlib.GroupTheory.OreLocalization.OreSet" ]
Mathlib/RingTheory/OreLocalization/OreSet.lean
nonempty_oreSet_iff
null