Pointwise operations of sets #
This file defines pointwise algebraic operations on sets.
Main declarations #
For sets s
and t
and scalar a
:
s * t
: Multiplication, set of allx * y
wherex ∈ s
andy ∈ t
.s + t
: Addition, set of allx + y
wherex ∈ s
andy ∈ t
.s⁻¹
: Inversion, set of allx⁻¹
wherex ∈ s
.-s
: Negation, set of all-x
wherex ∈ s
.s / t
: Division, set of allx / y
wherex ∈ s
andy ∈ t
.s - t
: Subtraction, set of allx - y
wherex ∈ s
andy ∈ t
.
For α
a semigroup/monoid, Set α
is a semigroup/monoid.
As an unfortunate side effect, this means that n • s
, where n : ℕ
, is ambiguous between
pointwise scaling and repeated pointwise addition; the former has (2 : ℕ) • {1, 2} = {2, 4}
, while
the latter has (2 : ℕ) • {1, 2} = {2, 3, 4}
. See note [pointwise nat action].
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:
(fun h ↦ h * g) ⁻¹' s
,(fun h ↦ g * h) ⁻¹' s
,(fun h ↦ h * g⁻¹) ⁻¹' s
,(fun h ↦ g⁻¹ * h) ⁻¹' s
,s * t
,s⁻¹
,(1 : Set _)
(and similarly for additive variants). Expressions equal to one of these will be simplified. - 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
.
Tags #
set multiplication, set addition, pointwise addition, pointwise multiplication, pointwise subtraction
0
/1
as sets #
The singleton operation as a OneHom
.
Equations
- Set.singletonOneHom = { toFun := singleton, map_one' := ⋯ }
Instances For
The singleton operation as a ZeroHom
.
Equations
- Set.singletonZeroHom = { toFun := singleton, map_zero' := ⋯ }
Instances For
Alias of Set.zero_prod_zero
.
Set negation/inversion #
Equations
- Set.involutiveInv = { toInv := Set.inv, inv_inv := ⋯ }
Equations
- Set.involutiveNeg = { toNeg := Set.neg, neg_neg := ⋯ }
Set addition/multiplication #
The singleton operation as a MulHom
.
Equations
- Set.singletonMulHom = { toFun := singleton, map_mul' := ⋯ }
Instances For
The singleton operation as an AddHom
.
Equations
- Set.singletonAddHom = { toFun := singleton, map_add' := ⋯ }
Instances For
Set subtraction/division #
Repeated pointwise multiplication/division (not the same as pointwise repeated
multiplication/division!) of a Set
. See note [pointwise nat action].
Instances For
Set α
is an AddSemigroup
under pointwise operations if α
is.
Equations
- Set.addSemigroup = { toAdd := Set.add, add_assoc := ⋯ }
Instances For
Set α
is a CommSemigroup
under pointwise operations if α
is.
Equations
- Set.commSemigroup = { toSemigroup := Set.semigroup, mul_comm := ⋯ }
Instances For
Set α
is an AddCommSemigroup
under pointwise operations if α
is.
Equations
- Set.addCommSemigroup = { toAddSemigroup := Set.addSemigroup, add_comm := ⋯ }
Instances For
Set α
is a MulOneClass
under pointwise operations if α
is.
Equations
- Set.mulOneClass = { toOne := Set.one, toMul := Set.mul, one_mul := ⋯, mul_one := ⋯ }
Instances For
Set α
is an AddZeroClass
under pointwise operations if α
is.
Equations
- Set.addZeroClass = { toZero := Set.zero, toAdd := Set.add, zero_add := ⋯, add_zero := ⋯ }
Instances For
The singleton operation as a MonoidHom
.
Equations
- Set.singletonMonoidHom = { toFun := Set.singletonMulHom.toFun, map_one' := ⋯, map_mul' := ⋯ }
Instances For
The singleton operation as an AddMonoidHom
.
Equations
- Set.singletonAddMonoidHom = { toFun := Set.singletonAddHom.toFun, map_zero' := ⋯, map_add' := ⋯ }
Instances For
Set α
is a Monoid
under pointwise operations if α
is.
Equations
- Set.monoid = { toSemigroup := Set.semigroup, toOne := MulOneClass.toOne, one_mul := ⋯, mul_one := ⋯, npow := npowRecAuto, npow_zero := ⋯, npow_succ := ⋯ }
Instances For
Set α
is an AddMonoid
under pointwise operations if α
is.
Equations
- Set.addMonoid = { toAddSemigroup := Set.addSemigroup, toZero := AddZeroClass.toZero, zero_add := ⋯, add_zero := ⋯, nsmul := nsmulRecAuto, nsmul_zero := ⋯, nsmul_succ := ⋯ }
Instances For
Set α
is a CommMonoid
under pointwise operations if α
is.
Equations
- Set.commMonoid = { toMonoid := Set.monoid, mul_comm := ⋯ }
Instances For
Set α
is an AddCommMonoid
under pointwise operations if α
is.
Equations
- Set.addCommMonoid = { toAddMonoid := Set.addMonoid, add_comm := ⋯ }
Instances For
Set α
is a division monoid under pointwise operations if α
is.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Set α
is a subtraction monoid under pointwise operations if α
is.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Set α
is a commutative division monoid under pointwise operations if α
is.
Equations
- Set.divisionCommMonoid = { toDivisionMonoid := Set.divisionMonoid, mul_comm := ⋯ }
Instances For
Set α
is a commutative subtraction monoid under pointwise operations if α
is.
Equations
- Set.subtractionCommMonoid = { toSubtractionMonoid := Set.subtractionMonoid, add_comm := ⋯ }
Instances For
Alias of the reverse direction of Set.not_one_mem_div_iff
.