# mathlibdocumentation

order.filter.partial

# tendsto for relations and partial functions #

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, so filter.comap and filter.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 #

def filter.rmap {α : Type u} {β : Type v} (r : rel α β) (l : filter α) :

The forward map of a filter under a relation. Generalization of filter.map to relations. Note that rel.core generalizes set.preimage.

Equations
theorem filter.rmap_sets {α : Type u} {β : Type v} (r : rel α β) (l : filter α) :
@[simp]
theorem filter.mem_rmap {α : Type u} {β : Type v} (r : rel α β) (l : filter α) (s : set β) :
s l r.core s l
@[simp]
theorem filter.rmap_rmap {α : Type u} {β : Type v} {γ : Type w} (r : rel α β) (s : rel β γ) (l : filter α) :
l) = filter.rmap (r.comp s) l
@[simp]
theorem filter.rmap_compose {α : Type u} {β : Type v} {γ : Type w} (r : rel α β) (s : rel β γ) :
def filter.rtendsto {α : Type u} {β : Type v} (r : rel α β) (l₁ : filter α) (l₂ : filter β) :
Prop

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
• l₁ l₂ = l₁ l₂)
theorem filter.rtendsto_def {α : Type u} {β : Type v} (r : rel α β) (l₁ : filter α) (l₂ : filter β) :
l₁ l₂ ∀ (s : set β), s l₂r.core s l₁
def filter.rcomap {α : Type u} {β : Type v} (r : rel α β) (f : filter β) :

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
theorem filter.rcomap_sets {α : Type u} {β : Type v} (r : rel α β) (f : filter β) :
f).sets = rel.image (λ (s : set β) (t : set α), r.core s t) f.sets
theorem filter.rcomap_rcomap {α : Type u} {β : Type v} {γ : Type w} (r : rel α β) (s : rel β γ) (l : filter γ) :
l) = filter.rcomap (r.comp s) l
@[simp]
theorem filter.rcomap_compose {α : Type u} {β : Type v} {γ : Type w} (r : rel α β) (s : rel β γ) :
theorem filter.rtendsto_iff_le_rcomap {α : Type u} {β : Type v} (r : rel α β) (l₁ : filter α) (l₂ : filter β) :
l₁ l₂ l₁ l₂
def filter.rcomap' {α : Type u} {β : Type v} (r : rel α β) (f : filter β) :

One way of taking the inverse map of a filter under a relation. Generalization of filter.comap to relations.

Equations
@[simp]
theorem filter.mem_rcomap' {α : Type u} {β : Type v} (r : rel α β) (l : filter β) (s : set α) :
s ∃ (t : set β) (H : t l), r.preimage t s
theorem filter.rcomap'_sets {α : Type u} {β : Type v} (r : rel α β) (f : filter β) :
f).sets = rel.image (λ (s : set β) (t : set α), r.preimage s t) f.sets
@[simp]
theorem filter.rcomap'_rcomap' {α : Type u} {β : Type v} {γ : Type w} (r : rel α β) (s : rel β γ) (l : filter γ) :
l) = filter.rcomap' (r.comp s) l
@[simp]
theorem filter.rcomap'_compose {α : Type u} {β : Type v} {γ : Type w} (r : rel α β) (s : rel β γ) :
def filter.rtendsto' {α : Type u} {β : Type v} (r : rel α β) (l₁ : filter α) (l₂ : filter β) :
Prop

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
• l₁ l₂ = (l₁ l₂)
theorem filter.rtendsto'_def {α : Type u} {β : Type v} (r : rel α β) (l₁ : filter α) (l₂ : filter β) :
l₁ l₂ ∀ (s : set β), s l₂r.preimage s l₁
theorem filter.tendsto_iff_rtendsto {α : Type u} {β : Type v} (l₁ : filter α) (l₂ : filter β) (f : α → β) :
l₁ l₂ l₂
theorem filter.tendsto_iff_rtendsto' {α : Type u} {β : Type v} (l₁ : filter α) (l₂ : filter β) (f : α → β) :
l₁ l₂ l₂

### Partial functions #

def filter.pmap {α : Type u} {β : Type v} (f : α →. β) (l : filter α) :

The forward map of a filter under a partial function. Generalization of filter.map to partial functions.

Equations
• l =
@[simp]
theorem filter.mem_pmap {α : Type u} {β : Type v} (f : α →. β) (l : filter α) (s : set β) :
s l f.core s l
def filter.ptendsto {α : Type u} {β : Type v} (f : α →. β) (l₁ : filter α) (l₂ : filter β) :
Prop

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
• l₁ l₂ = l₁ l₂)
theorem filter.ptendsto_def {α : Type u} {β : Type v} (f : α →. β) (l₁ : filter α) (l₂ : filter β) :
l₁ l₂ ∀ (s : set β), s l₂f.core s l₁
theorem filter.ptendsto_iff_rtendsto {α : Type u} {β : Type v} (l₁ : filter α) (l₂ : filter β) (f : α →. β) :
l₁ l₂ l₂
theorem filter.pmap_res {α : Type u} {β : Type v} (l : filter α) (s : set α) (f : α → β) :
theorem filter.tendsto_iff_ptendsto {α : Type u} {β : Type v} (l₁ : filter α) (l₂ : filter β) (s : set α) (f : α → β) :
(l₁ l₂ filter.ptendsto (pfun.res f s) l₁ l₂
theorem filter.tendsto_iff_ptendsto_univ {α : Type u} {β : Type v} (l₁ : filter α) (l₂ : filter β) (f : α → β) :
l₁ l₂ l₁ l₂
def filter.pcomap' {α : Type u} {β : Type v} (f : α →. β) (l : filter β) :

Inverse map of a filter under a partial function. One generalization of filter.comap to partial functions.

Equations
def filter.ptendsto' {α : Type u} {β : Type v} (f : α →. β) (l₁ : filter α) (l₂ : filter β) :
Prop

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
• l₁ l₂ = (l₁ l₂)
theorem filter.ptendsto'_def {α : Type u} {β : Type v} (f : α →. β) (l₁ : filter α) (l₂ : filter β) :
l₁ l₂ ∀ (s : set β), s l₂f.preimage s l₁
theorem filter.ptendsto_of_ptendsto' {α : Type u} {β : Type v} {f : α →. β} {l₁ : filter α} {l₂ : filter β} :
l₁ l₂ l₁ l₂
theorem filter.ptendsto'_of_ptendsto {α : Type u} {β : Type v} {f : α →. β} {l₁ : filter α} {l₂ : filter β} (h : f.dom l₁) :
l₁ l₂ l₁ l₂