Pointwise addition, multiplication, and scalar multiplication of sets.
This file defines pointwise algebraic operations on sets.
- For a type
α
with multiplication, multiplication is defined onset α
by takings * t
to be the set of allx * y
wherex ∈ s
andy ∈ t
. Similarly for addition. - For
α
a semigroup,set α
is a semigroup. - If
α
is a (commutative) monoid, we define an aliasset_semiring α
forset α
, which then becomes a (commutative) semiring with union as addition and pointwise multiplication as multiplication. - For a type
β
with scalar multiplication by another typeα
, this file defines a scalar multiplication ofset β
byset α
and a separate scalar multiplication ofset β
byα
. - We also define pointwise multiplication on
finset
.
Appropriate definitions and results are also transported to the additive theory via to_additive
.
Implementation notes
- The following expressions are considered in simp-normal form in a group:
(λ h, h * g) ⁻¹' s
,(λ h, g * h) ⁻¹' s
,(λ h, h * g⁻¹) ⁻¹' s
,(λ h, g⁻¹ * h) ⁻¹' s
,s * t
,s⁻¹
,(1 : set _)
(and similarly for additive variants). Expressions equal to one of these will be simplified.
Tags
set multiplication, set addition, pointwise addition, pointwise multiplication
Properties about 1
Equations
- set.has_one = {one := {1}}
Properties about multiplication
Equations
Equations
- set.semigroup = {mul := has_mul.mul set.has_mul, mul_assoc := _}
Equations
- set.monoid = {mul := semigroup.mul set.semigroup, mul_assoc := _, one := 1, one_mul := _, mul_one := _}
Equations
- set.comm_monoid = {mul := monoid.mul set.monoid, mul_assoc := _, one := monoid.one set.monoid, one_mul := _, mul_one := _, mul_comm := _}
singleton is an add monoid hom
singleton
is a monoid hom.
Equations
- set.singleton_hom = {to_fun := has_singleton.singleton set.has_singleton, map_one' := _, map_mul' := _}
multiplication preserves finiteness
Equations
- s.fintype_mul t = set.fintype_image2 (λ (a b : α), a * b) s t
Properties about inversion
Equations
Properties about scalar multiplication
Scaling a set: multiplying every element by a scalar.
Equations
- set.has_scalar_set = {smul := λ (a : α), set.image (has_scalar.smul a)}
Pointwise scalar multiplication by a set of scalars.
Equations
set α
as a (∪,*)
-semiring
An alias for set α
, which has a semiring structure given by ∪
as "addition" and pointwise
multiplication *
as "multiplication".
Equations
- set.set_semiring α = set α
The identitiy function set_semiring α → set α
.
Equations
- set.set_semiring.semiring = {add := λ (s t : set.set_semiring α), s ∪ t, add_assoc := _, zero := ∅, zero_add := _, add_zero := _, add_comm := _, mul := monoid.mul set.monoid, mul_assoc := _, one := monoid.one set.monoid, one_mul := _, mul_one := _, zero_mul := _, mul_zero := _, left_distrib := _, right_distrib := _}
Equations
- set.set_semiring.comm_semiring = {add := semiring.add set.set_semiring.semiring, add_assoc := _, zero := semiring.zero set.set_semiring.semiring, zero_add := _, add_zero := _, add_comm := _, mul := comm_monoid.mul set.comm_monoid, mul_assoc := _, one := comm_monoid.one set.comm_monoid, one_mul := _, mul_one := _, zero_mul := _, mul_zero := _, left_distrib := _, right_distrib := _, mul_comm := _}
A multiplicative action of a monoid on a type β gives also a multiplicative action on the subsets of β.
Equations
- set.mul_action_set = {to_has_scalar := {smul := has_scalar.smul set.has_scalar_set}, one_smul := _, mul_smul := _}
The image of a set under function is a ring homomorphism with respect to the pointwise operations on sets.
A nonempty set in a semimodule is scaled by zero to the singleton containing 0 in the semimodule.
The pointwise sum of two finite sets s
and t
:
s + t = { x + y | x ∈ s, y ∈ t }
.
The pointwise product of two finite sets s
and t
:
st = s ⬝ t = s * t = { x * y | x ∈ s, y ∈ t }
.