Pointwise operations of sets #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file defines pointwise algebraic operations on sets.
Main declarations #
For sets s and t and scalar a:
s • t: Scalar multiplication, set of allx • ywherex ∈ sandy ∈ t.s +ᵥ t: Scalar addition, set of allx +ᵥ ywherex ∈ sandy ∈ t.s -ᵥ t: Scalar subtraction, set of allx -ᵥ ywherex ∈ sandy ∈ t.a • s: Scaling, set of alla • xwherex ∈ s.a +ᵥ s: Translation, set of alla +ᵥ xwherex ∈ s.
For α a semigroup/monoid, set α is a semigroup/monoid.
Appropriate definitions and results are also transported to the additive theory via to_additive.
Implementation notes #
- We put all instances in the locale
pointwise, so that these instances are not available by default. Note that we do not mark them as reducible (as argued by note [reducible non-instances]) since we expect the locale to be open whenever the instances are actually used (and making the instances reducible changes the behavior ofsimp.
Translation/scaling of sets #
The dilation of set x • s is defined as {x • y | y ∈ s} in locale pointwise.
Equations
- set.has_smul_set = {smul := λ (a : α), set.image (has_smul.smul a)}
The translation of set x +ᵥ s is defined as {x +ᵥ y | y ∈ s} in
locale pointwise.
Equations
- set.has_vadd_set = {vadd := λ (a : α), set.image (has_vadd.vadd a)}
The pointwise scalar multiplication of sets s • t is defined as {x • y | x ∈ s, y ∈ t} in
locale pointwise.
Equations
The pointwise scalar addition of sets s +ᵥ t is defined as
{x +ᵥ y | x ∈ s, y ∈ t} in locale pointwise.
Equations
A multiplicative action of a monoid α on a type β gives a multiplicative action of set α
on set β.
Equations
- set.mul_action = {to_has_smul := set.has_smul mul_action.to_has_smul, one_smul := _, mul_smul := _}
An additive action of an additive monoid α on a type β gives an additive action
of set α on set β
Equations
- set.add_action = {to_has_vadd := set.has_vadd add_action.to_has_vadd, zero_vadd := _, add_vadd := _}
An additive action of an additive monoid on a type β gives an additive action
on set β.
Equations
- set.add_action_set = {to_has_vadd := set.has_vadd_set add_action.to_has_vadd, zero_vadd := _, add_vadd := _}
A multiplicative action of a monoid on a type β gives a multiplicative action on set β.
Equations
- set.mul_action_set = {to_has_smul := set.has_smul_set mul_action.to_has_smul, one_smul := _, mul_smul := _}
A distributive multiplicative action of a monoid on an additive monoid β gives a distributive
multiplicative action on set β.
Equations
A multiplicative action of a monoid on a monoid β gives a multiplicative action on set β.
Equations
Equations
Note that we have neither smul_with_zero α (set β) nor smul_with_zero (set α) (set β)
because 0 * ∅ ≠ 0.