File: Mathlib/Order/Filter/Lift.lean

full_name: Filter.lift
code: /-- A variant on `bind` using a function `g` taking a set instead of a member of `α`.
This is essentially a push-forward along a function mapping each set to a filter. -/
protected def lift (f : Filter α) (g : Set α → Filter β) 
goal: Filter β

full_name: Filter.lift_top
code: @[simp]
theorem lift_top (g : Set α → Filter β) : (⊤ : Filter α).lift g = g univ 
goal: ⊤.lift g = g Set.univ

full_name: Filter.HasBasis.mem_lift_iff
code: /-- If `(p : ι → Prop, s : ι → Set α)` is a basis of a filter `f`, `g` is a monotone function
`Set α → Filter γ`, and for each `i`, `(pg : β i → Prop, sg : β i → Set α)` is a basis
of the filter `g (s i)`, then
`(fun (i : ι) (x : β i) ↦ p i ∧ pg i x, fun (i : ι) (x : β i) ↦ sg i x)` is a basis
of the filter `f.lift g`.

This basis is parametrized by `i : ι` and `x : β i`, so in order to formulate this fact using
`Filter.HasBasis` one has to use `Σ i, β i` as the index type, see `Filter.HasBasis.lift`.
This lemma states the corresponding `mem_iff` statement without using a sigma type. -/
theorem HasBasis.mem_lift_iff {ι} {p : ι → Prop} {s : ι → Set α} {f : Filter α}
    (hf : f.HasBasis p s) {β : ι → Type*} {pg : ∀ i, β i → Prop} {sg : ∀ i, β i → Set γ}
    {g : Set α → Filter γ} (hg : ∀ i, (g <| s i).HasBasis (pg i) (sg i)) (gm : Monotone g)
    {s : Set γ} : s ∈ f.lift g ↔ ∃ i, p i ∧ ∃ x, pg i x ∧ sg i x ⊆ s 
goal: ∀ {s : Set γ}, s ∈ f.lift g ↔ ∃ i, p i ∧ ∃ x, pg i x ∧ sg i x ⊆ s

full_name: Filter.HasBasis.lift
code: /-- If `(p : ι → Prop, s : ι → Set α)` is a basis of a filter `f`, `g` is a monotone function
`Set α → Filter γ`, and for each `i`, `(pg : β i → Prop, sg : β i → Set α)` is a basis
of the filter `g (s i)`, then
`(fun (i : ι) (x : β i) ↦ p i ∧ pg i x, fun (i : ι) (x : β i) ↦ sg i x)`
is a basis of the filter `f.lift g`.

This basis is parametrized by `i : ι` and `x : β i`, so in order to formulate this fact using
`has_basis` one has to use `Σ i, β i` as the index type. See also `Filter.HasBasis.mem_lift_iff`
for the corresponding `mem_iff` statement formulated without using a sigma type. -/
theorem HasBasis.lift {ι} {p : ι → Prop} {s : ι → Set α} {f : Filter α} (hf : f.HasBasis p s)
    {β : ι → Type*} {pg : ∀ i, β i → Prop} {sg : ∀ i, β i → Set γ} {g : Set α → Filter γ}
    (hg : ∀ i, (g (s i)).HasBasis (pg i) (sg i)) (gm : Monotone g) :
    (f.lift g).HasBasis (fun i : Σi, β i => p i.1 ∧ pg i.1 i.2) fun i : Σi, β i => sg i.1 i.2 
goal: (f.lift g).HasBasis (fun i => p i.fst ∧ pg i.fst i.snd) fun i => sg i.fst i.snd

full_name: Filter.mem_lift_sets
code: theorem mem_lift_sets (hg : Monotone g) {s : Set β} : s ∈ f.lift g ↔ ∃ t ∈ f, s ∈ g t 
goal: s ∈ f.lift g ↔ ∃ t ∈ f, s ∈ g t

full_name: Filter.sInter_lift_sets
code: theorem sInter_lift_sets (hg : Monotone g) :
    ⋂₀ { s | s ∈ f.lift g } = ⋂ s ∈ f, ⋂₀ { t | t ∈ g s } 
goal: ⋂₀ {s | s ∈ f.lift g} = ⋂ s ∈ f, ⋂₀ {t | t ∈ g s}

