statement
stringlengths
1
2.88k
proof
stringlengths
0
13.9k
type
stringclasses
10 values
symbolic_name
stringlengths
1
131
library
stringclasses
417 values
filename
stringlengths
17
80
imports
listlengths
0
16
deps
listlengths
0
64
docstring
stringlengths
0
10.2k
source_url
stringclasses
1 value
commit
stringclasses
1 value
limit_cone_is_limit (F : J ⥤ Ring.{max v u}) : is_limit (limit_cone F)
lifted_limit_is_limit _
def
Ring.limit_cone_is_limit
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[]
The chosen cone is a limit cone. (Generally, you'll just want to use `limit.cone F`.)
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
has_limits_of_size : has_limits_of_size.{v v} Ring.{max v u}
{ has_limits_of_shape := λ J 𝒥, by exactI { has_limit := λ F, has_limit_of_created F (forget₂ Ring SemiRing.{max v u}) } }
instance
Ring.has_limits_of_size
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[ "Ring" ]
The category of rings has all limits.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
has_limits : has_limits Ring.{u}
Ring.has_limits_of_size.{u u}
instance
Ring.has_limits
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
forget₂_SemiRing_preserves_limits_of_size : preserves_limits_of_size.{v v} (forget₂ Ring SemiRing.{max v u})
{ preserves_limits_of_shape := λ J 𝒥, { preserves_limit := λ F, by apply_instance } }
instance
Ring.forget₂_SemiRing_preserves_limits_of_size
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[ "Ring" ]
The forgetful functor from rings to semirings preserves all limits.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
forget₂_SemiRing_preserves_limits : preserves_limits (forget₂ Ring SemiRing.{u})
Ring.forget₂_SemiRing_preserves_limits_of_size.{u u}
instance
Ring.forget₂_SemiRing_preserves_limits
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[ "Ring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
forget₂_AddCommGroup_preserves_limits_aux (F : J ⥤ Ring.{max v u}) : is_limit ((forget₂ Ring AddCommGroup).map_cone (limit_cone F))
by apply AddCommGroup.limit_cone_is_limit (F ⋙ forget₂ Ring AddCommGroup.{max v u})
def
Ring.forget₂_AddCommGroup_preserves_limits_aux
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[ "Ring" ]
An auxiliary declaration to speed up typechecking.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
forget₂_AddCommGroup_preserves_limits_of_size : preserves_limits_of_size.{v v} (forget₂ Ring AddCommGroup.{max v u})
{ preserves_limits_of_shape := λ J 𝒥, by exactI { preserves_limit := λ F, preserves_limit_of_preserves_limit_cone (limit_cone_is_limit F) (forget₂_AddCommGroup_preserves_limits_aux F) } }
instance
Ring.forget₂_AddCommGroup_preserves_limits_of_size
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[ "Ring" ]
The forgetful functor from rings to additive commutative groups preserves all limits.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
forget₂_AddCommGroup_preserves_limits : preserves_limits (forget₂ Ring AddCommGroup.{u})
Ring.forget₂_AddCommGroup_preserves_limits_of_size.{u u}
instance
Ring.forget₂_AddCommGroup_preserves_limits
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[ "Ring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
forget_preserves_limits_of_size : preserves_limits_of_size.{v v} (forget Ring.{max v u})
{ preserves_limits_of_shape := λ J 𝒥, by exactI { preserves_limit := λ F, limits.comp_preserves_limit (forget₂ Ring SemiRing) (forget SemiRing.{max v u}) } }
instance
Ring.forget_preserves_limits_of_size
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[ "Ring", "SemiRing" ]
The forgetful functor from rings to types preserves all limits. (That is, the underlying types could have been computed instead as limits in the category of types.)
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
forget_preserves_limits : preserves_limits (forget Ring.{u})
Ring.forget_preserves_limits_of_size.{u u}
instance
Ring.forget_preserves_limits
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
comm_ring_obj (F : J ⥤ CommRing.{max v u}) (j) : comm_ring ((F ⋙ forget CommRing).obj j)
by { change comm_ring (F.obj j), apply_instance }
instance
CommRing.comm_ring_obj
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[ "CommRing", "comm_ring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
limit_comm_ring (F : J ⥤ CommRing.{max v u}) : comm_ring (types.limit_cone (F ⋙ forget CommRing.{max v u})).X
@subring.to_comm_ring (Π j, F.obj j) _ (Ring.sections_subring (F ⋙ forget₂ CommRing Ring.{max v u}))
instance
CommRing.limit_comm_ring
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[ "CommRing", "Ring.sections_subring", "comm_ring", "subring.to_comm_ring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
limit_cone (F : J ⥤ CommRing.{max v u}) : cone F
lift_limit (limit.is_limit (F ⋙ (forget₂ CommRing Ring.{max v u})))
def
CommRing.limit_cone
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[ "CommRing" ]
A choice of limit cone for a functor into `CommRing`. (Generally, you'll just want to use `limit F`.)
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
limit_cone_is_limit (F : J ⥤ CommRing.{max v u}) : is_limit (limit_cone F)
lifted_limit_is_limit _
def
CommRing.limit_cone_is_limit
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[]
The chosen cone is a limit cone. (Generally, you'll just want to use `limit.cone F`.)
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
has_limits_of_size : has_limits_of_size.{v v} CommRing.{max v u}
{ has_limits_of_shape := λ J 𝒥, by exactI { has_limit := λ F, has_limit_of_created F (forget₂ CommRing Ring.{max v u}) } }
instance
CommRing.has_limits_of_size
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[ "CommRing" ]
The category of commutative rings has all limits.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
has_limits : has_limits CommRing.{u}
CommRing.has_limits_of_size.{u u}
instance
CommRing.has_limits
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
forget₂_Ring_preserves_limits_of_size : preserves_limits_of_size.{v v} (forget₂ CommRing Ring.{max v u})
{ preserves_limits_of_shape := λ J 𝒥, { preserves_limit := λ F, by apply_instance } }
instance
CommRing.forget₂_Ring_preserves_limits_of_size
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[ "CommRing" ]
The forgetful functor from commutative rings to rings preserves all limits. (That is, the underlying rings could have been computed instead as limits in the category of rings.)
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
forget₂_Ring_preserves_limits : preserves_limits (forget₂ CommRing Ring.{u})
CommRing.forget₂_Ring_preserves_limits_of_size.{u u}
instance
CommRing.forget₂_Ring_preserves_limits
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[ "CommRing" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
forget₂_CommSemiRing_preserves_limits_aux (F : J ⥤ CommRing.{max v u}) : is_limit ((forget₂ CommRing CommSemiRing).map_cone (limit_cone F))
by apply CommSemiRing.limit_cone_is_limit (F ⋙ forget₂ CommRing CommSemiRing.{max v u})
def
CommRing.forget₂_CommSemiRing_preserves_limits_aux
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[ "CommRing", "CommSemiRing", "CommSemiRing.limit_cone_is_limit" ]
An auxiliary declaration to speed up typechecking.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
forget₂_CommSemiRing_preserves_limits_of_size : preserves_limits_of_size.{v v} (forget₂ CommRing CommSemiRing.{max v u})
{ preserves_limits_of_shape := λ J 𝒥, by exactI { preserves_limit := λ F, preserves_limit_of_preserves_limit_cone (limit_cone_is_limit F) (forget₂_CommSemiRing_preserves_limits_aux F) } }
instance
CommRing.forget₂_CommSemiRing_preserves_limits_of_size
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[ "CommRing" ]
The forgetful functor from commutative rings to commutative semirings preserves all limits. (That is, the underlying commutative semirings could have been computed instead as limits in the category of commutative semirings.)
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
forget₂_CommSemiRing_preserves_limits : preserves_limits (forget₂ CommRing CommSemiRing.{u})
CommRing.forget₂_CommSemiRing_preserves_limits_of_size.{u u}
instance
CommRing.forget₂_CommSemiRing_preserves_limits
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[ "CommRing" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
forget_preserves_limits_of_size : preserves_limits_of_size.{v v} (forget CommRing.{max v u})
{ preserves_limits_of_shape := λ J 𝒥, by exactI { preserves_limit := λ F, limits.comp_preserves_limit (forget₂ CommRing Ring) (forget Ring) } }
instance
CommRing.forget_preserves_limits_of_size
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[ "CommRing", "Ring" ]
The forgetful functor from commutative rings to types preserves all limits. (That is, the underlying types could have been computed instead as limits in the category of types.)
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
forget_preserves_limits : preserves_limits (forget CommRing.{u})
CommRing.forget_preserves_limits_of_size.{u u}
instance
CommRing.forget_preserves_limits
algebra.category.Ring
src/algebra/category/Ring/limits.lean
[ "algebra.ring.pi", "algebra.category.Ring.basic", "algebra.category.Group.limits", "ring_theory.subring.basic" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Magma : Type (u+1)
bundled has_mul
def
Magma
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[]
The category of magmas and magma morphisms.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
bundled_hom : bundled_hom @mul_hom
⟨@mul_hom.to_fun, @mul_hom.id, @mul_hom.comp, @mul_hom.coe_inj⟩
instance
Magma.bundled_hom
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[ "mul_hom", "mul_hom.comp", "mul_hom.id" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of (M : Type u) [has_mul M] : Magma
bundled.of M
def
Magma.of
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[ "Magma" ]
Construct a bundled `Magma` from the underlying type and typeclass.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_hom {X Y : Type u} [has_mul X] [has_mul Y] (f : X →ₙ* Y) : of X ⟶ of Y
f
def
Magma.of_hom
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[]
Typecheck a `mul_hom` as a morphism in `Magma`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_hom_apply {X Y : Type u} [has_mul X] [has_mul Y] (f : X →ₙ* Y) (x : X) : of_hom f x = f x
rfl
lemma
Magma.of_hom_apply
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_of (R : Type u) [has_mul R] : (Magma.of R : Type u) = R
rfl
lemma
Magma.coe_of
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[ "Magma.of" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Semigroup : Type (u+1)
bundled semigroup
def
Semigroup
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[ "semigroup" ]
The category of semigroups and semigroup morphisms.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of (M : Type u) [semigroup M] : Semigroup
bundled.of M
def
Semigroup.of
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[ "Semigroup", "semigroup" ]
Construct a bundled `Semigroup` from the underlying type and typeclass.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_hom {X Y : Type u} [semigroup X] [semigroup Y] (f : X →ₙ* Y) : of X ⟶ of Y
f
def
Semigroup.of_hom
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[ "semigroup" ]
Typecheck a `mul_hom` as a morphism in `Semigroup`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_hom_apply {X Y : Type u} [semigroup X] [semigroup Y] (f : X →ₙ* Y) (x : X) : of_hom f x = f x
rfl
lemma
Semigroup.of_hom_apply
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[ "semigroup" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_of (R : Type u) [semigroup R] : (Semigroup.of R : Type u) = R
rfl
lemma
Semigroup.coe_of
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[ "Semigroup.of", "semigroup" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
has_forget_to_Magma : has_forget₂ Semigroup Magma
bundled_hom.forget₂ _ _
instance
Semigroup.has_forget_to_Magma
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[ "Magma", "Semigroup" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mul_equiv.to_Magma_iso (e : X ≃* Y) : Magma.of X ≅ Magma.of Y
{ hom := e.to_mul_hom, inv := e.symm.to_mul_hom }
def
mul_equiv.to_Magma_iso
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[ "Magma.of" ]
Build an isomorphism in the category `Magma` from a `mul_equiv` between `has_mul`s.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mul_equiv.to_Semigroup_iso (e : X ≃* Y) : Semigroup.of X ≅ Semigroup.of Y
{ hom := e.to_mul_hom, inv := e.symm.to_mul_hom }
def
mul_equiv.to_Semigroup_iso
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[ "Semigroup.of" ]
Build an isomorphism in the category `Semigroup` from a `mul_equiv` between `semigroup`s.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Magma_iso_to_mul_equiv {X Y : Magma} (i : X ≅ Y) : X ≃* Y
{ to_fun := i.hom, inv_fun := i.inv, left_inv := λ x, by simp, right_inv := λ y, by simp, map_mul' := by simp }
def
category_theory.iso.Magma_iso_to_mul_equiv
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[ "Magma", "inv_fun" ]
Build a `mul_equiv` from an isomorphism in the category `Magma`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Semigroup_iso_to_mul_equiv {X Y : Semigroup} (i : X ≅ Y) : X ≃* Y
{ to_fun := i.hom, inv_fun := i.inv, left_inv := λ x, by simp, right_inv := λ y, by simp, map_mul' := by simp }
def
category_theory.iso.Semigroup_iso_to_mul_equiv
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[ "Semigroup", "inv_fun" ]
Build a `mul_equiv` from an isomorphism in the category `Semigroup`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mul_equiv_iso_Magma_iso {X Y : Type u} [has_mul X] [has_mul Y] : (X ≃* Y) ≅ (Magma.of X ≅ Magma.of Y)
{ hom := λ e, e.to_Magma_iso, inv := λ i, i.Magma_iso_to_mul_equiv }
def
mul_equiv_iso_Magma_iso
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[ "Magma.of" ]
multiplicative equivalences between `has_mul`s are the same as (isomorphic to) isomorphisms in `Magma`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mul_equiv_iso_Semigroup_iso {X Y : Type u} [semigroup X] [semigroup Y] : (X ≃* Y) ≅ (Semigroup.of X ≅ Semigroup.of Y)
{ hom := λ e, e.to_Semigroup_iso, inv := λ i, i.Semigroup_iso_to_mul_equiv }
def
mul_equiv_iso_Semigroup_iso
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[ "Semigroup.of", "semigroup" ]
multiplicative equivalences between `semigroup`s are the same as (isomorphic to) isomorphisms in `Semigroup`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Magma.forget_reflects_isos : reflects_isomorphisms (forget Magma.{u})
{ reflects := λ X Y f _, begin resetI, let i := as_iso ((forget Magma).map f), let e : X ≃* Y := { ..f, ..i.to_equiv }, exact ⟨(is_iso.of_iso e.to_Magma_iso).1⟩, end }
instance
Magma.forget_reflects_isos
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[ "Magma" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Semigroup.forget_reflects_isos : reflects_isomorphisms (forget Semigroup.{u})
{ reflects := λ X Y f _, begin resetI, let i := as_iso ((forget Semigroup).map f), let e : X ≃* Y := { ..f, ..i.to_equiv }, exact ⟨(is_iso.of_iso e.to_Semigroup_iso).1⟩, end }
instance
Semigroup.forget_reflects_isos
algebra.category.Semigroup
src/algebra/category/Semigroup/basic.lean
[ "algebra.pempty_instances", "algebra.hom.equiv.basic", "category_theory.concrete_category.bundled_hom", "category_theory.functor.reflects_isomorphisms", "category_theory.elementwise" ]
[ "Semigroup" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p_of_injective_algebra_map {R A : Type*} [comm_semiring R] [semiring A] [algebra R A] (h : function.injective (algebra_map R A)) (p : ℕ) [char_p R p] : char_p A p
{ cast_eq_zero_iff := λx, begin rw ←char_p.cast_eq_zero_iff R p x, change algebra_map ℕ A x = 0 ↔ algebra_map ℕ R x = 0, rw is_scalar_tower.algebra_map_apply ℕ R A x, refine iff.trans _ h.eq_iff, rw ring_hom.map_zero, end }
lemma
char_p_of_injective_algebra_map
algebra.char_p
src/algebra/char_p/algebra.lean
[ "algebra.char_p.basic", "ring_theory.localization.fraction_ring", "algebra.free_algebra" ]
[ "algebra", "algebra_map", "char_p", "comm_semiring", "is_scalar_tower.algebra_map_apply", "ring_hom.map_zero", "semiring" ]
If the algebra map `R →+* A` is injective then `A` has the same characteristic as `R`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p_of_injective_algebra_map' (R A : Type*) [field R] [semiring A] [algebra R A] [nontrivial A] (p : ℕ) [char_p R p] : char_p A p
char_p_of_injective_algebra_map (algebra_map R A).injective p
lemma
char_p_of_injective_algebra_map'
algebra.char_p
src/algebra/char_p/algebra.lean
[ "algebra.char_p.basic", "ring_theory.localization.fraction_ring", "algebra.free_algebra" ]
[ "algebra", "algebra_map", "char_p", "char_p_of_injective_algebra_map", "field", "nontrivial", "semiring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_zero_of_injective_algebra_map {R A : Type*} [comm_semiring R] [semiring A] [algebra R A] (h : function.injective (algebra_map R A)) [char_zero R] : char_zero A
{ cast_injective := λ x y hxy, begin change algebra_map ℕ A x = algebra_map ℕ A y at hxy, rw is_scalar_tower.algebra_map_apply ℕ R A x at hxy, rw is_scalar_tower.algebra_map_apply ℕ R A y at hxy, exact char_zero.cast_injective (h hxy), end }
lemma
char_zero_of_injective_algebra_map
algebra.char_p
src/algebra/char_p/algebra.lean
[ "algebra.char_p.basic", "ring_theory.localization.fraction_ring", "algebra.free_algebra" ]
[ "algebra", "algebra_map", "char_zero", "comm_semiring", "is_scalar_tower.algebra_map_apply", "semiring" ]
If the algebra map `R →+* A` is injective and `R` has characteristic zero then so does `A`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
algebra_rat.char_p_zero [semiring R] [algebra ℚ R] : char_p R 0
char_p_of_injective_algebra_map (algebra_map ℚ R).injective 0
lemma
algebra_rat.char_p_zero
algebra.char_p
src/algebra/char_p/algebra.lean
[ "algebra.char_p.basic", "ring_theory.localization.fraction_ring", "algebra.free_algebra" ]
[ "algebra", "algebra_map", "char_p", "char_p_of_injective_algebra_map", "semiring" ]
A nontrivial `ℚ`-algebra has `char_p` equal to zero. This cannot be a (local) instance because it would immediately form a loop with the instance `algebra_rat`. It's probably easier to go the other way: prove `char_zero R` and automatically receive an `algebra ℚ R` instance.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
algebra_rat.char_zero [ring R] [algebra ℚ R] : char_zero R
@char_p.char_p_to_char_zero R _ (algebra_rat.char_p_zero R)
lemma
algebra_rat.char_zero
algebra.char_p
src/algebra/char_p/algebra.lean
[ "algebra.char_p.basic", "ring_theory.localization.fraction_ring", "algebra.free_algebra" ]
[ "algebra", "algebra_rat.char_p_zero", "char_p.char_p_to_char_zero", "char_zero", "ring" ]
A nontrivial `ℚ`-algebra has characteristic zero. This cannot be a (local) instance because it would immediately form a loop with the instance `algebra_rat`. It's probably easier to go the other way: prove `char_zero R` and automatically receive an `algebra ℚ R` instance.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
algebra.char_p_iff (p : ℕ) : char_p K p ↔ char_p L p
(algebra_map K L).char_p_iff_char_p p
lemma
algebra.char_p_iff
algebra.char_p
src/algebra/char_p/algebra.lean
[ "algebra.char_p.basic", "ring_theory.localization.fraction_ring", "algebra.free_algebra" ]
[ "algebra_map", "char_p" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
algebra.ring_char_eq : ring_char K = ring_char L
by { rw [ring_char.eq_iff, algebra.char_p_iff K L], apply ring_char.char_p }
lemma
algebra.ring_char_eq
algebra.char_p
src/algebra/char_p/algebra.lean
[ "algebra.char_p.basic", "ring_theory.localization.fraction_ring", "algebra.free_algebra" ]
[ "algebra.char_p_iff", "ring_char", "ring_char.char_p", "ring_char.eq_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p [char_p R p] : char_p (free_algebra R X) p
char_p_of_injective_algebra_map free_algebra.algebra_map_left_inverse.injective p
instance
free_algebra.char_p
algebra.char_p
src/algebra/char_p/algebra.lean
[ "algebra.char_p.basic", "ring_theory.localization.fraction_ring", "algebra.free_algebra" ]
[ "char_p", "char_p_of_injective_algebra_map", "free_algebra" ]
If `R` has characteristic `p`, then so does `free_algebra R X`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_zero [char_zero R] : char_zero (free_algebra R X)
char_zero_of_injective_algebra_map free_algebra.algebra_map_left_inverse.injective
instance
free_algebra.char_zero
algebra.char_p
src/algebra/char_p/algebra.lean
[ "algebra.char_p.basic", "ring_theory.localization.fraction_ring", "algebra.free_algebra" ]
[ "char_zero", "char_zero_of_injective_algebra_map", "free_algebra" ]
If `R` has characteristic `0`, then so does `free_algebra R X`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p_of_is_fraction_ring [char_p R p] : char_p K p
char_p_of_injective_algebra_map (is_fraction_ring.injective R K) p
lemma
is_fraction_ring.char_p_of_is_fraction_ring
algebra.char_p
src/algebra/char_p/algebra.lean
[ "algebra.char_p.basic", "ring_theory.localization.fraction_ring", "algebra.free_algebra" ]
[ "char_p", "char_p_of_injective_algebra_map", "is_fraction_ring.injective" ]
If `R` has characteristic `p`, then so does Frac(R).
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_zero_of_is_fraction_ring [char_zero R] : char_zero K
@char_p.char_p_to_char_zero K _ (char_p_of_is_fraction_ring R 0)
lemma
is_fraction_ring.char_zero_of_is_fraction_ring
algebra.char_p
src/algebra/char_p/algebra.lean
[ "algebra.char_p.basic", "ring_theory.localization.fraction_ring", "algebra.free_algebra" ]
[ "char_p.char_p_to_char_zero", "char_zero" ]
If `R` has characteristic `0`, then so does Frac(R).
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p [char_p R p] : char_p (fraction_ring R) p
char_p_of_is_fraction_ring R p
instance
is_fraction_ring.char_p
algebra.char_p
src/algebra/char_p/algebra.lean
[ "algebra.char_p.basic", "ring_theory.localization.fraction_ring", "algebra.free_algebra" ]
[ "char_p", "fraction_ring" ]
If `R` has characteristic `p`, then so does `fraction_ring R`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_zero [char_zero R] : char_zero (fraction_ring R)
char_zero_of_is_fraction_ring R
instance
is_fraction_ring.char_zero
algebra.char_p
src/algebra/char_p/algebra.lean
[ "algebra.char_p.basic", "ring_theory.localization.fraction_ring", "algebra.free_algebra" ]
[ "char_zero", "fraction_ring" ]
If `R` has characteristic `0`, then so does `fraction_ring R`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_pow_prime_pow_eq (hp : p.prime) (h : commute x y) (n : ℕ) : (x + y) ^ p ^ n = x ^ p ^ n + y ^ p ^ n + p * ∑ k in Ioo 0 (p ^ n), x ^ k * y ^ (p ^ n - k) * ↑((p ^ n).choose k / p)
begin transitivity x ^ p ^ n + y ^ p ^ n + ∑ k in Ioo 0 (p ^ n), x ^ k * y ^ (p ^ n - k) * (p ^ n).choose k, { simp_rw [h.add_pow, ←nat.Ico_zero_eq_range, nat.Ico_succ_right, Icc_eq_cons_Ico (zero_le _), finset.sum_cons, Ico_eq_cons_Ioo (pow_pos hp.pos _), finset.sum_cons, tsub_self, tsub_zero, pow_...
lemma
commute.add_pow_prime_pow_eq
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "add_pow_prime_pow_eq", "commute", "finset.mul_sum", "mul_assoc", "mul_one", "nat.Ico_succ_right", "nat.cast_comm", "nat.cast_one", "nat.choose_self", "nat.choose_zero_right", "one_mul", "pow_pos", "pow_zero", "tsub_self", "tsub_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_pow_prime_eq (hp : p.prime) (h : commute x y) : (x + y) ^ p = x ^ p + y ^ p + p * ∑ k in finset.Ioo 0 p, x ^ k * y ^ (p - k) * ↑(p.choose k / p)
by simpa using h.add_pow_prime_pow_eq hp 1
lemma
commute.add_pow_prime_eq
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "add_pow_prime_eq", "commute", "finset.Ioo" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
exists_add_pow_prime_pow_eq (hp : p.prime) (h : commute x y) (n : ℕ) : ∃ r, (x + y) ^ p ^ n = x ^ p ^ n + y ^ p ^ n + p * r
⟨_, h.add_pow_prime_pow_eq hp n⟩
lemma
commute.exists_add_pow_prime_pow_eq
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "commute", "exists_add_pow_prime_pow_eq" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
exists_add_pow_prime_eq (hp : p.prime) (h : commute x y) : ∃ r, (x + y) ^ p = x ^ p + y ^ p + p * r
⟨_, h.add_pow_prime_eq hp⟩
lemma
commute.exists_add_pow_prime_eq
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "commute", "exists_add_pow_prime_eq" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_pow_prime_pow_eq (hp : p.prime) (x y : R) (n : ℕ) : (x + y) ^ p ^ n = x ^ p ^ n + y ^ p ^ n + p * ∑ k in finset.Ioo 0 (p ^ n), x ^ k * y ^ (p ^ n - k) * ↑((p ^ n).choose k / p)
(commute.all x y).add_pow_prime_pow_eq hp n
lemma
add_pow_prime_pow_eq
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "commute.all", "finset.Ioo" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_pow_prime_eq (hp : p.prime) (x y : R) : (x + y) ^ p = x ^ p + y ^ p + p * ∑ k in finset.Ioo 0 p, x ^ k * y ^ (p - k) * ↑(p.choose k / p)
(commute.all x y).add_pow_prime_eq hp
lemma
add_pow_prime_eq
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "commute.all", "finset.Ioo" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
exists_add_pow_prime_pow_eq (hp : p.prime) (x y : R) (n : ℕ) : ∃ r, (x + y) ^ p ^ n = x ^ p ^ n + y ^ p ^ n + p * r
(commute.all x y).exists_add_pow_prime_pow_eq hp n
lemma
exists_add_pow_prime_pow_eq
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "commute.all" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
exists_add_pow_prime_eq (hp : p.prime) (x y : R) : ∃ r, (x + y) ^ p = x ^ p + y ^ p + p * r
(commute.all x y).exists_add_pow_prime_eq hp
lemma
exists_add_pow_prime_eq
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "commute.all" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p [add_monoid_with_one R] (p : ℕ) : Prop
(cast_eq_zero_iff [] : ∀ x:ℕ, (x:R) = 0 ↔ p ∣ x)
class
char_p
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "add_monoid_with_one" ]
The generator of the kernel of the unique homomorphism ℕ → R for a semiring R. *Warning*: for a semiring `R`, `char_p R 0` and `char_zero R` need not coincide. * `char_p R 0` asks that only `0 : ℕ` maps to `0 : R` under the map `ℕ → R`; * `char_zero R` requires an injection `ℕ ↪ R`. For instance, endowing `{0, 1}` wi...
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p.cast_eq_zero [add_monoid_with_one R] (p : ℕ) [char_p R p] : (p:R) = 0
(char_p.cast_eq_zero_iff R p p).2 (dvd_refl p)
theorem
char_p.cast_eq_zero
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "add_monoid_with_one", "char_p", "dvd_refl" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p.cast_card_eq_zero [add_group_with_one R] [fintype R] : (fintype.card R : R) = 0
by rw [← nsmul_one, card_nsmul_eq_zero]
lemma
char_p.cast_card_eq_zero
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "add_group_with_one", "fintype", "fintype.card", "nsmul_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p.add_order_of_one (R) [semiring R] : char_p R (add_order_of (1 : R))
⟨λ n, by rw [← nat.smul_one_eq_coe, add_order_of_dvd_iff_nsmul_eq_zero]⟩
lemma
char_p.add_order_of_one
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "char_p", "nat.smul_one_eq_coe", "semiring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p.int_cast_eq_zero_iff [add_group_with_one R] (p : ℕ) [char_p R p] (a : ℤ) : (a : R) = 0 ↔ (p:ℤ) ∣ a
begin rcases lt_trichotomy a 0 with h|rfl|h, { rw [← neg_eq_zero, ← int.cast_neg, ← dvd_neg], lift -a to ℕ using neg_nonneg.mpr (le_of_lt h) with b, rw [int.cast_coe_nat, char_p.cast_eq_zero_iff R p, int.coe_nat_dvd] }, { simp only [int.cast_zero, eq_self_iff_true, dvd_zero] }, { lift a to ℕ using (le_o...
lemma
char_p.int_cast_eq_zero_iff
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "add_group_with_one", "char_p", "dvd_neg", "dvd_zero", "int.cast_coe_nat", "int.cast_neg", "int.cast_zero", "int.coe_nat_dvd", "lift" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p.int_cast_eq_int_cast [add_group_with_one R] (p : ℕ) [char_p R p] {a b : ℤ} : (a : R) = b ↔ a ≡ b [ZMOD p]
by rw [eq_comm, ←sub_eq_zero, ←int.cast_sub, char_p.int_cast_eq_zero_iff R p, int.modeq_iff_dvd]
lemma
char_p.int_cast_eq_int_cast
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "add_group_with_one", "char_p", "char_p.int_cast_eq_zero_iff", "int.modeq_iff_dvd" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p.nat_cast_eq_nat_cast [add_group_with_one R] (p : ℕ) [char_p R p] {a b : ℕ} : (a : R) = b ↔ a ≡ b [MOD p]
begin rw [←int.cast_coe_nat, ←int.cast_coe_nat b], exact (char_p.int_cast_eq_int_cast _ _).trans int.coe_nat_modeq_iff, end
lemma
char_p.nat_cast_eq_nat_cast
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "add_group_with_one", "char_p", "char_p.int_cast_eq_int_cast", "int.coe_nat_modeq_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p.eq [add_monoid_with_one R] {p q : ℕ} (c1 : char_p R p) (c2 : char_p R q) : p = q
nat.dvd_antisymm ((char_p.cast_eq_zero_iff R p q).1 (char_p.cast_eq_zero _ _)) ((char_p.cast_eq_zero_iff R q p).1 (char_p.cast_eq_zero _ _))
theorem
char_p.eq
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "add_monoid_with_one", "char_p", "char_p.cast_eq_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p.of_char_zero [add_monoid_with_one R] [char_zero R] : char_p R 0
⟨λ x, by rw [zero_dvd_iff, ← nat.cast_zero, nat.cast_inj]⟩
instance
char_p.of_char_zero
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "add_monoid_with_one", "char_p", "char_zero", "nat.cast_inj", "nat.cast_zero", "zero_dvd_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p.exists [non_assoc_semiring R] : ∃ p, char_p R p
by letI := classical.dec_eq R; exact classical.by_cases (assume H : ∀ p:ℕ, (p:R) = 0 → p = 0, ⟨0, ⟨λ x, by rw [zero_dvd_iff]; exact ⟨H x, by rintro rfl; simp⟩⟩⟩) (λ H, ⟨nat.find (not_forall.1 H), ⟨λ x, ⟨λ H1, nat.dvd_of_mod_eq_zero (by_contradiction $ λ H2, nat.find_min (not_forall.1 H) (nat.m...
theorem
char_p.exists
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "by_contradiction", "char_p", "classical.dec_eq", "nat.cast_add", "nat.cast_mul", "non_assoc_semiring", "not_imp_of_and_not", "not_not_of_not_imp", "not_of_not_imp", "of_not_not", "zero_dvd_iff", "zero_mul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p.exists_unique [non_assoc_semiring R] : ∃! p, char_p R p
let ⟨c, H⟩ := char_p.exists R in ⟨c, H, λ y H2, char_p.eq R H2 H⟩
theorem
char_p.exists_unique
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "char_p", "char_p.eq", "char_p.exists", "non_assoc_semiring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p.congr {R : Type u} [add_monoid_with_one R] {p : ℕ} (q : ℕ) [hq : char_p R q] (h : q = p) : char_p R p
h ▸ hq
theorem
char_p.congr
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "add_monoid_with_one", "char_p" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ring_char [non_assoc_semiring R] : ℕ
classical.some (char_p.exists_unique R)
def
ring_char
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "char_p.exists_unique", "non_assoc_semiring" ]
Noncomputable function that outputs the unique characteristic of a semiring.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
spec : ∀ x:ℕ, (x:R) = 0 ↔ ring_char R ∣ x
by letI := (classical.some_spec (char_p.exists_unique R)).1; unfold ring_char; exact char_p.cast_eq_zero_iff R (ring_char R)
theorem
ring_char.spec
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "char_p.exists_unique", "ring_char" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
eq (p : ℕ) [C : char_p R p] : ring_char R = p
((classical.some_spec (char_p.exists_unique R)).2 p C).symm
theorem
ring_char.eq
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "char_p", "char_p.exists_unique", "ring_char" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p : char_p R (ring_char R)
⟨spec R⟩
instance
ring_char.char_p
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "char_p", "ring_char" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_eq {p : ℕ} (h : ring_char R = p) : char_p R p
char_p.congr (ring_char R) h
theorem
ring_char.of_eq
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "char_p", "char_p.congr", "of_eq", "ring_char" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
eq_iff {p : ℕ} : ring_char R = p ↔ char_p R p
⟨of_eq, @eq R _ p⟩
theorem
ring_char.eq_iff
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "char_p", "ring_char" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dvd {x : ℕ} (hx : (x : R) = 0) : ring_char R ∣ x
(spec R x).1 hx
theorem
ring_char.dvd
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "ring_char" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
eq_zero [char_zero R] : ring_char R = 0
eq R 0
lemma
ring_char.eq_zero
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "char_zero", "ring_char" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nat.cast_ring_char : (ring_char R : R) = 0
by rw ring_char.spec
lemma
ring_char.nat.cast_ring_char
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "ring_char", "ring_char.spec" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_pow_char_of_commute [semiring R] {p : ℕ} [hp : fact p.prime] [char_p R p] (x y : R) (h : commute x y) : (x + y)^p = x^p + y^p
let ⟨r, hr⟩ := h.exists_add_pow_prime_eq hp.out in by simp [hr]
theorem
add_pow_char_of_commute
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "char_p", "commute", "fact", "semiring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_pow_char_pow_of_commute [semiring R] {p n : ℕ} [hp : fact p.prime] [char_p R p] (x y : R) (h : commute x y) : (x + y) ^ (p ^ n) = x ^ (p ^ n) + y ^ (p ^ n)
let ⟨r, hr⟩ := h.exists_add_pow_prime_pow_eq hp.out n in by simp [hr]
theorem
add_pow_char_pow_of_commute
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "char_p", "commute", "fact", "semiring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sub_pow_char_of_commute [ring R] {p : ℕ} [fact p.prime] [char_p R p] (x y : R) (h : commute x y) : (x - y)^p = x^p - y^p
begin rw [eq_sub_iff_add_eq, ← add_pow_char_of_commute _ _ _ (commute.sub_left h rfl)], simp, repeat {apply_instance}, end
theorem
sub_pow_char_of_commute
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "add_pow_char_of_commute", "char_p", "commute", "commute.sub_left", "fact", "ring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sub_pow_char_pow_of_commute [ring R] {p : ℕ} [fact p.prime] [char_p R p] {n : ℕ} (x y : R) (h : commute x y) : (x - y) ^ (p ^ n) = x ^ (p ^ n) - y ^ (p ^ n)
begin induction n, { simp, }, rw [pow_succ', pow_mul, pow_mul, pow_mul, n_ih], apply sub_pow_char_of_commute, apply commute.pow_pow h, end
theorem
sub_pow_char_pow_of_commute
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "char_p", "commute", "commute.pow_pow", "fact", "pow_mul", "pow_succ'", "ring", "sub_pow_char_of_commute" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_pow_char [comm_semiring R] {p : ℕ} [fact p.prime] [char_p R p] (x y : R) : (x + y)^p = x^p + y^p
add_pow_char_of_commute _ _ _ (commute.all _ _)
theorem
add_pow_char
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "add_pow_char_of_commute", "char_p", "comm_semiring", "commute.all", "fact" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_pow_char_pow [comm_semiring R] {p : ℕ} [fact p.prime] [char_p R p] {n : ℕ} (x y : R) : (x + y) ^ (p ^ n) = x ^ (p ^ n) + y ^ (p ^ n)
add_pow_char_pow_of_commute _ _ _ (commute.all _ _)
theorem
add_pow_char_pow
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "add_pow_char_pow_of_commute", "char_p", "comm_semiring", "commute.all", "fact" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sub_pow_char [comm_ring R] {p : ℕ} [fact p.prime] [char_p R p] (x y : R) : (x - y)^p = x^p - y^p
sub_pow_char_of_commute _ _ _ (commute.all _ _)
theorem
sub_pow_char
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "char_p", "comm_ring", "commute.all", "fact", "sub_pow_char_of_commute" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sub_pow_char_pow [comm_ring R] {p : ℕ} [fact p.prime] [char_p R p] {n : ℕ} (x y : R) : (x - y) ^ (p ^ n) = x ^ (p ^ n) - y ^ (p ^ n)
sub_pow_char_pow_of_commute _ _ _ (commute.all _ _)
theorem
sub_pow_char_pow
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "char_p", "comm_ring", "commute.all", "fact", "sub_pow_char_pow_of_commute" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p.neg_one_ne_one [ring R] (p : ℕ) [char_p R p] [fact (2 < p)] : (-1 : R) ≠ (1 : R)
begin suffices : (2 : R) ≠ 0, { symmetry, rw [ne.def, ← sub_eq_zero, sub_neg_eq_add], exact this }, assume h, rw [show (2 : R) = (2 : ℕ), by norm_cast] at h, have := (char_p.cast_eq_zero_iff R p 2).mp h, have := nat.le_of_dvd dec_trivial this, rw fact_iff at *, linarith, end
lemma
char_p.neg_one_ne_one
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "char_p", "fact", "fact_iff", "ring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p.neg_one_pow_char [comm_ring R] (p : ℕ) [char_p R p] [fact p.prime] : (-1 : R) ^ p = -1
begin rw eq_neg_iff_add_eq_zero, nth_rewrite 1 ← one_pow p, rw [← add_pow_char, add_left_neg, zero_pow (fact.out (nat.prime p)).pos], end
lemma
char_p.neg_one_pow_char
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "add_pow_char", "char_p", "comm_ring", "fact", "nat.prime", "one_pow", "zero_pow" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
char_p.neg_one_pow_char_pow [comm_ring R] (p n : ℕ) [char_p R p] [fact p.prime] : (-1 : R) ^ p ^ n = -1
begin rw eq_neg_iff_add_eq_zero, nth_rewrite 1 ← one_pow (p ^ n), rw [← add_pow_char_pow, add_left_neg, zero_pow (pow_pos (fact.out (nat.prime p)).pos _)], end
lemma
char_p.neg_one_pow_char_pow
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "add_pow_char_pow", "char_p", "comm_ring", "fact", "nat.prime", "one_pow", "pow_pos", "zero_pow" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ring_hom.char_p_iff_char_p {K L : Type*} [division_ring K] [semiring L] [nontrivial L] (f : K →+* L) (p : ℕ) : char_p K p ↔ char_p L p
by simp only [char_p_iff, ← f.injective.eq_iff, map_nat_cast f, f.map_zero]
lemma
ring_hom.char_p_iff_char_p
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "char_p", "division_ring", "map_nat_cast", "nontrivial", "semiring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
frobenius : R →+* R
{ to_fun := λ x, x^p, map_one' := one_pow p, map_mul' := λ x y, mul_pow x y p, map_zero' := zero_pow (fact.out (nat.prime p)).pos, map_add' := add_pow_char R }
def
frobenius
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "add_pow_char", "mul_pow", "nat.prime", "one_pow", "zero_pow" ]
The frobenius map that sends x to x^p
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
frobenius_def : frobenius R p x = x ^ p
rfl
theorem
frobenius_def
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "frobenius" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
iterate_frobenius (n : ℕ) : (frobenius R p)^[n] x = x ^ p ^ n
begin induction n, {simp}, rw [function.iterate_succ', pow_succ', pow_mul, function.comp_apply, frobenius_def, n_ih] end
theorem
iterate_frobenius
algebra.char_p
src/algebra/char_p/basic.lean
[ "data.int.modeq", "data.nat.multiplicity", "group_theory.order_of_element", "ring_theory.nilpotent" ]
[ "frobenius", "frobenius_def", "function.comp_apply", "function.iterate_succ'", "pow_mul", "pow_succ'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83