Pointwise operations on filters #
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.instZero
): Pure filter at0 : α
, or alternatively principal filter at0 : Set α
.1
(Filter.instOne
): Pure filter at1 : α
, or alternatively principal filter at1 : Set α
.f + g
(Filter.instAdd
): Addition, filter generated by alls + t
wheres ∈ f
andt ∈ g
.f * g
(Filter.instMul
): Multiplication, filter generated by alls * t
wheres ∈ f
andt ∈ g
.-f
(Filter.instNeg
): Negation, filter of all-s
wheres ∈ f
.f⁻¹
(Filter.instInv
): Inversion, filter of alls⁻¹
wheres ∈ f
.f - g
(Filter.instSub
): Subtraction, filter generated by alls - t
wheres ∈ f
andt ∈ g
.f / g
(Filter.instDiv
): Division, filter generated by alls / t
wheres ∈ f
andt ∈ g
.f +ᵥ g
(Filter.instVAdd
): Scalar addition, filter generated by alls +ᵥ t
wheres ∈ f
andt ∈ g
.f -ᵥ g
(Filter.instVSub
): Scalar subtraction, filter generated by alls -ᵥ t
wheres ∈ f
andt ∈ g
.f • g
(Filter.instSMul
): Scalar multiplication, filter generated by alls • t
wheres ∈ f
andt ∈ g
.a +ᵥ f
(Filter.instVAddFilter
): Translation, filter of alla +ᵥ s
wheres ∈ f
.a • f
(Filter.instSMulFilter
): 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 #
Filter negation/inversion #
The negation of a filter is the pointwise preimage under -
of its sets.
Equations
- Filter.instNeg = { neg := Filter.map Neg.neg }
The inverse of a filter is the pointwise preimage under ⁻¹
of its sets.
Equations
- Filter.instInv = { inv := Filter.map Inv.inv }
Negation is involutive on Filter α
if it is on α
.
Equations
- Filter.instInvolutiveNeg = let __src := Filter.instNeg; InvolutiveNeg.mk ⋯
Instances For
Inversion is involutive on Filter α
if it is on α
.
Equations
- Filter.instInvolutiveInv = let __src := Filter.instInv; InvolutiveInv.mk ⋯
Instances For
Filter addition/multiplication #
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Filter subtraction/division #
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Repeated pointwise multiplication/division (not the same as pointwise repeated
multiplication/division!) of a Filter
. See Note [pointwise nat action].
Instances For
Filter α
is an AddSemigroup
under pointwise operations if α
is.
Equations
- Filter.addSemigroup = AddSemigroup.mk ⋯
Instances For
Filter α
is a Semigroup
under pointwise operations if α
is.
Equations
- Filter.semigroup = Semigroup.mk ⋯
Instances For
Filter α
is an AddCommSemigroup
under pointwise operations if α
is.
Equations
- Filter.addCommSemigroup = let __src := Filter.addSemigroup; AddCommSemigroup.mk ⋯
Instances For
Filter α
is a CommSemigroup
under pointwise operations if α
is.
Equations
- Filter.commSemigroup = let __src := Filter.semigroup; CommSemigroup.mk ⋯
Instances For
Filter α
is an AddZeroClass
under pointwise operations if α
is.
Equations
- Filter.addZeroClass = AddZeroClass.mk ⋯ ⋯
Instances For
Filter α
is a MulOneClass
under pointwise operations if α
is.
Equations
- Filter.mulOneClass = MulOneClass.mk ⋯ ⋯
Instances For
If φ : α →+ β
then mapAddMonoidHom φ
is the monoid homomorphism
Filter α →+ Filter β
induced by map φ
.
Equations
- Filter.mapAddMonoidHom φ = { toFun := Filter.map ⇑φ, map_zero' := ⋯, map_add' := ⋯ }
Instances For
If φ : α →* β
then mapMonoidHom φ
is the monoid homomorphism
Filter α →* Filter β
induced by map φ
.
Equations
- Filter.mapMonoidHom φ = { toFun := Filter.map ⇑φ, map_one' := ⋯, map_mul' := ⋯ }
Instances For
Equations
- ⋯ = ⋯
Instances For
pure
as an AddMonoidHom
.
Equations
- Filter.pureAddMonoidHom = let __src := Filter.pureAddHom; let __src_1 := Filter.pureZeroHom; { toFun := __src.toFun, map_zero' := ⋯, map_add' := ⋯ }
Instances For
Filter α
is an AddMonoid
under pointwise operations if α
is.
Equations
- Filter.addMonoid = let __src := Filter.addZeroClass; let __src_1 := Filter.addSemigroup; let __src_2 := Filter.instNSMul; AddMonoid.mk ⋯ ⋯ nsmulRec ⋯ ⋯
Instances For
Filter α
is an AddCommMonoid
under pointwise operations if α
is.
Equations
- Filter.addCommMonoid = let __src := Filter.addZeroClass; let __src_1 := Filter.addCommSemigroup; AddCommMonoid.mk ⋯
Instances For
Filter α
is a CommMonoid
under pointwise operations if α
is.
Equations
- Filter.commMonoid = let __src := Filter.mulOneClass; let __src_1 := Filter.commSemigroup; CommMonoid.mk ⋯
Instances For
Filter α
is a subtraction monoid under pointwise operations if
α
is.
Equations
- Filter.subtractionMonoid = let __src := Filter.addMonoid; let __src_1 := Filter.instInvolutiveNeg; let __src_2 := Filter.instSub; let __src_3 := Filter.instZSMul; SubtractionMonoid.mk ⋯ ⋯ ⋯
Instances For
Filter α
is a division monoid under pointwise operations if α
is.
Equations
- Filter.divisionMonoid = let __src := Filter.monoid; let __src_1 := Filter.instInvolutiveInv; let __src_2 := Filter.instDiv; let __src_3 := Filter.instZPow; DivisionMonoid.mk ⋯ ⋯ ⋯
Instances For
Filter α
is a commutative subtraction monoid under pointwise operations if α
is.
Equations
- Filter.subtractionCommMonoid = let __src := Filter.subtractionMonoid; let __src_1 := Filter.addCommSemigroup; SubtractionCommMonoid.mk ⋯
Instances For
Filter α
is a commutative division monoid under pointwise operations if α
is.
Equations
- Filter.divisionCommMonoid = let __src := Filter.divisionMonoid; let __src_1 := Filter.commSemigroup; DivisionCommMonoid.mk ⋯
Instances For
Filter α
has distributive negation if α
has.
Equations
- Filter.instDistribNeg = let __src := Filter.instInvolutiveNeg; HasDistribNeg.mk ⋯ ⋯
Instances For
Note that Filter
is not a MulZeroClass
because 0 * ⊥ ≠ 0
.
Note that Filter α
is not a group because f / f ≠ 1
in general
Scalar addition/multiplication of filters #
Scalar subtraction of filters #
Translation/scaling of filters #
a +ᵥ f
is the map of f
under a +ᵥ
in locale Pointwise
.
Equations
- Filter.instVAddFilter = { vadd := fun (a : α) => Filter.map fun (x : β) => a +ᵥ x }
Instances For
a • f
is the map of f
under a •
in locale Pointwise
.
Equations
- Filter.instSMulFilter = { smul := fun (a : α) => Filter.map fun (x : β) => a • x }
Instances For
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
A distributive multiplicative action of a monoid on an additive monoid β
gives a distributive
multiplicative action on Filter β
.
Equations
- Filter.distribMulActionFilter = DistribMulAction.mk ⋯ ⋯
Instances For
A multiplicative action of a monoid on a monoid β
gives a multiplicative action on Set β
.
Equations
- Filter.mulDistribMulActionFilter = MulDistribMulAction.mk ⋯ ⋯
Instances For
Note that we have neither SMulWithZero α (Filter β)
nor SMulWithZero (Filter α) (Filter β)
because 0 * ⊥ ≠ 0
.