Pi instances for ring #
This file defines instances for ring, semiring and related structures on Pi Types
@[protected, instance]
Equations
- pi.distrib = {mul := has_mul.mul pi.has_mul, add := has_add.add pi.has_add, left_distrib := _, right_distrib := _}
@[protected, instance]
def
pi.non_unital_non_assoc_semiring
{I : Type u}
{f : I → Type v}
[Π (i : I), non_unital_non_assoc_semiring (f i)] :
non_unital_non_assoc_semiring (Π (i : I), f i)
Equations
- pi.non_unital_non_assoc_semiring = {add := has_add.add pi.has_add, add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := λ (ᾰ : ℕ) (ᾰ_1 : Π (i : I), f i) (i : I), non_unital_non_assoc_semiring.nsmul ᾰ (ᾰ_1 i), nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul pi.has_mul, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _}
@[protected, instance]
def
pi.non_unital_semiring
{I : Type u}
{f : I → Type v}
[Π (i : I), non_unital_semiring (f i)] :
non_unital_semiring (Π (i : I), f i)
Equations
- pi.non_unital_semiring = {add := has_add.add pi.has_add, add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := λ (ᾰ : ℕ) (ᾰ_1 : Π (i : I), f i) (i : I), non_unital_semiring.nsmul ᾰ (ᾰ_1 i), nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul pi.has_mul, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _}
@[protected, instance]
def
pi.non_assoc_semiring
{I : Type u}
{f : I → Type v}
[Π (i : I), non_assoc_semiring (f i)] :
non_assoc_semiring (Π (i : I), f i)
Equations
- pi.non_assoc_semiring = {add := has_add.add pi.has_add, add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := λ (ᾰ : ℕ) (ᾰ_1 : Π (i : I), f i) (i : I), non_assoc_semiring.nsmul ᾰ (ᾰ_1 i), nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul pi.has_mul, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, one := 1, one_mul := _, mul_one := _}
@[protected, instance]
def
pi.semiring
{I : Type u}
{f : I → Type v}
[Π (i : I), semiring (f i)] :
semiring (Π (i : I), f i)
Equations
- pi.semiring = {add := has_add.add pi.has_add, add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := add_monoid.nsmul pi.add_monoid, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul pi.has_mul, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := 1, one_mul := _, mul_one := _, npow := monoid.npow pi.monoid, npow_zero' := _, npow_succ' := _}
@[protected, instance]
def
pi.comm_semiring
{I : Type u}
{f : I → Type v}
[Π (i : I), comm_semiring (f i)] :
comm_semiring (Π (i : I), f i)
Equations
- pi.comm_semiring = {add := has_add.add pi.has_add, add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := add_monoid.nsmul pi.add_monoid, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul pi.has_mul, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := 1, one_mul := _, mul_one := _, npow := monoid.npow pi.monoid, npow_zero' := _, npow_succ' := _, mul_comm := _}
@[protected, instance]
def
pi.non_unital_non_assoc_ring
{I : Type u}
{f : I → Type v}
[Π (i : I), non_unital_non_assoc_ring (f i)] :
non_unital_non_assoc_ring (Π (i : I), f i)
Equations
- pi.non_unital_non_assoc_ring = {add := has_add.add pi.has_add, add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := add_monoid.nsmul pi.add_monoid, nsmul_zero' := _, nsmul_succ' := _, neg := has_neg.neg pi.has_neg, sub := λ (ᾰ ᾰ_1 : Π (i : I), f i) (i : I), non_unital_non_assoc_ring.sub (ᾰ i) (ᾰ_1 i), sub_eq_add_neg := _, zsmul := sub_neg_monoid.zsmul pi.sub_neg_add_monoid, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := has_mul.mul pi.has_mul, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _}
@[protected, instance]
def
pi.non_unital_ring
{I : Type u}
{f : I → Type v}
[Π (i : I), non_unital_ring (f i)] :
non_unital_ring (Π (i : I), f i)
Equations
- pi.non_unital_ring = {add := has_add.add pi.has_add, add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := add_monoid.nsmul pi.add_monoid, nsmul_zero' := _, nsmul_succ' := _, neg := has_neg.neg pi.has_neg, sub := λ (ᾰ ᾰ_1 : Π (i : I), f i) (i : I), non_unital_ring.sub (ᾰ i) (ᾰ_1 i), sub_eq_add_neg := _, zsmul := sub_neg_monoid.zsmul pi.sub_neg_add_monoid, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := has_mul.mul pi.has_mul, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _}
@[protected, instance]
def
pi.non_assoc_ring
{I : Type u}
{f : I → Type v}
[Π (i : I), non_assoc_ring (f i)] :
non_assoc_ring (Π (i : I), f i)
Equations
- pi.non_assoc_ring = {add := has_add.add pi.has_add, add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := add_monoid.nsmul pi.add_monoid, nsmul_zero' := _, nsmul_succ' := _, neg := has_neg.neg pi.has_neg, sub := λ (ᾰ ᾰ_1 : Π (i : I), f i) (i : I), non_assoc_ring.sub (ᾰ i) (ᾰ_1 i), sub_eq_add_neg := _, zsmul := sub_neg_monoid.zsmul pi.sub_neg_add_monoid, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := has_mul.mul pi.has_mul, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, one := λ (i : I), non_assoc_ring.one, one_mul := _, mul_one := _}
@[protected, instance]
Equations
- pi.ring = {add := has_add.add pi.has_add, add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := add_monoid.nsmul pi.add_monoid, nsmul_zero' := _, nsmul_succ' := _, neg := has_neg.neg pi.has_neg, sub := λ (ᾰ ᾰ_1 : Π (i : I), f i) (i : I), ring.sub (ᾰ i) (ᾰ_1 i), sub_eq_add_neg := _, zsmul := sub_neg_monoid.zsmul pi.sub_neg_add_monoid, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := has_mul.mul pi.has_mul, mul_assoc := _, one := 1, one_mul := _, mul_one := _, npow := monoid.npow pi.monoid, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _}
@[protected, instance]
def
pi.comm_ring
{I : Type u}
{f : I → Type v}
[Π (i : I), comm_ring (f i)] :
comm_ring (Π (i : I), f i)
Equations
- pi.comm_ring = {add := has_add.add pi.has_add, add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := add_monoid.nsmul pi.add_monoid, nsmul_zero' := _, nsmul_succ' := _, neg := has_neg.neg pi.has_neg, sub := λ (ᾰ ᾰ_1 : Π (i : I), f i) (i : I), comm_ring.sub (ᾰ i) (ᾰ_1 i), sub_eq_add_neg := _, zsmul := sub_neg_monoid.zsmul pi.sub_neg_add_monoid, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := has_mul.mul pi.has_mul, mul_assoc := _, one := 1, one_mul := _, mul_one := _, npow := monoid.npow pi.monoid, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _, mul_comm := _}
@[protected]
def
pi.ring_hom
{I : Type u}
{f : I → Type v}
{γ : Type w}
[Π (i : I), non_assoc_semiring (f i)]
[non_assoc_semiring γ]
(g : Π (i : I), γ →+* f i) :
γ →+* Π (i : I), f i
A family of ring homomorphisms f a : γ →+* β a
defines a ring homomorphism
pi.ring_hom f : γ →+* Π a, β a
given by pi.ring_hom f x b = f b x
.
@[simp]
theorem
pi.ring_hom_apply
{I : Type u}
{f : I → Type v}
{γ : Type w}
[Π (i : I), non_assoc_semiring (f i)]
[non_assoc_semiring γ]
(g : Π (i : I), γ →+* f i)
(x : γ)
(b : I) :
⇑(pi.ring_hom g) x b = ⇑(g b) x
theorem
pi.ring_hom_injective
{I : Type u}
{f : I → Type v}
{γ : Type w}
[nonempty I]
[Π (i : I), non_assoc_semiring (f i)]
[non_assoc_semiring γ]
(g : Π (i : I), γ →+* f i)
(hg : ∀ (i : I), function.injective ⇑(g i)) :
@[simp]
theorem
pi.eval_ring_hom_apply
{I : Type u}
(f : I → Type v)
[Π (i : I), non_assoc_semiring (f i)]
(i : I)
(ᾰ : Π (i : I), f i) :
⇑(pi.eval_ring_hom f i) ᾰ = (pi.eval_monoid_hom f i).to_fun ᾰ
def
pi.eval_ring_hom
{I : Type u}
(f : I → Type v)
[Π (i : I), non_assoc_semiring (f i)]
(i : I) :
(Π (i : I), f i) →+* f i
Evaluation of functions into an indexed collection of rings at a point is a ring
homomorphism. This is function.eval
as a ring_hom
.
Equations
- pi.eval_ring_hom f i = {to_fun := (pi.eval_monoid_hom f i).to_fun, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
@[simp]
theorem
pi.const_ring_hom_apply
(α : Type u_1)
(β : Type u_2)
[non_assoc_semiring β]
(a : β)
(ᾰ : α) :
⇑(pi.const_ring_hom α β) a ᾰ = function.const α a ᾰ
function.const
as a ring_hom
.
Equations
- pi.const_ring_hom α β = {to_fun := function.const α, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
@[protected]
def
ring_hom.comp_left
{α : Type u_1}
{β : Type u_2}
[non_assoc_semiring α]
[non_assoc_semiring β]
(f : α →+* β)
(I : Type u_3) :
(I → α) →+* I → β
Ring homomorphism between the function spaces I → α
and I → β
, induced by a ring
homomorphism f
between α
and β
.
@[simp]
theorem
ring_hom.comp_left_apply
{α : Type u_1}
{β : Type u_2}
[non_assoc_semiring α]
[non_assoc_semiring β]
(f : α →+* β)
(I : Type u_3)
(h : I → α)
(ᾰ : I) :