Sets as a semiring under union #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file defines set_semiring α
, an alias of set α
, which we endow with ∪
as addition and
pointwise *
as multiplication. If α
is a (commutative) monoid, set_semiring α
is a
(commutative) semiring.
@[protected, instance]
@[protected, instance]
@[protected, instance]
An alias for set α
, which has a semiring structure given by ∪
as "addition" and pointwise
multiplication *
as "multiplication".
Equations
- set_semiring α = set α
Instances for set_semiring
- set_semiring.inhabited
- set_semiring.partial_order
- set_semiring.order_bot
- set_semiring.add_comm_monoid
- set_semiring.covariant_class_add
- set_semiring.non_unital_non_assoc_semiring
- set_semiring.no_zero_divisors
- set_semiring.covariant_class_mul_left
- set_semiring.covariant_class_mul_right
- set_semiring.has_one
- set_semiring.non_assoc_semiring
- set_semiring.non_unital_semiring
- set_semiring.idem_semiring
- set_semiring.non_unital_comm_semiring
- set_semiring.idem_comm_semiring
- set_semiring.canonically_ordered_comm_semiring
- submodule.module_set
@[protected, simp]
@[protected, simp]
theorem
set_semiring.up_down
{α : Type u_1}
(s : set_semiring α) :
⇑set.up (⇑set_semiring.down s) = s
@[simp]
theorem
set_semiring.down_subset_down
{α : Type u_1}
{s t : set_semiring α} :
⇑set_semiring.down s ⊆ ⇑set_semiring.down t ↔ s ≤ t
@[simp]
theorem
set_semiring.down_ssubset_down
{α : Type u_1}
{s t : set_semiring α} :
⇑set_semiring.down s ⊂ ⇑set_semiring.down t ↔ s < t
@[protected, instance]
Equations
- set_semiring.add_comm_monoid = {add := λ (s t : set_semiring α), ⇑set.up (⇑set_semiring.down s ∪ ⇑set_semiring.down t), add_assoc := _, zero := ⇑set.up ∅, zero_add := _, add_zero := _, nsmul := add_monoid.nsmul._default (⇑set.up ∅) (λ (s t : set_semiring α), ⇑set.up (⇑set_semiring.down s ∪ ⇑set_semiring.down t)) set.empty_union set.union_empty, nsmul_zero' := _, nsmul_succ' := _, add_comm := _}
theorem
set_semiring.add_def
{α : Type u_1}
(s t : set_semiring α) :
s + t = ⇑set.up (⇑set_semiring.down s ∪ ⇑set_semiring.down t)
@[simp]
theorem
set_semiring.down_add
{α : Type u_1}
(s t : set_semiring α) :
⇑set_semiring.down (s + t) = ⇑set_semiring.down s ∪ ⇑set_semiring.down t
@[protected, instance]
@[protected, instance]
Equations
- set_semiring.non_unital_non_assoc_semiring = {add := add_comm_monoid.add set_semiring.add_comm_monoid, add_assoc := _, zero := add_comm_monoid.zero set_semiring.add_comm_monoid, zero_add := _, add_zero := _, nsmul := add_comm_monoid.nsmul set_semiring.add_comm_monoid, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := λ (s t : set_semiring α), ⇑set.up (set.image2 has_mul.mul (⇑set_semiring.down s) (⇑set_semiring.down t)), left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _}
theorem
set_semiring.mul_def
{α : Type u_1}
[has_mul α]
(s t : set_semiring α) :
s * t = ⇑set.up (⇑set_semiring.down s * ⇑set_semiring.down t)
@[simp]
theorem
set_semiring.down_mul
{α : Type u_1}
[has_mul α]
(s t : set_semiring α) :
⇑set_semiring.down (s * t) = ⇑set_semiring.down s * ⇑set_semiring.down t
@[protected, instance]
@[protected, instance]
@[protected, instance]
@[protected, instance]
@[protected, instance]
Equations
- set_semiring.non_assoc_semiring = {add := non_unital_non_assoc_semiring.add set_semiring.non_unital_non_assoc_semiring, add_assoc := _, zero := non_unital_non_assoc_semiring.zero set_semiring.non_unital_non_assoc_semiring, zero_add := _, add_zero := _, nsmul := non_unital_non_assoc_semiring.nsmul set_semiring.non_unital_non_assoc_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul (distrib.to_has_mul (set_semiring α)), left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, one := 1, one_mul := _, mul_one := _, nat_cast := add_comm_monoid_with_one.nat_cast._default 1 non_unital_non_assoc_semiring.add set_semiring.non_assoc_semiring._proof_13 non_unital_non_assoc_semiring.zero set_semiring.non_assoc_semiring._proof_14 set_semiring.non_assoc_semiring._proof_15 non_unital_non_assoc_semiring.nsmul set_semiring.non_assoc_semiring._proof_16 set_semiring.non_assoc_semiring._proof_17, nat_cast_zero := _, nat_cast_succ := _}
@[protected, instance]
Equations
- set_semiring.non_unital_semiring = {add := non_unital_non_assoc_semiring.add set_semiring.non_unital_non_assoc_semiring, add_assoc := _, zero := non_unital_non_assoc_semiring.zero set_semiring.non_unital_non_assoc_semiring, zero_add := _, add_zero := _, nsmul := non_unital_non_assoc_semiring.nsmul set_semiring.non_unital_non_assoc_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := non_unital_non_assoc_semiring.mul set_semiring.non_unital_non_assoc_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _}
@[protected, instance]
Equations
- set_semiring.idem_semiring = {add := non_assoc_semiring.add set_semiring.non_assoc_semiring, add_assoc := _, zero := non_assoc_semiring.zero set_semiring.non_assoc_semiring, zero_add := _, add_zero := _, nsmul := non_assoc_semiring.nsmul set_semiring.non_assoc_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := non_assoc_semiring.mul set_semiring.non_assoc_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := non_assoc_semiring.one set_semiring.non_assoc_semiring, one_mul := _, mul_one := _, nat_cast := non_assoc_semiring.nat_cast set_semiring.non_assoc_semiring, nat_cast_zero := _, nat_cast_succ := _, npow := semiring.npow._default non_assoc_semiring.one non_assoc_semiring.mul set_semiring.idem_semiring._proof_16 set_semiring.idem_semiring._proof_17, npow_zero' := _, npow_succ' := _, sup := complete_boolean_algebra.sup set.complete_boolean_algebra, le := complete_boolean_algebra.le set.complete_boolean_algebra, lt := complete_boolean_algebra.lt set.complete_boolean_algebra, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, add_eq_sup := _, bot := complete_boolean_algebra.bot set.complete_boolean_algebra, bot_le := _}
@[protected, instance]
Equations
- set_semiring.non_unital_comm_semiring = {add := non_unital_semiring.add set_semiring.non_unital_semiring, add_assoc := _, zero := non_unital_semiring.zero set_semiring.non_unital_semiring, zero_add := _, add_zero := _, nsmul := non_unital_semiring.nsmul set_semiring.non_unital_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := non_unital_semiring.mul set_semiring.non_unital_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, mul_comm := _}
@[protected, instance]
Equations
- set_semiring.idem_comm_semiring = {add := idem_semiring.add set_semiring.idem_semiring, add_assoc := _, zero := idem_semiring.zero set_semiring.idem_semiring, zero_add := _, add_zero := _, nsmul := idem_semiring.nsmul set_semiring.idem_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := idem_semiring.mul set_semiring.idem_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := idem_semiring.one set_semiring.idem_semiring, one_mul := _, mul_one := _, nat_cast := idem_semiring.nat_cast set_semiring.idem_semiring, nat_cast_zero := _, nat_cast_succ := _, npow := idem_semiring.npow set_semiring.idem_semiring, npow_zero' := _, npow_succ' := _, mul_comm := _, sup := idem_semiring.sup set_semiring.idem_semiring, le := idem_semiring.le set_semiring.idem_semiring, lt := idem_semiring.lt set_semiring.idem_semiring, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, add_eq_sup := _, bot := idem_semiring.bot set_semiring.idem_semiring, bot_le := _}
@[protected, instance]
Equations
- set_semiring.canonically_ordered_comm_semiring = {add := idem_semiring.add set_semiring.idem_semiring, add_assoc := _, zero := idem_semiring.zero set_semiring.idem_semiring, zero_add := _, add_zero := _, nsmul := idem_semiring.nsmul set_semiring.idem_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, le := idem_semiring.le set_semiring.idem_semiring, lt := idem_semiring.lt set_semiring.idem_semiring, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, add_le_add_left := _, bot := idem_semiring.bot set_semiring.idem_semiring, bot_le := _, exists_add_of_le := _, le_self_add := _, mul := idem_semiring.mul set_semiring.idem_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := idem_semiring.one set_semiring.idem_semiring, one_mul := _, mul_one := _, nat_cast := idem_semiring.nat_cast set_semiring.idem_semiring, nat_cast_zero := _, nat_cast_succ := _, npow := idem_semiring.npow set_semiring.idem_semiring, npow_zero' := _, npow_succ' := _, mul_comm := _, eq_zero_or_eq_zero_of_mul_eq_zero := _}
def
set_semiring.image_hom
{α : Type u_1}
{β : Type u_2}
[mul_one_class α]
[mul_one_class β]
(f : α →* β) :
The image of a set under a multiplicative homomorphism is a ring homomorphism with respect to the pointwise operations on sets.
Equations
- set_semiring.image_hom f = {to_fun := λ (s : set_semiring α), ⇑set.up (⇑f '' ⇑set_semiring.down s), map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
theorem
set_semiring.image_hom_def
{α : Type u_1}
{β : Type u_2}
[mul_one_class α]
[mul_one_class β]
(f : α →* β)
(s : set_semiring α) :
⇑(set_semiring.image_hom f) s = ⇑set.up (⇑f '' ⇑set_semiring.down s)
@[simp]
theorem
set_semiring.down_image_hom
{α : Type u_1}
{β : Type u_2}
[mul_one_class α]
[mul_one_class β]
(f : α →* β)
(s : set_semiring α) :
⇑set_semiring.down (⇑(set_semiring.image_hom f) s) = ⇑f '' ⇑set_semiring.down s
@[simp]
theorem
set.up_image
{α : Type u_1}
{β : Type u_2}
[mul_one_class α]
[mul_one_class β]
(f : α →* β)
(s : set α) :