Pointwise operations on filters #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file defines pointwise operations on filters. This is useful because usual algebraic operations distribute over pointwise operations. For example,
(f₁ * f₂).map m = f₁.map m * f₂.map m
𝓝 (x * y) = 𝓝 x * 𝓝 y
Main declarations #
0
(filter.has_zero
): Pure filter at0 : α
, or alternatively principal filter at0 : set α
.1
(filter.has_one
): Pure filter at1 : α
, or alternatively principal filter at1 : set α
.f + g
(filter.has_add
): Addition, filter generated by alls + t
wheres ∈ f
andt ∈ g
.f * g
(filter.has_mul
): Multiplication, filter generated by alls * t
wheres ∈ f
andt ∈ g
.-f
(filter.has_neg
): Negation, filter of all-s
wheres ∈ f
.f⁻¹
(filter.has_inv
): Inversion, filter of alls⁻¹
wheres ∈ f
.f - g
(filter.has_sub
): Subtraction, filter generated by alls - t
wheres ∈ f
andt ∈ g
.f / g
(filter.has_div
): Division, filter generated by alls / t
wheres ∈ f
andt ∈ g
.f +ᵥ g
(filter.has_vadd
): Scalar addition, filter generated by alls +ᵥ t
wheres ∈ f
andt ∈ g
.f -ᵥ g
(filter.has_vsub
): Scalar subtraction, filter generated by alls -ᵥ t
wheres ∈ f
andt ∈ g
.f • g
(filter.has_smul
): Scalar multiplication, filter generated by alls • t
wheres ∈ f
andt ∈ g
.a +ᵥ f
(filter.has_vadd_filter
): Translation, filter of alla +ᵥ s
wheres ∈ f
.a • f
(filter.has_smul_filter
): Scaling, filter of alla • s
wheres ∈ f
.
For α
a semigroup/monoid, filter α
is a semigroup/monoid.
As an unfortunate side effect, this means that n • f
, where n : ℕ
, is ambiguous between
pointwise scaling and repeated pointwise addition. See note [pointwise nat action].
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 of simp
.
Tags #
filter multiplication, filter addition, pointwise addition, pointwise multiplication,
0
/1
as filters #
0 : filter α
is defined as the filter of sets containing 0 : α
in locale
pointwise
.
Equations
- filter.has_zero = {zero := has_pure.pure 0}
1 : filter α
is defined as the filter of sets containing 1 : α
in locale pointwise
.
Equations
- filter.has_one = {one := has_pure.pure 1}
pure
as a zero_hom
.
Equations
- filter.pure_zero_hom = {to_fun := has_pure.pure α, map_zero' := _}
pure
as a one_hom
.
Equations
- filter.pure_one_hom = {to_fun := has_pure.pure α, map_one' := _}
Filter negation/inversion #
The inverse of a filter is the pointwise preimage under ⁻¹
of its sets.
Equations
The negation of a filter is the pointwise preimage under -
of its sets.
Equations
Filter addition/multiplication #
The filter f + g
is generated by {s + t | s ∈ f, t ∈ g}
in locale pointwise
.
The filter f * g
is generated by {s * t | s ∈ f, t ∈ g}
in locale pointwise
.
The singleton operation as an add_hom
.
Equations
- filter.pure_add_hom = {to_fun := has_pure.pure α, map_add' := _}
pure
operation as a mul_hom
.
Equations
- filter.pure_mul_hom = {to_fun := has_pure.pure α, map_mul' := _}
Filter subtraction/division #
The filter f - g
is generated by {s - t | s ∈ f, t ∈ g}
in locale pointwise
.
The filter f / g
is generated by {s / t | s ∈ f, t ∈ g}
in locale pointwise
.
Repeated pointwise addition (not the same as pointwise repeated addition!) of a filter
. See
Note [pointwise nat action].
Equations
Repeated pointwise multiplication (not the same as pointwise repeated multiplication!) of a
filter
. See Note [pointwise nat action].
Repeated pointwise addition/subtraction (not the same as pointwise repeated
addition/subtraction!) of a filter
. See Note [pointwise nat action].
Equations
Repeated pointwise multiplication/division (not the same as pointwise repeated
multiplication/division!) of a filter
. See Note [pointwise nat action].
filter α
is a semigroup
under pointwise operations if α
is.
Equations
- filter.semigroup = {mul := has_mul.mul filter.has_mul, mul_assoc := _}
filter α
is an add_semigroup
under pointwise operations if α
is.
Equations
- filter.add_semigroup = {add := has_add.add filter.has_add, add_assoc := _}
filter α
is a comm_semigroup
under pointwise operations if α
is.
Equations
- filter.comm_semigroup = {mul := semigroup.mul filter.semigroup, mul_assoc := _, mul_comm := _}
filter α
is an add_comm_semigroup
under pointwise operations if α
is.
Equations
- filter.add_comm_semigroup = {add := add_semigroup.add filter.add_semigroup, add_assoc := _, add_comm := _}
filter α
is an add_zero_class
under pointwise operations if α
is.
Equations
- filter.add_zero_class = {zero := 0, add := has_add.add filter.has_add, zero_add := _, add_zero := _}
filter α
is a mul_one_class
under pointwise operations if α
is.
Equations
- filter.mul_one_class = {one := 1, mul := has_mul.mul filter.has_mul, one_mul := _, mul_one := _}
If φ : α →+ β
then map_add_monoid_hom φ
is the monoid homomorphism
filter α →+ filter β
induced by map φ
.
Equations
- filter.map_add_monoid_hom φ = {to_fun := filter.map ⇑φ, map_zero' := _, map_add' := _}
If φ : α →* β
then map_monoid_hom φ
is the monoid homomorphism
filter α →* filter β
induced by map φ
.
Equations
- filter.map_monoid_hom φ = {to_fun := filter.map ⇑φ, map_one' := _, map_mul' := _}
pure
as a monoid_hom
.
Equations
- filter.pure_monoid_hom = {to_fun := filter.pure_mul_hom.to_fun, map_one' := _, map_mul' := _}
pure
as an add_monoid_hom
.
Equations
- filter.pure_add_monoid_hom = {to_fun := filter.pure_add_hom.to_fun, map_zero' := _, map_add' := _}
filter α
is an add_monoid
under pointwise operations if α
is.
Equations
- filter.add_monoid = {add := add_zero_class.add filter.add_zero_class, add_assoc := _, zero := add_zero_class.zero filter.add_zero_class, zero_add := _, add_zero := _, nsmul := nsmul_rec (add_zero_class.to_has_add (filter α)), nsmul_zero' := _, nsmul_succ' := _}
filter α
is a monoid
under pointwise operations if α
is.
Equations
- filter.monoid = {mul := mul_one_class.mul filter.mul_one_class, mul_assoc := _, one := mul_one_class.one filter.mul_one_class, one_mul := _, mul_one := _, npow := npow_rec (mul_one_class.to_has_mul (filter α)), npow_zero' := _, npow_succ' := _}
filter α
is a comm_monoid
under pointwise operations if α
is.
Equations
- filter.comm_monoid = {mul := mul_one_class.mul filter.mul_one_class, mul_assoc := _, one := mul_one_class.one filter.mul_one_class, one_mul := _, mul_one := _, npow := monoid.npow._default mul_one_class.one mul_one_class.mul filter.comm_monoid._proof_4 filter.comm_monoid._proof_5, npow_zero' := _, npow_succ' := _, mul_comm := _}
filter α
is an add_comm_monoid
under pointwise operations if α
is.
Equations
- filter.add_comm_monoid = {add := add_zero_class.add filter.add_zero_class, add_assoc := _, zero := add_zero_class.zero filter.add_zero_class, zero_add := _, add_zero := _, nsmul := add_monoid.nsmul._default add_zero_class.zero add_zero_class.add filter.add_comm_monoid._proof_4 filter.add_comm_monoid._proof_5, nsmul_zero' := _, nsmul_succ' := _, add_comm := _}
filter α
is a division monoid under pointwise operations if α
is.
Equations
- filter.division_monoid = {mul := monoid.mul filter.monoid, mul_assoc := _, one := monoid.one filter.monoid, one_mul := _, mul_one := _, npow := monoid.npow filter.monoid, npow_zero' := _, npow_succ' := _, inv := has_involutive_inv.inv filter.has_involutive_inv, div := has_div.div filter.has_div, div_eq_mul_inv := _, zpow := div_inv_monoid.zpow._default monoid.mul filter.division_monoid._proof_7 monoid.one filter.division_monoid._proof_8 filter.division_monoid._proof_9 monoid.npow filter.division_monoid._proof_10 filter.division_monoid._proof_11 has_involutive_inv.inv, zpow_zero' := _, zpow_succ' := _, zpow_neg' := _, inv_inv := _, mul_inv_rev := _, inv_eq_of_mul := _}
filter α
is a subtraction monoid under pointwise
operations if α
is.
Equations
- filter.subtraction_monoid = {add := add_monoid.add filter.add_monoid, add_assoc := _, zero := add_monoid.zero filter.add_monoid, zero_add := _, add_zero := _, nsmul := add_monoid.nsmul filter.add_monoid, nsmul_zero' := _, nsmul_succ' := _, neg := has_involutive_neg.neg filter.has_involutive_neg, sub := has_sub.sub filter.has_sub, sub_eq_add_neg := _, zsmul := sub_neg_monoid.zsmul._default add_monoid.add filter.subtraction_monoid._proof_7 add_monoid.zero filter.subtraction_monoid._proof_8 filter.subtraction_monoid._proof_9 add_monoid.nsmul filter.subtraction_monoid._proof_10 filter.subtraction_monoid._proof_11 has_involutive_neg.neg, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, neg_neg := _, neg_add_rev := _, neg_eq_of_add := _}
filter α
is a commutative division monoid under pointwise operations if α
is.
Equations
- filter.division_comm_monoid = {mul := division_monoid.mul filter.division_monoid, mul_assoc := _, one := division_monoid.one filter.division_monoid, one_mul := _, mul_one := _, npow := division_monoid.npow filter.division_monoid, npow_zero' := _, npow_succ' := _, inv := division_monoid.inv filter.division_monoid, div := division_monoid.div filter.division_monoid, div_eq_mul_inv := _, zpow := division_monoid.zpow filter.division_monoid, zpow_zero' := _, zpow_succ' := _, zpow_neg' := _, inv_inv := _, mul_inv_rev := _, inv_eq_of_mul := _, mul_comm := _}
filter α
is a commutative subtraction monoid under
pointwise operations if α
is.
Equations
- filter.subtraction_comm_monoid = {add := subtraction_monoid.add filter.subtraction_monoid, add_assoc := _, zero := subtraction_monoid.zero filter.subtraction_monoid, zero_add := _, add_zero := _, nsmul := subtraction_monoid.nsmul filter.subtraction_monoid, nsmul_zero' := _, nsmul_succ' := _, neg := subtraction_monoid.neg filter.subtraction_monoid, sub := subtraction_monoid.sub filter.subtraction_monoid, sub_eq_add_neg := _, zsmul := subtraction_monoid.zsmul filter.subtraction_monoid, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, neg_neg := _, neg_add_rev := _, neg_eq_of_add := _, add_comm := _}
filter α
has distributive negation if α
has.
Equations
- filter.has_distrib_neg = {neg := has_involutive_neg.neg filter.has_involutive_neg, neg_neg := _, neg_mul := _, mul_neg := _}
Note that filter
is not a mul_zero_class
because 0 * ⊥ ≠ 0
.
Note that filter α
is not a group because f / f ≠ 1
in general
Scalar addition/multiplication of filters #
The filter f • g
is generated by {s • t | s ∈ f, t ∈ g}
in locale pointwise
.
The filter f +ᵥ g
is generated by {s +ᵥ t | s ∈ f, t ∈ g}
in locale pointwise
.
Scalar subtraction of filters #
The filter f -ᵥ g
is generated by {s -ᵥ t | s ∈ f, t ∈ g}
in locale pointwise
.
Translation/scaling of filters #
a • f
is the map of f
under a •
in locale pointwise
.
Equations
- filter.has_smul_filter = {smul := λ (a : α), filter.map (has_smul.smul a)}
a +ᵥ f
is the map of f
under a +ᵥ
in locale pointwise
.
Equations
- filter.has_vadd_filter = {vadd := λ (a : α), filter.map (has_vadd.vadd a)}
An additive action of an additive monoid α
on a type β
gives an additive action
of filter α
on filter β
Equations
- filter.add_action = {to_has_vadd := filter.has_vadd add_action.to_has_vadd, zero_vadd := _, add_vadd := _}
A multiplicative action of a monoid α
on a type β
gives a multiplicative action of
filter α
on filter β
.
Equations
- filter.mul_action = {to_has_smul := filter.has_smul mul_action.to_has_smul, one_smul := _, mul_smul := _}
A multiplicative action of a monoid on a type β
gives a multiplicative action on filter β
.
Equations
An additive action of an additive monoid on a type β
gives an additive action on
filter β
.
Equations
A distributive multiplicative action of a monoid on an additive monoid β
gives a distributive
multiplicative action on filter β
.
Equations
A multiplicative action of a monoid on a monoid β
gives a multiplicative action on set β
.
Equations
Note that we have neither smul_with_zero α (filter β)
nor smul_with_zero (filter α) (filter β)
because 0 * ⊥ ≠ 0
.