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
comul_C (a : A) : Coalgebra.comul (R := R) (C a) = TensorProduct.map (lsingle 0) (lsingle 0) (Coalgebra.comul (R := R) a) := comul_single _ _ @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.Laurent", "Mathlib.RingTheory.Coalgebra.Basic" ]
Mathlib/RingTheory/Coalgebra/MonoidAlgebra.lean
comul_C
null
comul_C_mul_T (a : A) (n : ℤ) : Coalgebra.comul (R := R) (C a * T n) = TensorProduct.map (lsingle n) (lsingle n) (Coalgebra.comul (R := R) a) := by simp [← single_eq_C_mul_T]
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.Laurent", "Mathlib.RingTheory.Coalgebra.Basic" ]
Mathlib/RingTheory/Coalgebra/MonoidAlgebra.lean
comul_C_mul_T
null
comul_C_mul_T_self (a : R) (n : ℤ) : Coalgebra.comul (C a * T n) = T n ⊗ₜ[R] (C a * T n) := by simp @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.Laurent", "Mathlib.RingTheory.Coalgebra.Basic" ]
Mathlib/RingTheory/Coalgebra/MonoidAlgebra.lean
comul_C_mul_T_self
null
counit_C (a : A) : Coalgebra.counit (R := R) (C a) = Coalgebra.counit (R := R) a := counit_single _ _ @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.Laurent", "Mathlib.RingTheory.Coalgebra.Basic" ]
Mathlib/RingTheory/Coalgebra/MonoidAlgebra.lean
counit_C
null
counit_C_mul_T (a : A) (n : ℤ) : Coalgebra.counit (R := R) (C a * T n) = Coalgebra.counit (R := R) a := by simp [← single_eq_C_mul_T]
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.Laurent", "Mathlib.RingTheory.Coalgebra.Basic" ]
Mathlib/RingTheory/Coalgebra/MonoidAlgebra.lean
counit_C_mul_T
null
comul_def [CoalgebraStruct R A] : comul (R := R) (A := Aᵐᵒᵖ) = map (opLinearEquiv R).toLinearMap (opLinearEquiv R).toLinearMap ∘ₗ comul ∘ₗ (opLinearEquiv R).symm.toLinearMap := rfl
lemma
RingTheory
[ "Mathlib.RingTheory.Coalgebra.Basic" ]
Mathlib/RingTheory/Coalgebra/MulOpposite.lean
comul_def
null
counit_def [CoalgebraStruct R A] : counit (R := R) (A := Aᵐᵒᵖ) = counit ∘ₗ (opLinearEquiv R).symm.toLinearMap := rfl
lemma
RingTheory
[ "Mathlib.RingTheory.Coalgebra.Basic" ]
Mathlib/RingTheory/Coalgebra/MulOpposite.lean
counit_def
null
noncomputable instCoalgebraStruct : CoalgebraStruct S (A ⊗[R] B) where comul := AlgebraTensorModule.tensorTensorTensorComm R S R S A A B B ∘ₗ AlgebraTensorModule.map comul comul counit := AlgebraTensorModule.rid R S S ∘ₗ AlgebraTensorModule.map counit counit
instance
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
instCoalgebraStruct
null
comul_def : Coalgebra.comul (R := S) (A := A ⊗[R] B) = AlgebraTensorModule.tensorTensorTensorComm R S R S A A B B ∘ₗ AlgebraTensorModule.map Coalgebra.comul Coalgebra.comul := rfl @[deprecated (since := "2025-04-09")] alias instCoalgebraStruct_comul := comul_def
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
comul_def
null
counit_def : Coalgebra.counit (R := S) (A := A ⊗[R] B) = AlgebraTensorModule.rid R S S ∘ₗ AlgebraTensorModule.map counit counit := rfl @[deprecated (since := "2025-04-09")] alias instCoalgebraStruct_counit := counit_def @[simp]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
counit_def
null
comul_tmul (x : A) (y : B) : comul (x ⊗ₜ y) = AlgebraTensorModule.tensorTensorTensorComm R S R S A A B B (comul x ⊗ₜ comul y) := rfl @[simp]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
comul_tmul
null
counit_tmul (x : A) (y : B) : counit (R := S) (x ⊗ₜ[R] y) = counit (R := R) y • counit (R := S) x := rfl
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
counit_tmul
null
noncomputable map (f : M →ₗc[S] N) (g : P →ₗc[R] Q) : M ⊗[R] P →ₗc[S] N ⊗[R] Q where toLinearMap := AlgebraTensorModule.map f.toLinearMap g.toLinearMap counit_comp := by ext; simp map_comp_comul := by ext x y dsimp simp only [← CoalgHomClass.map_comp_comul_apply] hopf_tensor_induction comul (R := S) x with x₁ x₂ hopf_tensor_induction comul (R := R) y with y₁ y₂ simp @[simp]
def
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
map
`hopf_tensor_induction x with x₁ x₂` attempts to replace `x` by `x₁ ⊗ₜ x₂` via linearity. This is an implementation detail that is used to set up tensor products of coalgebras, bialgebras, and hopf algebras, and shouldn't be relied on downstream. -/ scoped macro "hopf_tensor_induction " var:elimTarget "with " var₁:ident var₂:ident : tactic => `(tactic| (induction $var with | zero => simp only [tmul_zero, LinearEquiv.map_zero, LinearMap.map_zero, zero_tmul, zero_mul, mul_zero] | add _ _ h₁ h₂ => -- avoid the more general `map_add` for performance reasons simp only [LinearEquiv.map_add, LinearMap.map_add, tmul_add, add_tmul, add_mul, mul_add, h₁, h₂] | tmul $var₁ $var₂ => ?_)) private lemma coassoc : TensorProduct.assoc S (A ⊗[R] B) (A ⊗[R] B) (A ⊗[R] B) ∘ₗ (comul (R := S) (A := (A ⊗[R] B))).rTensor (A ⊗[R] B) ∘ₗ (comul (R := S) (A := (A ⊗[R] B))) = (comul (R := S) (A := (A ⊗[R] B))).lTensor (A ⊗[R] B) ∘ₗ (comul (R := S) (A := (A ⊗[R] B))) := by ext x y let F : A ⊗[S] (A ⊗[S] A) ⊗[R] (B ⊗[R] (B ⊗[R] B)) ≃ₗ[S] A ⊗[R] B ⊗[S] (A ⊗[R] B ⊗[S] (A ⊗[R] B)) := AlgebraTensorModule.tensorTensorTensorComm _ _ _ _ _ _ _ _ ≪≫ₗ AlgebraTensorModule.congr (.refl _ _) (AlgebraTensorModule.tensorTensorTensorComm _ _ _ _ _ _ _ _) let F' : A ⊗[S] (A ⊗[S] A) ⊗[R] (B ⊗[R] (B ⊗[R] B)) →ₗ[S] A ⊗[R] B ⊗[S] (A ⊗[R] B ⊗[S] (A ⊗[R] B)) := TensorProduct.mapOfCompatibleSMul _ _ _ _ ∘ₗ TensorProduct.map .id (TensorProduct.mapOfCompatibleSMul _ _ _ _) ∘ₗ F.toLinearMap convert congr(F ($(Coalgebra.coassoc_apply x) ⊗ₜ[R] $(Coalgebra.coassoc_apply y))) using 1 · dsimp hopf_tensor_induction comul (R := S) x with x₁ x₂ hopf_tensor_induction comul (R := R) y with y₁ y₂ dsimp hopf_tensor_induction comul (R := S) x₁ with x₁₁ x₁₂ hopf_tensor_induction comul (R := R) y₁ with y₁₁ y₁₂ rfl · dsimp hopf_tensor_induction comul (R := S) x with x₁ x₂ hopf_tensor_induction comul (R := R) y with y₁ y₂ dsimp hopf_tensor_induction comul (R := S) x₂ with x₂₁ x₂₂ hopf_tensor_induction comul (R := R) y₂ with y₂₁ y₂₂ rfl noncomputable instance instCoalgebra : Coalgebra S (A ⊗[R] B) where coassoc := coassoc (R := R) rTensor_counit_comp_comul := by ext x y convert congr((TensorProduct.lid S _).symm (TensorProduct.lid _ _ $(rTensor_counit_comul (R := S) x) ⊗ₜ[R] TensorProduct.lid _ _ $(rTensor_counit_comul (R := R) y))) · dsimp hopf_tensor_induction comul (R := S) x with x₁ x₂ hopf_tensor_induction comul (R := R) y with y₁ y₂ apply (TensorProduct.lid S _).injective dsimp rw [tmul_smul, smul_assoc, one_smul, smul_tmul'] · dsimp simp only [one_smul] lTensor_counit_comp_comul := by ext x y convert congr((TensorProduct.rid S _).symm (TensorProduct.rid _ _ $(lTensor_counit_comul (R := S) x) ⊗ₜ[R] TensorProduct.rid _ _ $(lTensor_counit_comul (R := R) y))) · dsimp hopf_tensor_induction comul (R := S) x with x₁ x₂ hopf_tensor_induction comul (R := R) y with y₁ y₂ apply (TensorProduct.rid S _).injective dsimp rw [tmul_smul, smul_assoc, one_smul, smul_tmul'] · dsimp simp only [one_smul] instance [IsCocomm S A] [IsCocomm R B] : IsCocomm S (A ⊗[R] B) where comm_comp_comul := by ext x y dsimp conv_rhs => rw [← comm_comul _ x, ← comm_comul _ y] hopf_tensor_induction comul (R := S) x with x₁ x₂ hopf_tensor_induction comul (R := R) y with y₁ y₂ simp end TensorProduct namespace Coalgebra namespace TensorProduct variable {R S M N P Q : Type*} [CommSemiring R] [CommSemiring S] [Algebra R S] [AddCommMonoid M] [AddCommMonoid N] [AddCommMonoid P] [AddCommMonoid Q] [Module R M] [Module R N] [Module R P] [Module R Q] [Module S M] [IsScalarTower R S M] [Coalgebra S M] [Module S N] [IsScalarTower R S N] [Coalgebra S N] [Coalgebra R P] [Coalgebra R Q] section /-- The tensor product of two coalgebra morphisms as a coalgebra morphism.
map_tmul (f : M →ₗc[S] N) (g : P →ₗc[R] Q) (x : M) (y : P) : map f g (x ⊗ₜ y) = f x ⊗ₜ g y := rfl @[simp]
theorem
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
map_tmul
null
map_toLinearMap (f : M →ₗc[S] N) (g : P →ₗc[R] Q) : map f g = AlgebraTensorModule.map (f : M →ₗ[S] N) (g : P →ₗ[R] Q) := rfl variable (R S M N P)
theorem
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
map_toLinearMap
null
protected noncomputable assoc : (M ⊗[S] N) ⊗[R] P ≃ₗc[S] M ⊗[S] (N ⊗[R] P) := { AlgebraTensorModule.assoc R S S M N P with counit_comp := by ext; simp map_comp_comul := by ext x y z dsimp hopf_tensor_induction comul (R := S) x with x₁ x₂ hopf_tensor_induction comul (R := S) y with y₁ y₂ hopf_tensor_induction comul (R := R) z with z₁ z₂ simp } variable {R S M N P} @[simp]
def
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
assoc
The associator for tensor products of R-coalgebras, as a coalgebra equivalence.
assoc_tmul (x : M) (y : N) (z : P) : Coalgebra.TensorProduct.assoc R S M N P ((x ⊗ₜ y) ⊗ₜ z) = x ⊗ₜ (y ⊗ₜ z) := rfl @[simp]
theorem
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
assoc_tmul
null
assoc_symm_tmul (x : M) (y : N) (z : P) : (Coalgebra.TensorProduct.assoc R S M N P).symm (x ⊗ₜ (y ⊗ₜ z)) = (x ⊗ₜ y) ⊗ₜ z := rfl @[simp]
theorem
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
assoc_symm_tmul
null
assoc_toLinearEquiv : Coalgebra.TensorProduct.assoc R S M N P = AlgebraTensorModule.assoc R S S M N P := rfl variable (R P)
theorem
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
assoc_toLinearEquiv
null
protected noncomputable lid : R ⊗[R] P ≃ₗc[R] P := { _root_.TensorProduct.lid R P with counit_comp := by ext; simp map_comp_comul := by ext x dsimp simp only [one_smul] hopf_tensor_induction comul (R := R) x with x₁ x₂ simp } variable {R P} @[simp]
def
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
lid
The base ring is a left identity for the tensor product of coalgebras, up to coalgebra equivalence.
lid_toLinearEquiv : (Coalgebra.TensorProduct.lid R P) = _root_.TensorProduct.lid R P := rfl @[simp]
theorem
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
lid_toLinearEquiv
null
lid_tmul (r : R) (a : P) : Coalgebra.TensorProduct.lid R P (r ⊗ₜ a) = r • a := rfl @[simp]
theorem
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
lid_tmul
null
lid_symm_apply (a : P) : (Coalgebra.TensorProduct.lid R P).symm a = 1 ⊗ₜ a := rfl variable (R S M) in
theorem
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
lid_symm_apply
null
protected noncomputable rid : M ⊗[R] R ≃ₗc[S] M := { AlgebraTensorModule.rid R S M with counit_comp := by ext; simp map_comp_comul := by ext x dsimp simp only [one_smul] hopf_tensor_induction comul (R := S) x with x₁ x₂ simp } @[simp]
def
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
rid
The base ring is a right identity for the tensor product of coalgebras, up to coalgebra equivalence.
rid_toLinearEquiv : (Coalgebra.TensorProduct.rid R S M) = AlgebraTensorModule.rid R S M := rfl @[simp]
theorem
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
rid_toLinearEquiv
null
rid_tmul (r : R) (a : M) : Coalgebra.TensorProduct.rid R S M (a ⊗ₜ r) = r • a := rfl @[simp]
theorem
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
rid_tmul
null
rid_symm_apply (a : M) : (Coalgebra.TensorProduct.rid R S M).symm a = a ⊗ₜ 1 := rfl
theorem
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
rid_symm_apply
null
noncomputable lTensor (f : N →ₗc[R] P) : M ⊗[R] N →ₗc[R] M ⊗[R] P := Coalgebra.TensorProduct.map (CoalgHom.id R M) f
abbrev
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
lTensor
`lTensor M f : M ⊗ N →ₗc M ⊗ P` is the natural coalgebra morphism induced by `f : N →ₗc P`.
noncomputable rTensor (f : N →ₗc[R] P) : N ⊗[R] M →ₗc[R] P ⊗[R] M := Coalgebra.TensorProduct.map f (CoalgHom.id R M)
abbrev
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.RingTheory.Coalgebra.Equiv" ]
Mathlib/RingTheory/Coalgebra/TensorProduct.lean
rTensor
`rTensor M f : N ⊗ M →ₗc P ⊗ M` is the natural coalgebra morphism induced by `f : N →ₗc P`.
@[simp, norm_cast] coe_smul (a : α) (x : R) : (↑(a • x) : c.Quotient) = a • (x : c.Quotient) := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
coe_smul
null
isScalarTower_right [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R] (c : RingCon R) : IsScalarTower α c.Quotient c.Quotient where smul_assoc _ := Quotient.ind₂' fun _ _ => congr_arg Quotient.mk'' <| smul_mul_assoc _ _ _
instance
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
isScalarTower_right
null
smulCommClass [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R] [SMulCommClass α R R] (c : RingCon R) : SMulCommClass α c.Quotient c.Quotient where smul_comm _ := Quotient.ind₂' fun _ _ => congr_arg Quotient.mk'' <| (mul_smul_comm _ _ _).symm
instance
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
smulCommClass
null
smulCommClass' [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R] [SMulCommClass R α R] (c : RingCon R) : SMulCommClass c.Quotient α c.Quotient := haveI := SMulCommClass.symm R α R SMulCommClass.symm _ _ _
instance
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
smulCommClass'
null
le_def {c d : RingCon R} : c ≤ d ↔ ∀ {x y}, c x y → d x y := Iff.rfl
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
le_def
For congruence relations `c, d` on a type `M` with multiplication and addition, `c ≤ d` iff `∀ x y ∈ M`, `x` is related to `y` by `d` if `x` is related to `y` by `c`. -/ instance : LE (RingCon R) where le c d := ∀ ⦃x y⦄, c x y → d x y /-- Definition of `≤` for congruence relations.
sInf_toSetoid (S : Set (RingCon R)) : (sInf S).toSetoid = sInf ((·.toSetoid) '' S) := Setoid.ext fun x y => ⟨fun h r ⟨c, hS, hr⟩ => by rw [← hr]; exact h c hS, fun h c hS => h c.toSetoid ⟨c, hS, rfl⟩⟩
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
sInf_toSetoid
The infimum of a set of congruence relations on a given type with multiplication and addition. -/ instance : InfSet (RingCon R) where sInf S := { r := fun x y => ∀ c : RingCon R, c ∈ S → c x y iseqv := ⟨fun x c _hc => c.refl x, fun h c hc => c.symm <| h c hc, fun h1 h2 c hc => c.trans (h1 c hc) <| h2 c hc⟩ add' := fun h1 h2 c hc => c.add (h1 c hc) <| h2 c hc mul' := fun h1 h2 c hc => c.mul (h1 c hc) <| h2 c hc } /-- The infimum of a set of congruence relations is the same as the infimum of the set's image under the map to the underlying equivalence relation.
@[simp, norm_cast] coe_sInf (S : Set (RingCon R)) : ⇑(sInf S) = sInf ((⇑) '' S) := by ext; simp only [sInf_image, iInf_apply, iInf_Prop_eq]; rfl @[simp, norm_cast]
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
coe_sInf
The infimum of a set of congruence relations is the same as the infimum of the set's image under the map to the underlying binary relation.
coe_iInf {ι : Sort*} (f : ι → RingCon R) : ⇑(iInf f) = ⨅ i, ⇑(f i) := by rw [iInf, coe_sInf, ← Set.range_comp, sInf_range, Function.comp_def]
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
coe_iInf
null
@[simp, norm_cast] coe_inf {c d : RingCon R} : ⇑(c ⊓ d) = ⇑c ⊓ ⇑d := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
coe_inf
The complete lattice of congruence relations on a given type with multiplication and addition. -/ instance : CompleteLattice (RingCon R) where __ := completeLatticeOfInf (RingCon R) fun s => ⟨fun r hr x y h => (h : ∀ r ∈ s, (r : RingCon R) x y) r hr, fun _r hr _x _y h _r' hr' => hr hr' h⟩ inf c d := { toSetoid := c.toSetoid ⊓ d.toSetoid mul' := fun h1 h2 => ⟨c.mul h1.1 h2.1, d.mul h1.2 h2.2⟩ add' := fun h1 h2 => ⟨c.add h1.1 h2.1, d.add h1.2 h2.2⟩ } inf_le_left _ _ := fun _ _ h => h.1 inf_le_right _ _ := fun _ _ h => h.2 le_inf _ _ _ hb hc := fun _ _ h => ⟨hb h, hc h⟩ top := { (⊤ : Setoid R) with mul' := fun _ _ => trivial add' := fun _ _ => trivial } le_top _ := fun _ _ _h => trivial bot := { (⊥ : Setoid R) with mul' := congr_arg₂ _ add' := congr_arg₂ _ } bot_le c := fun x _y h => h ▸ c.refl x @[simp, norm_cast] theorem coe_top : ⇑(⊤ : RingCon R) = ⊤ := rfl @[simp, norm_cast] theorem coe_bot : ⇑(⊥ : RingCon R) = Eq := rfl /-- The infimum of two congruence relations equals the infimum of the underlying binary operations.
inf_iff_and {c d : RingCon R} {x y} : (c ⊓ d) x y ↔ c x y ∧ d x y := Iff.rfl
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
inf_iff_and
Definition of the infimum of two congruence relations.
nontrivial_iff : Nontrivial (RingCon R) ↔ Nontrivial R := by cases subsingleton_or_nontrivial R on_goal 1 => simp_rw [← not_subsingleton_iff_nontrivial, not_iff_not] all_goals exact iff_of_true inferInstance ‹_›
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
nontrivial_iff
null
subsingleton_iff : Subsingleton (RingCon R) ↔ Subsingleton R := by simp_rw [← not_nontrivial_iff_subsingleton, nontrivial_iff]
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
subsingleton_iff
null
ringConGen_eq (r : R → R → Prop) : ringConGen r = sInf {s : RingCon R | ∀ x y, r x y → s x y} := le_antisymm (fun _x _y H => RingConGen.Rel.recOn H (fun _ _ h _ hs => hs _ _ h) (RingCon.refl _) (fun _ => RingCon.symm _) (fun _ _ => RingCon.trans _) (fun _ _ h1 h2 c hc => c.add (h1 c hc) <| h2 c hc) (fun _ _ h1 h2 c hc => c.mul (h1 c hc) <| h2 c hc)) (sInf_le fun _ _ => RingConGen.Rel.of _ _)
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
ringConGen_eq
The inductively defined smallest congruence relation containing a binary relation `r` equals the infimum of the set of congruence relations containing `r`.
ringConGen_le {r : R → R → Prop} {c : RingCon R} (h : ∀ x y, r x y → c x y) : ringConGen r ≤ c := by rw [ringConGen_eq]; exact sInf_le h
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
ringConGen_le
The smallest congruence relation containing a binary relation `r` is contained in any congruence relation containing `r`.
ringConGen_mono {r s : R → R → Prop} (h : ∀ x y, r x y → s x y) : ringConGen r ≤ ringConGen s := ringConGen_le fun x y hr => RingConGen.Rel.of _ _ <| h x y hr
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
ringConGen_mono
Given binary relations `r, s` with `r` contained in `s`, the smallest congruence relation containing `s` contains the smallest congruence relation containing `r`.
ringConGen_of_ringCon (c : RingCon R) : ringConGen c = c := le_antisymm (by rw [ringConGen_eq]; exact sInf_le fun _ _ => id) RingConGen.Rel.of
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
ringConGen_of_ringCon
Congruence relations equal the smallest congruence relation in which they are contained.
ringConGen_idem (r : R → R → Prop) : ringConGen (ringConGen r) = ringConGen r := ringConGen_of_ringCon _
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
ringConGen_idem
The map sending a binary relation to the smallest congruence relation in which it is contained is idempotent.
sup_eq_ringConGen (c d : RingCon R) : c ⊔ d = ringConGen fun x y => c x y ∨ d x y := by rw [ringConGen_eq] apply congr_arg sInf simp only [le_def, or_imp, ← forall_and]
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
sup_eq_ringConGen
The supremum of congruence relations `c, d` equals the smallest congruence relation containing the binary relation '`x` is related to `y` by `c` or `d`'.
sup_def {c d : RingCon R} : c ⊔ d = ringConGen (⇑c ⊔ ⇑d) := by rw [sup_eq_ringConGen]; rfl
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
sup_def
The supremum of two congruence relations equals the smallest congruence relation containing the supremum of the underlying binary operations.
sSup_eq_ringConGen (S : Set (RingCon R)) : sSup S = ringConGen fun x y => ∃ c : RingCon R, c ∈ S ∧ c x y := by rw [ringConGen_eq] apply congr_arg sInf ext exact ⟨fun h _ _ ⟨r, hr⟩ => h hr.1 hr.2, fun h r hS _ _ hr => h _ _ ⟨r, hS, hr⟩⟩
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
sSup_eq_ringConGen
The supremum of a set of congruence relations `S` equals the smallest congruence relation containing the binary relation 'there exists `c ∈ S` such that `x` is related to `y` by `c`'.
sSup_def {S : Set (RingCon R)} : sSup S = ringConGen (sSup (@Set.image (RingCon R) (R → R → Prop) (⇑) S)) := by rw [sSup_eq_ringConGen, sSup_image] congr with (x y) simp only [iSup_apply, iSup_Prop_eq, exists_prop] variable (R)
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
sSup_def
The supremum of a set of congruence relations is the same as the smallest congruence relation containing the supremum of the set's image under the map to the underlying binary relation.
protected gi : @GaloisInsertion (R → R → Prop) (RingCon R) _ _ ringConGen (⇑) where choice r _h := ringConGen r gc _r c := ⟨fun H _ _ h => H <| RingConGen.Rel.of _ _ h, fun H => ringConGen_of_ringCon c ▸ ringConGen_mono H⟩ le_l_u x := (ringConGen_of_ringCon x).symm ▸ le_refl x choice_eq _ _ := rfl
def
RingTheory
[ "Mathlib.Algebra.Ring.Action.Basic", "Mathlib.GroupTheory.Congruence.Basic", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/Basic.lean
gi
There is a Galois insertion of congruence relations on a type with multiplication and addition `R` into binary relations on `R`.
protected listSum {ι S : Type*} [AddMonoid S] [Mul S] (t : RingCon S) (l : List ι) {f g : ι → S} (h : ∀ i ∈ l, t (f i) (g i)) : t (l.map f).sum (l.map g).sum := t.toAddCon.list_sum h
lemma
RingTheory
[ "Mathlib.GroupTheory.Congruence.BigOperators", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/BigOperators.lean
listSum
Congruence relation of a ring preserves finite sum indexed by a list.
protected multisetSum {ι S : Type*} [AddCommMonoid S] [Mul S] (t : RingCon S) (s : Multiset ι) {f g : ι → S} (h : ∀ i ∈ s, t (f i) (g i)) : t (s.map f).sum (s.map g).sum := t.toAddCon.multiset_sum h
lemma
RingTheory
[ "Mathlib.GroupTheory.Congruence.BigOperators", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/BigOperators.lean
multisetSum
Congruence relation of a ring preserves finite sum indexed by a multiset.
protected finsetSum {ι S : Type*} [AddCommMonoid S] [Mul S] (t : RingCon S) (s : Finset ι) {f g : ι → S} (h : ∀ i ∈ s, t (f i) (g i)) : t (s.sum f) (s.sum g) := t.toAddCon.finset_sum s h
lemma
RingTheory
[ "Mathlib.GroupTheory.Congruence.BigOperators", "Mathlib.RingTheory.Congruence.Defs" ]
Mathlib/RingTheory/Congruence/BigOperators.lean
finsetSum
Congruence relation of a ring preserves finite sum.
RingCon (R : Type*) [Add R] [Mul R] extends Con R, AddCon R where
structure
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
RingCon
A congruence relation on a type with an addition and multiplication is an equivalence relation which preserves both.
RingConGen.Rel [Add R] [Mul R] (r : R → R → Prop) : R → R → Prop | of : ∀ x y, r x y → RingConGen.Rel r x y | refl : ∀ x, RingConGen.Rel r x x | symm : ∀ {x y}, RingConGen.Rel r x y → RingConGen.Rel r y x | trans : ∀ {x y z}, RingConGen.Rel r x y → RingConGen.Rel r y z → RingConGen.Rel r x z | add : ∀ {w x y z}, RingConGen.Rel r w x → RingConGen.Rel r y z → RingConGen.Rel r (w + y) (x + z) | mul : ∀ {w x y z}, RingConGen.Rel r w x → RingConGen.Rel r y z → RingConGen.Rel r (w * y) (x * z)
inductive
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
RingConGen.Rel
The induced multiplicative congruence from a `RingCon`. -/ add_decl_doc RingCon.toCon /-- The induced additive congruence from a `RingCon`. -/ add_decl_doc RingCon.toAddCon variable {R : Type*} /-- The inductively defined smallest ring congruence relation containing a given binary relation.
ringConGen [Add R] [Mul R] (r : R → R → Prop) : RingCon R where r := RingConGen.Rel r iseqv := ⟨RingConGen.Rel.refl, @RingConGen.Rel.symm _ _ _ _, @RingConGen.Rel.trans _ _ _ _⟩ add' := RingConGen.Rel.add mul' := RingConGen.Rel.mul
def
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
ringConGen
The inductively defined smallest ring congruence relation containing a given binary relation.
ext' {c d : RingCon R} (H : ⇑c = ⇑d) : c = d := DFunLike.coe_injective H
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
ext'
A coercion from a congruence relation to its underlying binary relation. -/ instance : FunLike (RingCon R) R (R → Prop) where coe c := c.r coe_injective' x y h := by rcases x with ⟨⟨x, _⟩, _⟩ rcases y with ⟨⟨y, _⟩, _⟩ congr! rw [Setoid.ext_iff, (show ⇑x = ⇑y from h)] simp @[simp] theorem coe_mk (s : Con R) (h) : ⇑(mk s h) = s := rfl theorem rel_eq_coe : c.r = c := rfl @[simp] theorem toCon_coe_eq_coe : (c.toCon : R → R → Prop) = c := rfl protected theorem refl (x) : c x x := c.refl' x protected theorem symm {x y} : c x y → c y x := c.symm' protected theorem trans {x y z} : c x y → c y z → c x z := c.trans' protected theorem add {w x y z} : c w x → c y z → c (w + y) (x + z) := c.add' protected theorem mul {w x y z} : c w x → c y z → c (w * y) (x * z) := c.mul' protected theorem sub {S : Type*} [AddGroup S] [Mul S] (t : RingCon S) {a b c d : S} (h : t a b) (h' : t c d) : t (a - c) (b - d) := t.toAddCon.sub h h' protected theorem neg {S : Type*} [AddGroup S] [Mul S] (t : RingCon S) {a b} (h : t a b) : t (-a) (-b) := t.toAddCon.neg h protected theorem nsmul {S : Type*} [AddMonoid S] [Mul S] (t : RingCon S) (m : ℕ) {x y : S} (hx : t x y) : t (m • x) (m • y) := t.toAddCon.nsmul m hx protected theorem zsmul {S : Type*} [AddGroup S] [Mul S] (t : RingCon S) (z : ℤ) {x y : S} (hx : t x y) : t (z • x) (z • y) := t.toAddCon.zsmul z hx instance : Inhabited (RingCon R) := ⟨ringConGen EmptyRelation⟩ @[simp] theorem rel_mk {s : Con R} {h a b} : RingCon.mk s h a b ↔ s a b := Iff.rfl /-- The map sending a congruence relation to its underlying binary relation is injective.
@[ext] ext {c d : RingCon R} (H : ∀ x y, c x y ↔ d x y) : c = d := ext' <| by ext; apply H
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
ext
Extensionality rule for congruence relations.
comap {R R' F : Type*} [Add R] [Add R'] [FunLike F R R'] [AddHomClass F R R'] [Mul R] [Mul R'] [MulHomClass F R R'] (J : RingCon R') (f : F) : RingCon R where __ := J.toCon.comap f (map_mul f) __ := J.toAddCon.comap f (map_add f)
def
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
comap
Pulling back a `RingCon` across a ring homomorphism.
protected Quotient := Quotient c.toSetoid variable {c}
def
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
Quotient
Defining the quotient by a congruence relation of a type with addition and multiplication.
@[coe] toQuotient (r : R) : c.Quotient := @Quotient.mk'' _ c.toSetoid r variable (c)
def
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
toQuotient
The morphism into the quotient by a congruence relation
@[simp] protected eq {a b : R} : (a : c.Quotient) = (b : c.Quotient) ↔ c a b := Quotient.eq''
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
eq
Coercion from a type with addition and multiplication to its quotient by a congruence relation. See Note [use has_coe_t]. -/ instance : CoeTC R c.Quotient := ⟨toQuotient⟩ -- Lower the priority since it unifies with any quotient type. /-- The quotient by a decidable congruence relation has decidable equality. -/ instance (priority := 500) [_d : ∀ a b, Decidable (c a b)] : DecidableEq c.Quotient := inferInstanceAs (DecidableEq (Quotient c.toSetoid)) @[simp] theorem quot_mk_eq_coe (x : R) : Quot.mk c x = (x : c.Quotient) := rfl /-- Two elements are related by a congruence relation `c` iff they are represented by the same element of the quotient by `c`.
@[simp, norm_cast] coe_add (x y : R) : (↑(x + y) : c.Quotient) = ↑x + ↑y := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
coe_add
null
@[simp, norm_cast] coe_mul (x y : R) : (↑(x * y) : c.Quotient) = ↑x * ↑y := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
coe_mul
null
@[simp, norm_cast] coe_zero : (↑(0 : R) : c.Quotient) = 0 := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
coe_zero
null
@[simp, norm_cast] coe_one : (↑(1 : R) : c.Quotient) = 1 := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
coe_one
null
@[simp, norm_cast] coe_neg (x : R) : (↑(-x) : c.Quotient) = -x := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
coe_neg
null
@[simp, norm_cast] coe_sub (x y : R) : (↑(x - y) : c.Quotient) = x - y := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
coe_sub
null
hasZSMul : SMul ℤ c.Quotient := inferInstanceAs (SMul ℤ c.toAddCon.Quotient) @[simp, norm_cast]
instance
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
hasZSMul
null
coe_zsmul (z : ℤ) (x : R) : (↑(z • x) : c.Quotient) = z • (x : c.Quotient) := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
coe_zsmul
null
hasNSMul : SMul ℕ c.Quotient := inferInstanceAs (SMul ℕ c.toAddCon.Quotient) @[simp, norm_cast]
instance
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
hasNSMul
null
coe_nsmul (n : ℕ) (x : R) : (↑(n • x) : c.Quotient) = n • (x : c.Quotient) := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
coe_nsmul
null
@[simp, norm_cast] coe_pow (x : R) (n : ℕ) : (↑(x ^ n) : c.Quotient) = (x : c.Quotient) ^ n := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
coe_pow
null
@[simp, norm_cast] coe_natCast (n : ℕ) : (↑(n : R) : c.Quotient) = n := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
coe_natCast
null
@[simp, norm_cast] coe_intCast (n : ℕ) : (↑(n : R) : c.Quotient) = n := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
coe_intCast
null
mk' [NonAssocSemiring R] (c : RingCon R) : R →+* c.Quotient where toFun := toQuotient map_zero' := rfl map_one' := rfl map_add' _ _ := rfl map_mul' _ _ := rfl
def
RingTheory
[ "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Algebra.Ring.InjSurj", "Mathlib.GroupTheory.Congruence.Defs", "Mathlib.Tactic.FastInstance" ]
Mathlib/RingTheory/Congruence/Defs.lean
mk'
The natural homomorphism from a ring to its quotient by a congruence relation.
op (c : RingCon R) : RingCon Rᵐᵒᵖ where __ := c.toCon.op mul' h1 h2 := c.toCon.op.mul h1 h2 add' h1 h2 := c.add h1 h2
def
RingTheory
[ "Mathlib.RingTheory.Congruence.Basic", "Mathlib.GroupTheory.Congruence.Opposite" ]
Mathlib/RingTheory/Congruence/Opposite.lean
op
If `c` is a `RingCon R`, then `(a, b) ↦ c b.unop a.unop` is a `RingCon Rᵐᵒᵖ`.
op_iff {c : RingCon R} {x y : Rᵐᵒᵖ} : c.op x y ↔ c y.unop x.unop := Iff.rfl
lemma
RingTheory
[ "Mathlib.RingTheory.Congruence.Basic", "Mathlib.GroupTheory.Congruence.Opposite" ]
Mathlib/RingTheory/Congruence/Opposite.lean
op_iff
null
unop (c : RingCon Rᵐᵒᵖ) : RingCon R where __ := c.toCon.unop mul' h1 h2 := c.toCon.unop.mul h1 h2 add' h1 h2 := c.add h1 h2
def
RingTheory
[ "Mathlib.RingTheory.Congruence.Basic", "Mathlib.GroupTheory.Congruence.Opposite" ]
Mathlib/RingTheory/Congruence/Opposite.lean
unop
If `c` is a `RingCon Rᵐᵒᵖ`, then `(a, b) ↦ c b.op a.op` is a `RingCon R`.
unop_iff {c : RingCon Rᵐᵒᵖ} {x y : R} : c.unop x y ↔ c (.op y) (.op x) := Iff.rfl
lemma
RingTheory
[ "Mathlib.RingTheory.Congruence.Basic", "Mathlib.GroupTheory.Congruence.Opposite" ]
Mathlib/RingTheory/Congruence/Opposite.lean
unop_iff
null
@[simps] opOrderIso : RingCon R ≃o RingCon Rᵐᵒᵖ where toFun := op invFun := unop map_rel_iff' {c d} := by rw [le_def, le_def]; constructor <;> intro h _ _ h' <;> exact h h'
def
RingTheory
[ "Mathlib.RingTheory.Congruence.Basic", "Mathlib.GroupTheory.Congruence.Opposite" ]
Mathlib/RingTheory/Congruence/Opposite.lean
opOrderIso
The congruences of a ring `R` biject to the congruences of the opposite ring `Rᵐᵒᵖ`.
IsCoprime : Prop := ∃ a b, a * x + b * y = 1 variable {x y z w} @[symm]
def
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
IsCoprime
The proposition that `x` and `y` are coprime, defined to be the existence of `a` and `b` such that `a * x + b * y = 1`. Note that elements with no common divisors are not necessarily coprime, e.g., the multivariate polynomials `x₁` and `x₂` are not coprime.
IsCoprime.symm (H : IsCoprime x y) : IsCoprime y x := let ⟨a, b, H⟩ := H ⟨b, a, by rw [add_comm, H]⟩
theorem
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
IsCoprime.symm
null
isCoprime_comm : IsCoprime x y ↔ IsCoprime y x := ⟨IsCoprime.symm, IsCoprime.symm⟩
theorem
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
isCoprime_comm
null
isCoprime_self : IsCoprime x x ↔ IsUnit x := ⟨fun ⟨a, b, h⟩ => isUnit_of_mul_eq_one x (a + b) <| by rwa [mul_comm, add_mul], fun h => let ⟨b, hb⟩ := isUnit_iff_exists_inv'.1 h ⟨b, 0, by rwa [zero_mul, add_zero]⟩⟩
theorem
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
isCoprime_self
null
isCoprime_zero_left : IsCoprime 0 x ↔ IsUnit x := ⟨fun ⟨a, b, H⟩ => isUnit_of_mul_eq_one x b <| by rwa [mul_zero, zero_add, mul_comm] at H, fun H => let ⟨b, hb⟩ := isUnit_iff_exists_inv'.1 H ⟨1, b, by rwa [one_mul, zero_add]⟩⟩
theorem
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
isCoprime_zero_left
null
isCoprime_zero_right : IsCoprime x 0 ↔ IsUnit x := isCoprime_comm.trans isCoprime_zero_left
theorem
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
isCoprime_zero_right
null
not_isCoprime_zero_zero [Nontrivial R] : ¬IsCoprime (0 : R) 0 := mt isCoprime_zero_right.mp not_isUnit_zero
theorem
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
not_isCoprime_zero_zero
null
IsCoprime.intCast {R : Type*} [CommRing R] {a b : ℤ} (h : IsCoprime a b) : IsCoprime (a : R) (b : R) := by rcases h with ⟨u, v, H⟩ use u, v rw_mod_cast [H] exact Int.cast_one
lemma
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
IsCoprime.intCast
null
IsCoprime.ne_zero [Nontrivial R] {p : Fin 2 → R} (h : IsCoprime (p 0) (p 1)) : p ≠ 0 := by rintro rfl exact not_isCoprime_zero_zero h
theorem
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
IsCoprime.ne_zero
If a 2-vector `p` satisfies `IsCoprime (p 0) (p 1)`, then `p ≠ 0`.
IsCoprime.ne_zero_or_ne_zero [Nontrivial R] (h : IsCoprime x y) : x ≠ 0 ∨ y ≠ 0 := by apply not_or_of_imp rintro rfl rfl exact not_isCoprime_zero_zero h
theorem
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
IsCoprime.ne_zero_or_ne_zero
null
isCoprime_one_left : IsCoprime 1 x := ⟨1, 0, by rw [one_mul, zero_mul, add_zero]⟩
theorem
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
isCoprime_one_left
null
isCoprime_one_right : IsCoprime x 1 := ⟨0, 1, by rw [one_mul, zero_mul, zero_add]⟩
theorem
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
isCoprime_one_right
null
IsCoprime.dvd_of_dvd_mul_right (H1 : IsCoprime x z) (H2 : x ∣ y * z) : x ∣ y := by let ⟨a, b, H⟩ := H1 rw [← mul_one y, ← H, mul_add, ← mul_assoc, mul_left_comm] exact dvd_add (dvd_mul_left _ _) (H2.mul_left _)
theorem
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
IsCoprime.dvd_of_dvd_mul_right
null
IsCoprime.dvd_of_dvd_mul_left (H1 : IsCoprime x y) (H2 : x ∣ y * z) : x ∣ z := by let ⟨a, b, H⟩ := H1 rw [← one_mul z, ← H, add_mul, mul_right_comm, mul_assoc b] exact dvd_add (dvd_mul_left _ _) (H2.mul_left _)
theorem
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
IsCoprime.dvd_of_dvd_mul_left
null
IsCoprime.mul_left (H1 : IsCoprime x z) (H2 : IsCoprime y z) : IsCoprime (x * y) z := let ⟨a, b, h1⟩ := H1 let ⟨c, d, h2⟩ := H2 ⟨a * c, a * x * d + b * c * y + b * d * z, calc a * c * (x * y) + (a * x * d + b * c * y + b * d * z) * z _ = (a * x + b * z) * (c * y + d * z) := by ring _ = 1 := by rw [h1, h2, mul_one] ⟩
theorem
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
IsCoprime.mul_left
null
IsCoprime.mul_right (H1 : IsCoprime x y) (H2 : IsCoprime x z) : IsCoprime x (y * z) := by rw [isCoprime_comm] at H1 H2 ⊢ exact H1.mul_left H2
theorem
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
IsCoprime.mul_right
null
IsCoprime.mul_dvd (H : IsCoprime x y) (H1 : x ∣ z) (H2 : y ∣ z) : x * y ∣ z := by obtain ⟨a, b, h⟩ := H rw [← mul_one z, ← h, mul_add] apply dvd_add · rw [mul_comm z, mul_assoc] exact (mul_dvd_mul_left _ H2).mul_left _ · rw [mul_comm b, ← mul_assoc] exact (mul_dvd_mul_right H1 _).mul_right _
theorem
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
IsCoprime.mul_dvd
null
IsCoprime.of_mul_left_left (H : IsCoprime (x * y) z) : IsCoprime x z := let ⟨a, b, h⟩ := H ⟨a * y, b, by rwa [mul_right_comm, mul_assoc]⟩
theorem
RingTheory
[ "Mathlib.Algebra.Group.Action.Units", "Mathlib.Algebra.Group.Nat.Units", "Mathlib.Algebra.GroupWithZero.Divisibility", "Mathlib.Algebra.Ring.Divisibility.Basic", "Mathlib.Algebra.Ring.Hom.Defs", "Mathlib.Logic.Basic", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Coprime/Basic.lean
IsCoprime.of_mul_left_left
null