tendsto
for relations and partial functions #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file generalizes filter
definitions from functions to partial functions and relations.
Considering functions and partial functions as relations #
A function f : α → β
can be considered as the relation rel α β
which relates x
and f x
for
all x
, and nothing else. This relation is called function.graph f
.
A partial function f : α →. β
can be considered as the relation rel α β
which relates x
and
f x
for all x
for which f x
exists, and nothing else. This relation is called
pfun.graph' f
.
In this regard, a function is a relation for which every element in α
is related to exactly one
element in β
and a partial function is a relation for which every element in α
is related to at
most one element in β
.
This file leverages this analogy to generalize filter
definitions from functions to partial
functions and relations.
Notes #
set.preimage
can be generalized to relations in two ways:
rel.preimage
returns the image of the set under the inverse relation.rel.core
returns the set of elements that are only related to those in the set. Both generalizations are sensible in the context of filters, sofilter.comap
andfilter.tendsto
get two generalizations each.
We first take care of relations. Then the definitions for partial functions are taken as special cases of the definitions for relations.
Relations #
The forward map of a filter under a relation. Generalization of filter.map
to relations. Note
that rel.core
generalizes set.preimage
.
Equations
- filter.rmap r l = {sets := {s : set β | r.core s ∈ l}, univ_sets := _, sets_of_superset := _, inter_sets := _}
Generic "limit of a relation" predicate. rtendsto r l₁ l₂
asserts that for every
l₂
-neighborhood a
, the r
-core of a
is an l₁
-neighborhood. One generalization of
filter.tendsto
to relations.
Equations
- filter.rtendsto r l₁ l₂ = (filter.rmap r l₁ ≤ l₂)
One way of taking the inverse map of a filter under a relation. One generalization of
filter.comap
to relations. Note that rel.core
generalizes set.preimage
.
Equations
- filter.rcomap r f = {sets := rel.image (λ (s : set β) (t : set α), r.core s ⊆ t) f.sets, univ_sets := _, sets_of_superset := _, inter_sets := _}
One way of taking the inverse map of a filter under a relation. Generalization of filter.comap
to relations.
Equations
- filter.rcomap' r f = {sets := rel.image (λ (s : set β) (t : set α), r.preimage s ⊆ t) f.sets, univ_sets := _, sets_of_superset := _, inter_sets := _}
Generic "limit of a relation" predicate. rtendsto' r l₁ l₂
asserts that for every
l₂
-neighborhood a
, the r
-preimage of a
is an l₁
-neighborhood. One generalization of
filter.tendsto
to relations.
Equations
- filter.rtendsto' r l₁ l₂ = (l₁ ≤ filter.rcomap' r l₂)
Partial functions #
The forward map of a filter under a partial function. Generalization of filter.map
to partial
functions.
Equations
- filter.pmap f l = filter.rmap f.graph' l
Generic "limit of a partial function" predicate. ptendsto r l₁ l₂
asserts that for every
l₂
-neighborhood a
, the p
-core of a
is an l₁
-neighborhood. One generalization of
filter.tendsto
to partial function.
Equations
- filter.ptendsto f l₁ l₂ = (filter.pmap f l₁ ≤ l₂)
Inverse map of a filter under a partial function. One generalization of filter.comap
to
partial functions.
Equations
- filter.pcomap' f l = filter.rcomap' f.graph' l
Generic "limit of a partial function" predicate. ptendsto' r l₁ l₂
asserts that for every
l₂
-neighborhood a
, the p
-preimage of a
is an l₁
-neighborhood. One generalization of
filter.tendsto
to partial functions.
Equations
- filter.ptendsto' f l₁ l₂ = (l₁ ≤ filter.rcomap' f.graph' l₂)