full_name: Filter.mem_lift
code: theorem mem_lift {s : Set β} {t : Set α} (ht : t ∈ f) (hs : s ∈ g t) : s ∈ f.lift g 
goal: s ∈ f.lift g

full_name: Filter.lift_le
code: theorem lift_le {f : Filter α} {g : Set α → Filter β} {h : Filter β} {s : Set α} (hs : s ∈ f)
    (hg : g s ≤ h) : f.lift g ≤ h 
goal: f.lift g ≤ h

full_name: Filter.le_lift
code: theorem le_lift {f : Filter α} {g : Set α → Filter β} {h : Filter β} :
    h ≤ f.lift g ↔ ∀ s ∈ f, h ≤ g s 
goal: h ≤ f.lift g ↔ ∀ s ∈ f, h ≤ g s

full_name: Filter.lift_mono
code: theorem lift_mono (hf : f₁ ≤ f₂) (hg : g₁ ≤ g₂) : f₁.lift g₁ ≤ f₂.lift g₂ 
goal: f₁.lift g₁ ≤ f₂.lift g₂

full_name: Filter.lift_mono'
code: theorem lift_mono' (hg : ∀ s ∈ f, g₁ s ≤ g₂ s) : f.lift g₁ ≤ f.lift g₂ 
goal: f.lift g₁ ≤ f.lift g₂

full_name: Filter.tendsto_lift
code: theorem tendsto_lift {m : γ → β} {l : Filter γ} :
    Tendsto m l (f.lift g) ↔ ∀ s ∈ f, Tendsto m l (g s) 
goal: Filter.Tendsto m l (f.lift g) ↔ ∀ s ∈ f, Filter.Tendsto m l (g s)

full_name: Filter.map_lift_eq
code: theorem map_lift_eq {m : β → γ} (hg : Monotone g) : map m (f.lift g) = f.lift (map m ∘ g) 
goal: Filter.map m (f.lift g) = f.lift (Filter.map m ∘ g)

full_name: Filter.comap_lift_eq
code: theorem comap_lift_eq {m : γ → β} : comap m (f.lift g) = f.lift (comap m ∘ g) 
goal: Filter.comap m (f.lift g) = f.lift (Filter.comap m ∘ g)

full_name: Filter.comap_lift_eq2
code: theorem comap_lift_eq2 {m : β → α} {g : Set β → Filter γ} (hg : Monotone g) :
    (comap m f).lift g = f.lift (g ∘ preimage m) 
goal: (Filter.comap m f).lift g = f.lift (g ∘ Set.preimage m)

full_name: Filter.lift_map_le
code: theorem lift_map_le {g : Set β → Filter γ} {m : α → β} : (map m f).lift g ≤ f.lift (g ∘ image m) 
goal: (Filter.map m f).lift g ≤ f.lift (g ∘ Set.image m)

full_name: Filter.map_lift_eq2
code: theorem map_lift_eq2 {g : Set β → Filter γ} {m : α → β} (hg : Monotone g) :
    (map m f).lift g = f.lift (g ∘ image m) 
goal: (Filter.map m f).lift g = f.lift (g ∘ Set.image m)

full_name: Filter.lift_comm
code: theorem lift_comm {g : Filter β} {h : Set α → Set β → Filter γ} :
    (f.lift fun s => g.lift (h s)) = g.lift fun t => f.lift fun s => h s t 
goal: (f.lift fun s => g.lift (h s)) = g.lift fun t => f.lift fun s => h s t

full_name: Filter.lift_assoc
code: theorem lift_assoc {h : Set β → Filter γ} (hg : Monotone g) :
    (f.lift g).lift h = f.lift fun s => (g s).lift h 
goal: (f.lift g).lift h = f.lift fun s => (g s).lift h

full_name: Filter.lift_lift_same_le_lift
code: theorem lift_lift_same_le_lift {g : Set α → Set α → Filter β} :
    (f.lift fun s => f.lift (g s)) ≤ f.lift fun s => g s s 
goal: (f.lift fun s => f.lift (g s)) ≤ f.lift fun s => g s s

