Sets as a semiring under union #
This file defines SetSemiring α
, an alias of Set α
, which we endow with ∪
as addition and
pointwise *
as multiplication. If α
is a (commutative) monoid, SetSemiring α
is a
(commutative) semiring.
An alias for Set α
, which has a semiring structure given by ∪
as "addition" and pointwise
multiplication *
as "multiplication".
Equations
- SetSemiring α = Set α
Instances For
Equations
- instInhabitedSetSemiring α = inferInstance
Equations
- instPartialOrderSetSemiring α = inferInstance
Equations
- instOrderBotSetSemiring α = inferInstance
The identity function SetSemiring α → Set α
.
Equations
- SetSemiring.down = Equiv.refl (SetSemiring α)
Instances For
@[simp]
@[simp]
@[simp]
@[simp]
Equations
- SetSemiring.instAdd = { add := fun (s t : SetSemiring α) => Set.up (SetSemiring.down s ∪ SetSemiring.down t) }
Equations
- SetSemiring.instAddCommMonoid = AddCommMonoid.mk ⋯
@[simp]
instance
SetSemiring.covariantClass_add
{α : Type u_1}
:
CovariantClass (SetSemiring α) (SetSemiring α) (fun (x x_1 : SetSemiring α) => x + x_1) fun (x x_1 : SetSemiring α) =>
x ≤ x_1
Equations
- ⋯ = ⋯
Equations
- SetSemiring.instNonUnitalNonAssocSemiring = let __src := inferInstance; NonUnitalNonAssocSemiring.mk ⋯ ⋯ ⋯ ⋯
@[simp]
Equations
- ⋯ = ⋯
instance
SetSemiring.covariantClass_mul_left
{α : Type u_1}
[Mul α]
:
CovariantClass (SetSemiring α) (SetSemiring α) (fun (x x_1 : SetSemiring α) => x * x_1) fun (x x_1 : SetSemiring α) =>
x ≤ x_1
Equations
- ⋯ = ⋯
instance
SetSemiring.covariantClass_mul_right
{α : Type u_1}
[Mul α]
:
CovariantClass (SetSemiring α) (SetSemiring α) (Function.swap fun (x x_1 : SetSemiring α) => x * x_1)
fun (x x_1 : SetSemiring α) => x ≤ x_1
Equations
- ⋯ = ⋯
Equations
- SetSemiring.instOne = { one := Set.up 1 }
Equations
- SetSemiring.instNonAssocSemiringOfMulOneClass = let __src := inferInstance; let __src_1 := Set.mulOneClass; NonAssocSemiring.mk ⋯ ⋯ ⋯ ⋯
Equations
- SetSemiring.instNonUnitalSemiringOfSemigroup = let __src := inferInstance; let __src_1 := Set.semigroup; NonUnitalSemiring.mk ⋯
Equations
- SetSemiring.instIdemSemiringOfMonoid = let __src := inferInstance; let __src_1 := inferInstance; let __src_2 := inferInstance; IdemSemiring.mk ⋯ ⊥ ⋯
Equations
- SetSemiring.instNonUnitalCommSemiringOfCommSemigroup = let __src := inferInstance; let __src_1 := Set.commSemigroup; NonUnitalCommSemiring.mk ⋯
Equations
- SetSemiring.instIdemCommSemiringOfCommMonoid = let __src := inferInstance; let __src_1 := inferInstance; IdemCommSemiring.mk ⋯ IdemSemiring.bot ⋯
Equations
- SetSemiring.instCommMonoid = let __src := inferInstance; let __src_1 := Set.commSemigroup; CommMonoid.mk ⋯
Equations
- One or more equations did not get rendered due to their size.
def
SetSemiring.imageHom
{α : Type u_1}
{β : Type u_2}
[MulOneClass α]
[MulOneClass β]
(f : α →* β)
:
The image of a set under a multiplicative homomorphism is a ring homomorphism with respect to the pointwise operations on sets.
Equations
- SetSemiring.imageHom f = { toFun := fun (s : SetSemiring α) => Set.up (⇑f '' SetSemiring.down s), map_one' := ⋯, map_mul' := ⋯, map_zero' := ⋯, map_add' := ⋯ }
Instances For
theorem
SetSemiring.imageHom_def
{α : Type u_1}
{β : Type u_2}
[MulOneClass α]
[MulOneClass β]
(f : α →* β)
(s : SetSemiring α)
:
(SetSemiring.imageHom f) s = Set.up (⇑f '' SetSemiring.down s)
@[simp]
theorem
SetSemiring.down_imageHom
{α : Type u_1}
{β : Type u_2}
[MulOneClass α]
[MulOneClass β]
(f : α →* β)
(s : SetSemiring α)
:
SetSemiring.down ((SetSemiring.imageHom f) s) = ⇑f '' SetSemiring.down s
@[simp]
theorem
Set.up_image
{α : Type u_1}
{β : Type u_2}
[MulOneClass α]
[MulOneClass β]
(f : α →* β)
(s : Set α)
:
Set.up (⇑f '' s) = (SetSemiring.imageHom f) (Set.up s)