order.filter.partialMathlib.Order.Filter.Partial

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad
 -/
 import Order.Filter.Basic
-import Data.Pfun
+import Data.PFun
 
 #align_import order.filter.partial from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
 
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2019 Jeremy Avigad. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad
 -/
-import Mathbin.Order.Filter.Basic
-import Mathbin.Data.Pfun
+import Order.Filter.Basic
+import Data.Pfun
 
 #align_import order.filter.partial from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2019 Jeremy Avigad. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad
-
-! This file was ported from Lean 3 source module order.filter.partial
-! leanprover-community/mathlib commit 0a0ec35061ed9960bf0e7ffb0335f44447b58977
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Order.Filter.Basic
 import Mathbin.Data.Pfun
 
+#align_import order.filter.partial from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
+
 /-!
 # `tendsto` for relations and partial functions
 
Diff
@@ -154,6 +154,7 @@ theorem rcomap_compose (r : Rel α β) (s : Rel β γ) : rcomap r ∘ rcomap s =
 #align filter.rcomap_compose Filter.rcomap_compose
 -/
 
+#print Filter.rtendsto_iff_le_rcomap /-
 theorem rtendsto_iff_le_rcomap (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :
     RTendsto r l₁ l₂ ↔ l₁ ≤ l₂.rcomap r :=
   by
@@ -163,6 +164,7 @@ theorem rtendsto_iff_le_rcomap (r : Rel α β) (l₁ : Filter α) (l₂ : Filter
   · exact fun h s t tl₂ => mem_of_superset (h t tl₂)
   · exact fun h t tl₂ => h _ t tl₂ Set.Subset.rfl
 #align filter.rtendsto_iff_le_rcomap Filter.rtendsto_iff_le_rcomap
+-/
 
 #print Filter.rcomap' /-
 -- Interestingly, there does not seem to be a way to express this relation using a forward map.
@@ -181,11 +183,13 @@ def rcomap' (r : Rel α β) (f : Filter β) : Filter α
 #align filter.rcomap' Filter.rcomap'
 -/
 
+#print Filter.mem_rcomap' /-
 @[simp]
 theorem mem_rcomap' (r : Rel α β) (l : Filter β) (s : Set α) :
     s ∈ l.rcomap' r ↔ ∃ t ∈ l, r.Preimage t ⊆ s :=
   Iff.rfl
 #align filter.mem_rcomap' Filter.mem_rcomap'
+-/
 
 #print Filter.rcomap'_sets /-
 theorem rcomap'_sets (r : Rel α β) (f : Filter β) :
@@ -288,17 +292,21 @@ theorem ptendsto_iff_rtendsto (l₁ : Filter α) (l₂ : Filter β) (f : α →.
 #align filter.ptendsto_iff_rtendsto Filter.ptendsto_iff_rtendsto
 -/
 
+#print Filter.pmap_res /-
 theorem pmap_res (l : Filter α) (s : Set α) (f : α → β) : pmap (PFun.res f s) l = map f (l ⊓ 𝓟 s) :=
   by
   ext t
   simp only [PFun.core_res, mem_pmap, mem_map, mem_inf_principal, imp_iff_not_or]
   rfl
 #align filter.pmap_res Filter.pmap_res
+-/
 
+#print Filter.tendsto_iff_ptendsto /-
 theorem tendsto_iff_ptendsto (l₁ : Filter α) (l₂ : Filter β) (s : Set α) (f : α → β) :
     Tendsto f (l₁ ⊓ 𝓟 s) l₂ ↔ PTendsto (PFun.res f s) l₁ l₂ := by
   simp only [tendsto, ptendsto, pmap_res]
 #align filter.tendsto_iff_ptendsto Filter.tendsto_iff_ptendsto
+-/
 
 #print Filter.tendsto_iff_ptendsto_univ /-
 theorem tendsto_iff_ptendsto_univ (l₁ : Filter α) (l₂ : Filter β) (f : α → β) :
Diff
@@ -99,18 +99,18 @@ theorem rmap_compose (r : Rel α β) (s : Rel β γ) : rmap s ∘ rmap r = rmap
 #align filter.rmap_compose Filter.rmap_compose
 -/
 
-#print Filter.Rtendsto /-
+#print Filter.RTendsto /-
 /-- 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. -/
-def Rtendsto (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :=
+def RTendsto (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :=
   l₁.rmap r ≤ l₂
-#align filter.rtendsto Filter.Rtendsto
+#align filter.rtendsto Filter.RTendsto
 -/
 
 #print Filter.rtendsto_def /-
 theorem rtendsto_def (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :
-    Rtendsto r l₁ l₂ ↔ ∀ s ∈ l₂, r.core s ∈ l₁ :=
+    RTendsto r l₁ l₂ ↔ ∀ s ∈ l₂, r.core s ∈ l₁ :=
   Iff.rfl
 #align filter.rtendsto_def Filter.rtendsto_def
 -/
@@ -155,7 +155,7 @@ theorem rcomap_compose (r : Rel α β) (s : Rel β γ) : rcomap r ∘ rcomap s =
 -/
 
 theorem rtendsto_iff_le_rcomap (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :
-    Rtendsto r l₁ l₂ ↔ l₁ ≤ l₂.rcomap r :=
+    RTendsto r l₁ l₂ ↔ l₁ ≤ l₂.rcomap r :=
   by
   rw [rtendsto_def]
   change (∀ s : Set β, s ∈ l₂.sets → r.core s ∈ l₁) ↔ l₁ ≤ rcomap r l₂
@@ -214,18 +214,18 @@ theorem rcomap'_compose (r : Rel α β) (s : Rel β γ) : rcomap' r ∘ rcomap'
 #align filter.rcomap'_compose Filter.rcomap'_compose
 -/
 
-#print Filter.Rtendsto' /-
+#print Filter.RTendsto' /-
 /-- 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. -/
-def Rtendsto' (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :=
+def RTendsto' (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :=
   l₁ ≤ l₂.rcomap' r
-#align filter.rtendsto' Filter.Rtendsto'
+#align filter.rtendsto' Filter.RTendsto'
 -/
 
 #print Filter.rtendsto'_def /-
 theorem rtendsto'_def (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :
-    Rtendsto' r l₁ l₂ ↔ ∀ s ∈ l₂, r.Preimage s ∈ l₁ :=
+    RTendsto' r l₁ l₂ ↔ ∀ s ∈ l₂, r.Preimage s ∈ l₁ :=
   by
   unfold rtendsto' rcomap'; simp [le_def, Rel.mem_image]; constructor
   · exact fun h s hs => h _ _ hs Set.Subset.rfl
@@ -235,14 +235,14 @@ theorem rtendsto'_def (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :
 
 #print Filter.tendsto_iff_rtendsto /-
 theorem tendsto_iff_rtendsto (l₁ : Filter α) (l₂ : Filter β) (f : α → β) :
-    Tendsto f l₁ l₂ ↔ Rtendsto (Function.graph f) l₁ l₂ := by
+    Tendsto f l₁ l₂ ↔ RTendsto (Function.graph f) l₁ l₂ := by
   simp [tendsto_def, Function.graph, rtendsto_def, Rel.core, Set.preimage]
 #align filter.tendsto_iff_rtendsto Filter.tendsto_iff_rtendsto
 -/
 
 #print Filter.tendsto_iff_rtendsto' /-
 theorem tendsto_iff_rtendsto' (l₁ : Filter α) (l₂ : Filter β) (f : α → β) :
-    Tendsto f l₁ l₂ ↔ Rtendsto' (Function.graph f) l₁ l₂ := by
+    Tendsto f l₁ l₂ ↔ RTendsto' (Function.graph f) l₁ l₂ := by
   simp [tendsto_def, Function.graph, rtendsto'_def, Rel.preimage_def, Set.preimage]
 #align filter.tendsto_iff_rtendsto' Filter.tendsto_iff_rtendsto'
 -/
@@ -265,25 +265,25 @@ theorem mem_pmap (f : α →. β) (l : Filter α) (s : Set β) : s ∈ l.pmap f
 #align filter.mem_pmap Filter.mem_pmap
 -/
 
-#print Filter.Ptendsto /-
+#print Filter.PTendsto /-
 /-- 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. -/
-def Ptendsto (f : α →. β) (l₁ : Filter α) (l₂ : Filter β) :=
+def PTendsto (f : α →. β) (l₁ : Filter α) (l₂ : Filter β) :=
   l₁.pmap f ≤ l₂
-#align filter.ptendsto Filter.Ptendsto
+#align filter.ptendsto Filter.PTendsto
 -/
 
 #print Filter.ptendsto_def /-
 theorem ptendsto_def (f : α →. β) (l₁ : Filter α) (l₂ : Filter β) :
-    Ptendsto f l₁ l₂ ↔ ∀ s ∈ l₂, f.core s ∈ l₁ :=
+    PTendsto f l₁ l₂ ↔ ∀ s ∈ l₂, f.core s ∈ l₁ :=
   Iff.rfl
 #align filter.ptendsto_def Filter.ptendsto_def
 -/
 
 #print Filter.ptendsto_iff_rtendsto /-
 theorem ptendsto_iff_rtendsto (l₁ : Filter α) (l₂ : Filter β) (f : α →. β) :
-    Ptendsto f l₁ l₂ ↔ Rtendsto f.graph' l₁ l₂ :=
+    PTendsto f l₁ l₂ ↔ RTendsto f.graph' l₁ l₂ :=
   Iff.rfl
 #align filter.ptendsto_iff_rtendsto Filter.ptendsto_iff_rtendsto
 -/
@@ -296,13 +296,13 @@ theorem pmap_res (l : Filter α) (s : Set α) (f : α → β) : pmap (PFun.res f
 #align filter.pmap_res Filter.pmap_res
 
 theorem tendsto_iff_ptendsto (l₁ : Filter α) (l₂ : Filter β) (s : Set α) (f : α → β) :
-    Tendsto f (l₁ ⊓ 𝓟 s) l₂ ↔ Ptendsto (PFun.res f s) l₁ l₂ := by
+    Tendsto f (l₁ ⊓ 𝓟 s) l₂ ↔ PTendsto (PFun.res f s) l₁ l₂ := by
   simp only [tendsto, ptendsto, pmap_res]
 #align filter.tendsto_iff_ptendsto Filter.tendsto_iff_ptendsto
 
 #print Filter.tendsto_iff_ptendsto_univ /-
 theorem tendsto_iff_ptendsto_univ (l₁ : Filter α) (l₂ : Filter β) (f : α → β) :
-    Tendsto f l₁ l₂ ↔ Ptendsto (PFun.res f Set.univ) l₁ l₂ := by rw [← tendsto_iff_ptendsto];
+    Tendsto f l₁ l₂ ↔ PTendsto (PFun.res f Set.univ) l₁ l₂ := by rw [← tendsto_iff_ptendsto];
   simp [principal_univ]
 #align filter.tendsto_iff_ptendsto_univ Filter.tendsto_iff_ptendsto_univ
 -/
@@ -315,25 +315,25 @@ def pcomap' (f : α →. β) (l : Filter β) : Filter α :=
 #align filter.pcomap' Filter.pcomap'
 -/
 
-#print Filter.Ptendsto' /-
+#print Filter.PTendsto' /-
 /-- 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. -/
-def Ptendsto' (f : α →. β) (l₁ : Filter α) (l₂ : Filter β) :=
+def PTendsto' (f : α →. β) (l₁ : Filter α) (l₂ : Filter β) :=
   l₁ ≤ l₂.rcomap' f.graph'
-#align filter.ptendsto' Filter.Ptendsto'
+#align filter.ptendsto' Filter.PTendsto'
 -/
 
 #print Filter.ptendsto'_def /-
 theorem ptendsto'_def (f : α →. β) (l₁ : Filter α) (l₂ : Filter β) :
-    Ptendsto' f l₁ l₂ ↔ ∀ s ∈ l₂, f.Preimage s ∈ l₁ :=
+    PTendsto' f l₁ l₂ ↔ ∀ s ∈ l₂, f.Preimage s ∈ l₁ :=
   rtendsto'_def _ _ _
 #align filter.ptendsto'_def Filter.ptendsto'_def
 -/
 
 #print Filter.ptendsto_of_ptendsto' /-
 theorem ptendsto_of_ptendsto' {f : α →. β} {l₁ : Filter α} {l₂ : Filter β} :
-    Ptendsto' f l₁ l₂ → Ptendsto f l₁ l₂ :=
+    PTendsto' f l₁ l₂ → PTendsto f l₁ l₂ :=
   by
   rw [ptendsto_def, ptendsto'_def]
   exact fun h s sl₂ => mem_of_superset (h s sl₂) (PFun.preimage_subset_core _ _)
@@ -342,7 +342,7 @@ theorem ptendsto_of_ptendsto' {f : α →. β} {l₁ : Filter α} {l₂ : Filter
 
 #print Filter.ptendsto'_of_ptendsto /-
 theorem ptendsto'_of_ptendsto {f : α →. β} {l₁ : Filter α} {l₂ : Filter β} (h : f.Dom ∈ l₁) :
-    Ptendsto f l₁ l₂ → Ptendsto' f l₁ l₂ :=
+    PTendsto f l₁ l₂ → PTendsto' f l₁ l₂ :=
   by
   rw [ptendsto_def, ptendsto'_def]
   intro h' s sl₂
Diff
@@ -64,7 +64,7 @@ open scoped Filter
 that `rel.core` generalizes `set.preimage`. -/
 def rmap (r : Rel α β) (l : Filter α) : Filter β
     where
-  sets := { s | r.core s ∈ l }
+  sets := {s | r.core s ∈ l}
   univ_sets := by simp
   sets_of_superset s t hs st := mem_of_superset hs <| Rel.core_mono _ st
   inter_sets s t hs ht := by simp [Rel.core_inter, inter_mem hs ht]
Diff
@@ -54,7 +54,7 @@ namespace Filter
 
 variable {α : Type u} {β : Type v} {γ : Type w}
 
-open Filter
+open scoped Filter
 
 /-! ### Relations -/
 
Diff
@@ -154,12 +154,6 @@ theorem rcomap_compose (r : Rel α β) (s : Rel β γ) : rcomap r ∘ rcomap s =
 #align filter.rcomap_compose Filter.rcomap_compose
 -/
 
-/- warning: filter.rtendsto_iff_le_rcomap -> Filter.rtendsto_iff_le_rcomap is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (r : Rel.{u1, u2} α β) (l₁ : Filter.{u1} α) (l₂ : Filter.{u2} β), Iff (Filter.Rtendsto.{u1, u2} α β r l₁ l₂) (LE.le.{u1} (Filter.{u1} α) (Preorder.toHasLe.{u1} (Filter.{u1} α) (PartialOrder.toPreorder.{u1} (Filter.{u1} α) (Filter.partialOrder.{u1} α))) l₁ (Filter.rcomap.{u1, u2} α β r l₂))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (r : Rel.{u1, u2} α β) (l₁ : Filter.{u1} α) (l₂ : Filter.{u2} β), Iff (Filter.Rtendsto.{u1, u2} α β r l₁ l₂) (LE.le.{u1} (Filter.{u1} α) (Preorder.toLE.{u1} (Filter.{u1} α) (PartialOrder.toPreorder.{u1} (Filter.{u1} α) (Filter.instPartialOrderFilter.{u1} α))) l₁ (Filter.rcomap.{u1, u2} α β r l₂))
-Case conversion may be inaccurate. Consider using '#align filter.rtendsto_iff_le_rcomap Filter.rtendsto_iff_le_rcomapₓ'. -/
 theorem rtendsto_iff_le_rcomap (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :
     Rtendsto r l₁ l₂ ↔ l₁ ≤ l₂.rcomap r :=
   by
@@ -187,12 +181,6 @@ def rcomap' (r : Rel α β) (f : Filter β) : Filter α
 #align filter.rcomap' Filter.rcomap'
 -/
 
-/- warning: filter.mem_rcomap' -> Filter.mem_rcomap' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (r : Rel.{u1, u2} α β) (l : Filter.{u2} β) (s : Set.{u1} α), Iff (Membership.Mem.{u1, u1} (Set.{u1} α) (Filter.{u1} α) (Filter.hasMem.{u1} α) s (Filter.rcomap'.{u1, u2} α β r l)) (Exists.{succ u2} (Set.{u2} β) (fun (t : Set.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (Set.{u2} β) (Filter.{u2} β) (Filter.hasMem.{u2} β) t l) (fun (H : Membership.Mem.{u2, u2} (Set.{u2} β) (Filter.{u2} β) (Filter.hasMem.{u2} β) t l) => HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (Rel.preimage.{u1, u2} α β r t) s)))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (r : Rel.{u1, u2} α β) (l : Filter.{u2} β) (s : Set.{u1} α), Iff (Membership.mem.{u1, u1} (Set.{u1} α) (Filter.{u1} α) (instMembershipSetFilter.{u1} α) s (Filter.rcomap'.{u1, u2} α β r l)) (Exists.{succ u2} (Set.{u2} β) (fun (t : Set.{u2} β) => And (Membership.mem.{u2, u2} (Set.{u2} β) (Filter.{u2} β) (instMembershipSetFilter.{u2} β) t l) (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (Rel.preimage.{u1, u2} α β r t) s)))
-Case conversion may be inaccurate. Consider using '#align filter.mem_rcomap' Filter.mem_rcomap'ₓ'. -/
 @[simp]
 theorem mem_rcomap' (r : Rel α β) (l : Filter β) (s : Set α) :
     s ∈ l.rcomap' r ↔ ∃ t ∈ l, r.Preimage t ⊆ s :=
@@ -300,12 +288,6 @@ theorem ptendsto_iff_rtendsto (l₁ : Filter α) (l₂ : Filter β) (f : α →.
 #align filter.ptendsto_iff_rtendsto Filter.ptendsto_iff_rtendsto
 -/
 
-/- warning: filter.pmap_res -> Filter.pmap_res is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (l : Filter.{u1} α) (s : Set.{u1} α) (f : α -> β), Eq.{succ u2} (Filter.{u2} β) (Filter.pmap.{u1, u2} α β (PFun.res.{u1, u2} α β f s) l) (Filter.map.{u1, u2} α β f (Inf.inf.{u1} (Filter.{u1} α) (Filter.hasInf.{u1} α) l (Filter.principal.{u1} α s)))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (l : Filter.{u1} α) (s : Set.{u1} α) (f : α -> β), Eq.{succ u2} (Filter.{u2} β) (Filter.pmap.{u1, u2} α β (PFun.res.{u1, u2} α β f s) l) (Filter.map.{u1, u2} α β f (Inf.inf.{u1} (Filter.{u1} α) (Filter.instInfFilter.{u1} α) l (Filter.principal.{u1} α s)))
-Case conversion may be inaccurate. Consider using '#align filter.pmap_res Filter.pmap_resₓ'. -/
 theorem pmap_res (l : Filter α) (s : Set α) (f : α → β) : pmap (PFun.res f s) l = map f (l ⊓ 𝓟 s) :=
   by
   ext t
@@ -313,12 +295,6 @@ theorem pmap_res (l : Filter α) (s : Set α) (f : α → β) : pmap (PFun.res f
   rfl
 #align filter.pmap_res Filter.pmap_res
 
-/- warning: filter.tendsto_iff_ptendsto -> Filter.tendsto_iff_ptendsto is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (l₁ : Filter.{u1} α) (l₂ : Filter.{u2} β) (s : Set.{u1} α) (f : α -> β), Iff (Filter.Tendsto.{u1, u2} α β f (Inf.inf.{u1} (Filter.{u1} α) (Filter.hasInf.{u1} α) l₁ (Filter.principal.{u1} α s)) l₂) (Filter.Ptendsto.{u1, u2} α β (PFun.res.{u1, u2} α β f s) l₁ l₂)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (l₁ : Filter.{u1} α) (l₂ : Filter.{u2} β) (s : Set.{u1} α) (f : α -> β), Iff (Filter.Tendsto.{u1, u2} α β f (Inf.inf.{u1} (Filter.{u1} α) (Filter.instInfFilter.{u1} α) l₁ (Filter.principal.{u1} α s)) l₂) (Filter.Ptendsto.{u1, u2} α β (PFun.res.{u1, u2} α β f s) l₁ l₂)
-Case conversion may be inaccurate. Consider using '#align filter.tendsto_iff_ptendsto Filter.tendsto_iff_ptendstoₓ'. -/
 theorem tendsto_iff_ptendsto (l₁ : Filter α) (l₂ : Filter β) (s : Set α) (f : α → β) :
     Tendsto f (l₁ ⊓ 𝓟 s) l₂ ↔ Ptendsto (PFun.res f s) l₁ l₂ := by
   simp only [tendsto, ptendsto, pmap_res]
Diff
@@ -326,9 +326,7 @@ theorem tendsto_iff_ptendsto (l₁ : Filter α) (l₂ : Filter β) (s : Set α)
 
 #print Filter.tendsto_iff_ptendsto_univ /-
 theorem tendsto_iff_ptendsto_univ (l₁ : Filter α) (l₂ : Filter β) (f : α → β) :
-    Tendsto f l₁ l₂ ↔ Ptendsto (PFun.res f Set.univ) l₁ l₂ :=
-  by
-  rw [← tendsto_iff_ptendsto]
+    Tendsto f l₁ l₂ ↔ Ptendsto (PFun.res f Set.univ) l₁ l₂ := by rw [← tendsto_iff_ptendsto];
   simp [principal_univ]
 #align filter.tendsto_iff_ptendsto_univ Filter.tendsto_iff_ptendsto_univ
 -/
Diff
@@ -156,7 +156,7 @@ theorem rcomap_compose (r : Rel α β) (s : Rel β γ) : rcomap r ∘ rcomap s =
 
 /- warning: filter.rtendsto_iff_le_rcomap -> Filter.rtendsto_iff_le_rcomap is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (r : Rel.{u1, u2} α β) (l₁ : Filter.{u1} α) (l₂ : Filter.{u2} β), Iff (Filter.Rtendsto.{u1, u2} α β r l₁ l₂) (LE.le.{u1} (Filter.{u1} α) (Preorder.toLE.{u1} (Filter.{u1} α) (PartialOrder.toPreorder.{u1} (Filter.{u1} α) (Filter.partialOrder.{u1} α))) l₁ (Filter.rcomap.{u1, u2} α β r l₂))
+  forall {α : Type.{u1}} {β : Type.{u2}} (r : Rel.{u1, u2} α β) (l₁ : Filter.{u1} α) (l₂ : Filter.{u2} β), Iff (Filter.Rtendsto.{u1, u2} α β r l₁ l₂) (LE.le.{u1} (Filter.{u1} α) (Preorder.toHasLe.{u1} (Filter.{u1} α) (PartialOrder.toPreorder.{u1} (Filter.{u1} α) (Filter.partialOrder.{u1} α))) l₁ (Filter.rcomap.{u1, u2} α β r l₂))
 but is expected to have type
   forall {α : Type.{u1}} {β : Type.{u2}} (r : Rel.{u1, u2} α β) (l₁ : Filter.{u1} α) (l₂ : Filter.{u2} β), Iff (Filter.Rtendsto.{u1, u2} α β r l₁ l₂) (LE.le.{u1} (Filter.{u1} α) (Preorder.toLE.{u1} (Filter.{u1} α) (PartialOrder.toPreorder.{u1} (Filter.{u1} α) (Filter.instPartialOrderFilter.{u1} α))) l₁ (Filter.rcomap.{u1, u2} α β r l₂))
 Case conversion may be inaccurate. Consider using '#align filter.rtendsto_iff_le_rcomap Filter.rtendsto_iff_le_rcomapₓ'. -/
Diff
@@ -302,9 +302,9 @@ theorem ptendsto_iff_rtendsto (l₁ : Filter α) (l₂ : Filter β) (f : α →.
 
 /- warning: filter.pmap_res -> Filter.pmap_res is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (l : Filter.{u1} α) (s : Set.{u1} α) (f : α -> β), Eq.{succ u2} (Filter.{u2} β) (Filter.pmap.{u1, u2} α β (PFun.res.{u1, u2} α β f s) l) (Filter.map.{u1, u2} α β f (HasInf.inf.{u1} (Filter.{u1} α) (Filter.hasInf.{u1} α) l (Filter.principal.{u1} α s)))
+  forall {α : Type.{u1}} {β : Type.{u2}} (l : Filter.{u1} α) (s : Set.{u1} α) (f : α -> β), Eq.{succ u2} (Filter.{u2} β) (Filter.pmap.{u1, u2} α β (PFun.res.{u1, u2} α β f s) l) (Filter.map.{u1, u2} α β f (Inf.inf.{u1} (Filter.{u1} α) (Filter.hasInf.{u1} α) l (Filter.principal.{u1} α s)))
 but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (l : Filter.{u1} α) (s : Set.{u1} α) (f : α -> β), Eq.{succ u2} (Filter.{u2} β) (Filter.pmap.{u1, u2} α β (PFun.res.{u1, u2} α β f s) l) (Filter.map.{u1, u2} α β f (HasInf.inf.{u1} (Filter.{u1} α) (Filter.instHasInfFilter.{u1} α) l (Filter.principal.{u1} α s)))
+  forall {α : Type.{u1}} {β : Type.{u2}} (l : Filter.{u1} α) (s : Set.{u1} α) (f : α -> β), Eq.{succ u2} (Filter.{u2} β) (Filter.pmap.{u1, u2} α β (PFun.res.{u1, u2} α β f s) l) (Filter.map.{u1, u2} α β f (Inf.inf.{u1} (Filter.{u1} α) (Filter.instInfFilter.{u1} α) l (Filter.principal.{u1} α s)))
 Case conversion may be inaccurate. Consider using '#align filter.pmap_res Filter.pmap_resₓ'. -/
 theorem pmap_res (l : Filter α) (s : Set α) (f : α → β) : pmap (PFun.res f s) l = map f (l ⊓ 𝓟 s) :=
   by
@@ -315,9 +315,9 @@ theorem pmap_res (l : Filter α) (s : Set α) (f : α → β) : pmap (PFun.res f
 
 /- warning: filter.tendsto_iff_ptendsto -> Filter.tendsto_iff_ptendsto is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (l₁ : Filter.{u1} α) (l₂ : Filter.{u2} β) (s : Set.{u1} α) (f : α -> β), Iff (Filter.Tendsto.{u1, u2} α β f (HasInf.inf.{u1} (Filter.{u1} α) (Filter.hasInf.{u1} α) l₁ (Filter.principal.{u1} α s)) l₂) (Filter.Ptendsto.{u1, u2} α β (PFun.res.{u1, u2} α β f s) l₁ l₂)
+  forall {α : Type.{u1}} {β : Type.{u2}} (l₁ : Filter.{u1} α) (l₂ : Filter.{u2} β) (s : Set.{u1} α) (f : α -> β), Iff (Filter.Tendsto.{u1, u2} α β f (Inf.inf.{u1} (Filter.{u1} α) (Filter.hasInf.{u1} α) l₁ (Filter.principal.{u1} α s)) l₂) (Filter.Ptendsto.{u1, u2} α β (PFun.res.{u1, u2} α β f s) l₁ l₂)
 but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (l₁ : Filter.{u1} α) (l₂ : Filter.{u2} β) (s : Set.{u1} α) (f : α -> β), Iff (Filter.Tendsto.{u1, u2} α β f (HasInf.inf.{u1} (Filter.{u1} α) (Filter.instHasInfFilter.{u1} α) l₁ (Filter.principal.{u1} α s)) l₂) (Filter.Ptendsto.{u1, u2} α β (PFun.res.{u1, u2} α β f s) l₁ l₂)
+  forall {α : Type.{u1}} {β : Type.{u2}} (l₁ : Filter.{u1} α) (l₂ : Filter.{u2} β) (s : Set.{u1} α) (f : α -> β), Iff (Filter.Tendsto.{u1, u2} α β f (Inf.inf.{u1} (Filter.{u1} α) (Filter.instInfFilter.{u1} α) l₁ (Filter.principal.{u1} α s)) l₂) (Filter.Ptendsto.{u1, u2} α β (PFun.res.{u1, u2} α β f s) l₁ l₂)
 Case conversion may be inaccurate. Consider using '#align filter.tendsto_iff_ptendsto Filter.tendsto_iff_ptendstoₓ'. -/
 theorem tendsto_iff_ptendsto (l₁ : Filter α) (l₂ : Filter β) (s : Set α) (f : α → β) :
     Tendsto f (l₁ ⊓ 𝓟 s) l₂ ↔ Ptendsto (PFun.res f s) l₁ l₂ := by

Changes in mathlib4

mathlib3
mathlib4
chore: space after (#8178)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -62,7 +62,7 @@ def rmap (r : Rel α β) (l : Filter α) : Filter β where
   inter_sets hs ht := by
     simp only [Set.mem_setOf_eq]
     convert inter_mem hs ht
-    rw [←Rel.core_inter]
+    rw [← Rel.core_inter]
 #align filter.rmap Filter.rmap
 
 theorem rmap_sets (r : Rel α β) (l : Filter α) : (l.rmap r).sets = r.core ⁻¹' l.sets :=
@@ -130,7 +130,7 @@ theorem rcomap_compose (r : Rel α β) (s : Rel β γ) : rcomap r ∘ rcomap s =
 theorem rtendsto_iff_le_rcomap (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :
     RTendsto r l₁ l₂ ↔ l₁ ≤ l₂.rcomap r := by
   rw [rtendsto_def]
-  simp_rw [←l₂.mem_sets]
+  simp_rw [← l₂.mem_sets]
   simp [Filter.le_def, rcomap, Rel.mem_image]; constructor
   · exact fun h s t tl₂ => mem_of_superset (h t tl₂)
   · exact fun h t tl₂ => h _ t tl₂ Set.Subset.rfl
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2019 Jeremy Avigad. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad
-
-! This file was ported from Lean 3 source module order.filter.partial
-! leanprover-community/mathlib commit b363547b3113d350d053abdf2884e9850a56b205
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Order.Filter.Basic
 import Mathlib.Data.PFun
 
+#align_import order.filter.partial from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205"
+
 /-!
 # `Tendsto` for relations and partial functions
 
style: rename Rtendsto and Ptendsto to RTendsto and PTendsto (#4722)

https://github.com/leanprover-community/mathlib4/issues/2203

Diff
@@ -88,15 +88,15 @@ theorem rmap_compose (r : Rel α β) (s : Rel β γ) : rmap s ∘ rmap r = rmap
   funext <| rmap_rmap _ _
 #align filter.rmap_compose Filter.rmap_compose
 
-/-- Generic "limit of a relation" predicate. `Rtendsto r l₁ l₂` asserts that for every
+/-- 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. -/
-def Rtendsto (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :=
+def RTendsto (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :=
   l₁.rmap r ≤ l₂
-#align filter.rtendsto Filter.Rtendsto
+#align filter.rtendsto Filter.RTendsto
 
 theorem rtendsto_def (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :
-    Rtendsto r l₁ l₂ ↔ ∀ s ∈ l₂, r.core s ∈ l₁ :=
+    RTendsto r l₁ l₂ ↔ ∀ s ∈ l₂, r.core s ∈ l₁ :=
   Iff.rfl
 #align filter.rtendsto_def Filter.rtendsto_def
 
@@ -131,7 +131,7 @@ theorem rcomap_compose (r : Rel α β) (s : Rel β γ) : rcomap r ∘ rcomap s =
 #align filter.rcomap_compose Filter.rcomap_compose
 
 theorem rtendsto_iff_le_rcomap (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :
-    Rtendsto r l₁ l₂ ↔ l₁ ≤ l₂.rcomap r := by
+    RTendsto r l₁ l₂ ↔ l₁ ≤ l₂.rcomap r := by
   rw [rtendsto_def]
   simp_rw [←l₂.mem_sets]
   simp [Filter.le_def, rcomap, Rel.mem_image]; constructor
@@ -181,27 +181,27 @@ theorem rcomap'_compose (r : Rel α β) (s : Rel β γ) : rcomap' r ∘ rcomap'
   funext <| rcomap'_rcomap' _ _
 #align filter.rcomap'_compose Filter.rcomap'_compose
 
-/-- Generic "limit of a relation" predicate. `Rtendsto' r l₁ l₂` asserts that for every
+/-- 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. -/
-def Rtendsto' (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :=
+def RTendsto' (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :=
   l₁ ≤ l₂.rcomap' r
-#align filter.rtendsto' Filter.Rtendsto'
+#align filter.rtendsto' Filter.RTendsto'
 
 theorem rtendsto'_def (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :
-    Rtendsto' r l₁ l₂ ↔ ∀ s ∈ l₂, r.preimage s ∈ l₁ := by
-  unfold Rtendsto' rcomap'; simp [le_def, Rel.mem_image]; constructor
+    RTendsto' r l₁ l₂ ↔ ∀ s ∈ l₂, r.preimage s ∈ l₁ := by
+  unfold RTendsto' rcomap'; simp [le_def, Rel.mem_image]; constructor
   · exact fun h s hs => h _ _ hs Set.Subset.rfl
   · exact fun h s t ht => mem_of_superset (h t ht)
 #align filter.rtendsto'_def Filter.rtendsto'_def
 
 theorem tendsto_iff_rtendsto (l₁ : Filter α) (l₂ : Filter β) (f : α → β) :
-    Tendsto f l₁ l₂ ↔ Rtendsto (Function.graph f) l₁ l₂ := by
+    Tendsto f l₁ l₂ ↔ RTendsto (Function.graph f) l₁ l₂ := by
   simp [tendsto_def, Function.graph, rtendsto_def, Rel.core, Set.preimage]
 #align filter.tendsto_iff_rtendsto Filter.tendsto_iff_rtendsto
 
 theorem tendsto_iff_rtendsto' (l₁ : Filter α) (l₂ : Filter β) (f : α → β) :
-    Tendsto f l₁ l₂ ↔ Rtendsto' (Function.graph f) l₁ l₂ := by
+    Tendsto f l₁ l₂ ↔ RTendsto' (Function.graph f) l₁ l₂ := by
   simp [tendsto_def, Function.graph, rtendsto'_def, Rel.preimage_def, Set.preimage]
 #align filter.tendsto_iff_rtendsto' Filter.tendsto_iff_rtendsto'
 
@@ -219,20 +219,20 @@ theorem mem_pmap (f : α →. β) (l : Filter α) (s : Set β) : s ∈ l.pmap f
   Iff.rfl
 #align filter.mem_pmap Filter.mem_pmap
 
-/-- Generic "limit of a partial function" predicate. `Ptendsto r l₁ l₂` asserts that for every
+/-- 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. -/
-def Ptendsto (f : α →. β) (l₁ : Filter α) (l₂ : Filter β) :=
+def PTendsto (f : α →. β) (l₁ : Filter α) (l₂ : Filter β) :=
   l₁.pmap f ≤ l₂
-#align filter.ptendsto Filter.Ptendsto
+#align filter.ptendsto Filter.PTendsto
 
 theorem ptendsto_def (f : α →. β) (l₁ : Filter α) (l₂ : Filter β) :
-    Ptendsto f l₁ l₂ ↔ ∀ s ∈ l₂, f.core s ∈ l₁ :=
+    PTendsto f l₁ l₂ ↔ ∀ s ∈ l₂, f.core s ∈ l₁ :=
   Iff.rfl
 #align filter.ptendsto_def Filter.ptendsto_def
 
 theorem ptendsto_iff_rtendsto (l₁ : Filter α) (l₂ : Filter β) (f : α →. β) :
-    Ptendsto f l₁ l₂ ↔ Rtendsto f.graph' l₁ l₂ :=
+    PTendsto f l₁ l₂ ↔ RTendsto f.graph' l₁ l₂ :=
   Iff.rfl
 #align filter.ptendsto_iff_rtendsto Filter.ptendsto_iff_rtendsto
 
@@ -244,12 +244,12 @@ theorem pmap_res (l : Filter α) (s : Set α) (f : α → β) :
 #align filter.pmap_res Filter.pmap_res
 
 theorem tendsto_iff_ptendsto (l₁ : Filter α) (l₂ : Filter β) (s : Set α) (f : α → β) :
-    Tendsto f (l₁ ⊓ 𝓟 s) l₂ ↔ Ptendsto (PFun.res f s) l₁ l₂ := by
-  simp only [Tendsto, Ptendsto, pmap_res]
+    Tendsto f (l₁ ⊓ 𝓟 s) l₂ ↔ PTendsto (PFun.res f s) l₁ l₂ := by
+  simp only [Tendsto, PTendsto, pmap_res]
 #align filter.tendsto_iff_ptendsto Filter.tendsto_iff_ptendsto
 
 theorem tendsto_iff_ptendsto_univ (l₁ : Filter α) (l₂ : Filter β) (f : α → β) :
-    Tendsto f l₁ l₂ ↔ Ptendsto (PFun.res f Set.univ) l₁ l₂ := by
+    Tendsto f l₁ l₂ ↔ PTendsto (PFun.res f Set.univ) l₁ l₂ := by
   rw [← tendsto_iff_ptendsto]
   simp [principal_univ]
 #align filter.tendsto_iff_ptendsto_univ Filter.tendsto_iff_ptendsto_univ
@@ -260,26 +260,26 @@ def pcomap' (f : α →. β) (l : Filter β) : Filter α :=
   Filter.rcomap' f.graph' l
 #align filter.pcomap' Filter.pcomap'
 
-/-- Generic "limit of a partial function" predicate. `Ptendsto' r l₁ l₂` asserts that for every
+/-- 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. -/
-def Ptendsto' (f : α →. β) (l₁ : Filter α) (l₂ : Filter β) :=
+def PTendsto' (f : α →. β) (l₁ : Filter α) (l₂ : Filter β) :=
   l₁ ≤ l₂.rcomap' f.graph'
-#align filter.ptendsto' Filter.Ptendsto'
+#align filter.ptendsto' Filter.PTendsto'
 
 theorem ptendsto'_def (f : α →. β) (l₁ : Filter α) (l₂ : Filter β) :
-    Ptendsto' f l₁ l₂ ↔ ∀ s ∈ l₂, f.preimage s ∈ l₁ :=
+    PTendsto' f l₁ l₂ ↔ ∀ s ∈ l₂, f.preimage s ∈ l₁ :=
   rtendsto'_def _ _ _
 #align filter.ptendsto'_def Filter.ptendsto'_def
 
 theorem ptendsto_of_ptendsto' {f : α →. β} {l₁ : Filter α} {l₂ : Filter β} :
-    Ptendsto' f l₁ l₂ → Ptendsto f l₁ l₂ := by
+    PTendsto' f l₁ l₂ → PTendsto f l₁ l₂ := by
   rw [ptendsto_def, ptendsto'_def]
   exact fun h s sl₂ => mem_of_superset (h s sl₂) (PFun.preimage_subset_core _ _)
 #align filter.ptendsto_of_ptendsto' Filter.ptendsto_of_ptendsto'
 
 theorem ptendsto'_of_ptendsto {f : α →. β} {l₁ : Filter α} {l₂ : Filter β} (h : f.Dom ∈ l₁) :
-    Ptendsto f l₁ l₂ → Ptendsto' f l₁ l₂ := by
+    PTendsto f l₁ l₂ → PTendsto' f l₁ l₂ := by
   rw [ptendsto_def, ptendsto'_def]
   intro h' s sl₂
   rw [PFun.preimage_eq]
chore: bye-bye, solo bys! (#3825)

This PR puts, with one exception, every single remaining by that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh. The exception is when the by begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.

Essentially this is s/\n *by$/ by/g, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated bys".

Diff
@@ -236,8 +236,8 @@ theorem ptendsto_iff_rtendsto (l₁ : Filter α) (l₂ : Filter β) (f : α →.
   Iff.rfl
 #align filter.ptendsto_iff_rtendsto Filter.ptendsto_iff_rtendsto
 
-theorem pmap_res (l : Filter α) (s : Set α) (f : α → β) : pmap (PFun.res f s) l = map f (l ⊓ 𝓟 s) :=
-  by
+theorem pmap_res (l : Filter α) (s : Set α) (f : α → β) :
+    pmap (PFun.res f s) l = map f (l ⊓ 𝓟 s) := by
   ext t
   simp only [PFun.core_res, mem_pmap, mem_map, mem_inf_principal, imp_iff_not_or]
   rfl
chore: tidy various files (#2236)
Diff
@@ -58,12 +58,11 @@ open Filter
 
 /-- The forward map of a filter under a relation. Generalization of `Filter.map` to relations. Note
 that `Rel.core` generalizes `Set.preimage`. -/
-def rmap (r : Rel α β) (l : Filter α) : Filter β
-    where
+def rmap (r : Rel α β) (l : Filter α) : Filter β where
   sets := { s | r.core s ∈ l }
   univ_sets := by simp
-  sets_of_superset := @fun s t hs st => mem_of_superset hs (Rel.core_mono _ st)
-  inter_sets := @fun s t hs ht => by
+  sets_of_superset hs st := mem_of_superset hs (Rel.core_mono _ st)
+  inter_sets hs ht := by
     simp only [Set.mem_setOf_eq]
     convert inter_mem hs ht
     rw [←Rel.core_inter]
@@ -91,7 +90,7 @@ theorem rmap_compose (r : Rel α β) (s : Rel β γ) : rmap s ∘ rmap r = rmap
 
 /-- 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. -/
+`Filter.Tendsto` to relations. -/
 def Rtendsto (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :=
   l₁.rmap r ≤ l₂
 #align filter.rtendsto Filter.Rtendsto
@@ -103,12 +102,11 @@ theorem rtendsto_def (r : Rel α β) (l₁ : Filter α) (l₂ : 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`. -/
-def rcomap (r : Rel α β) (f : Filter β) : Filter α
-    where
+def rcomap (r : Rel α β) (f : Filter β) : Filter α where
   sets := Rel.image (fun s t => r.core s ⊆ t) f.sets
   univ_sets := ⟨Set.univ, univ_mem, Set.subset_univ _⟩
-  sets_of_superset := @fun _ _ ⟨a', ha', ma'a⟩ ab => ⟨a', ha', ma'a.trans ab⟩
-  inter_sets := @fun _ _ ⟨a', ha₁, ha₂⟩ ⟨b', hb₁, hb₂⟩ =>
+  sets_of_superset := fun ⟨a', ha', ma'a⟩ ab => ⟨a', ha', ma'a.trans ab⟩
+  inter_sets := fun ⟨a', ha₁, ha₂⟩ ⟨b', hb₁, hb₂⟩ =>
     ⟨a' ∩ b', inter_mem ha₁ hb₁, (r.core_inter a' b').subset.trans (Set.inter_subset_inter ha₂ hb₂)⟩
 #align filter.rcomap Filter.rcomap
 
@@ -135,7 +133,7 @@ theorem rcomap_compose (r : Rel α β) (s : Rel β γ) : rcomap r ∘ rcomap s =
 theorem rtendsto_iff_le_rcomap (r : Rel α β) (l₁ : Filter α) (l₂ : Filter β) :
     Rtendsto r l₁ l₂ ↔ l₁ ≤ l₂.rcomap r := by
   rw [rtendsto_def]
-  change (∀ s : Set β, s ∈ l₂.sets → r.core s ∈ l₁) ↔ l₁ ≤ rcomap r l₂
+  simp_rw [←l₂.mem_sets]
   simp [Filter.le_def, rcomap, Rel.mem_image]; constructor
   · exact fun h s t tl₂ => mem_of_superset (h t tl₂)
   · exact fun h t tl₂ => h _ t tl₂ Set.Subset.rfl
@@ -146,12 +144,11 @@ theorem rtendsto_iff_le_rcomap (r : Rel α β) (l₁ : Filter α) (l₂ : Filter
 -- and only if `s ∈ f'`. But the intersection of two sets satisfying the lhs may be empty.
 /-- One way of taking the inverse map of a filter under a relation. Generalization of `Filter.comap`
 to relations. -/
-def rcomap' (r : Rel α β) (f : Filter β) : Filter α
-    where
+def rcomap' (r : Rel α β) (f : Filter β) : Filter α where
   sets := Rel.image (fun s t => r.preimage s ⊆ t) f.sets
   univ_sets := ⟨Set.univ, univ_mem, Set.subset_univ _⟩
-  sets_of_superset := @fun _ _ ⟨a', ha', ma'a⟩ ab => ⟨a', ha', ma'a.trans ab⟩
-  inter_sets := @fun _ _ ⟨a', ha₁, ha₂⟩ ⟨b', hb₁, hb₂⟩ =>
+  sets_of_superset := fun ⟨a', ha', ma'a⟩ ab => ⟨a', ha', ma'a.trans ab⟩
+  inter_sets := fun ⟨a', ha₁, ha₂⟩ ⟨b', hb₁, hb₂⟩ =>
     ⟨a' ∩ b', inter_mem ha₁ hb₁,
       (@Rel.preimage_inter _ _ r _ _).trans (Set.inter_subset_inter ha₂ hb₂)⟩
 #align filter.rcomap' Filter.rcomap'
@@ -171,7 +168,8 @@ theorem rcomap'_sets (r : Rel α β) (f : Filter β) :
 theorem rcomap'_rcomap' (r : Rel α β) (s : Rel β γ) (l : Filter γ) :
     rcomap' r (rcomap' s l) = rcomap' (r.comp s) l :=
   Filter.ext fun t => by
-    simp [rcomap'_sets, Rel.image, Rel.preimage_comp]; constructor
+    simp only [mem_rcomap', Rel.preimage_comp]
+    constructor
     · rintro ⟨u, ⟨v, vsets, hv⟩, h⟩
       exact ⟨v, vsets, (Rel.preimage_mono _ hv).trans h⟩
     rintro ⟨t, tsets, ht⟩
feat: port Order.Filter.Partial (#2059)

Co-authored-by: Moritz Firsching <firsching@google.com>

Dependencies 6 + 218

219 files ported (97.3%)
99703 lines ported (97.9%)
Show graph

The unported dependencies are