full_name: Filter.lift_lift_same_eq_lift
code: theorem lift_lift_same_eq_lift {g : Set α → Set α → Filter β} (hg₁ : ∀ s, Monotone fun t => g s t)
    (hg₂ : ∀ t, Monotone fun s => g s t) : (f.lift fun s => f.lift (g s)) = f.lift fun s => g s s 
goal: (f.lift fun s => f.lift (g s)) = f.lift fun s => g s s

full_name: Filter.lift_principal
code: theorem lift_principal {s : Set α} (hg : Monotone g) : (𝓟 s).lift g = g s 
goal: (𝓟 s).lift g = g s

full_name: Filter.monotone_lift
code: theorem monotone_lift [Preorder γ] {f : γ → Filter α} {g : γ → Set α → Filter β} (hf : Monotone f)
    (hg : Monotone g) : Monotone fun c => (f c).lift (g c) 
goal: Monotone fun c => (f c).lift (g c)

full_name: Filter.lift_neBot_iff
code: theorem lift_neBot_iff (hm : Monotone g) : (NeBot (f.lift g)) ↔ ∀ s ∈ f, NeBot (g s) 
goal: (f.lift g).NeBot ↔ ∀ s ∈ f, (g s).NeBot

full_name: Filter.lift_const
code: @[simp]
theorem lift_const {f : Filter α} {g : Filter β} : (f.lift fun _ => g) = g 
goal: (f.lift fun x => g) = g

full_name: Filter.lift_inf
code: @[simp]
theorem lift_inf {f : Filter α} {g h : Set α → Filter β} :
    (f.lift fun x => g x ⊓ h x) = f.lift g ⊓ f.lift h 
goal: (f.lift fun x => g x ⊓ h x) = f.lift g ⊓ f.lift h

full_name: Filter.lift_principal2
code: @[simp]
theorem lift_principal2 {f : Filter α} : f.lift 𝓟 = f 
goal: f.lift 𝓟 = f

full_name: Filter.lift_iInf_le
code: theorem lift_iInf_le {f : ι → Filter α} {g : Set α → Filter β} :
    (iInf f).lift g ≤ ⨅ i, (f i).lift g 
goal: (iInf f).lift g ≤ ⨅ i, (f i).lift g

full_name: Filter.lift_iInf
code: theorem lift_iInf [Nonempty ι] {f : ι → Filter α} {g : Set α → Filter β}
    (hg : ∀ s t, g (s ∩ t) = g s ⊓ g t) : (iInf f).lift g = ⨅ i, (f i).lift g 
goal: (iInf f).lift g = ⨅ i, (f i).lift g

full_name: Filter.lift_iInf_of_directed
code: theorem lift_iInf_of_directed [Nonempty ι] {f : ι → Filter α} {g : Set α → Filter β}
    (hf : Directed (· ≥ ·) f) (hg : Monotone g) : (iInf f).lift g = ⨅ i, (f i).lift g 
goal: (iInf f).lift g = ⨅ i, (f i).lift g

full_name: Filter.lift_iInf_of_map_univ
code: theorem lift_iInf_of_map_univ {f : ι → Filter α} {g : Set α → Filter β}
    (hg : ∀ s t, g (s ∩ t) = g s ⊓ g t) (hg' : g univ = ⊤) :
    (iInf f).lift g = ⨅ i, (f i).lift g 
goal: (iInf f).lift g = ⨅ i, (f i).lift g

full_name: Filter.lift'
code: /-- Specialize `lift` to functions `Set α → Set β`. This can be viewed as a generalization of `map`.
This is essentially a push-forward along a function mapping each set to a set. -/
protected def lift' (f : Filter α) (h : Set α → Set β) 
goal: Filter β

full_name: Filter.lift'_top
code: @[simp]
theorem lift'_top (h : Set α → Set β) : (⊤ : Filter α).lift' h = 𝓟 (h univ) 
goal: ⊤.lift' h = 𝓟 (h Set.univ)

full_name: Filter.mem_lift'
code: theorem mem_lift' {t : Set α} (ht : t ∈ f) : h t ∈ f.lift' h 
goal: h t ∈ f.lift' h

full_name: Filter.tendsto_lift'
code: theorem tendsto_lift' {m : γ → β} {l : Filter γ} :
    Tendsto m l (f.lift' h) ↔ ∀ s ∈ f, ∀ᶠ a in l, m a ∈ h s 
goal: Filter.Tendsto m l (f.lift' h) ↔ ∀ s ∈ f, ∀ᶠ (a : γ) in l, m a ∈ h s

full_name: Filter.HasBasis.lift'
code: theorem HasBasis.lift' {ι} {p : ι → Prop} {s} (hf : f.HasBasis p s) (hh : Monotone h) :
    (f.lift' h).HasBasis p (h ∘ s) 
goal: (f.lift' h).HasBasis p (h ∘ s)

full_name: Filter.mem_lift'_sets
code: theorem mem_lift'_sets (hh : Monotone h) {s : Set β} : s ∈ f.lift' h ↔ ∃ t ∈ f, h t ⊆ s 
goal: s ∈ f.lift' h ↔ ∃ t ∈ f, h t ⊆ s

full_name: Filter.eventually_lift'_iff
code: theorem eventually_lift'_iff (hh : Monotone h) {p : β → Prop} :
    (∀ᶠ y in f.lift' h, p y) ↔ ∃ t ∈ f, ∀ y ∈ h t, p y 
goal: (∀ᶠ (y : β) in f.lift' h, p y) ↔ ∃ t ∈ f, ∀ y ∈ h t, p y

full_name: Filter.sInter_lift'_sets
code: theorem sInter_lift'_sets (hh : Monotone h) : ⋂₀ { s | s ∈ f.lift' h } = ⋂ s ∈ f, h s 
goal: ⋂₀ {s | s ∈ f.lift' h} = ⋂ s ∈ f, h s

full_name: Filter.lift'_le
code: theorem lift'_le {f : Filter α} {g : Set α → Set β} {h : Filter β} {s : Set α} (hs : s ∈ f)
    (hg : 𝓟 (g s) ≤ h) : f.lift' g ≤ h 
goal: f.lift' g ≤ h

full_name: Filter.lift'_mono
code: theorem lift'_mono (hf : f₁ ≤ f₂) (hh : h₁ ≤ h₂) : f₁.lift' h₁ ≤ f₂.lift' h₂ 
goal: f₁.lift' h₁ ≤ f₂.lift' h₂

full_name: Filter.lift'_mono'
code: theorem lift'_mono' (hh : ∀ s ∈ f, h₁ s ⊆ h₂ s) : f.lift' h₁ ≤ f.lift' h₂ 
goal: f.lift' h₁ ≤ f.lift' h₂

full_name: Filter.lift'_cong
code: theorem lift'_cong (hh : ∀ s ∈ f, h₁ s = h₂ s) : f.lift' h₁ = f.lift' h₂ 
goal: f.lift' h₁ = f.lift' h₂

full_name: Filter.map_lift'_eq
code: theorem map_lift'_eq {m : β → γ} (hh : Monotone h) : map m (f.lift' h) = f.lift' (image m ∘ h) 
goal: Filter.map m (f.lift' h) = f.lift' (Set.image m ∘ h)

full_name: Filter.lift'_map_le
code: theorem lift'_map_le {g : Set β → Set γ} {m : α → β} : (map m f).lift' g ≤ f.lift' (g ∘ image m) 
goal: (Filter.map m f).lift' g ≤ f.lift' (g ∘ Set.image m)

full_name: Filter.map_lift'_eq2
code: theorem map_lift'_eq2 {g : Set β → Set γ} {m : α → β} (hg : Monotone g) :
    (map m f).lift' g = f.lift' (g ∘ image m) 
goal: (Filter.map m f).lift' g = f.lift' (g ∘ Set.image m)

full_name: Filter.comap_lift'_eq
code: theorem comap_lift'_eq {m : γ → β} : comap m (f.lift' h) = f.lift' (preimage m ∘ h) 
goal: Filter.comap m (f.lift' h) = f.lift' (Set.preimage m ∘ h)

full_name: Filter.comap_lift'_eq2
code: theorem comap_lift'_eq2 {m : β → α} {g : Set β → Set γ} (hg : Monotone g) :
    (comap m f).lift' g = f.lift' (g ∘ preimage m) 
goal: (Filter.comap m f).lift' g = f.lift' (g ∘ Set.preimage m)

full_name: Filter.lift'_principal
code: theorem lift'_principal {s : Set α} (hh : Monotone h) : (𝓟 s).lift' h = 𝓟 (h s) 
goal: (𝓟 s).lift' h = 𝓟 (h s)

full_name: Filter.lift'_pure
code: theorem lift'_pure {a : α} (hh : Monotone h) : (pure a : Filter α).lift' h = 𝓟 (h {a}) 
goal: (pure a).lift' h = 𝓟 (h {a})

full_name: Filter.lift'_bot
code: theorem lift'_bot (hh : Monotone h) : (⊥ : Filter α).lift' h = 𝓟 (h ∅) 
goal: ⊥.lift' h = 𝓟 (h ∅)

full_name: Filter.le_lift'
code: theorem le_lift' {f : Filter α} {h : Set α → Set β} {g : Filter β} :
    g ≤ f.lift' h ↔ ∀ s ∈ f, h s ∈ g 
goal: g ≤ f.lift' h ↔ ∀ s ∈ f, h s ∈ g

full_name: Filter.principal_le_lift'
code: theorem principal_le_lift' {t : Set β} : 𝓟 t ≤ f.lift' h ↔ ∀ s ∈ f, t ⊆ h s 
goal: 𝓟 t ≤ f.lift' h ↔ ∀ s ∈ f, t ⊆ h s

full_name: Filter.monotone_lift'
code: theorem monotone_lift' [Preorder γ] {f : γ → Filter α} {g : γ → Set α → Set β} (hf : Monotone f)
    (hg : Monotone g) : Monotone fun c => (f c).lift' (g c) 
goal: Monotone fun c => (f c).lift' (g c)

full_name: Filter.lift_lift'_assoc
code: theorem lift_lift'_assoc {g : Set α → Set β} {h : Set β → Filter γ} (hg : Monotone g)
    (hh : Monotone h) : (f.lift' g).lift h = f.lift fun s => h (g s) 
goal: (f.lift' g).lift h = f.lift fun s => h (g s)

full_name: Filter.lift'_lift'_assoc
code: theorem lift'_lift'_assoc {g : Set α → Set β} {h : Set β → Set γ} (hg : Monotone g)
    (hh : Monotone h) : (f.lift' g).lift' h = f.lift' fun s => h (g s) 
goal: (f.lift' g).lift' h = f.lift' fun s => h (g s)

full_name: Filter.lift'_lift_assoc
code: theorem lift'_lift_assoc {g : Set α → Filter β} {h : Set β → Set γ} (hg : Monotone g) :
    (f.lift g).lift' h = f.lift fun s => (g s).lift' h 
goal: (f.lift g).lift' h = f.lift fun s => (g s).lift' h

full_name: Filter.lift_lift'_same_le_lift'
code: theorem lift_lift'_same_le_lift' {g : Set α → Set α → Set β} :
    (f.lift fun s => f.lift' (g s)) ≤ f.lift' fun s => g s s 
goal: (f.lift fun s => f.lift' (g s)) ≤ f.lift' fun s => g s s

full_name: Filter.lift_lift'_same_eq_lift'
code: theorem lift_lift'_same_eq_lift' {g : Set α → Set α → Set β} (hg₁ : ∀ s, Monotone fun t => g s t)
    (hg₂ : ∀ t, Monotone fun s => g s t) :
    (f.lift fun s => f.lift' (g s)) = f.lift' fun s => g s s 
goal: (f.lift fun s => f.lift' (g s)) = f.lift' fun s => g s s

full_name: Filter.lift'_inf_principal_eq
code: theorem lift'_inf_principal_eq {h : Set α → Set β} {s : Set β} :
    f.lift' h ⊓ 𝓟 s = f.lift' fun t => h t ∩ s 
goal: f.lift' h ⊓ 𝓟 s = f.lift' fun t => h t ∩ s

full_name: Filter.lift'_neBot_iff
code: theorem lift'_neBot_iff (hh : Monotone h) : NeBot (f.lift' h) ↔ ∀ s ∈ f, (h s).Nonempty 
goal: (f.lift' h).NeBot ↔ ∀ s ∈ f, (h s).Nonempty

full_name: Filter.lift'_id
code: @[simp]
theorem lift'_id {f : Filter α} : f.lift' id = f 
goal: f.lift' id = f

full_name: Filter.lift'_iInf
code: theorem lift'_iInf [Nonempty ι] {f : ι → Filter α} {g : Set α → Set β}
    (hg : ∀ s t, g (s ∩ t) = g s ∩ g t) : (iInf f).lift' g = ⨅ i, (f i).lift' g 
goal: (iInf f).lift' g = ⨅ i, (f i).lift' g

full_name: Filter.lift'_iInf_of_map_univ
code: theorem lift'_iInf_of_map_univ {f : ι → Filter α} {g : Set α → Set β}
    (hg : ∀ {s t}, g (s ∩ t) = g s ∩ g t) (hg' : g univ = univ) :
    (iInf f).lift' g = ⨅ i, (f i).lift' g 
goal: (iInf f).lift' g = ⨅ i, (f i).lift' g

full_name: Filter.lift'_inf
code: theorem lift'_inf (f g : Filter α) {s : Set α → Set β} (hs : ∀ t₁ t₂, s (t₁ ∩ t₂) = s t₁ ∩ s t₂) :
    (f ⊓ g).lift' s = f.lift' s ⊓ g.lift' s 
goal: (f ⊓ g).lift' s = f.lift' s ⊓ g.lift' s

full_name: Filter.lift'_inf_le
code: theorem lift'_inf_le (f g : Filter α) (s : Set α → Set β) :
    (f ⊓ g).lift' s ≤ f.lift' s ⊓ g.lift' s 
goal: (f ⊓ g).lift' s ≤ f.lift' s ⊓ g.lift' s

full_name: Filter.comap_eq_lift'
code: theorem comap_eq_lift' {f : Filter β} {m : α → β} : comap m f = f.lift' (preimage m) 
goal: Filter.comap m f = f.lift' (Set.preimage m)

full_name: Filter.prod_def
code: theorem prod_def {f : Filter α} {g : Filter β} :
    f ×ˢ g = f.lift fun s => g.lift' fun t => s ×ˢ t 
goal: f ×ˢ g = f.lift fun s => g.lift' fun t => s ×ˢ t

full_name: Filter.prod_same_eq
code: theorem prod_same_eq : f ×ˢ f = f.lift' fun t : Set α => t ×ˢ t 
goal: f ×ˢ f = f.lift' fun t => t ×ˢ t

full_name: Filter.tendsto_prod_self_iff
code: theorem tendsto_prod_self_iff {f : α × α → β} {x : Filter α} {y : Filter β} :
    Filter.Tendsto f (x ×ˢ x) y ↔ ∀ W ∈ y, ∃ U ∈ x, ∀ x x' : α, x ∈ U → x' ∈ U → f (x, x') ∈ W 
goal: Filter.Tendsto f (x ×ˢ x) y ↔ ∀ W ∈ y, ∃ U ∈ x, ∀ (x x' : α), x ∈ U → x' ∈ U → f (x, x') ∈ W

full_name: Filter.prod_lift_lift
code: theorem prod_lift_lift {f₁ : Filter α₁} {f₂ : Filter α₂} {g₁ : Set α₁ → Filter β₁}
    {g₂ : Set α₂ → Filter β₂} (hg₁ : Monotone g₁) (hg₂ : Monotone g₂) :
    f₁.lift g₁ ×ˢ f₂.lift g₂ = f₁.lift fun s => f₂.lift fun t => g₁ s ×ˢ g₂ t 
goal: f₁.lift g₁ ×ˢ f₂.lift g₂ = f₁.lift fun s => f₂.lift fun t => g₁ s ×ˢ g₂ t

full_name: Filter.prod_lift'_lift'
code: theorem prod_lift'_lift' {f₁ : Filter α₁} {f₂ : Filter α₂} {g₁ : Set α₁ → Set β₁}
    {g₂ : Set α₂ → Set β₂} (hg₁ : Monotone g₁) (hg₂ : Monotone g₂) :
    f₁.lift' g₁ ×ˢ f₂.lift' g₂ = f₁.lift fun s => f₂.lift' fun t => g₁ s ×ˢ g₂ t 
goal: f₁.lift' g₁ ×ˢ f₂.lift' g₂ = f₁.lift fun s => f₂.lift' fun t => g₁ s ×ˢ g₂ t