Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.55k
proof
stringlengths
5
7.36k
rank
int64
0
2.4k
import Mathlib.Order.ConditionallyCompleteLattice.Basic import Mathlib.Data.Int.LeastGreatest #align_import data.int.conditionally_complete_order from "leanprover-community/mathlib"@"1e05171a5e8cf18d98d9cf7b207540acb044acae" open Int noncomputable section open scoped Classical instance instConditionallyCompleteLinearOrder : ConditionallyCompleteLinearOrder β„€ where __ := instLinearOrder __ := LinearOrder.toLattice sSup s := if h : s.Nonempty ∧ BddAbove s then greatestOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1 else 0 sInf s := if h : s.Nonempty ∧ BddBelow s then leastOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1 else 0 le_csSup s n hs hns := by have : s.Nonempty ∧ BddAbove s := ⟨⟨n, hns⟩, hs⟩ -- Porting note: this was `rw [dif_pos this]` simp only [this, and_self, dite_true, ge_iff_le] exact (greatestOfBdd _ _ _).2.2 n hns csSup_le s n hs hns := by have : s.Nonempty ∧ BddAbove s := ⟨hs, ⟨n, hns⟩⟩ -- Porting note: this was `rw [dif_pos this]` simp only [this, and_self, dite_true, ge_iff_le] exact hns (greatestOfBdd _ (Classical.choose_spec this.2) _).2.1 csInf_le s n hs hns := by have : s.Nonempty ∧ BddBelow s := ⟨⟨n, hns⟩, hs⟩ -- Porting note: this was `rw [dif_pos this]` simp only [this, and_self, dite_true, ge_iff_le] exact (leastOfBdd _ _ _).2.2 n hns le_csInf s n hs hns := by have : s.Nonempty ∧ BddBelow s := ⟨hs, ⟨n, hns⟩⟩ -- Porting note: this was `rw [dif_pos this]` simp only [this, and_self, dite_true, ge_iff_le] exact hns (leastOfBdd _ (Classical.choose_spec this.2) _).2.1 csSup_of_not_bddAbove := fun s hs ↦ by simp [hs] csInf_of_not_bddBelow := fun s hs ↦ by simp [hs] namespace Int -- Porting note: mathlib3 proof uses `convert dif_pos _ using 1` theorem csSup_eq_greatest_of_bdd {s : Set β„€} [DecidablePred (Β· ∈ s)] (b : β„€) (Hb : βˆ€ z ∈ s, z ≀ b) (Hinh : βˆƒ z : β„€, z ∈ s) : sSup s = greatestOfBdd b Hb Hinh := by have : s.Nonempty ∧ BddAbove s := ⟨Hinh, b, Hb⟩ simp only [sSup, this, and_self, dite_true] convert (coe_greatestOfBdd_eq Hb (Classical.choose_spec (⟨b, Hb⟩ : BddAbove s)) Hinh).symm #align int.cSup_eq_greatest_of_bdd Int.csSup_eq_greatest_of_bdd @[simp] theorem csSup_empty : sSup (βˆ… : Set β„€) = 0 := dif_neg (by simp) #align int.cSup_empty Int.csSup_empty theorem csSup_of_not_bdd_above {s : Set β„€} (h : Β¬BddAbove s) : sSup s = 0 := dif_neg (by simp [h]) #align int.cSup_of_not_bdd_above Int.csSup_of_not_bdd_above -- Porting note: mathlib3 proof uses `convert dif_pos _ using 1` theorem csInf_eq_least_of_bdd {s : Set β„€} [DecidablePred (Β· ∈ s)] (b : β„€) (Hb : βˆ€ z ∈ s, b ≀ z) (Hinh : βˆƒ z : β„€, z ∈ s) : sInf s = leastOfBdd b Hb Hinh := by have : s.Nonempty ∧ BddBelow s := ⟨Hinh, b, Hb⟩ simp only [sInf, this, and_self, dite_true] convert (coe_leastOfBdd_eq Hb (Classical.choose_spec (⟨b, Hb⟩ : BddBelow s)) Hinh).symm #align int.cInf_eq_least_of_bdd Int.csInf_eq_least_of_bdd @[simp] theorem csInf_empty : sInf (βˆ… : Set β„€) = 0 := dif_neg (by simp) #align int.cInf_empty Int.csInf_empty theorem csInf_of_not_bdd_below {s : Set β„€} (h : Β¬BddBelow s) : sInf s = 0 := dif_neg (by simp [h]) #align int.cInf_of_not_bdd_below Int.csInf_of_not_bdd_below theorem csSup_mem {s : Set β„€} (h1 : s.Nonempty) (h2 : BddAbove s) : sSup s ∈ s := by convert (greatestOfBdd _ (Classical.choose_spec h2) h1).2.1 exact dif_pos ⟨h1, h2⟩ #align int.cSup_mem Int.csSup_mem
Mathlib/Data/Int/ConditionallyCompleteOrder.lean
99
101
theorem csInf_mem {s : Set β„€} (h1 : s.Nonempty) (h2 : BddBelow s) : sInf s ∈ s := by
convert (leastOfBdd _ (Classical.choose_spec h2) h1).2.1 exact dif_pos ⟨h1, h2⟩
1,104
import Mathlib.Order.Filter.Bases import Mathlib.Order.ConditionallyCompleteLattice.Basic #align_import order.filter.lift from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" open Set Classical Filter Function namespace Filter variable {Ξ± Ξ² Ξ³ : Type*} {ΞΉ : Sort*} section lift protected def lift (f : Filter Ξ±) (g : Set Ξ± β†’ Filter Ξ²) := β¨… s ∈ f, g s #align filter.lift Filter.lift variable {f f₁ fβ‚‚ : Filter Ξ±} {g g₁ gβ‚‚ : Set Ξ± β†’ Filter Ξ²} @[simp]
Mathlib/Order/Filter/Lift.lean
32
32
theorem lift_top (g : Set Ξ± β†’ Filter Ξ²) : (⊀ : Filter Ξ±).lift g = g univ := by
simp [Filter.lift]
1,105
import Mathlib.Order.Filter.Bases import Mathlib.Order.ConditionallyCompleteLattice.Basic #align_import order.filter.lift from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" open Set Classical Filter Function namespace Filter variable {Ξ± Ξ² Ξ³ : Type*} {ΞΉ : Sort*} section lift protected def lift (f : Filter Ξ±) (g : Set Ξ± β†’ Filter Ξ²) := β¨… s ∈ f, g s #align filter.lift Filter.lift variable {f f₁ fβ‚‚ : Filter Ξ±} {g g₁ gβ‚‚ : Set Ξ± β†’ Filter Ξ²} @[simp] theorem lift_top (g : Set Ξ± β†’ Filter Ξ²) : (⊀ : Filter Ξ±).lift g = g univ := by simp [Filter.lift] #align filter.lift_top Filter.lift_top -- Porting note: use `βˆƒ i, p i ∧ _` instead of `βˆƒ i (hi : p i), _`
Mathlib/Order/Filter/Lift.lean
45
53
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 := by
refine (mem_biInf_of_directed ?_ ⟨univ, univ_sets _⟩).trans ?_ Β· intro t₁ ht₁ tβ‚‚ htβ‚‚ exact ⟨t₁ ∩ tβ‚‚, inter_mem ht₁ htβ‚‚, gm inter_subset_left, gm inter_subset_right⟩ Β· simp only [← (hg _).mem_iff] exact hf.exists_iff fun t₁ tβ‚‚ ht H => gm ht H
1,105
import Mathlib.Order.Filter.Bases import Mathlib.Order.ConditionallyCompleteLattice.Basic #align_import order.filter.lift from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" open Set Classical Filter Function namespace Filter variable {Ξ± Ξ² Ξ³ : Type*} {ΞΉ : Sort*} section lift protected def lift (f : Filter Ξ±) (g : Set Ξ± β†’ Filter Ξ²) := β¨… s ∈ f, g s #align filter.lift Filter.lift variable {f f₁ fβ‚‚ : Filter Ξ±} {g g₁ gβ‚‚ : Set Ξ± β†’ Filter Ξ²} @[simp] theorem lift_top (g : Set Ξ± β†’ Filter Ξ²) : (⊀ : Filter Ξ±).lift g = g univ := by simp [Filter.lift] #align filter.lift_top Filter.lift_top -- Porting note: use `βˆƒ i, p i ∧ _` instead of `βˆƒ i (hi : p i), _` 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 := by refine (mem_biInf_of_directed ?_ ⟨univ, univ_sets _⟩).trans ?_ Β· intro t₁ ht₁ tβ‚‚ htβ‚‚ exact ⟨t₁ ∩ tβ‚‚, inter_mem ht₁ htβ‚‚, gm inter_subset_left, gm inter_subset_right⟩ Β· simp only [← (hg _).mem_iff] exact hf.exists_iff fun t₁ tβ‚‚ ht H => gm ht H #align filter.has_basis.mem_lift_iff Filter.HasBasis.mem_lift_iffβ‚“
Mathlib/Order/Filter/Lift.lean
65
70
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 := by
refine ⟨fun t => (hf.mem_lift_iff hg gm).trans ?_⟩ simp [Sigma.exists, and_assoc, exists_and_left]
1,105
import Mathlib.Order.Filter.Bases import Mathlib.Order.ConditionallyCompleteLattice.Basic #align_import order.filter.lift from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" open Set Classical Filter Function namespace Filter variable {Ξ± Ξ² Ξ³ : Type*} {ΞΉ : Sort*} section lift protected def lift (f : Filter Ξ±) (g : Set Ξ± β†’ Filter Ξ²) := β¨… s ∈ f, g s #align filter.lift Filter.lift variable {f f₁ fβ‚‚ : Filter Ξ±} {g g₁ gβ‚‚ : Set Ξ± β†’ Filter Ξ²} @[simp] theorem lift_top (g : Set Ξ± β†’ Filter Ξ²) : (⊀ : Filter Ξ±).lift g = g univ := by simp [Filter.lift] #align filter.lift_top Filter.lift_top -- Porting note: use `βˆƒ i, p i ∧ _` instead of `βˆƒ i (hi : p i), _` 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 := by refine (mem_biInf_of_directed ?_ ⟨univ, univ_sets _⟩).trans ?_ Β· intro t₁ ht₁ tβ‚‚ htβ‚‚ exact ⟨t₁ ∩ tβ‚‚, inter_mem ht₁ htβ‚‚, gm inter_subset_left, gm inter_subset_right⟩ Β· simp only [← (hg _).mem_iff] exact hf.exists_iff fun t₁ tβ‚‚ ht H => gm ht H #align filter.has_basis.mem_lift_iff Filter.HasBasis.mem_lift_iffβ‚“ 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 := by refine ⟨fun t => (hf.mem_lift_iff hg gm).trans ?_⟩ simp [Sigma.exists, and_assoc, exists_and_left] #align filter.has_basis.lift Filter.HasBasis.lift theorem mem_lift_sets (hg : Monotone g) {s : Set Ξ²} : s ∈ f.lift g ↔ βˆƒ t ∈ f, s ∈ g t := (f.basis_sets.mem_lift_iff (fun s => (g s).basis_sets) hg).trans <| by simp only [id, exists_mem_subset_iff] #align filter.mem_lift_sets Filter.mem_lift_sets
Mathlib/Order/Filter/Lift.lean
78
81
theorem sInter_lift_sets (hg : Monotone g) : β‹‚β‚€ { s | s ∈ f.lift g } = β‹‚ s ∈ f, β‹‚β‚€ { t | t ∈ g s } := by
simp only [sInter_eq_biInter, mem_setOf_eq, Filter.mem_sets, mem_lift_sets hg, iInter_exists, iInter_and, @iInter_comm _ (Set Ξ²)]
1,105
import Mathlib.Order.Filter.Bases import Mathlib.Order.ConditionallyCompleteLattice.Basic #align_import order.filter.lift from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" open Set Classical Filter Function namespace Filter variable {Ξ± Ξ² Ξ³ : Type*} {ΞΉ : Sort*} section lift protected def lift (f : Filter Ξ±) (g : Set Ξ± β†’ Filter Ξ²) := β¨… s ∈ f, g s #align filter.lift Filter.lift variable {f f₁ fβ‚‚ : Filter Ξ±} {g g₁ gβ‚‚ : Set Ξ± β†’ Filter Ξ²} @[simp] theorem lift_top (g : Set Ξ± β†’ Filter Ξ²) : (⊀ : Filter Ξ±).lift g = g univ := by simp [Filter.lift] #align filter.lift_top Filter.lift_top -- Porting note: use `βˆƒ i, p i ∧ _` instead of `βˆƒ i (hi : p i), _` 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 := by refine (mem_biInf_of_directed ?_ ⟨univ, univ_sets _⟩).trans ?_ Β· intro t₁ ht₁ tβ‚‚ htβ‚‚ exact ⟨t₁ ∩ tβ‚‚, inter_mem ht₁ htβ‚‚, gm inter_subset_left, gm inter_subset_right⟩ Β· simp only [← (hg _).mem_iff] exact hf.exists_iff fun t₁ tβ‚‚ ht H => gm ht H #align filter.has_basis.mem_lift_iff Filter.HasBasis.mem_lift_iffβ‚“ 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 := by refine ⟨fun t => (hf.mem_lift_iff hg gm).trans ?_⟩ simp [Sigma.exists, and_assoc, exists_and_left] #align filter.has_basis.lift Filter.HasBasis.lift theorem mem_lift_sets (hg : Monotone g) {s : Set Ξ²} : s ∈ f.lift g ↔ βˆƒ t ∈ f, s ∈ g t := (f.basis_sets.mem_lift_iff (fun s => (g s).basis_sets) hg).trans <| by simp only [id, exists_mem_subset_iff] #align filter.mem_lift_sets Filter.mem_lift_sets theorem sInter_lift_sets (hg : Monotone g) : β‹‚β‚€ { s | s ∈ f.lift g } = β‹‚ s ∈ f, β‹‚β‚€ { t | t ∈ g s } := by simp only [sInter_eq_biInter, mem_setOf_eq, Filter.mem_sets, mem_lift_sets hg, iInter_exists, iInter_and, @iInter_comm _ (Set Ξ²)] #align filter.sInter_lift_sets Filter.sInter_lift_sets theorem mem_lift {s : Set Ξ²} {t : Set Ξ±} (ht : t ∈ f) (hs : s ∈ g t) : s ∈ f.lift g := le_principal_iff.mp <| show f.lift g ≀ π“Ÿ s from iInf_le_of_le t <| iInf_le_of_le ht <| le_principal_iff.mpr hs #align filter.mem_lift Filter.mem_lift theorem lift_le {f : Filter Ξ±} {g : Set Ξ± β†’ Filter Ξ²} {h : Filter Ξ²} {s : Set Ξ±} (hs : s ∈ f) (hg : g s ≀ h) : f.lift g ≀ h := iInfβ‚‚_le_of_le s hs hg #align filter.lift_le Filter.lift_le theorem le_lift {f : Filter Ξ±} {g : Set Ξ± β†’ Filter Ξ²} {h : Filter Ξ²} : h ≀ f.lift g ↔ βˆ€ s ∈ f, h ≀ g s := le_iInfβ‚‚_iff #align filter.le_lift Filter.le_lift theorem lift_mono (hf : f₁ ≀ fβ‚‚) (hg : g₁ ≀ gβ‚‚) : f₁.lift g₁ ≀ fβ‚‚.lift gβ‚‚ := iInf_mono fun s => iInf_mono' fun hs => ⟨hf hs, hg s⟩ #align filter.lift_mono Filter.lift_mono theorem lift_mono' (hg : βˆ€ s ∈ f, g₁ s ≀ gβ‚‚ s) : f.lift g₁ ≀ f.lift gβ‚‚ := iInfβ‚‚_mono hg #align filter.lift_mono' Filter.lift_mono'
Mathlib/Order/Filter/Lift.lean
106
108
theorem tendsto_lift {m : Ξ³ β†’ Ξ²} {l : Filter Ξ³} : Tendsto m l (f.lift g) ↔ βˆ€ s ∈ f, Tendsto m l (g s) := by
simp only [Filter.lift, tendsto_iInf]
1,105
import Mathlib.Order.Filter.Bases import Mathlib.Order.ConditionallyCompleteLattice.Basic #align_import order.filter.lift from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" open Set Classical Filter Function namespace Filter variable {Ξ± Ξ² Ξ³ : Type*} {ΞΉ : Sort*} section lift protected def lift (f : Filter Ξ±) (g : Set Ξ± β†’ Filter Ξ²) := β¨… s ∈ f, g s #align filter.lift Filter.lift variable {f f₁ fβ‚‚ : Filter Ξ±} {g g₁ gβ‚‚ : Set Ξ± β†’ Filter Ξ²} @[simp] theorem lift_top (g : Set Ξ± β†’ Filter Ξ²) : (⊀ : Filter Ξ±).lift g = g univ := by simp [Filter.lift] #align filter.lift_top Filter.lift_top -- Porting note: use `βˆƒ i, p i ∧ _` instead of `βˆƒ i (hi : p i), _` 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 := by refine (mem_biInf_of_directed ?_ ⟨univ, univ_sets _⟩).trans ?_ Β· intro t₁ ht₁ tβ‚‚ htβ‚‚ exact ⟨t₁ ∩ tβ‚‚, inter_mem ht₁ htβ‚‚, gm inter_subset_left, gm inter_subset_right⟩ Β· simp only [← (hg _).mem_iff] exact hf.exists_iff fun t₁ tβ‚‚ ht H => gm ht H #align filter.has_basis.mem_lift_iff Filter.HasBasis.mem_lift_iffβ‚“ 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 := by refine ⟨fun t => (hf.mem_lift_iff hg gm).trans ?_⟩ simp [Sigma.exists, and_assoc, exists_and_left] #align filter.has_basis.lift Filter.HasBasis.lift theorem mem_lift_sets (hg : Monotone g) {s : Set Ξ²} : s ∈ f.lift g ↔ βˆƒ t ∈ f, s ∈ g t := (f.basis_sets.mem_lift_iff (fun s => (g s).basis_sets) hg).trans <| by simp only [id, exists_mem_subset_iff] #align filter.mem_lift_sets Filter.mem_lift_sets theorem sInter_lift_sets (hg : Monotone g) : β‹‚β‚€ { s | s ∈ f.lift g } = β‹‚ s ∈ f, β‹‚β‚€ { t | t ∈ g s } := by simp only [sInter_eq_biInter, mem_setOf_eq, Filter.mem_sets, mem_lift_sets hg, iInter_exists, iInter_and, @iInter_comm _ (Set Ξ²)] #align filter.sInter_lift_sets Filter.sInter_lift_sets theorem mem_lift {s : Set Ξ²} {t : Set Ξ±} (ht : t ∈ f) (hs : s ∈ g t) : s ∈ f.lift g := le_principal_iff.mp <| show f.lift g ≀ π“Ÿ s from iInf_le_of_le t <| iInf_le_of_le ht <| le_principal_iff.mpr hs #align filter.mem_lift Filter.mem_lift theorem lift_le {f : Filter Ξ±} {g : Set Ξ± β†’ Filter Ξ²} {h : Filter Ξ²} {s : Set Ξ±} (hs : s ∈ f) (hg : g s ≀ h) : f.lift g ≀ h := iInfβ‚‚_le_of_le s hs hg #align filter.lift_le Filter.lift_le theorem le_lift {f : Filter Ξ±} {g : Set Ξ± β†’ Filter Ξ²} {h : Filter Ξ²} : h ≀ f.lift g ↔ βˆ€ s ∈ f, h ≀ g s := le_iInfβ‚‚_iff #align filter.le_lift Filter.le_lift theorem lift_mono (hf : f₁ ≀ fβ‚‚) (hg : g₁ ≀ gβ‚‚) : f₁.lift g₁ ≀ fβ‚‚.lift gβ‚‚ := iInf_mono fun s => iInf_mono' fun hs => ⟨hf hs, hg s⟩ #align filter.lift_mono Filter.lift_mono theorem lift_mono' (hg : βˆ€ s ∈ f, g₁ s ≀ gβ‚‚ s) : f.lift g₁ ≀ f.lift gβ‚‚ := iInfβ‚‚_mono hg #align filter.lift_mono' Filter.lift_mono' theorem tendsto_lift {m : Ξ³ β†’ Ξ²} {l : Filter Ξ³} : Tendsto m l (f.lift g) ↔ βˆ€ s ∈ f, Tendsto m l (g s) := by simp only [Filter.lift, tendsto_iInf] #align filter.tendsto_lift Filter.tendsto_lift theorem map_lift_eq {m : Ξ² β†’ Ξ³} (hg : Monotone g) : map m (f.lift g) = f.lift (map m ∘ g) := have : Monotone (map m ∘ g) := map_mono.comp hg Filter.ext fun s => by simp only [mem_lift_sets hg, mem_lift_sets this, exists_prop, mem_map, Function.comp_apply] #align filter.map_lift_eq Filter.map_lift_eq
Mathlib/Order/Filter/Lift.lean
117
118
theorem comap_lift_eq {m : Ξ³ β†’ Ξ²} : comap m (f.lift g) = f.lift (comap m ∘ g) := by
simp only [Filter.lift, comap_iInf]; rfl
1,105
import Mathlib.Order.Filter.Lift import Mathlib.Topology.Separation import Mathlib.Order.Interval.Set.Monotone #align_import topology.filter from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Set Filter TopologicalSpace open Filter Topology variable {ΞΉ : Sort*} {Ξ± Ξ² X Y : Type*} namespace Filter instance : TopologicalSpace (Filter Ξ±) := generateFrom <| range <| Iic ∘ π“Ÿ theorem isOpen_Iic_principal {s : Set Ξ±} : IsOpen (Iic (π“Ÿ s)) := GenerateOpen.basic _ (mem_range_self _) #align filter.is_open_Iic_principal Filter.isOpen_Iic_principal
Mathlib/Topology/Filter.lean
55
56
theorem isOpen_setOf_mem {s : Set α} : IsOpen { l : Filter α | s ∈ l } := by
simpa only [Iic_principal] using isOpen_Iic_principal
1,106
import Mathlib.Order.Filter.Lift import Mathlib.Topology.Separation import Mathlib.Order.Interval.Set.Monotone #align_import topology.filter from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Set Filter TopologicalSpace open Filter Topology variable {ΞΉ : Sort*} {Ξ± Ξ² X Y : Type*} namespace Filter instance : TopologicalSpace (Filter Ξ±) := generateFrom <| range <| Iic ∘ π“Ÿ theorem isOpen_Iic_principal {s : Set Ξ±} : IsOpen (Iic (π“Ÿ s)) := GenerateOpen.basic _ (mem_range_self _) #align filter.is_open_Iic_principal Filter.isOpen_Iic_principal theorem isOpen_setOf_mem {s : Set Ξ±} : IsOpen { l : Filter Ξ± | s ∈ l } := by simpa only [Iic_principal] using isOpen_Iic_principal #align filter.is_open_set_of_mem Filter.isOpen_setOf_mem
Mathlib/Topology/Filter.lean
59
66
theorem isTopologicalBasis_Iic_principal : IsTopologicalBasis (range (Iic ∘ π“Ÿ : Set Ξ± β†’ Set (Filter Ξ±))) := { exists_subset_inter := by
rintro _ ⟨s, rfl⟩ _ ⟨t, rfl⟩ l hl exact ⟨Iic (π“Ÿ s) ∩ Iic (π“Ÿ t), ⟨s ∩ t, by simp⟩, hl, Subset.rfl⟩ sUnion_eq := sUnion_eq_univ_iff.2 fun l => ⟨Iic ⊀, ⟨univ, congr_arg Iic principal_univ⟩, mem_Iic.2 le_top⟩ eq_generateFrom := rfl }
1,106
import Mathlib.Order.Filter.Lift import Mathlib.Topology.Separation import Mathlib.Order.Interval.Set.Monotone #align_import topology.filter from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Set Filter TopologicalSpace open Filter Topology variable {ΞΉ : Sort*} {Ξ± Ξ² X Y : Type*} namespace Filter instance : TopologicalSpace (Filter Ξ±) := generateFrom <| range <| Iic ∘ π“Ÿ theorem isOpen_Iic_principal {s : Set Ξ±} : IsOpen (Iic (π“Ÿ s)) := GenerateOpen.basic _ (mem_range_self _) #align filter.is_open_Iic_principal Filter.isOpen_Iic_principal theorem isOpen_setOf_mem {s : Set Ξ±} : IsOpen { l : Filter Ξ± | s ∈ l } := by simpa only [Iic_principal] using isOpen_Iic_principal #align filter.is_open_set_of_mem Filter.isOpen_setOf_mem theorem isTopologicalBasis_Iic_principal : IsTopologicalBasis (range (Iic ∘ π“Ÿ : Set Ξ± β†’ Set (Filter Ξ±))) := { exists_subset_inter := by rintro _ ⟨s, rfl⟩ _ ⟨t, rfl⟩ l hl exact ⟨Iic (π“Ÿ s) ∩ Iic (π“Ÿ t), ⟨s ∩ t, by simp⟩, hl, Subset.rfl⟩ sUnion_eq := sUnion_eq_univ_iff.2 fun l => ⟨Iic ⊀, ⟨univ, congr_arg Iic principal_univ⟩, mem_Iic.2 le_top⟩ eq_generateFrom := rfl } #align filter.is_topological_basis_Iic_principal Filter.isTopologicalBasis_Iic_principal theorem isOpen_iff {s : Set (Filter Ξ±)} : IsOpen s ↔ βˆƒ T : Set (Set Ξ±), s = ⋃ t ∈ T, Iic (π“Ÿ t) := isTopologicalBasis_Iic_principal.open_iff_eq_sUnion.trans <| by simp only [exists_subset_range_and_iff, sUnion_image, (Β· ∘ Β·)] #align filter.is_open_iff Filter.isOpen_iff theorem nhds_eq (l : Filter Ξ±) : 𝓝 l = l.lift' (Iic ∘ π“Ÿ) := nhds_generateFrom.trans <| by simp only [mem_setOf_eq, @and_comm (l ∈ _), iInf_and, iInf_range, Filter.lift', Filter.lift, (Β· ∘ Β·), mem_Iic, le_principal_iff] #align filter.nhds_eq Filter.nhds_eq theorem nhds_eq' (l : Filter Ξ±) : 𝓝 l = l.lift' fun s => { l' | s ∈ l' } := by simpa only [(Β· ∘ Β·), Iic_principal] using nhds_eq l #align filter.nhds_eq' Filter.nhds_eq' protected theorem tendsto_nhds {la : Filter Ξ±} {lb : Filter Ξ²} {f : Ξ± β†’ Filter Ξ²} : Tendsto f la (𝓝 lb) ↔ βˆ€ s ∈ lb, βˆ€αΆ  a in la, s ∈ f a := by simp only [nhds_eq', tendsto_lift', mem_setOf_eq] #align filter.tendsto_nhds Filter.tendsto_nhds protected theorem HasBasis.nhds {l : Filter Ξ±} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Ξ±} (h : HasBasis l p s) : HasBasis (𝓝 l) p fun i => Iic (π“Ÿ (s i)) := by rw [nhds_eq] exact h.lift' monotone_principal.Iic #align filter.has_basis.nhds Filter.HasBasis.nhds protected theorem tendsto_pure_self (l : Filter X) : Tendsto (pure : X β†’ Filter X) l (𝓝 l) := by rw [Filter.tendsto_nhds] exact fun s hs ↦ Eventually.mono hs fun x ↦ id instance {l : Filter Ξ±} [IsCountablyGenerated l] : IsCountablyGenerated (𝓝 l) := let ⟨_b, hb⟩ := l.exists_antitone_basis HasCountableBasis.isCountablyGenerated <| ⟨hb.nhds, Set.to_countable _⟩
Mathlib/Topology/Filter.lean
105
106
theorem HasBasis.nhds' {l : Filter Ξ±} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Ξ±} (h : HasBasis l p s) : HasBasis (𝓝 l) p fun i => { l' | s i ∈ l' } := by
simpa only [Iic_principal] using h.nhds
1,106
import Mathlib.Order.Filter.Lift import Mathlib.Topology.Separation import Mathlib.Order.Interval.Set.Monotone #align_import topology.filter from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Set Filter TopologicalSpace open Filter Topology variable {ΞΉ : Sort*} {Ξ± Ξ² X Y : Type*} namespace Filter instance : TopologicalSpace (Filter Ξ±) := generateFrom <| range <| Iic ∘ π“Ÿ theorem isOpen_Iic_principal {s : Set Ξ±} : IsOpen (Iic (π“Ÿ s)) := GenerateOpen.basic _ (mem_range_self _) #align filter.is_open_Iic_principal Filter.isOpen_Iic_principal theorem isOpen_setOf_mem {s : Set Ξ±} : IsOpen { l : Filter Ξ± | s ∈ l } := by simpa only [Iic_principal] using isOpen_Iic_principal #align filter.is_open_set_of_mem Filter.isOpen_setOf_mem theorem isTopologicalBasis_Iic_principal : IsTopologicalBasis (range (Iic ∘ π“Ÿ : Set Ξ± β†’ Set (Filter Ξ±))) := { exists_subset_inter := by rintro _ ⟨s, rfl⟩ _ ⟨t, rfl⟩ l hl exact ⟨Iic (π“Ÿ s) ∩ Iic (π“Ÿ t), ⟨s ∩ t, by simp⟩, hl, Subset.rfl⟩ sUnion_eq := sUnion_eq_univ_iff.2 fun l => ⟨Iic ⊀, ⟨univ, congr_arg Iic principal_univ⟩, mem_Iic.2 le_top⟩ eq_generateFrom := rfl } #align filter.is_topological_basis_Iic_principal Filter.isTopologicalBasis_Iic_principal theorem isOpen_iff {s : Set (Filter Ξ±)} : IsOpen s ↔ βˆƒ T : Set (Set Ξ±), s = ⋃ t ∈ T, Iic (π“Ÿ t) := isTopologicalBasis_Iic_principal.open_iff_eq_sUnion.trans <| by simp only [exists_subset_range_and_iff, sUnion_image, (Β· ∘ Β·)] #align filter.is_open_iff Filter.isOpen_iff theorem nhds_eq (l : Filter Ξ±) : 𝓝 l = l.lift' (Iic ∘ π“Ÿ) := nhds_generateFrom.trans <| by simp only [mem_setOf_eq, @and_comm (l ∈ _), iInf_and, iInf_range, Filter.lift', Filter.lift, (Β· ∘ Β·), mem_Iic, le_principal_iff] #align filter.nhds_eq Filter.nhds_eq theorem nhds_eq' (l : Filter Ξ±) : 𝓝 l = l.lift' fun s => { l' | s ∈ l' } := by simpa only [(Β· ∘ Β·), Iic_principal] using nhds_eq l #align filter.nhds_eq' Filter.nhds_eq' protected theorem tendsto_nhds {la : Filter Ξ±} {lb : Filter Ξ²} {f : Ξ± β†’ Filter Ξ²} : Tendsto f la (𝓝 lb) ↔ βˆ€ s ∈ lb, βˆ€αΆ  a in la, s ∈ f a := by simp only [nhds_eq', tendsto_lift', mem_setOf_eq] #align filter.tendsto_nhds Filter.tendsto_nhds protected theorem HasBasis.nhds {l : Filter Ξ±} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Ξ±} (h : HasBasis l p s) : HasBasis (𝓝 l) p fun i => Iic (π“Ÿ (s i)) := by rw [nhds_eq] exact h.lift' monotone_principal.Iic #align filter.has_basis.nhds Filter.HasBasis.nhds protected theorem tendsto_pure_self (l : Filter X) : Tendsto (pure : X β†’ Filter X) l (𝓝 l) := by rw [Filter.tendsto_nhds] exact fun s hs ↦ Eventually.mono hs fun x ↦ id instance {l : Filter Ξ±} [IsCountablyGenerated l] : IsCountablyGenerated (𝓝 l) := let ⟨_b, hb⟩ := l.exists_antitone_basis HasCountableBasis.isCountablyGenerated <| ⟨hb.nhds, Set.to_countable _⟩ theorem HasBasis.nhds' {l : Filter Ξ±} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Ξ±} (h : HasBasis l p s) : HasBasis (𝓝 l) p fun i => { l' | s i ∈ l' } := by simpa only [Iic_principal] using h.nhds #align filter.has_basis.nhds' Filter.HasBasis.nhds' protected theorem mem_nhds_iff {l : Filter Ξ±} {S : Set (Filter Ξ±)} : S ∈ 𝓝 l ↔ βˆƒ t ∈ l, Iic (π“Ÿ t) βŠ† S := l.basis_sets.nhds.mem_iff #align filter.mem_nhds_iff Filter.mem_nhds_iff theorem mem_nhds_iff' {l : Filter Ξ±} {S : Set (Filter Ξ±)} : S ∈ 𝓝 l ↔ βˆƒ t ∈ l, βˆ€ ⦃l' : Filter α⦄, t ∈ l' β†’ l' ∈ S := l.basis_sets.nhds'.mem_iff #align filter.mem_nhds_iff' Filter.mem_nhds_iff' @[simp] theorem nhds_bot : 𝓝 (βŠ₯ : Filter Ξ±) = pure βŠ₯ := by simp [nhds_eq, (Β· ∘ Β·), lift'_bot monotone_principal.Iic] #align filter.nhds_bot Filter.nhds_bot @[simp]
Mathlib/Topology/Filter.lean
125
125
theorem nhds_top : 𝓝 (⊀ : Filter Ξ±) = ⊀ := by
simp [nhds_eq]
1,106
import Mathlib.Order.Filter.Lift import Mathlib.Topology.Separation import Mathlib.Order.Interval.Set.Monotone #align_import topology.filter from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Set Filter TopologicalSpace open Filter Topology variable {ΞΉ : Sort*} {Ξ± Ξ² X Y : Type*} namespace Filter instance : TopologicalSpace (Filter Ξ±) := generateFrom <| range <| Iic ∘ π“Ÿ theorem isOpen_Iic_principal {s : Set Ξ±} : IsOpen (Iic (π“Ÿ s)) := GenerateOpen.basic _ (mem_range_self _) #align filter.is_open_Iic_principal Filter.isOpen_Iic_principal theorem isOpen_setOf_mem {s : Set Ξ±} : IsOpen { l : Filter Ξ± | s ∈ l } := by simpa only [Iic_principal] using isOpen_Iic_principal #align filter.is_open_set_of_mem Filter.isOpen_setOf_mem theorem isTopologicalBasis_Iic_principal : IsTopologicalBasis (range (Iic ∘ π“Ÿ : Set Ξ± β†’ Set (Filter Ξ±))) := { exists_subset_inter := by rintro _ ⟨s, rfl⟩ _ ⟨t, rfl⟩ l hl exact ⟨Iic (π“Ÿ s) ∩ Iic (π“Ÿ t), ⟨s ∩ t, by simp⟩, hl, Subset.rfl⟩ sUnion_eq := sUnion_eq_univ_iff.2 fun l => ⟨Iic ⊀, ⟨univ, congr_arg Iic principal_univ⟩, mem_Iic.2 le_top⟩ eq_generateFrom := rfl } #align filter.is_topological_basis_Iic_principal Filter.isTopologicalBasis_Iic_principal theorem isOpen_iff {s : Set (Filter Ξ±)} : IsOpen s ↔ βˆƒ T : Set (Set Ξ±), s = ⋃ t ∈ T, Iic (π“Ÿ t) := isTopologicalBasis_Iic_principal.open_iff_eq_sUnion.trans <| by simp only [exists_subset_range_and_iff, sUnion_image, (Β· ∘ Β·)] #align filter.is_open_iff Filter.isOpen_iff theorem nhds_eq (l : Filter Ξ±) : 𝓝 l = l.lift' (Iic ∘ π“Ÿ) := nhds_generateFrom.trans <| by simp only [mem_setOf_eq, @and_comm (l ∈ _), iInf_and, iInf_range, Filter.lift', Filter.lift, (Β· ∘ Β·), mem_Iic, le_principal_iff] #align filter.nhds_eq Filter.nhds_eq theorem nhds_eq' (l : Filter Ξ±) : 𝓝 l = l.lift' fun s => { l' | s ∈ l' } := by simpa only [(Β· ∘ Β·), Iic_principal] using nhds_eq l #align filter.nhds_eq' Filter.nhds_eq' protected theorem tendsto_nhds {la : Filter Ξ±} {lb : Filter Ξ²} {f : Ξ± β†’ Filter Ξ²} : Tendsto f la (𝓝 lb) ↔ βˆ€ s ∈ lb, βˆ€αΆ  a in la, s ∈ f a := by simp only [nhds_eq', tendsto_lift', mem_setOf_eq] #align filter.tendsto_nhds Filter.tendsto_nhds protected theorem HasBasis.nhds {l : Filter Ξ±} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Ξ±} (h : HasBasis l p s) : HasBasis (𝓝 l) p fun i => Iic (π“Ÿ (s i)) := by rw [nhds_eq] exact h.lift' monotone_principal.Iic #align filter.has_basis.nhds Filter.HasBasis.nhds protected theorem tendsto_pure_self (l : Filter X) : Tendsto (pure : X β†’ Filter X) l (𝓝 l) := by rw [Filter.tendsto_nhds] exact fun s hs ↦ Eventually.mono hs fun x ↦ id instance {l : Filter Ξ±} [IsCountablyGenerated l] : IsCountablyGenerated (𝓝 l) := let ⟨_b, hb⟩ := l.exists_antitone_basis HasCountableBasis.isCountablyGenerated <| ⟨hb.nhds, Set.to_countable _⟩ theorem HasBasis.nhds' {l : Filter Ξ±} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Ξ±} (h : HasBasis l p s) : HasBasis (𝓝 l) p fun i => { l' | s i ∈ l' } := by simpa only [Iic_principal] using h.nhds #align filter.has_basis.nhds' Filter.HasBasis.nhds' protected theorem mem_nhds_iff {l : Filter Ξ±} {S : Set (Filter Ξ±)} : S ∈ 𝓝 l ↔ βˆƒ t ∈ l, Iic (π“Ÿ t) βŠ† S := l.basis_sets.nhds.mem_iff #align filter.mem_nhds_iff Filter.mem_nhds_iff theorem mem_nhds_iff' {l : Filter Ξ±} {S : Set (Filter Ξ±)} : S ∈ 𝓝 l ↔ βˆƒ t ∈ l, βˆ€ ⦃l' : Filter α⦄, t ∈ l' β†’ l' ∈ S := l.basis_sets.nhds'.mem_iff #align filter.mem_nhds_iff' Filter.mem_nhds_iff' @[simp] theorem nhds_bot : 𝓝 (βŠ₯ : Filter Ξ±) = pure βŠ₯ := by simp [nhds_eq, (Β· ∘ Β·), lift'_bot monotone_principal.Iic] #align filter.nhds_bot Filter.nhds_bot @[simp] theorem nhds_top : 𝓝 (⊀ : Filter Ξ±) = ⊀ := by simp [nhds_eq] #align filter.nhds_top Filter.nhds_top @[simp] theorem nhds_principal (s : Set Ξ±) : 𝓝 (π“Ÿ s) = π“Ÿ (Iic (π“Ÿ s)) := (hasBasis_principal s).nhds.eq_of_same_basis (hasBasis_principal _) #align filter.nhds_principal Filter.nhds_principal @[simp]
Mathlib/Topology/Filter.lean
134
135
theorem nhds_pure (x : Ξ±) : 𝓝 (pure x : Filter Ξ±) = π“Ÿ {βŠ₯, pure x} := by
rw [← principal_singleton, nhds_principal, principal_singleton, Iic_pure]
1,106
import Mathlib.Order.Filter.Lift import Mathlib.Topology.Separation import Mathlib.Order.Interval.Set.Monotone #align_import topology.filter from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Set Filter TopologicalSpace open Filter Topology variable {ΞΉ : Sort*} {Ξ± Ξ² X Y : Type*} namespace Filter instance : TopologicalSpace (Filter Ξ±) := generateFrom <| range <| Iic ∘ π“Ÿ theorem isOpen_Iic_principal {s : Set Ξ±} : IsOpen (Iic (π“Ÿ s)) := GenerateOpen.basic _ (mem_range_self _) #align filter.is_open_Iic_principal Filter.isOpen_Iic_principal theorem isOpen_setOf_mem {s : Set Ξ±} : IsOpen { l : Filter Ξ± | s ∈ l } := by simpa only [Iic_principal] using isOpen_Iic_principal #align filter.is_open_set_of_mem Filter.isOpen_setOf_mem theorem isTopologicalBasis_Iic_principal : IsTopologicalBasis (range (Iic ∘ π“Ÿ : Set Ξ± β†’ Set (Filter Ξ±))) := { exists_subset_inter := by rintro _ ⟨s, rfl⟩ _ ⟨t, rfl⟩ l hl exact ⟨Iic (π“Ÿ s) ∩ Iic (π“Ÿ t), ⟨s ∩ t, by simp⟩, hl, Subset.rfl⟩ sUnion_eq := sUnion_eq_univ_iff.2 fun l => ⟨Iic ⊀, ⟨univ, congr_arg Iic principal_univ⟩, mem_Iic.2 le_top⟩ eq_generateFrom := rfl } #align filter.is_topological_basis_Iic_principal Filter.isTopologicalBasis_Iic_principal theorem isOpen_iff {s : Set (Filter Ξ±)} : IsOpen s ↔ βˆƒ T : Set (Set Ξ±), s = ⋃ t ∈ T, Iic (π“Ÿ t) := isTopologicalBasis_Iic_principal.open_iff_eq_sUnion.trans <| by simp only [exists_subset_range_and_iff, sUnion_image, (Β· ∘ Β·)] #align filter.is_open_iff Filter.isOpen_iff theorem nhds_eq (l : Filter Ξ±) : 𝓝 l = l.lift' (Iic ∘ π“Ÿ) := nhds_generateFrom.trans <| by simp only [mem_setOf_eq, @and_comm (l ∈ _), iInf_and, iInf_range, Filter.lift', Filter.lift, (Β· ∘ Β·), mem_Iic, le_principal_iff] #align filter.nhds_eq Filter.nhds_eq theorem nhds_eq' (l : Filter Ξ±) : 𝓝 l = l.lift' fun s => { l' | s ∈ l' } := by simpa only [(Β· ∘ Β·), Iic_principal] using nhds_eq l #align filter.nhds_eq' Filter.nhds_eq' protected theorem tendsto_nhds {la : Filter Ξ±} {lb : Filter Ξ²} {f : Ξ± β†’ Filter Ξ²} : Tendsto f la (𝓝 lb) ↔ βˆ€ s ∈ lb, βˆ€αΆ  a in la, s ∈ f a := by simp only [nhds_eq', tendsto_lift', mem_setOf_eq] #align filter.tendsto_nhds Filter.tendsto_nhds protected theorem HasBasis.nhds {l : Filter Ξ±} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Ξ±} (h : HasBasis l p s) : HasBasis (𝓝 l) p fun i => Iic (π“Ÿ (s i)) := by rw [nhds_eq] exact h.lift' monotone_principal.Iic #align filter.has_basis.nhds Filter.HasBasis.nhds protected theorem tendsto_pure_self (l : Filter X) : Tendsto (pure : X β†’ Filter X) l (𝓝 l) := by rw [Filter.tendsto_nhds] exact fun s hs ↦ Eventually.mono hs fun x ↦ id instance {l : Filter Ξ±} [IsCountablyGenerated l] : IsCountablyGenerated (𝓝 l) := let ⟨_b, hb⟩ := l.exists_antitone_basis HasCountableBasis.isCountablyGenerated <| ⟨hb.nhds, Set.to_countable _⟩ theorem HasBasis.nhds' {l : Filter Ξ±} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Ξ±} (h : HasBasis l p s) : HasBasis (𝓝 l) p fun i => { l' | s i ∈ l' } := by simpa only [Iic_principal] using h.nhds #align filter.has_basis.nhds' Filter.HasBasis.nhds' protected theorem mem_nhds_iff {l : Filter Ξ±} {S : Set (Filter Ξ±)} : S ∈ 𝓝 l ↔ βˆƒ t ∈ l, Iic (π“Ÿ t) βŠ† S := l.basis_sets.nhds.mem_iff #align filter.mem_nhds_iff Filter.mem_nhds_iff theorem mem_nhds_iff' {l : Filter Ξ±} {S : Set (Filter Ξ±)} : S ∈ 𝓝 l ↔ βˆƒ t ∈ l, βˆ€ ⦃l' : Filter α⦄, t ∈ l' β†’ l' ∈ S := l.basis_sets.nhds'.mem_iff #align filter.mem_nhds_iff' Filter.mem_nhds_iff' @[simp] theorem nhds_bot : 𝓝 (βŠ₯ : Filter Ξ±) = pure βŠ₯ := by simp [nhds_eq, (Β· ∘ Β·), lift'_bot monotone_principal.Iic] #align filter.nhds_bot Filter.nhds_bot @[simp] theorem nhds_top : 𝓝 (⊀ : Filter Ξ±) = ⊀ := by simp [nhds_eq] #align filter.nhds_top Filter.nhds_top @[simp] theorem nhds_principal (s : Set Ξ±) : 𝓝 (π“Ÿ s) = π“Ÿ (Iic (π“Ÿ s)) := (hasBasis_principal s).nhds.eq_of_same_basis (hasBasis_principal _) #align filter.nhds_principal Filter.nhds_principal @[simp] theorem nhds_pure (x : Ξ±) : 𝓝 (pure x : Filter Ξ±) = π“Ÿ {βŠ₯, pure x} := by rw [← principal_singleton, nhds_principal, principal_singleton, Iic_pure] #align filter.nhds_pure Filter.nhds_pure @[simp]
Mathlib/Topology/Filter.lean
139
141
theorem nhds_iInf (f : ΞΉ β†’ Filter Ξ±) : 𝓝 (β¨… i, f i) = β¨… i, 𝓝 (f i) := by
simp only [nhds_eq] apply lift'_iInf_of_map_univ <;> simp
1,106
import Mathlib.Order.Filter.Lift import Mathlib.Topology.Defs.Filter #align_import topology.basic from "leanprover-community/mathlib"@"e354e865255654389cc46e6032160238df2e0f40" noncomputable section open Set Filter universe u v w x def TopologicalSpace.ofClosed {X : Type u} (T : Set (Set X)) (empty_mem : βˆ… ∈ T) (sInter_mem : βˆ€ A, A βŠ† T β†’ β‹‚β‚€ A ∈ T) (union_mem : βˆ€ A, A ∈ T β†’ βˆ€ B, B ∈ T β†’ A βˆͺ B ∈ T) : TopologicalSpace X where IsOpen X := Xᢜ ∈ T isOpen_univ := by simp [empty_mem] isOpen_inter s t hs ht := by simpa only [compl_inter] using union_mem sᢜ hs tᢜ ht isOpen_sUnion s hs := by simp only [Set.compl_sUnion] exact sInter_mem (compl '' s) fun z ⟨y, hy, hz⟩ => hz β–Έ hs y hy #align topological_space.of_closed TopologicalSpace.ofClosed section TopologicalSpace variable {X : Type u} {Y : Type v} {ΞΉ : Sort w} {Ξ± Ξ² : Type*} {x : X} {s s₁ sβ‚‚ t : Set X} {p p₁ pβ‚‚ : X β†’ Prop} open Topology lemma isOpen_mk {p h₁ hβ‚‚ h₃} : IsOpen[⟨p, h₁, hβ‚‚, hβ‚ƒβŸ©] s ↔ p s := Iff.rfl #align is_open_mk isOpen_mk @[ext] protected theorem TopologicalSpace.ext : βˆ€ {f g : TopologicalSpace X}, IsOpen[f] = IsOpen[g] β†’ f = g | ⟨_, _, _, _⟩, ⟨_, _, _, _⟩, rfl => rfl #align topological_space_eq TopologicalSpace.ext section variable [TopologicalSpace X] end protected theorem TopologicalSpace.ext_iff {t t' : TopologicalSpace X} : t = t' ↔ βˆ€ s, IsOpen[t] s ↔ IsOpen[t'] s := ⟨fun h s => h β–Έ Iff.rfl, fun h => by ext; exact h _⟩ #align topological_space_eq_iff TopologicalSpace.ext_iff theorem isOpen_fold {t : TopologicalSpace X} : t.IsOpen s = IsOpen[t] s := rfl #align is_open_fold isOpen_fold variable [TopologicalSpace X] theorem isOpen_iUnion {f : ΞΉ β†’ Set X} (h : βˆ€ i, IsOpen (f i)) : IsOpen (⋃ i, f i) := isOpen_sUnion (forall_mem_range.2 h) #align is_open_Union isOpen_iUnion theorem isOpen_biUnion {s : Set Ξ±} {f : Ξ± β†’ Set X} (h : βˆ€ i ∈ s, IsOpen (f i)) : IsOpen (⋃ i ∈ s, f i) := isOpen_iUnion fun i => isOpen_iUnion fun hi => h i hi #align is_open_bUnion isOpen_biUnion
Mathlib/Topology/Basic.lean
115
116
theorem IsOpen.union (h₁ : IsOpen s₁) (hβ‚‚ : IsOpen sβ‚‚) : IsOpen (s₁ βˆͺ sβ‚‚) := by
rw [union_eq_iUnion]; exact isOpen_iUnion (Bool.forall_bool.2 ⟨hβ‚‚, hβ‚βŸ©)
1,107
import Mathlib.Order.Filter.Lift import Mathlib.Topology.Defs.Filter #align_import topology.basic from "leanprover-community/mathlib"@"e354e865255654389cc46e6032160238df2e0f40" noncomputable section open Set Filter universe u v w x def TopologicalSpace.ofClosed {X : Type u} (T : Set (Set X)) (empty_mem : βˆ… ∈ T) (sInter_mem : βˆ€ A, A βŠ† T β†’ β‹‚β‚€ A ∈ T) (union_mem : βˆ€ A, A ∈ T β†’ βˆ€ B, B ∈ T β†’ A βˆͺ B ∈ T) : TopologicalSpace X where IsOpen X := Xᢜ ∈ T isOpen_univ := by simp [empty_mem] isOpen_inter s t hs ht := by simpa only [compl_inter] using union_mem sᢜ hs tᢜ ht isOpen_sUnion s hs := by simp only [Set.compl_sUnion] exact sInter_mem (compl '' s) fun z ⟨y, hy, hz⟩ => hz β–Έ hs y hy #align topological_space.of_closed TopologicalSpace.ofClosed section TopologicalSpace variable {X : Type u} {Y : Type v} {ΞΉ : Sort w} {Ξ± Ξ² : Type*} {x : X} {s s₁ sβ‚‚ t : Set X} {p p₁ pβ‚‚ : X β†’ Prop} open Topology lemma isOpen_mk {p h₁ hβ‚‚ h₃} : IsOpen[⟨p, h₁, hβ‚‚, hβ‚ƒβŸ©] s ↔ p s := Iff.rfl #align is_open_mk isOpen_mk @[ext] protected theorem TopologicalSpace.ext : βˆ€ {f g : TopologicalSpace X}, IsOpen[f] = IsOpen[g] β†’ f = g | ⟨_, _, _, _⟩, ⟨_, _, _, _⟩, rfl => rfl #align topological_space_eq TopologicalSpace.ext section variable [TopologicalSpace X] end protected theorem TopologicalSpace.ext_iff {t t' : TopologicalSpace X} : t = t' ↔ βˆ€ s, IsOpen[t] s ↔ IsOpen[t'] s := ⟨fun h s => h β–Έ Iff.rfl, fun h => by ext; exact h _⟩ #align topological_space_eq_iff TopologicalSpace.ext_iff theorem isOpen_fold {t : TopologicalSpace X} : t.IsOpen s = IsOpen[t] s := rfl #align is_open_fold isOpen_fold variable [TopologicalSpace X] theorem isOpen_iUnion {f : ΞΉ β†’ Set X} (h : βˆ€ i, IsOpen (f i)) : IsOpen (⋃ i, f i) := isOpen_sUnion (forall_mem_range.2 h) #align is_open_Union isOpen_iUnion theorem isOpen_biUnion {s : Set Ξ±} {f : Ξ± β†’ Set X} (h : βˆ€ i ∈ s, IsOpen (f i)) : IsOpen (⋃ i ∈ s, f i) := isOpen_iUnion fun i => isOpen_iUnion fun hi => h i hi #align is_open_bUnion isOpen_biUnion theorem IsOpen.union (h₁ : IsOpen s₁) (hβ‚‚ : IsOpen sβ‚‚) : IsOpen (s₁ βˆͺ sβ‚‚) := by rw [union_eq_iUnion]; exact isOpen_iUnion (Bool.forall_bool.2 ⟨hβ‚‚, hβ‚βŸ©) #align is_open.union IsOpen.union lemma isOpen_iff_of_cover {f : Ξ± β†’ Set X} (ho : βˆ€ i, IsOpen (f i)) (hU : (⋃ i, f i) = univ) : IsOpen s ↔ βˆ€ i, IsOpen (f i ∩ s) := by refine ⟨fun h i ↦ (ho i).inter h, fun h ↦ ?_⟩ rw [← s.inter_univ, inter_comm, ← hU, iUnion_inter] exact isOpen_iUnion fun i ↦ h i @[simp] theorem isOpen_empty : IsOpen (βˆ… : Set X) := by rw [← sUnion_empty]; exact isOpen_sUnion fun a => False.elim #align is_open_empty isOpen_empty theorem Set.Finite.isOpen_sInter {s : Set (Set X)} (hs : s.Finite) : (βˆ€ t ∈ s, IsOpen t) β†’ IsOpen (β‹‚β‚€ s) := Finite.induction_on hs (fun _ => by rw [sInter_empty]; exact isOpen_univ) fun _ _ ih h => by simp only [sInter_insert, forall_mem_insert] at h ⊒ exact h.1.inter (ih h.2) #align is_open_sInter Set.Finite.isOpen_sInter theorem Set.Finite.isOpen_biInter {s : Set Ξ±} {f : Ξ± β†’ Set X} (hs : s.Finite) (h : βˆ€ i ∈ s, IsOpen (f i)) : IsOpen (β‹‚ i ∈ s, f i) := sInter_image f s β–Έ (hs.image _).isOpen_sInter (forall_mem_image.2 h) #align is_open_bInter Set.Finite.isOpen_biInter theorem isOpen_iInter_of_finite [Finite ΞΉ] {s : ΞΉ β†’ Set X} (h : βˆ€ i, IsOpen (s i)) : IsOpen (β‹‚ i, s i) := (finite_range _).isOpen_sInter (forall_mem_range.2 h) #align is_open_Inter isOpen_iInter_of_finite theorem isOpen_biInter_finset {s : Finset Ξ±} {f : Ξ± β†’ Set X} (h : βˆ€ i ∈ s, IsOpen (f i)) : IsOpen (β‹‚ i ∈ s, f i) := s.finite_toSet.isOpen_biInter h #align is_open_bInter_finset isOpen_biInter_finset @[simp] -- Porting note: added `simp`
Mathlib/Topology/Basic.lean
153
153
theorem isOpen_const {p : Prop} : IsOpen { _x : X | p } := by
by_cases p <;> simp [*]
1,107
import Mathlib.Order.Filter.Lift import Mathlib.Topology.Defs.Filter #align_import topology.basic from "leanprover-community/mathlib"@"e354e865255654389cc46e6032160238df2e0f40" noncomputable section open Set Filter universe u v w x def TopologicalSpace.ofClosed {X : Type u} (T : Set (Set X)) (empty_mem : βˆ… ∈ T) (sInter_mem : βˆ€ A, A βŠ† T β†’ β‹‚β‚€ A ∈ T) (union_mem : βˆ€ A, A ∈ T β†’ βˆ€ B, B ∈ T β†’ A βˆͺ B ∈ T) : TopologicalSpace X where IsOpen X := Xᢜ ∈ T isOpen_univ := by simp [empty_mem] isOpen_inter s t hs ht := by simpa only [compl_inter] using union_mem sᢜ hs tᢜ ht isOpen_sUnion s hs := by simp only [Set.compl_sUnion] exact sInter_mem (compl '' s) fun z ⟨y, hy, hz⟩ => hz β–Έ hs y hy #align topological_space.of_closed TopologicalSpace.ofClosed section TopologicalSpace variable {X : Type u} {Y : Type v} {ΞΉ : Sort w} {Ξ± Ξ² : Type*} {x : X} {s s₁ sβ‚‚ t : Set X} {p p₁ pβ‚‚ : X β†’ Prop} open Topology lemma isOpen_mk {p h₁ hβ‚‚ h₃} : IsOpen[⟨p, h₁, hβ‚‚, hβ‚ƒβŸ©] s ↔ p s := Iff.rfl #align is_open_mk isOpen_mk @[ext] protected theorem TopologicalSpace.ext : βˆ€ {f g : TopologicalSpace X}, IsOpen[f] = IsOpen[g] β†’ f = g | ⟨_, _, _, _⟩, ⟨_, _, _, _⟩, rfl => rfl #align topological_space_eq TopologicalSpace.ext section variable [TopologicalSpace X] end protected theorem TopologicalSpace.ext_iff {t t' : TopologicalSpace X} : t = t' ↔ βˆ€ s, IsOpen[t] s ↔ IsOpen[t'] s := ⟨fun h s => h β–Έ Iff.rfl, fun h => by ext; exact h _⟩ #align topological_space_eq_iff TopologicalSpace.ext_iff theorem isOpen_fold {t : TopologicalSpace X} : t.IsOpen s = IsOpen[t] s := rfl #align is_open_fold isOpen_fold variable [TopologicalSpace X] theorem isOpen_iUnion {f : ΞΉ β†’ Set X} (h : βˆ€ i, IsOpen (f i)) : IsOpen (⋃ i, f i) := isOpen_sUnion (forall_mem_range.2 h) #align is_open_Union isOpen_iUnion theorem isOpen_biUnion {s : Set Ξ±} {f : Ξ± β†’ Set X} (h : βˆ€ i ∈ s, IsOpen (f i)) : IsOpen (⋃ i ∈ s, f i) := isOpen_iUnion fun i => isOpen_iUnion fun hi => h i hi #align is_open_bUnion isOpen_biUnion theorem IsOpen.union (h₁ : IsOpen s₁) (hβ‚‚ : IsOpen sβ‚‚) : IsOpen (s₁ βˆͺ sβ‚‚) := by rw [union_eq_iUnion]; exact isOpen_iUnion (Bool.forall_bool.2 ⟨hβ‚‚, hβ‚βŸ©) #align is_open.union IsOpen.union lemma isOpen_iff_of_cover {f : Ξ± β†’ Set X} (ho : βˆ€ i, IsOpen (f i)) (hU : (⋃ i, f i) = univ) : IsOpen s ↔ βˆ€ i, IsOpen (f i ∩ s) := by refine ⟨fun h i ↦ (ho i).inter h, fun h ↦ ?_⟩ rw [← s.inter_univ, inter_comm, ← hU, iUnion_inter] exact isOpen_iUnion fun i ↦ h i @[simp] theorem isOpen_empty : IsOpen (βˆ… : Set X) := by rw [← sUnion_empty]; exact isOpen_sUnion fun a => False.elim #align is_open_empty isOpen_empty theorem Set.Finite.isOpen_sInter {s : Set (Set X)} (hs : s.Finite) : (βˆ€ t ∈ s, IsOpen t) β†’ IsOpen (β‹‚β‚€ s) := Finite.induction_on hs (fun _ => by rw [sInter_empty]; exact isOpen_univ) fun _ _ ih h => by simp only [sInter_insert, forall_mem_insert] at h ⊒ exact h.1.inter (ih h.2) #align is_open_sInter Set.Finite.isOpen_sInter theorem Set.Finite.isOpen_biInter {s : Set Ξ±} {f : Ξ± β†’ Set X} (hs : s.Finite) (h : βˆ€ i ∈ s, IsOpen (f i)) : IsOpen (β‹‚ i ∈ s, f i) := sInter_image f s β–Έ (hs.image _).isOpen_sInter (forall_mem_image.2 h) #align is_open_bInter Set.Finite.isOpen_biInter theorem isOpen_iInter_of_finite [Finite ΞΉ] {s : ΞΉ β†’ Set X} (h : βˆ€ i, IsOpen (s i)) : IsOpen (β‹‚ i, s i) := (finite_range _).isOpen_sInter (forall_mem_range.2 h) #align is_open_Inter isOpen_iInter_of_finite theorem isOpen_biInter_finset {s : Finset Ξ±} {f : Ξ± β†’ Set X} (h : βˆ€ i ∈ s, IsOpen (f i)) : IsOpen (β‹‚ i ∈ s, f i) := s.finite_toSet.isOpen_biInter h #align is_open_bInter_finset isOpen_biInter_finset @[simp] -- Porting note: added `simp` theorem isOpen_const {p : Prop} : IsOpen { _x : X | p } := by by_cases p <;> simp [*] #align is_open_const isOpen_const theorem IsOpen.and : IsOpen { x | p₁ x } β†’ IsOpen { x | pβ‚‚ x } β†’ IsOpen { x | p₁ x ∧ pβ‚‚ x } := IsOpen.inter #align is_open.and IsOpen.and @[simp] theorem isOpen_compl_iff : IsOpen sᢜ ↔ IsClosed s := ⟨fun h => ⟨h⟩, fun h => h.isOpen_compl⟩ #align is_open_compl_iff isOpen_compl_iff
Mathlib/Topology/Basic.lean
164
167
theorem TopologicalSpace.ext_iff_isClosed {t₁ tβ‚‚ : TopologicalSpace X} : t₁ = tβ‚‚ ↔ βˆ€ s, IsClosed[t₁] s ↔ IsClosed[tβ‚‚] s := by
rw [TopologicalSpace.ext_iff, compl_surjective.forall] simp only [@isOpen_compl_iff _ _ t₁, @isOpen_compl_iff _ _ tβ‚‚]
1,107
import Mathlib.Order.Filter.Partial import Mathlib.Topology.Basic #align_import topology.partial from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Filter open Topology variable {X Y : Type*} [TopologicalSpace X] theorem rtendsto_nhds {r : Rel Y X} {l : Filter Y} {x : X} : RTendsto r l (𝓝 x) ↔ βˆ€ s, IsOpen s β†’ x ∈ s β†’ r.core s ∈ l := all_mem_nhds_filter _ _ (fun _s _t => id) _ #align rtendsto_nhds rtendsto_nhds
Mathlib/Topology/Partial.lean
30
34
theorem rtendsto'_nhds {r : Rel Y X} {l : Filter Y} {x : X} : RTendsto' r l (𝓝 x) ↔ βˆ€ s, IsOpen s β†’ x ∈ s β†’ r.preimage s ∈ l := by
rw [rtendsto'_def] apply all_mem_nhds_filter apply Rel.preimage_mono
1,108
import Mathlib.Order.Filter.Partial import Mathlib.Topology.Basic #align_import topology.partial from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Filter open Topology variable {X Y : Type*} [TopologicalSpace X] theorem rtendsto_nhds {r : Rel Y X} {l : Filter Y} {x : X} : RTendsto r l (𝓝 x) ↔ βˆ€ s, IsOpen s β†’ x ∈ s β†’ r.core s ∈ l := all_mem_nhds_filter _ _ (fun _s _t => id) _ #align rtendsto_nhds rtendsto_nhds theorem rtendsto'_nhds {r : Rel Y X} {l : Filter Y} {x : X} : RTendsto' r l (𝓝 x) ↔ βˆ€ s, IsOpen s β†’ x ∈ s β†’ r.preimage s ∈ l := by rw [rtendsto'_def] apply all_mem_nhds_filter apply Rel.preimage_mono #align rtendsto'_nhds rtendsto'_nhds theorem ptendsto_nhds {f : Y β†’. X} {l : Filter Y} {x : X} : PTendsto f l (𝓝 x) ↔ βˆ€ s, IsOpen s β†’ x ∈ s β†’ f.core s ∈ l := rtendsto_nhds #align ptendsto_nhds ptendsto_nhds theorem ptendsto'_nhds {f : Y β†’. X} {l : Filter Y} {x : X} : PTendsto' f l (𝓝 x) ↔ βˆ€ s, IsOpen s β†’ x ∈ s β†’ f.preimage s ∈ l := rtendsto'_nhds #align ptendsto'_nhds ptendsto'_nhds variable [TopologicalSpace Y] def PContinuous (f : X β†’. Y) := βˆ€ s, IsOpen s β†’ IsOpen (f.preimage s) #align pcontinuous PContinuous
Mathlib/Topology/Partial.lean
57
58
theorem open_dom_of_pcontinuous {f : X β†’. Y} (h : PContinuous f) : IsOpen f.Dom := by
rw [← PFun.preimage_univ]; exact h _ isOpen_univ
1,108
import Mathlib.Order.Filter.Partial import Mathlib.Topology.Basic #align_import topology.partial from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Filter open Topology variable {X Y : Type*} [TopologicalSpace X] theorem rtendsto_nhds {r : Rel Y X} {l : Filter Y} {x : X} : RTendsto r l (𝓝 x) ↔ βˆ€ s, IsOpen s β†’ x ∈ s β†’ r.core s ∈ l := all_mem_nhds_filter _ _ (fun _s _t => id) _ #align rtendsto_nhds rtendsto_nhds theorem rtendsto'_nhds {r : Rel Y X} {l : Filter Y} {x : X} : RTendsto' r l (𝓝 x) ↔ βˆ€ s, IsOpen s β†’ x ∈ s β†’ r.preimage s ∈ l := by rw [rtendsto'_def] apply all_mem_nhds_filter apply Rel.preimage_mono #align rtendsto'_nhds rtendsto'_nhds theorem ptendsto_nhds {f : Y β†’. X} {l : Filter Y} {x : X} : PTendsto f l (𝓝 x) ↔ βˆ€ s, IsOpen s β†’ x ∈ s β†’ f.core s ∈ l := rtendsto_nhds #align ptendsto_nhds ptendsto_nhds theorem ptendsto'_nhds {f : Y β†’. X} {l : Filter Y} {x : X} : PTendsto' f l (𝓝 x) ↔ βˆ€ s, IsOpen s β†’ x ∈ s β†’ f.preimage s ∈ l := rtendsto'_nhds #align ptendsto'_nhds ptendsto'_nhds variable [TopologicalSpace Y] def PContinuous (f : X β†’. Y) := βˆ€ s, IsOpen s β†’ IsOpen (f.preimage s) #align pcontinuous PContinuous theorem open_dom_of_pcontinuous {f : X β†’. Y} (h : PContinuous f) : IsOpen f.Dom := by rw [← PFun.preimage_univ]; exact h _ isOpen_univ #align open_dom_of_pcontinuous open_dom_of_pcontinuous
Mathlib/Topology/Partial.lean
61
83
theorem pcontinuous_iff' {f : X β†’. Y} : PContinuous f ↔ βˆ€ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
constructor Β· intro h x y h' simp only [ptendsto'_def, mem_nhds_iff] rintro s ⟨t, tsubs, opent, yt⟩ exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩ intro hf s os rw [isOpen_iff_nhds] rintro x ⟨y, ys, fxy⟩ t rw [mem_principal] intro (h : f.preimage s βŠ† t) change t ∈ 𝓝 x apply mem_of_superset _ h have h' : βˆ€ s ∈ 𝓝 y, f.preimage s ∈ 𝓝 x := by intro s hs have : PTendsto' f (𝓝 x) (𝓝 y) := hf fxy rw [ptendsto'_def] at this exact this s hs show f.preimage s ∈ 𝓝 x apply h' rw [mem_nhds_iff] exact ⟨s, Set.Subset.refl _, os, ys⟩
1,108
import Mathlib.Topology.Basic import Mathlib.Order.UpperLower.Basic import Mathlib.Order.OmegaCompletePartialOrder #align_import topology.omega_complete_partial_order from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9" open Set OmegaCompletePartialOrder open scoped Classical universe u -- "Scott", "Ο‰Sup" set_option linter.uppercaseLean3 false namespace Scott def IsΟ‰Sup {Ξ± : Type u} [Preorder Ξ±] (c : Chain Ξ±) (x : Ξ±) : Prop := (βˆ€ i, c i ≀ x) ∧ βˆ€ y, (βˆ€ i, c i ≀ y) β†’ x ≀ y #align Scott.is_Ο‰Sup Scott.IsΟ‰Sup
Mathlib/Topology/OmegaCompletePartialOrder.lean
41
43
theorem isΟ‰Sup_iff_isLUB {Ξ± : Type u} [Preorder Ξ±] {c : Chain Ξ±} {x : Ξ±} : IsΟ‰Sup c x ↔ IsLUB (range c) x := by
simp [IsωSup, IsLUB, IsLeast, upperBounds, lowerBounds]
1,109
import Mathlib.Topology.Basic import Mathlib.Order.UpperLower.Basic import Mathlib.Order.OmegaCompletePartialOrder #align_import topology.omega_complete_partial_order from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9" open Set OmegaCompletePartialOrder open scoped Classical universe u -- "Scott", "Ο‰Sup" set_option linter.uppercaseLean3 false namespace Scott def IsΟ‰Sup {Ξ± : Type u} [Preorder Ξ±] (c : Chain Ξ±) (x : Ξ±) : Prop := (βˆ€ i, c i ≀ x) ∧ βˆ€ y, (βˆ€ i, c i ≀ y) β†’ x ≀ y #align Scott.is_Ο‰Sup Scott.IsΟ‰Sup theorem isΟ‰Sup_iff_isLUB {Ξ± : Type u} [Preorder Ξ±] {c : Chain Ξ±} {x : Ξ±} : IsΟ‰Sup c x ↔ IsLUB (range c) x := by simp [IsΟ‰Sup, IsLUB, IsLeast, upperBounds, lowerBounds] #align Scott.is_Ο‰Sup_iff_is_lub Scott.isΟ‰Sup_iff_isLUB variable (Ξ± : Type u) [OmegaCompletePartialOrder Ξ±] def IsOpen (s : Set Ξ±) : Prop := Continuous' fun x ↦ x ∈ s #align Scott.is_open Scott.IsOpen theorem isOpen_univ : IsOpen Ξ± univ := ⟨fun _ _ _ _ ↦ mem_univ _, @CompleteLattice.top_continuous Ξ± Prop _ _⟩ #align Scott.is_open_univ Scott.isOpen_univ theorem IsOpen.inter (s t : Set Ξ±) : IsOpen Ξ± s β†’ IsOpen Ξ± t β†’ IsOpen Ξ± (s ∩ t) := CompleteLattice.inf_continuous' #align Scott.is_open.inter Scott.IsOpen.inter
Mathlib/Topology/OmegaCompletePartialOrder.lean
62
66
theorem isOpen_sUnion (s : Set (Set Ξ±)) (hs : βˆ€ t ∈ s, IsOpen Ξ± t) : IsOpen Ξ± (⋃₀ s) := by
simp only [IsOpen] at hs ⊒ convert CompleteLattice.sSup_continuous' (setOf ⁻¹' s) hs simp only [sSup_apply, setOf_bijective.surjective.exists, exists_prop, mem_preimage, SetCoe.exists, iSup_Prop_eq, mem_setOf_eq, mem_sUnion]
1,109
import Mathlib.Topology.Defs.Induced import Mathlib.Topology.Basic #align_import topology.order from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" open Function Set Filter Topology universe u v w namespace TopologicalSpace variable {Ξ± : Type u} inductive GenerateOpen (g : Set (Set Ξ±)) : Set Ξ± β†’ Prop | basic : βˆ€ s ∈ g, GenerateOpen g s | univ : GenerateOpen g univ | inter : βˆ€ s t, GenerateOpen g s β†’ GenerateOpen g t β†’ GenerateOpen g (s ∩ t) | sUnion : βˆ€ S : Set (Set Ξ±), (βˆ€ s ∈ S, GenerateOpen g s) β†’ GenerateOpen g (⋃₀ S) #align topological_space.generate_open TopologicalSpace.GenerateOpen def generateFrom (g : Set (Set Ξ±)) : TopologicalSpace Ξ± where IsOpen := GenerateOpen g isOpen_univ := GenerateOpen.univ isOpen_inter := GenerateOpen.inter isOpen_sUnion := GenerateOpen.sUnion #align topological_space.generate_from TopologicalSpace.generateFrom theorem isOpen_generateFrom_of_mem {g : Set (Set Ξ±)} {s : Set Ξ±} (hs : s ∈ g) : IsOpen[generateFrom g] s := GenerateOpen.basic s hs #align topological_space.is_open_generate_from_of_mem TopologicalSpace.isOpen_generateFrom_of_mem
Mathlib/Topology/Order.lean
78
90
theorem nhds_generateFrom {g : Set (Set Ξ±)} {a : Ξ±} : @nhds Ξ± (generateFrom g) a = β¨… s ∈ { s | a ∈ s ∧ s ∈ g }, π“Ÿ s := by
letI := generateFrom g rw [nhds_def] refine le_antisymm (biInf_mono fun s ⟨as, sg⟩ => ⟨as, .basic _ sg⟩) <| le_iInfβ‚‚ ?_ rintro s ⟨ha, hs⟩ induction hs with | basic _ hs => exact iInfβ‚‚_le _ ⟨ha, hs⟩ | univ => exact le_top.trans_eq principal_univ.symm | inter _ _ _ _ hs ht => exact (le_inf (hs ha.1) (ht ha.2)).trans_eq inf_principal | sUnion _ _ hS => let ⟨t, htS, hat⟩ := ha exact (hS t htS hat).trans (principal_mono.2 <| subset_sUnion_of_mem htS)
1,110
import Mathlib.Topology.Defs.Induced import Mathlib.Topology.Basic #align_import topology.order from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" open Function Set Filter Topology universe u v w namespace TopologicalSpace variable {Ξ± : Type u} inductive GenerateOpen (g : Set (Set Ξ±)) : Set Ξ± β†’ Prop | basic : βˆ€ s ∈ g, GenerateOpen g s | univ : GenerateOpen g univ | inter : βˆ€ s t, GenerateOpen g s β†’ GenerateOpen g t β†’ GenerateOpen g (s ∩ t) | sUnion : βˆ€ S : Set (Set Ξ±), (βˆ€ s ∈ S, GenerateOpen g s) β†’ GenerateOpen g (⋃₀ S) #align topological_space.generate_open TopologicalSpace.GenerateOpen def generateFrom (g : Set (Set Ξ±)) : TopologicalSpace Ξ± where IsOpen := GenerateOpen g isOpen_univ := GenerateOpen.univ isOpen_inter := GenerateOpen.inter isOpen_sUnion := GenerateOpen.sUnion #align topological_space.generate_from TopologicalSpace.generateFrom theorem isOpen_generateFrom_of_mem {g : Set (Set Ξ±)} {s : Set Ξ±} (hs : s ∈ g) : IsOpen[generateFrom g] s := GenerateOpen.basic s hs #align topological_space.is_open_generate_from_of_mem TopologicalSpace.isOpen_generateFrom_of_mem theorem nhds_generateFrom {g : Set (Set Ξ±)} {a : Ξ±} : @nhds Ξ± (generateFrom g) a = β¨… s ∈ { s | a ∈ s ∧ s ∈ g }, π“Ÿ s := by letI := generateFrom g rw [nhds_def] refine le_antisymm (biInf_mono fun s ⟨as, sg⟩ => ⟨as, .basic _ sg⟩) <| le_iInfβ‚‚ ?_ rintro s ⟨ha, hs⟩ induction hs with | basic _ hs => exact iInfβ‚‚_le _ ⟨ha, hs⟩ | univ => exact le_top.trans_eq principal_univ.symm | inter _ _ _ _ hs ht => exact (le_inf (hs ha.1) (ht ha.2)).trans_eq inf_principal | sUnion _ _ hS => let ⟨t, htS, hat⟩ := ha exact (hS t htS hat).trans (principal_mono.2 <| subset_sUnion_of_mem htS) #align topological_space.nhds_generate_from TopologicalSpace.nhds_generateFrom lemma tendsto_nhds_generateFrom_iff {Ξ² : Type*} {m : Ξ± β†’ Ξ²} {f : Filter Ξ±} {g : Set (Set Ξ²)} {b : Ξ²} : Tendsto m f (@nhds Ξ² (generateFrom g) b) ↔ βˆ€ s ∈ g, b ∈ s β†’ m ⁻¹' s ∈ f := by simp only [nhds_generateFrom, @forall_swap (b ∈ _), tendsto_iInf, mem_setOf_eq, and_imp, tendsto_principal]; rfl @[deprecated] alias ⟨_, tendsto_nhds_generateFrom⟩ := tendsto_nhds_generateFrom_iff #align topological_space.tendsto_nhds_generate_from TopologicalSpace.tendsto_nhds_generateFrom protected def mkOfNhds (n : Ξ± β†’ Filter Ξ±) : TopologicalSpace Ξ± where IsOpen s := βˆ€ a ∈ s, s ∈ n a isOpen_univ _ _ := univ_mem isOpen_inter := fun _s _t hs ht x ⟨hxs, hxt⟩ => inter_mem (hs x hxs) (ht x hxt) isOpen_sUnion := fun _s hs _a ⟨x, hx, hxa⟩ => mem_of_superset (hs x hx _ hxa) (subset_sUnion_of_mem hx) #align topological_space.mk_of_nhds TopologicalSpace.mkOfNhds
Mathlib/Topology/Order.lean
110
121
theorem nhds_mkOfNhds_of_hasBasis {n : Ξ± β†’ Filter Ξ±} {ΞΉ : Ξ± β†’ Sort*} {p : βˆ€ a, ΞΉ a β†’ Prop} {s : βˆ€ a, ΞΉ a β†’ Set Ξ±} (hb : βˆ€ a, (n a).HasBasis (p a) (s a)) (hpure : βˆ€ a i, p a i β†’ a ∈ s a i) (hopen : βˆ€ a i, p a i β†’ βˆ€αΆ  x in n a, s a i ∈ n x) (a : Ξ±) : @nhds Ξ± (.mkOfNhds n) a = n a := by
let t : TopologicalSpace Ξ± := .mkOfNhds n apply le_antisymm Β· intro U hU replace hpure : pure ≀ n := fun x ↦ (hb x).ge_iff.2 (hpure x) refine mem_nhds_iff.2 ⟨{x | U ∈ n x}, fun x hx ↦ hpure x hx, fun x hx ↦ ?_, hU⟩ rcases (hb x).mem_iff.1 hx with ⟨i, hpi, hi⟩ exact (hopen x i hpi).mono fun y hy ↦ mem_of_superset hy hi Β· exact (nhds_basis_opens a).ge_iff.2 fun U ⟨haU, hUo⟩ ↦ hUo a haU
1,110
import Mathlib.Topology.Defs.Induced import Mathlib.Topology.Basic #align_import topology.order from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" open Function Set Filter Topology universe u v w namespace TopologicalSpace variable {Ξ± : Type u} inductive GenerateOpen (g : Set (Set Ξ±)) : Set Ξ± β†’ Prop | basic : βˆ€ s ∈ g, GenerateOpen g s | univ : GenerateOpen g univ | inter : βˆ€ s t, GenerateOpen g s β†’ GenerateOpen g t β†’ GenerateOpen g (s ∩ t) | sUnion : βˆ€ S : Set (Set Ξ±), (βˆ€ s ∈ S, GenerateOpen g s) β†’ GenerateOpen g (⋃₀ S) #align topological_space.generate_open TopologicalSpace.GenerateOpen def generateFrom (g : Set (Set Ξ±)) : TopologicalSpace Ξ± where IsOpen := GenerateOpen g isOpen_univ := GenerateOpen.univ isOpen_inter := GenerateOpen.inter isOpen_sUnion := GenerateOpen.sUnion #align topological_space.generate_from TopologicalSpace.generateFrom theorem isOpen_generateFrom_of_mem {g : Set (Set Ξ±)} {s : Set Ξ±} (hs : s ∈ g) : IsOpen[generateFrom g] s := GenerateOpen.basic s hs #align topological_space.is_open_generate_from_of_mem TopologicalSpace.isOpen_generateFrom_of_mem theorem nhds_generateFrom {g : Set (Set Ξ±)} {a : Ξ±} : @nhds Ξ± (generateFrom g) a = β¨… s ∈ { s | a ∈ s ∧ s ∈ g }, π“Ÿ s := by letI := generateFrom g rw [nhds_def] refine le_antisymm (biInf_mono fun s ⟨as, sg⟩ => ⟨as, .basic _ sg⟩) <| le_iInfβ‚‚ ?_ rintro s ⟨ha, hs⟩ induction hs with | basic _ hs => exact iInfβ‚‚_le _ ⟨ha, hs⟩ | univ => exact le_top.trans_eq principal_univ.symm | inter _ _ _ _ hs ht => exact (le_inf (hs ha.1) (ht ha.2)).trans_eq inf_principal | sUnion _ _ hS => let ⟨t, htS, hat⟩ := ha exact (hS t htS hat).trans (principal_mono.2 <| subset_sUnion_of_mem htS) #align topological_space.nhds_generate_from TopologicalSpace.nhds_generateFrom lemma tendsto_nhds_generateFrom_iff {Ξ² : Type*} {m : Ξ± β†’ Ξ²} {f : Filter Ξ±} {g : Set (Set Ξ²)} {b : Ξ²} : Tendsto m f (@nhds Ξ² (generateFrom g) b) ↔ βˆ€ s ∈ g, b ∈ s β†’ m ⁻¹' s ∈ f := by simp only [nhds_generateFrom, @forall_swap (b ∈ _), tendsto_iInf, mem_setOf_eq, and_imp, tendsto_principal]; rfl @[deprecated] alias ⟨_, tendsto_nhds_generateFrom⟩ := tendsto_nhds_generateFrom_iff #align topological_space.tendsto_nhds_generate_from TopologicalSpace.tendsto_nhds_generateFrom protected def mkOfNhds (n : Ξ± β†’ Filter Ξ±) : TopologicalSpace Ξ± where IsOpen s := βˆ€ a ∈ s, s ∈ n a isOpen_univ _ _ := univ_mem isOpen_inter := fun _s _t hs ht x ⟨hxs, hxt⟩ => inter_mem (hs x hxs) (ht x hxt) isOpen_sUnion := fun _s hs _a ⟨x, hx, hxa⟩ => mem_of_superset (hs x hx _ hxa) (subset_sUnion_of_mem hx) #align topological_space.mk_of_nhds TopologicalSpace.mkOfNhds theorem nhds_mkOfNhds_of_hasBasis {n : Ξ± β†’ Filter Ξ±} {ΞΉ : Ξ± β†’ Sort*} {p : βˆ€ a, ΞΉ a β†’ Prop} {s : βˆ€ a, ΞΉ a β†’ Set Ξ±} (hb : βˆ€ a, (n a).HasBasis (p a) (s a)) (hpure : βˆ€ a i, p a i β†’ a ∈ s a i) (hopen : βˆ€ a i, p a i β†’ βˆ€αΆ  x in n a, s a i ∈ n x) (a : Ξ±) : @nhds Ξ± (.mkOfNhds n) a = n a := by let t : TopologicalSpace Ξ± := .mkOfNhds n apply le_antisymm Β· intro U hU replace hpure : pure ≀ n := fun x ↦ (hb x).ge_iff.2 (hpure x) refine mem_nhds_iff.2 ⟨{x | U ∈ n x}, fun x hx ↦ hpure x hx, fun x hx ↦ ?_, hU⟩ rcases (hb x).mem_iff.1 hx with ⟨i, hpi, hi⟩ exact (hopen x i hpi).mono fun y hy ↦ mem_of_superset hy hi Β· exact (nhds_basis_opens a).ge_iff.2 fun U ⟨haU, hUo⟩ ↦ hUo a haU theorem nhds_mkOfNhds (n : Ξ± β†’ Filter Ξ±) (a : Ξ±) (hβ‚€ : pure ≀ n) (h₁ : βˆ€ a, βˆ€ s ∈ n a, βˆ€αΆ  y in n a, s ∈ n y) : @nhds Ξ± (TopologicalSpace.mkOfNhds n) a = n a := nhds_mkOfNhds_of_hasBasis (fun a ↦ (n a).basis_sets) hβ‚€ h₁ _ #align topological_space.nhds_mk_of_nhds TopologicalSpace.nhds_mkOfNhds
Mathlib/Topology/Order.lean
129
138
theorem nhds_mkOfNhds_single [DecidableEq Ξ±] {aβ‚€ : Ξ±} {l : Filter Ξ±} (h : pure aβ‚€ ≀ l) (b : Ξ±) : @nhds Ξ± (TopologicalSpace.mkOfNhds (update pure aβ‚€ l)) b = (update pure aβ‚€ l : Ξ± β†’ Filter Ξ±) b := by
refine nhds_mkOfNhds _ _ (le_update_iff.mpr ⟨h, fun _ _ => le_rfl⟩) fun a s hs => ?_ rcases eq_or_ne a aβ‚€ with (rfl | ha) Β· filter_upwards [hs] with b hb rcases eq_or_ne b a with (rfl | hb) Β· exact hs Β· rwa [update_noteq hb] Β· simpa only [update_noteq ha, mem_pure, eventually_pure] using hs
1,110
import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Set Filter Function open TopologicalSpace Topology Filter variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β†’ Y} {g : Y β†’ Z} section Inducing variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] theorem inducing_induced (f : X β†’ Y) : @Inducing X Y (TopologicalSpace.induced f β€Ή_β€Ί) _ f := @Inducing.mk _ _ (TopologicalSpace.induced f β€Ή_β€Ί) _ _ rfl theorem inducing_id : Inducing (@id X) := ⟨induced_id.symm⟩ #align inducing_id inducing_id protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) : Inducing (g ∘ f) := ⟨by rw [hf.induced, hg.induced, induced_compose]⟩ #align inducing.comp Inducing.comp
Mathlib/Topology/Maps.lean
69
72
theorem Inducing.of_comp_iff (hg : Inducing g) : Inducing (g ∘ f) ↔ Inducing f := by
refine ⟨fun h ↦ ?_, hg.comp⟩ rw [inducing_iff, hg.induced, induced_compose, h.induced]
1,111
import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Set Filter Function open TopologicalSpace Topology Filter variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β†’ Y} {g : Y β†’ Z} section Inducing variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] theorem inducing_induced (f : X β†’ Y) : @Inducing X Y (TopologicalSpace.induced f β€Ή_β€Ί) _ f := @Inducing.mk _ _ (TopologicalSpace.induced f β€Ή_β€Ί) _ _ rfl theorem inducing_id : Inducing (@id X) := ⟨induced_id.symm⟩ #align inducing_id inducing_id protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) : Inducing (g ∘ f) := ⟨by rw [hf.induced, hg.induced, induced_compose]⟩ #align inducing.comp Inducing.comp theorem Inducing.of_comp_iff (hg : Inducing g) : Inducing (g ∘ f) ↔ Inducing f := by refine ⟨fun h ↦ ?_, hg.comp⟩ rw [inducing_iff, hg.induced, induced_compose, h.induced] #align inducing.inducing_iff Inducing.of_comp_iff theorem inducing_of_inducing_compose (hf : Continuous f) (hg : Continuous g) (hgf : Inducing (g ∘ f)) : Inducing f := ⟨le_antisymm (by rwa [← continuous_iff_le_induced]) (by rw [hgf.induced, ← induced_compose] exact induced_mono hg.le_induced)⟩ #align inducing_of_inducing_compose inducing_of_inducing_compose theorem inducing_iff_nhds : Inducing f ↔ βˆ€ x, 𝓝 x = comap f (𝓝 (f x)) := (inducing_iff _).trans (induced_iff_nhds_eq f) #align inducing_iff_nhds inducing_iff_nhds namespace Inducing theorem nhds_eq_comap (hf : Inducing f) : βˆ€ x : X, 𝓝 x = comap f (𝓝 <| f x) := inducing_iff_nhds.1 hf #align inducing.nhds_eq_comap Inducing.nhds_eq_comap theorem basis_nhds {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Y} (hf : Inducing f) {x : X} (h_basis : (𝓝 (f x)).HasBasis p s) : (𝓝 x).HasBasis p (preimage f ∘ s) := hf.nhds_eq_comap x β–Έ h_basis.comap f
Mathlib/Topology/Maps.lean
97
99
theorem nhdsSet_eq_comap (hf : Inducing f) (s : Set X) : 𝓝˒ s = comap f (𝓝˒ (f '' s)) := by
simp only [nhdsSet, sSup_image, comap_iSup, hf.nhds_eq_comap, iSup_image]
1,111
import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Set Filter Function open TopologicalSpace Topology Filter variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β†’ Y} {g : Y β†’ Z} section Inducing variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] theorem inducing_induced (f : X β†’ Y) : @Inducing X Y (TopologicalSpace.induced f β€Ή_β€Ί) _ f := @Inducing.mk _ _ (TopologicalSpace.induced f β€Ή_β€Ί) _ _ rfl theorem inducing_id : Inducing (@id X) := ⟨induced_id.symm⟩ #align inducing_id inducing_id protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) : Inducing (g ∘ f) := ⟨by rw [hf.induced, hg.induced, induced_compose]⟩ #align inducing.comp Inducing.comp theorem Inducing.of_comp_iff (hg : Inducing g) : Inducing (g ∘ f) ↔ Inducing f := by refine ⟨fun h ↦ ?_, hg.comp⟩ rw [inducing_iff, hg.induced, induced_compose, h.induced] #align inducing.inducing_iff Inducing.of_comp_iff theorem inducing_of_inducing_compose (hf : Continuous f) (hg : Continuous g) (hgf : Inducing (g ∘ f)) : Inducing f := ⟨le_antisymm (by rwa [← continuous_iff_le_induced]) (by rw [hgf.induced, ← induced_compose] exact induced_mono hg.le_induced)⟩ #align inducing_of_inducing_compose inducing_of_inducing_compose theorem inducing_iff_nhds : Inducing f ↔ βˆ€ x, 𝓝 x = comap f (𝓝 (f x)) := (inducing_iff _).trans (induced_iff_nhds_eq f) #align inducing_iff_nhds inducing_iff_nhds namespace Inducing theorem nhds_eq_comap (hf : Inducing f) : βˆ€ x : X, 𝓝 x = comap f (𝓝 <| f x) := inducing_iff_nhds.1 hf #align inducing.nhds_eq_comap Inducing.nhds_eq_comap theorem basis_nhds {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Y} (hf : Inducing f) {x : X} (h_basis : (𝓝 (f x)).HasBasis p s) : (𝓝 x).HasBasis p (preimage f ∘ s) := hf.nhds_eq_comap x β–Έ h_basis.comap f theorem nhdsSet_eq_comap (hf : Inducing f) (s : Set X) : 𝓝˒ s = comap f (𝓝˒ (f '' s)) := by simp only [nhdsSet, sSup_image, comap_iSup, hf.nhds_eq_comap, iSup_image] #align inducing.nhds_set_eq_comap Inducing.nhdsSet_eq_comap theorem map_nhds_eq (hf : Inducing f) (x : X) : (𝓝 x).map f = 𝓝[range f] f x := hf.induced.symm β–Έ map_nhds_induced_eq x #align inducing.map_nhds_eq Inducing.map_nhds_eq theorem map_nhds_of_mem (hf : Inducing f) (x : X) (h : range f ∈ 𝓝 (f x)) : (𝓝 x).map f = 𝓝 (f x) := hf.induced.symm β–Έ map_nhds_induced_of_mem h #align inducing.map_nhds_of_mem Inducing.map_nhds_of_mem -- Porting note (#10756): new lemma
Mathlib/Topology/Maps.lean
112
115
theorem mapClusterPt_iff (hf : Inducing f) {x : X} {l : Filter X} : MapClusterPt (f x) l f ↔ ClusterPt x l := by
delta MapClusterPt ClusterPt rw [← Filter.push_pull', ← hf.nhds_eq_comap, map_neBot_iff]
1,111
import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Set Filter Function open TopologicalSpace Topology Filter variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β†’ Y} {g : Y β†’ Z} section Inducing variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] theorem inducing_induced (f : X β†’ Y) : @Inducing X Y (TopologicalSpace.induced f β€Ή_β€Ί) _ f := @Inducing.mk _ _ (TopologicalSpace.induced f β€Ή_β€Ί) _ _ rfl theorem inducing_id : Inducing (@id X) := ⟨induced_id.symm⟩ #align inducing_id inducing_id protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) : Inducing (g ∘ f) := ⟨by rw [hf.induced, hg.induced, induced_compose]⟩ #align inducing.comp Inducing.comp theorem Inducing.of_comp_iff (hg : Inducing g) : Inducing (g ∘ f) ↔ Inducing f := by refine ⟨fun h ↦ ?_, hg.comp⟩ rw [inducing_iff, hg.induced, induced_compose, h.induced] #align inducing.inducing_iff Inducing.of_comp_iff theorem inducing_of_inducing_compose (hf : Continuous f) (hg : Continuous g) (hgf : Inducing (g ∘ f)) : Inducing f := ⟨le_antisymm (by rwa [← continuous_iff_le_induced]) (by rw [hgf.induced, ← induced_compose] exact induced_mono hg.le_induced)⟩ #align inducing_of_inducing_compose inducing_of_inducing_compose theorem inducing_iff_nhds : Inducing f ↔ βˆ€ x, 𝓝 x = comap f (𝓝 (f x)) := (inducing_iff _).trans (induced_iff_nhds_eq f) #align inducing_iff_nhds inducing_iff_nhds namespace Inducing theorem nhds_eq_comap (hf : Inducing f) : βˆ€ x : X, 𝓝 x = comap f (𝓝 <| f x) := inducing_iff_nhds.1 hf #align inducing.nhds_eq_comap Inducing.nhds_eq_comap theorem basis_nhds {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Y} (hf : Inducing f) {x : X} (h_basis : (𝓝 (f x)).HasBasis p s) : (𝓝 x).HasBasis p (preimage f ∘ s) := hf.nhds_eq_comap x β–Έ h_basis.comap f theorem nhdsSet_eq_comap (hf : Inducing f) (s : Set X) : 𝓝˒ s = comap f (𝓝˒ (f '' s)) := by simp only [nhdsSet, sSup_image, comap_iSup, hf.nhds_eq_comap, iSup_image] #align inducing.nhds_set_eq_comap Inducing.nhdsSet_eq_comap theorem map_nhds_eq (hf : Inducing f) (x : X) : (𝓝 x).map f = 𝓝[range f] f x := hf.induced.symm β–Έ map_nhds_induced_eq x #align inducing.map_nhds_eq Inducing.map_nhds_eq theorem map_nhds_of_mem (hf : Inducing f) (x : X) (h : range f ∈ 𝓝 (f x)) : (𝓝 x).map f = 𝓝 (f x) := hf.induced.symm β–Έ map_nhds_induced_of_mem h #align inducing.map_nhds_of_mem Inducing.map_nhds_of_mem -- Porting note (#10756): new lemma theorem mapClusterPt_iff (hf : Inducing f) {x : X} {l : Filter X} : MapClusterPt (f x) l f ↔ ClusterPt x l := by delta MapClusterPt ClusterPt rw [← Filter.push_pull', ← hf.nhds_eq_comap, map_neBot_iff] theorem image_mem_nhdsWithin (hf : Inducing f) {x : X} {s : Set X} (hs : s ∈ 𝓝 x) : f '' s ∈ 𝓝[range f] f x := hf.map_nhds_eq x β–Έ image_mem_map hs #align inducing.image_mem_nhds_within Inducing.image_mem_nhdsWithin
Mathlib/Topology/Maps.lean
122
124
theorem tendsto_nhds_iff {f : ΞΉ β†’ Y} {l : Filter ΞΉ} {y : Y} (hg : Inducing g) : Tendsto f l (𝓝 y) ↔ Tendsto (g ∘ f) l (𝓝 (g y)) := by
rw [hg.nhds_eq_comap, tendsto_comap_iff]
1,111
import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Set Filter Function open TopologicalSpace Topology Filter variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β†’ Y} {g : Y β†’ Z} section Inducing variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] theorem inducing_induced (f : X β†’ Y) : @Inducing X Y (TopologicalSpace.induced f β€Ή_β€Ί) _ f := @Inducing.mk _ _ (TopologicalSpace.induced f β€Ή_β€Ί) _ _ rfl theorem inducing_id : Inducing (@id X) := ⟨induced_id.symm⟩ #align inducing_id inducing_id protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) : Inducing (g ∘ f) := ⟨by rw [hf.induced, hg.induced, induced_compose]⟩ #align inducing.comp Inducing.comp theorem Inducing.of_comp_iff (hg : Inducing g) : Inducing (g ∘ f) ↔ Inducing f := by refine ⟨fun h ↦ ?_, hg.comp⟩ rw [inducing_iff, hg.induced, induced_compose, h.induced] #align inducing.inducing_iff Inducing.of_comp_iff theorem inducing_of_inducing_compose (hf : Continuous f) (hg : Continuous g) (hgf : Inducing (g ∘ f)) : Inducing f := ⟨le_antisymm (by rwa [← continuous_iff_le_induced]) (by rw [hgf.induced, ← induced_compose] exact induced_mono hg.le_induced)⟩ #align inducing_of_inducing_compose inducing_of_inducing_compose theorem inducing_iff_nhds : Inducing f ↔ βˆ€ x, 𝓝 x = comap f (𝓝 (f x)) := (inducing_iff _).trans (induced_iff_nhds_eq f) #align inducing_iff_nhds inducing_iff_nhds namespace Inducing theorem nhds_eq_comap (hf : Inducing f) : βˆ€ x : X, 𝓝 x = comap f (𝓝 <| f x) := inducing_iff_nhds.1 hf #align inducing.nhds_eq_comap Inducing.nhds_eq_comap theorem basis_nhds {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Y} (hf : Inducing f) {x : X} (h_basis : (𝓝 (f x)).HasBasis p s) : (𝓝 x).HasBasis p (preimage f ∘ s) := hf.nhds_eq_comap x β–Έ h_basis.comap f theorem nhdsSet_eq_comap (hf : Inducing f) (s : Set X) : 𝓝˒ s = comap f (𝓝˒ (f '' s)) := by simp only [nhdsSet, sSup_image, comap_iSup, hf.nhds_eq_comap, iSup_image] #align inducing.nhds_set_eq_comap Inducing.nhdsSet_eq_comap theorem map_nhds_eq (hf : Inducing f) (x : X) : (𝓝 x).map f = 𝓝[range f] f x := hf.induced.symm β–Έ map_nhds_induced_eq x #align inducing.map_nhds_eq Inducing.map_nhds_eq theorem map_nhds_of_mem (hf : Inducing f) (x : X) (h : range f ∈ 𝓝 (f x)) : (𝓝 x).map f = 𝓝 (f x) := hf.induced.symm β–Έ map_nhds_induced_of_mem h #align inducing.map_nhds_of_mem Inducing.map_nhds_of_mem -- Porting note (#10756): new lemma theorem mapClusterPt_iff (hf : Inducing f) {x : X} {l : Filter X} : MapClusterPt (f x) l f ↔ ClusterPt x l := by delta MapClusterPt ClusterPt rw [← Filter.push_pull', ← hf.nhds_eq_comap, map_neBot_iff] theorem image_mem_nhdsWithin (hf : Inducing f) {x : X} {s : Set X} (hs : s ∈ 𝓝 x) : f '' s ∈ 𝓝[range f] f x := hf.map_nhds_eq x β–Έ image_mem_map hs #align inducing.image_mem_nhds_within Inducing.image_mem_nhdsWithin theorem tendsto_nhds_iff {f : ΞΉ β†’ Y} {l : Filter ΞΉ} {y : Y} (hg : Inducing g) : Tendsto f l (𝓝 y) ↔ Tendsto (g ∘ f) l (𝓝 (g y)) := by rw [hg.nhds_eq_comap, tendsto_comap_iff] #align inducing.tendsto_nhds_iff Inducing.tendsto_nhds_iff theorem continuousAt_iff (hg : Inducing g) {x : X} : ContinuousAt f x ↔ ContinuousAt (g ∘ f) x := hg.tendsto_nhds_iff #align inducing.continuous_at_iff Inducing.continuousAt_iff
Mathlib/Topology/Maps.lean
132
134
theorem continuous_iff (hg : Inducing g) : Continuous f ↔ Continuous (g ∘ f) := by
simp_rw [continuous_iff_continuousAt, hg.continuousAt_iff]
1,111
import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Set Filter Function open TopologicalSpace Topology Filter variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β†’ Y} {g : Y β†’ Z} section Inducing variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] theorem inducing_induced (f : X β†’ Y) : @Inducing X Y (TopologicalSpace.induced f β€Ή_β€Ί) _ f := @Inducing.mk _ _ (TopologicalSpace.induced f β€Ή_β€Ί) _ _ rfl theorem inducing_id : Inducing (@id X) := ⟨induced_id.symm⟩ #align inducing_id inducing_id protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) : Inducing (g ∘ f) := ⟨by rw [hf.induced, hg.induced, induced_compose]⟩ #align inducing.comp Inducing.comp theorem Inducing.of_comp_iff (hg : Inducing g) : Inducing (g ∘ f) ↔ Inducing f := by refine ⟨fun h ↦ ?_, hg.comp⟩ rw [inducing_iff, hg.induced, induced_compose, h.induced] #align inducing.inducing_iff Inducing.of_comp_iff theorem inducing_of_inducing_compose (hf : Continuous f) (hg : Continuous g) (hgf : Inducing (g ∘ f)) : Inducing f := ⟨le_antisymm (by rwa [← continuous_iff_le_induced]) (by rw [hgf.induced, ← induced_compose] exact induced_mono hg.le_induced)⟩ #align inducing_of_inducing_compose inducing_of_inducing_compose theorem inducing_iff_nhds : Inducing f ↔ βˆ€ x, 𝓝 x = comap f (𝓝 (f x)) := (inducing_iff _).trans (induced_iff_nhds_eq f) #align inducing_iff_nhds inducing_iff_nhds namespace Inducing theorem nhds_eq_comap (hf : Inducing f) : βˆ€ x : X, 𝓝 x = comap f (𝓝 <| f x) := inducing_iff_nhds.1 hf #align inducing.nhds_eq_comap Inducing.nhds_eq_comap theorem basis_nhds {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Y} (hf : Inducing f) {x : X} (h_basis : (𝓝 (f x)).HasBasis p s) : (𝓝 x).HasBasis p (preimage f ∘ s) := hf.nhds_eq_comap x β–Έ h_basis.comap f theorem nhdsSet_eq_comap (hf : Inducing f) (s : Set X) : 𝓝˒ s = comap f (𝓝˒ (f '' s)) := by simp only [nhdsSet, sSup_image, comap_iSup, hf.nhds_eq_comap, iSup_image] #align inducing.nhds_set_eq_comap Inducing.nhdsSet_eq_comap theorem map_nhds_eq (hf : Inducing f) (x : X) : (𝓝 x).map f = 𝓝[range f] f x := hf.induced.symm β–Έ map_nhds_induced_eq x #align inducing.map_nhds_eq Inducing.map_nhds_eq theorem map_nhds_of_mem (hf : Inducing f) (x : X) (h : range f ∈ 𝓝 (f x)) : (𝓝 x).map f = 𝓝 (f x) := hf.induced.symm β–Έ map_nhds_induced_of_mem h #align inducing.map_nhds_of_mem Inducing.map_nhds_of_mem -- Porting note (#10756): new lemma theorem mapClusterPt_iff (hf : Inducing f) {x : X} {l : Filter X} : MapClusterPt (f x) l f ↔ ClusterPt x l := by delta MapClusterPt ClusterPt rw [← Filter.push_pull', ← hf.nhds_eq_comap, map_neBot_iff] theorem image_mem_nhdsWithin (hf : Inducing f) {x : X} {s : Set X} (hs : s ∈ 𝓝 x) : f '' s ∈ 𝓝[range f] f x := hf.map_nhds_eq x β–Έ image_mem_map hs #align inducing.image_mem_nhds_within Inducing.image_mem_nhdsWithin theorem tendsto_nhds_iff {f : ΞΉ β†’ Y} {l : Filter ΞΉ} {y : Y} (hg : Inducing g) : Tendsto f l (𝓝 y) ↔ Tendsto (g ∘ f) l (𝓝 (g y)) := by rw [hg.nhds_eq_comap, tendsto_comap_iff] #align inducing.tendsto_nhds_iff Inducing.tendsto_nhds_iff theorem continuousAt_iff (hg : Inducing g) {x : X} : ContinuousAt f x ↔ ContinuousAt (g ∘ f) x := hg.tendsto_nhds_iff #align inducing.continuous_at_iff Inducing.continuousAt_iff theorem continuous_iff (hg : Inducing g) : Continuous f ↔ Continuous (g ∘ f) := by simp_rw [continuous_iff_continuousAt, hg.continuousAt_iff] #align inducing.continuous_iff Inducing.continuous_iff
Mathlib/Topology/Maps.lean
137
139
theorem continuousAt_iff' (hf : Inducing f) {x : X} (h : range f ∈ 𝓝 (f x)) : ContinuousAt (g ∘ f) x ↔ ContinuousAt g (f x) := by
simp_rw [ContinuousAt, Filter.Tendsto, ← hf.map_nhds_of_mem _ h, Filter.map_map, comp]
1,111
import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Set Filter Function open TopologicalSpace Topology Filter variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β†’ Y} {g : Y β†’ Z} section Inducing variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] theorem inducing_induced (f : X β†’ Y) : @Inducing X Y (TopologicalSpace.induced f β€Ή_β€Ί) _ f := @Inducing.mk _ _ (TopologicalSpace.induced f β€Ή_β€Ί) _ _ rfl theorem inducing_id : Inducing (@id X) := ⟨induced_id.symm⟩ #align inducing_id inducing_id protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) : Inducing (g ∘ f) := ⟨by rw [hf.induced, hg.induced, induced_compose]⟩ #align inducing.comp Inducing.comp theorem Inducing.of_comp_iff (hg : Inducing g) : Inducing (g ∘ f) ↔ Inducing f := by refine ⟨fun h ↦ ?_, hg.comp⟩ rw [inducing_iff, hg.induced, induced_compose, h.induced] #align inducing.inducing_iff Inducing.of_comp_iff theorem inducing_of_inducing_compose (hf : Continuous f) (hg : Continuous g) (hgf : Inducing (g ∘ f)) : Inducing f := ⟨le_antisymm (by rwa [← continuous_iff_le_induced]) (by rw [hgf.induced, ← induced_compose] exact induced_mono hg.le_induced)⟩ #align inducing_of_inducing_compose inducing_of_inducing_compose theorem inducing_iff_nhds : Inducing f ↔ βˆ€ x, 𝓝 x = comap f (𝓝 (f x)) := (inducing_iff _).trans (induced_iff_nhds_eq f) #align inducing_iff_nhds inducing_iff_nhds namespace Inducing theorem nhds_eq_comap (hf : Inducing f) : βˆ€ x : X, 𝓝 x = comap f (𝓝 <| f x) := inducing_iff_nhds.1 hf #align inducing.nhds_eq_comap Inducing.nhds_eq_comap theorem basis_nhds {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Y} (hf : Inducing f) {x : X} (h_basis : (𝓝 (f x)).HasBasis p s) : (𝓝 x).HasBasis p (preimage f ∘ s) := hf.nhds_eq_comap x β–Έ h_basis.comap f theorem nhdsSet_eq_comap (hf : Inducing f) (s : Set X) : 𝓝˒ s = comap f (𝓝˒ (f '' s)) := by simp only [nhdsSet, sSup_image, comap_iSup, hf.nhds_eq_comap, iSup_image] #align inducing.nhds_set_eq_comap Inducing.nhdsSet_eq_comap theorem map_nhds_eq (hf : Inducing f) (x : X) : (𝓝 x).map f = 𝓝[range f] f x := hf.induced.symm β–Έ map_nhds_induced_eq x #align inducing.map_nhds_eq Inducing.map_nhds_eq theorem map_nhds_of_mem (hf : Inducing f) (x : X) (h : range f ∈ 𝓝 (f x)) : (𝓝 x).map f = 𝓝 (f x) := hf.induced.symm β–Έ map_nhds_induced_of_mem h #align inducing.map_nhds_of_mem Inducing.map_nhds_of_mem -- Porting note (#10756): new lemma theorem mapClusterPt_iff (hf : Inducing f) {x : X} {l : Filter X} : MapClusterPt (f x) l f ↔ ClusterPt x l := by delta MapClusterPt ClusterPt rw [← Filter.push_pull', ← hf.nhds_eq_comap, map_neBot_iff] theorem image_mem_nhdsWithin (hf : Inducing f) {x : X} {s : Set X} (hs : s ∈ 𝓝 x) : f '' s ∈ 𝓝[range f] f x := hf.map_nhds_eq x β–Έ image_mem_map hs #align inducing.image_mem_nhds_within Inducing.image_mem_nhdsWithin theorem tendsto_nhds_iff {f : ΞΉ β†’ Y} {l : Filter ΞΉ} {y : Y} (hg : Inducing g) : Tendsto f l (𝓝 y) ↔ Tendsto (g ∘ f) l (𝓝 (g y)) := by rw [hg.nhds_eq_comap, tendsto_comap_iff] #align inducing.tendsto_nhds_iff Inducing.tendsto_nhds_iff theorem continuousAt_iff (hg : Inducing g) {x : X} : ContinuousAt f x ↔ ContinuousAt (g ∘ f) x := hg.tendsto_nhds_iff #align inducing.continuous_at_iff Inducing.continuousAt_iff theorem continuous_iff (hg : Inducing g) : Continuous f ↔ Continuous (g ∘ f) := by simp_rw [continuous_iff_continuousAt, hg.continuousAt_iff] #align inducing.continuous_iff Inducing.continuous_iff theorem continuousAt_iff' (hf : Inducing f) {x : X} (h : range f ∈ 𝓝 (f x)) : ContinuousAt (g ∘ f) x ↔ ContinuousAt g (f x) := by simp_rw [ContinuousAt, Filter.Tendsto, ← hf.map_nhds_of_mem _ h, Filter.map_map, comp] #align inducing.continuous_at_iff' Inducing.continuousAt_iff' protected theorem continuous (hf : Inducing f) : Continuous f := hf.continuous_iff.mp continuous_id #align inducing.continuous Inducing.continuous
Mathlib/Topology/Maps.lean
146
149
theorem closure_eq_preimage_closure_image (hf : Inducing f) (s : Set X) : closure s = f ⁻¹' closure (f '' s) := by
ext x rw [Set.mem_preimage, ← closure_induced, hf.induced]
1,111
import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Set Filter Function open TopologicalSpace Topology Filter variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β†’ Y} {g : Y β†’ Z} section Inducing variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] theorem inducing_induced (f : X β†’ Y) : @Inducing X Y (TopologicalSpace.induced f β€Ή_β€Ί) _ f := @Inducing.mk _ _ (TopologicalSpace.induced f β€Ή_β€Ί) _ _ rfl theorem inducing_id : Inducing (@id X) := ⟨induced_id.symm⟩ #align inducing_id inducing_id protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) : Inducing (g ∘ f) := ⟨by rw [hf.induced, hg.induced, induced_compose]⟩ #align inducing.comp Inducing.comp theorem Inducing.of_comp_iff (hg : Inducing g) : Inducing (g ∘ f) ↔ Inducing f := by refine ⟨fun h ↦ ?_, hg.comp⟩ rw [inducing_iff, hg.induced, induced_compose, h.induced] #align inducing.inducing_iff Inducing.of_comp_iff theorem inducing_of_inducing_compose (hf : Continuous f) (hg : Continuous g) (hgf : Inducing (g ∘ f)) : Inducing f := ⟨le_antisymm (by rwa [← continuous_iff_le_induced]) (by rw [hgf.induced, ← induced_compose] exact induced_mono hg.le_induced)⟩ #align inducing_of_inducing_compose inducing_of_inducing_compose theorem inducing_iff_nhds : Inducing f ↔ βˆ€ x, 𝓝 x = comap f (𝓝 (f x)) := (inducing_iff _).trans (induced_iff_nhds_eq f) #align inducing_iff_nhds inducing_iff_nhds namespace Inducing theorem nhds_eq_comap (hf : Inducing f) : βˆ€ x : X, 𝓝 x = comap f (𝓝 <| f x) := inducing_iff_nhds.1 hf #align inducing.nhds_eq_comap Inducing.nhds_eq_comap theorem basis_nhds {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Y} (hf : Inducing f) {x : X} (h_basis : (𝓝 (f x)).HasBasis p s) : (𝓝 x).HasBasis p (preimage f ∘ s) := hf.nhds_eq_comap x β–Έ h_basis.comap f theorem nhdsSet_eq_comap (hf : Inducing f) (s : Set X) : 𝓝˒ s = comap f (𝓝˒ (f '' s)) := by simp only [nhdsSet, sSup_image, comap_iSup, hf.nhds_eq_comap, iSup_image] #align inducing.nhds_set_eq_comap Inducing.nhdsSet_eq_comap theorem map_nhds_eq (hf : Inducing f) (x : X) : (𝓝 x).map f = 𝓝[range f] f x := hf.induced.symm β–Έ map_nhds_induced_eq x #align inducing.map_nhds_eq Inducing.map_nhds_eq theorem map_nhds_of_mem (hf : Inducing f) (x : X) (h : range f ∈ 𝓝 (f x)) : (𝓝 x).map f = 𝓝 (f x) := hf.induced.symm β–Έ map_nhds_induced_of_mem h #align inducing.map_nhds_of_mem Inducing.map_nhds_of_mem -- Porting note (#10756): new lemma theorem mapClusterPt_iff (hf : Inducing f) {x : X} {l : Filter X} : MapClusterPt (f x) l f ↔ ClusterPt x l := by delta MapClusterPt ClusterPt rw [← Filter.push_pull', ← hf.nhds_eq_comap, map_neBot_iff] theorem image_mem_nhdsWithin (hf : Inducing f) {x : X} {s : Set X} (hs : s ∈ 𝓝 x) : f '' s ∈ 𝓝[range f] f x := hf.map_nhds_eq x β–Έ image_mem_map hs #align inducing.image_mem_nhds_within Inducing.image_mem_nhdsWithin theorem tendsto_nhds_iff {f : ΞΉ β†’ Y} {l : Filter ΞΉ} {y : Y} (hg : Inducing g) : Tendsto f l (𝓝 y) ↔ Tendsto (g ∘ f) l (𝓝 (g y)) := by rw [hg.nhds_eq_comap, tendsto_comap_iff] #align inducing.tendsto_nhds_iff Inducing.tendsto_nhds_iff theorem continuousAt_iff (hg : Inducing g) {x : X} : ContinuousAt f x ↔ ContinuousAt (g ∘ f) x := hg.tendsto_nhds_iff #align inducing.continuous_at_iff Inducing.continuousAt_iff theorem continuous_iff (hg : Inducing g) : Continuous f ↔ Continuous (g ∘ f) := by simp_rw [continuous_iff_continuousAt, hg.continuousAt_iff] #align inducing.continuous_iff Inducing.continuous_iff theorem continuousAt_iff' (hf : Inducing f) {x : X} (h : range f ∈ 𝓝 (f x)) : ContinuousAt (g ∘ f) x ↔ ContinuousAt g (f x) := by simp_rw [ContinuousAt, Filter.Tendsto, ← hf.map_nhds_of_mem _ h, Filter.map_map, comp] #align inducing.continuous_at_iff' Inducing.continuousAt_iff' protected theorem continuous (hf : Inducing f) : Continuous f := hf.continuous_iff.mp continuous_id #align inducing.continuous Inducing.continuous theorem closure_eq_preimage_closure_image (hf : Inducing f) (s : Set X) : closure s = f ⁻¹' closure (f '' s) := by ext x rw [Set.mem_preimage, ← closure_induced, hf.induced] #align inducing.closure_eq_preimage_closure_image Inducing.closure_eq_preimage_closure_image
Mathlib/Topology/Maps.lean
152
153
theorem isClosed_iff (hf : Inducing f) {s : Set X} : IsClosed s ↔ βˆƒ t, IsClosed t ∧ f ⁻¹' t = s := by
rw [hf.induced, isClosed_induced_iff]
1,111
import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Set Filter Function open TopologicalSpace Topology Filter variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β†’ Y} {g : Y β†’ Z} section Inducing variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] theorem inducing_induced (f : X β†’ Y) : @Inducing X Y (TopologicalSpace.induced f β€Ή_β€Ί) _ f := @Inducing.mk _ _ (TopologicalSpace.induced f β€Ή_β€Ί) _ _ rfl theorem inducing_id : Inducing (@id X) := ⟨induced_id.symm⟩ #align inducing_id inducing_id protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) : Inducing (g ∘ f) := ⟨by rw [hf.induced, hg.induced, induced_compose]⟩ #align inducing.comp Inducing.comp theorem Inducing.of_comp_iff (hg : Inducing g) : Inducing (g ∘ f) ↔ Inducing f := by refine ⟨fun h ↦ ?_, hg.comp⟩ rw [inducing_iff, hg.induced, induced_compose, h.induced] #align inducing.inducing_iff Inducing.of_comp_iff theorem inducing_of_inducing_compose (hf : Continuous f) (hg : Continuous g) (hgf : Inducing (g ∘ f)) : Inducing f := ⟨le_antisymm (by rwa [← continuous_iff_le_induced]) (by rw [hgf.induced, ← induced_compose] exact induced_mono hg.le_induced)⟩ #align inducing_of_inducing_compose inducing_of_inducing_compose theorem inducing_iff_nhds : Inducing f ↔ βˆ€ x, 𝓝 x = comap f (𝓝 (f x)) := (inducing_iff _).trans (induced_iff_nhds_eq f) #align inducing_iff_nhds inducing_iff_nhds namespace Inducing theorem nhds_eq_comap (hf : Inducing f) : βˆ€ x : X, 𝓝 x = comap f (𝓝 <| f x) := inducing_iff_nhds.1 hf #align inducing.nhds_eq_comap Inducing.nhds_eq_comap theorem basis_nhds {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Y} (hf : Inducing f) {x : X} (h_basis : (𝓝 (f x)).HasBasis p s) : (𝓝 x).HasBasis p (preimage f ∘ s) := hf.nhds_eq_comap x β–Έ h_basis.comap f theorem nhdsSet_eq_comap (hf : Inducing f) (s : Set X) : 𝓝˒ s = comap f (𝓝˒ (f '' s)) := by simp only [nhdsSet, sSup_image, comap_iSup, hf.nhds_eq_comap, iSup_image] #align inducing.nhds_set_eq_comap Inducing.nhdsSet_eq_comap theorem map_nhds_eq (hf : Inducing f) (x : X) : (𝓝 x).map f = 𝓝[range f] f x := hf.induced.symm β–Έ map_nhds_induced_eq x #align inducing.map_nhds_eq Inducing.map_nhds_eq theorem map_nhds_of_mem (hf : Inducing f) (x : X) (h : range f ∈ 𝓝 (f x)) : (𝓝 x).map f = 𝓝 (f x) := hf.induced.symm β–Έ map_nhds_induced_of_mem h #align inducing.map_nhds_of_mem Inducing.map_nhds_of_mem -- Porting note (#10756): new lemma theorem mapClusterPt_iff (hf : Inducing f) {x : X} {l : Filter X} : MapClusterPt (f x) l f ↔ ClusterPt x l := by delta MapClusterPt ClusterPt rw [← Filter.push_pull', ← hf.nhds_eq_comap, map_neBot_iff] theorem image_mem_nhdsWithin (hf : Inducing f) {x : X} {s : Set X} (hs : s ∈ 𝓝 x) : f '' s ∈ 𝓝[range f] f x := hf.map_nhds_eq x β–Έ image_mem_map hs #align inducing.image_mem_nhds_within Inducing.image_mem_nhdsWithin theorem tendsto_nhds_iff {f : ΞΉ β†’ Y} {l : Filter ΞΉ} {y : Y} (hg : Inducing g) : Tendsto f l (𝓝 y) ↔ Tendsto (g ∘ f) l (𝓝 (g y)) := by rw [hg.nhds_eq_comap, tendsto_comap_iff] #align inducing.tendsto_nhds_iff Inducing.tendsto_nhds_iff theorem continuousAt_iff (hg : Inducing g) {x : X} : ContinuousAt f x ↔ ContinuousAt (g ∘ f) x := hg.tendsto_nhds_iff #align inducing.continuous_at_iff Inducing.continuousAt_iff theorem continuous_iff (hg : Inducing g) : Continuous f ↔ Continuous (g ∘ f) := by simp_rw [continuous_iff_continuousAt, hg.continuousAt_iff] #align inducing.continuous_iff Inducing.continuous_iff theorem continuousAt_iff' (hf : Inducing f) {x : X} (h : range f ∈ 𝓝 (f x)) : ContinuousAt (g ∘ f) x ↔ ContinuousAt g (f x) := by simp_rw [ContinuousAt, Filter.Tendsto, ← hf.map_nhds_of_mem _ h, Filter.map_map, comp] #align inducing.continuous_at_iff' Inducing.continuousAt_iff' protected theorem continuous (hf : Inducing f) : Continuous f := hf.continuous_iff.mp continuous_id #align inducing.continuous Inducing.continuous theorem closure_eq_preimage_closure_image (hf : Inducing f) (s : Set X) : closure s = f ⁻¹' closure (f '' s) := by ext x rw [Set.mem_preimage, ← closure_induced, hf.induced] #align inducing.closure_eq_preimage_closure_image Inducing.closure_eq_preimage_closure_image theorem isClosed_iff (hf : Inducing f) {s : Set X} : IsClosed s ↔ βˆƒ t, IsClosed t ∧ f ⁻¹' t = s := by rw [hf.induced, isClosed_induced_iff] #align inducing.is_closed_iff Inducing.isClosed_iff
Mathlib/Topology/Maps.lean
156
157
theorem isClosed_iff' (hf : Inducing f) {s : Set X} : IsClosed s ↔ βˆ€ x, f x ∈ closure (f '' s) β†’ x ∈ s := by
rw [hf.induced, isClosed_induced_iff']
1,111
import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Set Filter Function open TopologicalSpace Topology Filter variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β†’ Y} {g : Y β†’ Z} section OpenMap variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] namespace IsOpenMap protected theorem id : IsOpenMap (@id X) := fun s hs => by rwa [image_id] #align is_open_map.id IsOpenMap.id protected theorem comp (hg : IsOpenMap g) (hf : IsOpenMap f) : IsOpenMap (g ∘ f) := fun s hs => by rw [image_comp]; exact hg _ (hf _ hs) #align is_open_map.comp IsOpenMap.comp
Mathlib/Topology/Maps.lean
338
340
theorem isOpen_range (hf : IsOpenMap f) : IsOpen (range f) := by
rw [← image_univ] exact hf _ isOpen_univ
1,111
import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Set Filter Function open TopologicalSpace Topology Filter variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β†’ Y} {g : Y β†’ Z} section OpenMap variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] namespace IsOpenMap protected theorem id : IsOpenMap (@id X) := fun s hs => by rwa [image_id] #align is_open_map.id IsOpenMap.id protected theorem comp (hg : IsOpenMap g) (hf : IsOpenMap f) : IsOpenMap (g ∘ f) := fun s hs => by rw [image_comp]; exact hg _ (hf _ hs) #align is_open_map.comp IsOpenMap.comp theorem isOpen_range (hf : IsOpenMap f) : IsOpen (range f) := by rw [← image_univ] exact hf _ isOpen_univ #align is_open_map.is_open_range IsOpenMap.isOpen_range theorem image_mem_nhds (hf : IsOpenMap f) {x : X} {s : Set X} (hx : s ∈ 𝓝 x) : f '' s ∈ 𝓝 (f x) := let ⟨t, hts, ht, hxt⟩ := mem_nhds_iff.1 hx mem_of_superset (IsOpen.mem_nhds (hf t ht) (mem_image_of_mem _ hxt)) (image_subset _ hts) #align is_open_map.image_mem_nhds IsOpenMap.image_mem_nhds theorem range_mem_nhds (hf : IsOpenMap f) (x : X) : range f ∈ 𝓝 (f x) := hf.isOpen_range.mem_nhds <| mem_range_self _ #align is_open_map.range_mem_nhds IsOpenMap.range_mem_nhds theorem mapsTo_interior (hf : IsOpenMap f) {s : Set X} {t : Set Y} (h : MapsTo f s t) : MapsTo f (interior s) (interior t) := mapsTo'.2 <| interior_maximal (h.mono interior_subset Subset.rfl).image_subset (hf _ isOpen_interior) #align is_open_map.maps_to_interior IsOpenMap.mapsTo_interior theorem image_interior_subset (hf : IsOpenMap f) (s : Set X) : f '' interior s βŠ† interior (f '' s) := (hf.mapsTo_interior (mapsTo_image f s)).image_subset #align is_open_map.image_interior_subset IsOpenMap.image_interior_subset theorem nhds_le (hf : IsOpenMap f) (x : X) : 𝓝 (f x) ≀ (𝓝 x).map f := le_map fun _ => hf.image_mem_nhds #align is_open_map.nhds_le IsOpenMap.nhds_le theorem of_nhds_le (hf : βˆ€ x, 𝓝 (f x) ≀ map f (𝓝 x)) : IsOpenMap f := fun _s hs => isOpen_iff_mem_nhds.2 fun _y ⟨_x, hxs, hxy⟩ => hxy β–Έ hf _ (image_mem_map <| hs.mem_nhds hxs) #align is_open_map.of_nhds_le IsOpenMap.of_nhds_le
Mathlib/Topology/Maps.lean
371
378
theorem of_sections (h : βˆ€ x, βˆƒ g : Y β†’ X, ContinuousAt g (f x) ∧ g (f x) = x ∧ RightInverse g f) : IsOpenMap f := of_nhds_le fun x => let ⟨g, hgc, hgx, hgf⟩ := h x calc 𝓝 (f x) = map f (map g (𝓝 (f x))) := by
rw [map_map, hgf.comp_eq_id, map_id] _ ≀ map f (𝓝 (g (f x))) := map_mono hgc _ = map f (𝓝 x) := by rw [hgx]
1,111
import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Set Filter Function open TopologicalSpace Topology Filter variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β†’ Y} {g : Y β†’ Z} section OpenMap variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] section IsClosedMap variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] namespace IsClosedMap open Function protected theorem id : IsClosedMap (@id X) := fun s hs => by rwa [image_id] #align is_closed_map.id IsClosedMap.id protected theorem comp (hg : IsClosedMap g) (hf : IsClosedMap f) : IsClosedMap (g ∘ f) := by intro s hs rw [image_comp] exact hg _ (hf _ hs) #align is_closed_map.comp IsClosedMap.comp theorem closure_image_subset (hf : IsClosedMap f) (s : Set X) : closure (f '' s) βŠ† f '' closure s := closure_minimal (image_subset _ subset_closure) (hf _ isClosed_closure) #align is_closed_map.closure_image_subset IsClosedMap.closure_image_subset theorem of_inverse {f' : Y β†’ X} (h : Continuous f') (l_inv : LeftInverse f f') (r_inv : RightInverse f f') : IsClosedMap f := fun s hs => by rw [image_eq_preimage_of_inverse r_inv l_inv] exact hs.preimage h #align is_closed_map.of_inverse IsClosedMap.of_inverse
Mathlib/Topology/Maps.lean
478
482
theorem of_nonempty (h : βˆ€ s, IsClosed s β†’ s.Nonempty β†’ IsClosed (f '' s)) : IsClosedMap f := by
intro s hs; rcases eq_empty_or_nonempty s with h2s | h2s Β· simp_rw [h2s, image_empty, isClosed_empty] Β· exact h s hs h2s
1,111
import Mathlib.Topology.Order import Mathlib.Topology.Sets.Opens import Mathlib.Topology.ContinuousFunction.Basic #align_import topology.continuous_function.t0_sierpinski from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" noncomputable section namespace TopologicalSpace
Mathlib/Topology/ContinuousFunction/T0Sierpinski.lean
28
37
theorem eq_induced_by_maps_to_sierpinski (X : Type*) [t : TopologicalSpace X] : t = β¨… u : Opens X, sierpinskiSpace.induced (Β· ∈ u) := by
apply le_antisymm Β· rw [le_iInf_iff] exact fun u => Continuous.le_induced (isOpen_iff_continuous_mem.mp u.2) Β· intro u h rw [← generateFrom_iUnion_isOpen] apply isOpen_generateFrom_of_mem simp only [Set.mem_iUnion, Set.mem_setOf_eq, isOpen_induced_iff] exact ⟨⟨u, h⟩, {True}, isOpen_singleton_true, by simp [Set.preimage]⟩
1,112
import Mathlib.Topology.Order import Mathlib.Topology.Sets.Opens import Mathlib.Topology.ContinuousFunction.Basic #align_import topology.continuous_function.t0_sierpinski from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" noncomputable section namespace TopologicalSpace theorem eq_induced_by_maps_to_sierpinski (X : Type*) [t : TopologicalSpace X] : t = β¨… u : Opens X, sierpinskiSpace.induced (Β· ∈ u) := by apply le_antisymm Β· rw [le_iInf_iff] exact fun u => Continuous.le_induced (isOpen_iff_continuous_mem.mp u.2) Β· intro u h rw [← generateFrom_iUnion_isOpen] apply isOpen_generateFrom_of_mem simp only [Set.mem_iUnion, Set.mem_setOf_eq, isOpen_induced_iff] exact ⟨⟨u, h⟩, {True}, isOpen_singleton_true, by simp [Set.preimage]⟩ #align topological_space.eq_induced_by_maps_to_sierpinski TopologicalSpace.eq_induced_by_maps_to_sierpinski variable (X : Type*) [TopologicalSpace X] def productOfMemOpens : C(X, Opens X β†’ Prop) where toFun x u := x ∈ u continuous_toFun := continuous_pi_iff.2 fun u => continuous_Prop.2 u.isOpen #align topological_space.product_of_mem_opens TopologicalSpace.productOfMemOpens
Mathlib/Topology/ContinuousFunction/T0Sierpinski.lean
50
52
theorem productOfMemOpens_inducing : Inducing (productOfMemOpens X) := by
convert inducing_iInf_to_pi fun (u : Opens X) (x : X) => x ∈ u apply eq_induced_by_maps_to_sierpinski
1,112
import Mathlib.Topology.Order import Mathlib.Topology.Sets.Opens import Mathlib.Topology.ContinuousFunction.Basic #align_import topology.continuous_function.t0_sierpinski from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" noncomputable section namespace TopologicalSpace theorem eq_induced_by_maps_to_sierpinski (X : Type*) [t : TopologicalSpace X] : t = β¨… u : Opens X, sierpinskiSpace.induced (Β· ∈ u) := by apply le_antisymm Β· rw [le_iInf_iff] exact fun u => Continuous.le_induced (isOpen_iff_continuous_mem.mp u.2) Β· intro u h rw [← generateFrom_iUnion_isOpen] apply isOpen_generateFrom_of_mem simp only [Set.mem_iUnion, Set.mem_setOf_eq, isOpen_induced_iff] exact ⟨⟨u, h⟩, {True}, isOpen_singleton_true, by simp [Set.preimage]⟩ #align topological_space.eq_induced_by_maps_to_sierpinski TopologicalSpace.eq_induced_by_maps_to_sierpinski variable (X : Type*) [TopologicalSpace X] def productOfMemOpens : C(X, Opens X β†’ Prop) where toFun x u := x ∈ u continuous_toFun := continuous_pi_iff.2 fun u => continuous_Prop.2 u.isOpen #align topological_space.product_of_mem_opens TopologicalSpace.productOfMemOpens theorem productOfMemOpens_inducing : Inducing (productOfMemOpens X) := by convert inducing_iInf_to_pi fun (u : Opens X) (x : X) => x ∈ u apply eq_induced_by_maps_to_sierpinski #align topological_space.product_of_mem_opens_inducing TopologicalSpace.productOfMemOpens_inducing
Mathlib/Topology/ContinuousFunction/T0Sierpinski.lean
55
58
theorem productOfMemOpens_injective [T0Space X] : Function.Injective (productOfMemOpens X) := by
intro x1 x2 h apply Inseparable.eq rw [← Inducing.inseparable_iff (productOfMemOpens_inducing X), h]
1,112
import Mathlib.Topology.Basic #align_import topology.nhds_set from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Filter Topology variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {f : Filter X} {s t s₁ sβ‚‚ t₁ tβ‚‚ : Set X} {x : X}
Mathlib/Topology/NhdsSet.lean
35
38
theorem nhdsSet_diagonal (X) [TopologicalSpace (X Γ— X)] : 𝓝˒ (diagonal X) = ⨆ (x : X), 𝓝 (x, x) := by
rw [nhdsSet, ← range_diag, ← range_comp] rfl
1,113
import Mathlib.Topology.Basic #align_import topology.nhds_set from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Filter Topology variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {f : Filter X} {s t s₁ sβ‚‚ t₁ tβ‚‚ : Set X} {x : X} theorem nhdsSet_diagonal (X) [TopologicalSpace (X Γ— X)] : 𝓝˒ (diagonal X) = ⨆ (x : X), 𝓝 (x, x) := by rw [nhdsSet, ← range_diag, ← range_comp] rfl #align nhds_set_diagonal nhdsSet_diagonal
Mathlib/Topology/NhdsSet.lean
41
42
theorem mem_nhdsSet_iff_forall : s ∈ 𝓝˒ t ↔ βˆ€ x : X, x ∈ t β†’ s ∈ 𝓝 x := by
simp_rw [nhdsSet, Filter.mem_sSup, forall_mem_image]
1,113
import Mathlib.Topology.Basic #align_import topology.nhds_set from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Filter Topology variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {f : Filter X} {s t s₁ sβ‚‚ t₁ tβ‚‚ : Set X} {x : X} theorem nhdsSet_diagonal (X) [TopologicalSpace (X Γ— X)] : 𝓝˒ (diagonal X) = ⨆ (x : X), 𝓝 (x, x) := by rw [nhdsSet, ← range_diag, ← range_comp] rfl #align nhds_set_diagonal nhdsSet_diagonal theorem mem_nhdsSet_iff_forall : s ∈ 𝓝˒ t ↔ βˆ€ x : X, x ∈ t β†’ s ∈ 𝓝 x := by simp_rw [nhdsSet, Filter.mem_sSup, forall_mem_image] #align mem_nhds_set_iff_forall mem_nhdsSet_iff_forall lemma nhdsSet_le : 𝓝˒ s ≀ f ↔ βˆ€ x ∈ s, 𝓝 x ≀ f := by simp [nhdsSet] theorem bUnion_mem_nhdsSet {t : X β†’ Set X} (h : βˆ€ x ∈ s, t x ∈ 𝓝 x) : (⋃ x ∈ s, t x) ∈ 𝓝˒ s := mem_nhdsSet_iff_forall.2 fun x hx => mem_of_superset (h x hx) <| subset_iUnionβ‚‚ (s := fun x _ => t x) x hx -- Porting note: fails to find `s` #align bUnion_mem_nhds_set bUnion_mem_nhdsSet
Mathlib/Topology/NhdsSet.lean
52
53
theorem subset_interior_iff_mem_nhdsSet : s βŠ† interior t ↔ t ∈ 𝓝˒ s := by
simp_rw [mem_nhdsSet_iff_forall, subset_interior_iff_nhds]
1,113
import Mathlib.Topology.Basic #align_import topology.nhds_set from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Filter Topology variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {f : Filter X} {s t s₁ sβ‚‚ t₁ tβ‚‚ : Set X} {x : X} theorem nhdsSet_diagonal (X) [TopologicalSpace (X Γ— X)] : 𝓝˒ (diagonal X) = ⨆ (x : X), 𝓝 (x, x) := by rw [nhdsSet, ← range_diag, ← range_comp] rfl #align nhds_set_diagonal nhdsSet_diagonal theorem mem_nhdsSet_iff_forall : s ∈ 𝓝˒ t ↔ βˆ€ x : X, x ∈ t β†’ s ∈ 𝓝 x := by simp_rw [nhdsSet, Filter.mem_sSup, forall_mem_image] #align mem_nhds_set_iff_forall mem_nhdsSet_iff_forall lemma nhdsSet_le : 𝓝˒ s ≀ f ↔ βˆ€ x ∈ s, 𝓝 x ≀ f := by simp [nhdsSet] theorem bUnion_mem_nhdsSet {t : X β†’ Set X} (h : βˆ€ x ∈ s, t x ∈ 𝓝 x) : (⋃ x ∈ s, t x) ∈ 𝓝˒ s := mem_nhdsSet_iff_forall.2 fun x hx => mem_of_superset (h x hx) <| subset_iUnionβ‚‚ (s := fun x _ => t x) x hx -- Porting note: fails to find `s` #align bUnion_mem_nhds_set bUnion_mem_nhdsSet theorem subset_interior_iff_mem_nhdsSet : s βŠ† interior t ↔ t ∈ 𝓝˒ s := by simp_rw [mem_nhdsSet_iff_forall, subset_interior_iff_nhds] #align subset_interior_iff_mem_nhds_set subset_interior_iff_mem_nhdsSet
Mathlib/Topology/NhdsSet.lean
56
58
theorem disjoint_principal_nhdsSet : Disjoint (π“Ÿ s) (𝓝˒ t) ↔ Disjoint (closure s) t := by
rw [disjoint_principal_left, ← subset_interior_iff_mem_nhdsSet, interior_compl, subset_compl_iff_disjoint_left]
1,113
import Mathlib.Topology.Basic #align_import topology.nhds_set from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Filter Topology variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {f : Filter X} {s t s₁ sβ‚‚ t₁ tβ‚‚ : Set X} {x : X} theorem nhdsSet_diagonal (X) [TopologicalSpace (X Γ— X)] : 𝓝˒ (diagonal X) = ⨆ (x : X), 𝓝 (x, x) := by rw [nhdsSet, ← range_diag, ← range_comp] rfl #align nhds_set_diagonal nhdsSet_diagonal theorem mem_nhdsSet_iff_forall : s ∈ 𝓝˒ t ↔ βˆ€ x : X, x ∈ t β†’ s ∈ 𝓝 x := by simp_rw [nhdsSet, Filter.mem_sSup, forall_mem_image] #align mem_nhds_set_iff_forall mem_nhdsSet_iff_forall lemma nhdsSet_le : 𝓝˒ s ≀ f ↔ βˆ€ x ∈ s, 𝓝 x ≀ f := by simp [nhdsSet] theorem bUnion_mem_nhdsSet {t : X β†’ Set X} (h : βˆ€ x ∈ s, t x ∈ 𝓝 x) : (⋃ x ∈ s, t x) ∈ 𝓝˒ s := mem_nhdsSet_iff_forall.2 fun x hx => mem_of_superset (h x hx) <| subset_iUnionβ‚‚ (s := fun x _ => t x) x hx -- Porting note: fails to find `s` #align bUnion_mem_nhds_set bUnion_mem_nhdsSet theorem subset_interior_iff_mem_nhdsSet : s βŠ† interior t ↔ t ∈ 𝓝˒ s := by simp_rw [mem_nhdsSet_iff_forall, subset_interior_iff_nhds] #align subset_interior_iff_mem_nhds_set subset_interior_iff_mem_nhdsSet theorem disjoint_principal_nhdsSet : Disjoint (π“Ÿ s) (𝓝˒ t) ↔ Disjoint (closure s) t := by rw [disjoint_principal_left, ← subset_interior_iff_mem_nhdsSet, interior_compl, subset_compl_iff_disjoint_left]
Mathlib/Topology/NhdsSet.lean
60
61
theorem disjoint_nhdsSet_principal : Disjoint (𝓝˒ s) (π“Ÿ t) ↔ Disjoint s (closure t) := by
rw [disjoint_comm, disjoint_principal_nhdsSet, disjoint_comm]
1,113
import Mathlib.Topology.Basic #align_import topology.nhds_set from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Filter Topology variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {f : Filter X} {s t s₁ sβ‚‚ t₁ tβ‚‚ : Set X} {x : X} theorem nhdsSet_diagonal (X) [TopologicalSpace (X Γ— X)] : 𝓝˒ (diagonal X) = ⨆ (x : X), 𝓝 (x, x) := by rw [nhdsSet, ← range_diag, ← range_comp] rfl #align nhds_set_diagonal nhdsSet_diagonal theorem mem_nhdsSet_iff_forall : s ∈ 𝓝˒ t ↔ βˆ€ x : X, x ∈ t β†’ s ∈ 𝓝 x := by simp_rw [nhdsSet, Filter.mem_sSup, forall_mem_image] #align mem_nhds_set_iff_forall mem_nhdsSet_iff_forall lemma nhdsSet_le : 𝓝˒ s ≀ f ↔ βˆ€ x ∈ s, 𝓝 x ≀ f := by simp [nhdsSet] theorem bUnion_mem_nhdsSet {t : X β†’ Set X} (h : βˆ€ x ∈ s, t x ∈ 𝓝 x) : (⋃ x ∈ s, t x) ∈ 𝓝˒ s := mem_nhdsSet_iff_forall.2 fun x hx => mem_of_superset (h x hx) <| subset_iUnionβ‚‚ (s := fun x _ => t x) x hx -- Porting note: fails to find `s` #align bUnion_mem_nhds_set bUnion_mem_nhdsSet theorem subset_interior_iff_mem_nhdsSet : s βŠ† interior t ↔ t ∈ 𝓝˒ s := by simp_rw [mem_nhdsSet_iff_forall, subset_interior_iff_nhds] #align subset_interior_iff_mem_nhds_set subset_interior_iff_mem_nhdsSet theorem disjoint_principal_nhdsSet : Disjoint (π“Ÿ s) (𝓝˒ t) ↔ Disjoint (closure s) t := by rw [disjoint_principal_left, ← subset_interior_iff_mem_nhdsSet, interior_compl, subset_compl_iff_disjoint_left] theorem disjoint_nhdsSet_principal : Disjoint (𝓝˒ s) (π“Ÿ t) ↔ Disjoint s (closure t) := by rw [disjoint_comm, disjoint_principal_nhdsSet, disjoint_comm]
Mathlib/Topology/NhdsSet.lean
63
64
theorem mem_nhdsSet_iff_exists : s ∈ 𝓝˒ t ↔ βˆƒ U : Set X, IsOpen U ∧ t βŠ† U ∧ U βŠ† s := by
rw [← subset_interior_iff_mem_nhdsSet, subset_interior_iff]
1,113
import Mathlib.Topology.Basic #align_import topology.nhds_set from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Filter Topology variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {f : Filter X} {s t s₁ sβ‚‚ t₁ tβ‚‚ : Set X} {x : X} theorem nhdsSet_diagonal (X) [TopologicalSpace (X Γ— X)] : 𝓝˒ (diagonal X) = ⨆ (x : X), 𝓝 (x, x) := by rw [nhdsSet, ← range_diag, ← range_comp] rfl #align nhds_set_diagonal nhdsSet_diagonal theorem mem_nhdsSet_iff_forall : s ∈ 𝓝˒ t ↔ βˆ€ x : X, x ∈ t β†’ s ∈ 𝓝 x := by simp_rw [nhdsSet, Filter.mem_sSup, forall_mem_image] #align mem_nhds_set_iff_forall mem_nhdsSet_iff_forall lemma nhdsSet_le : 𝓝˒ s ≀ f ↔ βˆ€ x ∈ s, 𝓝 x ≀ f := by simp [nhdsSet] theorem bUnion_mem_nhdsSet {t : X β†’ Set X} (h : βˆ€ x ∈ s, t x ∈ 𝓝 x) : (⋃ x ∈ s, t x) ∈ 𝓝˒ s := mem_nhdsSet_iff_forall.2 fun x hx => mem_of_superset (h x hx) <| subset_iUnionβ‚‚ (s := fun x _ => t x) x hx -- Porting note: fails to find `s` #align bUnion_mem_nhds_set bUnion_mem_nhdsSet theorem subset_interior_iff_mem_nhdsSet : s βŠ† interior t ↔ t ∈ 𝓝˒ s := by simp_rw [mem_nhdsSet_iff_forall, subset_interior_iff_nhds] #align subset_interior_iff_mem_nhds_set subset_interior_iff_mem_nhdsSet theorem disjoint_principal_nhdsSet : Disjoint (π“Ÿ s) (𝓝˒ t) ↔ Disjoint (closure s) t := by rw [disjoint_principal_left, ← subset_interior_iff_mem_nhdsSet, interior_compl, subset_compl_iff_disjoint_left] theorem disjoint_nhdsSet_principal : Disjoint (𝓝˒ s) (π“Ÿ t) ↔ Disjoint s (closure t) := by rw [disjoint_comm, disjoint_principal_nhdsSet, disjoint_comm] theorem mem_nhdsSet_iff_exists : s ∈ 𝓝˒ t ↔ βˆƒ U : Set X, IsOpen U ∧ t βŠ† U ∧ U βŠ† s := by rw [← subset_interior_iff_mem_nhdsSet, subset_interior_iff] #align mem_nhds_set_iff_exists mem_nhdsSet_iff_exists theorem eventually_nhdsSet_iff_exists {p : X β†’ Prop} : (βˆ€αΆ  x in 𝓝˒ s, p x) ↔ βˆƒ t, IsOpen t ∧ s βŠ† t ∧ βˆ€ x, x ∈ t β†’ p x := mem_nhdsSet_iff_exists theorem eventually_nhdsSet_iff_forall {p : X β†’ Prop} : (βˆ€αΆ  x in 𝓝˒ s, p x) ↔ βˆ€ x, x ∈ s β†’ βˆ€αΆ  y in 𝓝 x, p y := mem_nhdsSet_iff_forall theorem hasBasis_nhdsSet (s : Set X) : (𝓝˒ s).HasBasis (fun U => IsOpen U ∧ s βŠ† U) fun U => U := ⟨fun t => by simp [mem_nhdsSet_iff_exists, and_assoc]⟩ #align has_basis_nhds_set hasBasis_nhdsSet @[simp] lemma lift'_nhdsSet_interior (s : Set X) : (𝓝˒ s).lift' interior = 𝓝˒ s := (hasBasis_nhdsSet s).lift'_interior_eq_self fun _ ↦ And.left lemma Filter.HasBasis.nhdsSet_interior {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set X} {t : Set X} (h : (𝓝˒ t).HasBasis p s) : (𝓝˒ t).HasBasis p (interior <| s Β·) := lift'_nhdsSet_interior t β–Έ h.lift'_interior
Mathlib/Topology/NhdsSet.lean
90
91
theorem IsOpen.mem_nhdsSet (hU : IsOpen s) : s ∈ 𝓝˒ t ↔ t βŠ† s := by
rw [← subset_interior_iff_mem_nhdsSet, hU.interior_eq]
1,113
import Mathlib.Topology.Basic #align_import topology.nhds_set from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Filter Topology variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {f : Filter X} {s t s₁ sβ‚‚ t₁ tβ‚‚ : Set X} {x : X} theorem nhdsSet_diagonal (X) [TopologicalSpace (X Γ— X)] : 𝓝˒ (diagonal X) = ⨆ (x : X), 𝓝 (x, x) := by rw [nhdsSet, ← range_diag, ← range_comp] rfl #align nhds_set_diagonal nhdsSet_diagonal theorem mem_nhdsSet_iff_forall : s ∈ 𝓝˒ t ↔ βˆ€ x : X, x ∈ t β†’ s ∈ 𝓝 x := by simp_rw [nhdsSet, Filter.mem_sSup, forall_mem_image] #align mem_nhds_set_iff_forall mem_nhdsSet_iff_forall lemma nhdsSet_le : 𝓝˒ s ≀ f ↔ βˆ€ x ∈ s, 𝓝 x ≀ f := by simp [nhdsSet] theorem bUnion_mem_nhdsSet {t : X β†’ Set X} (h : βˆ€ x ∈ s, t x ∈ 𝓝 x) : (⋃ x ∈ s, t x) ∈ 𝓝˒ s := mem_nhdsSet_iff_forall.2 fun x hx => mem_of_superset (h x hx) <| subset_iUnionβ‚‚ (s := fun x _ => t x) x hx -- Porting note: fails to find `s` #align bUnion_mem_nhds_set bUnion_mem_nhdsSet theorem subset_interior_iff_mem_nhdsSet : s βŠ† interior t ↔ t ∈ 𝓝˒ s := by simp_rw [mem_nhdsSet_iff_forall, subset_interior_iff_nhds] #align subset_interior_iff_mem_nhds_set subset_interior_iff_mem_nhdsSet theorem disjoint_principal_nhdsSet : Disjoint (π“Ÿ s) (𝓝˒ t) ↔ Disjoint (closure s) t := by rw [disjoint_principal_left, ← subset_interior_iff_mem_nhdsSet, interior_compl, subset_compl_iff_disjoint_left] theorem disjoint_nhdsSet_principal : Disjoint (𝓝˒ s) (π“Ÿ t) ↔ Disjoint s (closure t) := by rw [disjoint_comm, disjoint_principal_nhdsSet, disjoint_comm] theorem mem_nhdsSet_iff_exists : s ∈ 𝓝˒ t ↔ βˆƒ U : Set X, IsOpen U ∧ t βŠ† U ∧ U βŠ† s := by rw [← subset_interior_iff_mem_nhdsSet, subset_interior_iff] #align mem_nhds_set_iff_exists mem_nhdsSet_iff_exists theorem eventually_nhdsSet_iff_exists {p : X β†’ Prop} : (βˆ€αΆ  x in 𝓝˒ s, p x) ↔ βˆƒ t, IsOpen t ∧ s βŠ† t ∧ βˆ€ x, x ∈ t β†’ p x := mem_nhdsSet_iff_exists theorem eventually_nhdsSet_iff_forall {p : X β†’ Prop} : (βˆ€αΆ  x in 𝓝˒ s, p x) ↔ βˆ€ x, x ∈ s β†’ βˆ€αΆ  y in 𝓝 x, p y := mem_nhdsSet_iff_forall theorem hasBasis_nhdsSet (s : Set X) : (𝓝˒ s).HasBasis (fun U => IsOpen U ∧ s βŠ† U) fun U => U := ⟨fun t => by simp [mem_nhdsSet_iff_exists, and_assoc]⟩ #align has_basis_nhds_set hasBasis_nhdsSet @[simp] lemma lift'_nhdsSet_interior (s : Set X) : (𝓝˒ s).lift' interior = 𝓝˒ s := (hasBasis_nhdsSet s).lift'_interior_eq_self fun _ ↦ And.left lemma Filter.HasBasis.nhdsSet_interior {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set X} {t : Set X} (h : (𝓝˒ t).HasBasis p s) : (𝓝˒ t).HasBasis p (interior <| s Β·) := lift'_nhdsSet_interior t β–Έ h.lift'_interior theorem IsOpen.mem_nhdsSet (hU : IsOpen s) : s ∈ 𝓝˒ t ↔ t βŠ† s := by rw [← subset_interior_iff_mem_nhdsSet, hU.interior_eq] #align is_open.mem_nhds_set IsOpen.mem_nhdsSet theorem IsOpen.mem_nhdsSet_self (ho : IsOpen s) : s ∈ 𝓝˒ s := ho.mem_nhdsSet.mpr Subset.rfl theorem principal_le_nhdsSet : π“Ÿ s ≀ 𝓝˒ s := fun _s hs => (subset_interior_iff_mem_nhdsSet.mpr hs).trans interior_subset #align principal_le_nhds_set principal_le_nhdsSet theorem subset_of_mem_nhdsSet (h : t ∈ 𝓝˒ s) : s βŠ† t := principal_le_nhdsSet h theorem Filter.Eventually.self_of_nhdsSet {p : X β†’ Prop} (h : βˆ€αΆ  x in 𝓝˒ s, p x) : βˆ€ x ∈ s, p x := principal_le_nhdsSet h nonrec theorem Filter.EventuallyEq.self_of_nhdsSet {f g : X β†’ Y} (h : f =αΆ [𝓝˒ s] g) : EqOn f g s := h.self_of_nhdsSet @[simp]
Mathlib/Topology/NhdsSet.lean
110
112
theorem nhdsSet_eq_principal_iff : 𝓝˒ s = π“Ÿ s ↔ IsOpen s := by
rw [← principal_le_nhdsSet.le_iff_eq, le_principal_iff, mem_nhdsSet_iff_forall, isOpen_iff_mem_nhds]
1,113
import Mathlib.Topology.Basic #align_import topology.nhds_set from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Filter Topology variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {f : Filter X} {s t s₁ sβ‚‚ t₁ tβ‚‚ : Set X} {x : X} theorem nhdsSet_diagonal (X) [TopologicalSpace (X Γ— X)] : 𝓝˒ (diagonal X) = ⨆ (x : X), 𝓝 (x, x) := by rw [nhdsSet, ← range_diag, ← range_comp] rfl #align nhds_set_diagonal nhdsSet_diagonal theorem mem_nhdsSet_iff_forall : s ∈ 𝓝˒ t ↔ βˆ€ x : X, x ∈ t β†’ s ∈ 𝓝 x := by simp_rw [nhdsSet, Filter.mem_sSup, forall_mem_image] #align mem_nhds_set_iff_forall mem_nhdsSet_iff_forall lemma nhdsSet_le : 𝓝˒ s ≀ f ↔ βˆ€ x ∈ s, 𝓝 x ≀ f := by simp [nhdsSet] theorem bUnion_mem_nhdsSet {t : X β†’ Set X} (h : βˆ€ x ∈ s, t x ∈ 𝓝 x) : (⋃ x ∈ s, t x) ∈ 𝓝˒ s := mem_nhdsSet_iff_forall.2 fun x hx => mem_of_superset (h x hx) <| subset_iUnionβ‚‚ (s := fun x _ => t x) x hx -- Porting note: fails to find `s` #align bUnion_mem_nhds_set bUnion_mem_nhdsSet theorem subset_interior_iff_mem_nhdsSet : s βŠ† interior t ↔ t ∈ 𝓝˒ s := by simp_rw [mem_nhdsSet_iff_forall, subset_interior_iff_nhds] #align subset_interior_iff_mem_nhds_set subset_interior_iff_mem_nhdsSet theorem disjoint_principal_nhdsSet : Disjoint (π“Ÿ s) (𝓝˒ t) ↔ Disjoint (closure s) t := by rw [disjoint_principal_left, ← subset_interior_iff_mem_nhdsSet, interior_compl, subset_compl_iff_disjoint_left] theorem disjoint_nhdsSet_principal : Disjoint (𝓝˒ s) (π“Ÿ t) ↔ Disjoint s (closure t) := by rw [disjoint_comm, disjoint_principal_nhdsSet, disjoint_comm] theorem mem_nhdsSet_iff_exists : s ∈ 𝓝˒ t ↔ βˆƒ U : Set X, IsOpen U ∧ t βŠ† U ∧ U βŠ† s := by rw [← subset_interior_iff_mem_nhdsSet, subset_interior_iff] #align mem_nhds_set_iff_exists mem_nhdsSet_iff_exists theorem eventually_nhdsSet_iff_exists {p : X β†’ Prop} : (βˆ€αΆ  x in 𝓝˒ s, p x) ↔ βˆƒ t, IsOpen t ∧ s βŠ† t ∧ βˆ€ x, x ∈ t β†’ p x := mem_nhdsSet_iff_exists theorem eventually_nhdsSet_iff_forall {p : X β†’ Prop} : (βˆ€αΆ  x in 𝓝˒ s, p x) ↔ βˆ€ x, x ∈ s β†’ βˆ€αΆ  y in 𝓝 x, p y := mem_nhdsSet_iff_forall theorem hasBasis_nhdsSet (s : Set X) : (𝓝˒ s).HasBasis (fun U => IsOpen U ∧ s βŠ† U) fun U => U := ⟨fun t => by simp [mem_nhdsSet_iff_exists, and_assoc]⟩ #align has_basis_nhds_set hasBasis_nhdsSet @[simp] lemma lift'_nhdsSet_interior (s : Set X) : (𝓝˒ s).lift' interior = 𝓝˒ s := (hasBasis_nhdsSet s).lift'_interior_eq_self fun _ ↦ And.left lemma Filter.HasBasis.nhdsSet_interior {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set X} {t : Set X} (h : (𝓝˒ t).HasBasis p s) : (𝓝˒ t).HasBasis p (interior <| s Β·) := lift'_nhdsSet_interior t β–Έ h.lift'_interior theorem IsOpen.mem_nhdsSet (hU : IsOpen s) : s ∈ 𝓝˒ t ↔ t βŠ† s := by rw [← subset_interior_iff_mem_nhdsSet, hU.interior_eq] #align is_open.mem_nhds_set IsOpen.mem_nhdsSet theorem IsOpen.mem_nhdsSet_self (ho : IsOpen s) : s ∈ 𝓝˒ s := ho.mem_nhdsSet.mpr Subset.rfl theorem principal_le_nhdsSet : π“Ÿ s ≀ 𝓝˒ s := fun _s hs => (subset_interior_iff_mem_nhdsSet.mpr hs).trans interior_subset #align principal_le_nhds_set principal_le_nhdsSet theorem subset_of_mem_nhdsSet (h : t ∈ 𝓝˒ s) : s βŠ† t := principal_le_nhdsSet h theorem Filter.Eventually.self_of_nhdsSet {p : X β†’ Prop} (h : βˆ€αΆ  x in 𝓝˒ s, p x) : βˆ€ x ∈ s, p x := principal_le_nhdsSet h nonrec theorem Filter.EventuallyEq.self_of_nhdsSet {f g : X β†’ Y} (h : f =αΆ [𝓝˒ s] g) : EqOn f g s := h.self_of_nhdsSet @[simp] theorem nhdsSet_eq_principal_iff : 𝓝˒ s = π“Ÿ s ↔ IsOpen s := by rw [← principal_le_nhdsSet.le_iff_eq, le_principal_iff, mem_nhdsSet_iff_forall, isOpen_iff_mem_nhds] #align nhds_set_eq_principal_iff nhdsSet_eq_principal_iff alias ⟨_, IsOpen.nhdsSet_eq⟩ := nhdsSet_eq_principal_iff #align is_open.nhds_set_eq IsOpen.nhdsSet_eq @[simp] theorem nhdsSet_interior : 𝓝˒ (interior s) = π“Ÿ (interior s) := isOpen_interior.nhdsSet_eq #align nhds_set_interior nhdsSet_interior @[simp]
Mathlib/Topology/NhdsSet.lean
124
124
theorem nhdsSet_singleton : 𝓝˒ {x} = 𝓝 x := by
simp [nhdsSet]
1,113
import Mathlib.Order.Filter.Germ import Mathlib.Topology.NhdsSet import Mathlib.Topology.LocallyConstant.Basic import Mathlib.Analysis.NormedSpace.Basic variable {F G : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] [NormedAddCommGroup G] [NormedSpace ℝ G] open scoped Topology open Filter Set variable {X Y Z : Type*} [TopologicalSpace X] {f g : X β†’ Y} {A : Set X} {x : X} section RestrictGermPredicate def RestrictGermPredicate (P : βˆ€ x : X, Germ (𝓝 x) Y β†’ Prop) (A : Set X) : βˆ€ x : X, Germ (𝓝 x) Y β†’ Prop := fun x Ο† ↦ Germ.liftOn Ο† (fun f ↦ x ∈ A β†’ βˆ€αΆ  y in 𝓝 x, P y f) haveI : βˆ€ f f' : X β†’ Y, f =αΆ [𝓝 x] f' β†’ (βˆ€αΆ  y in 𝓝 x, P y f) β†’ βˆ€αΆ  y in 𝓝 x, P y f' := by intro f f' hff' hf apply (hf.and <| Eventually.eventually_nhds hff').mono rintro y ⟨hy, hy'⟩ rwa [Germ.coe_eq.mpr (EventuallyEq.symm hy')] fun f f' hff' ↦ propext <| forall_congr' fun _ ↦ ⟨this f f' hff', this f' f hff'.symm⟩
Mathlib/Topology/Germ.lean
94
102
theorem Filter.Eventually.germ_congr_set {P : βˆ€ x : X, Germ (𝓝 x) Y β†’ Prop} (hf : βˆ€αΆ  x in 𝓝˒ A, P x f) (h : βˆ€αΆ  z in 𝓝˒ A, g z = f z) : βˆ€αΆ  x in 𝓝˒ A, P x g := by
rw [eventually_nhdsSet_iff_forall] at * intro x hx apply ((hf x hx).and (h x hx).eventually_nhds).mono intro y hy convert hy.1 using 1 exact Germ.coe_eq.mpr hy.2
1,114
import Mathlib.Order.Filter.Germ import Mathlib.Topology.NhdsSet import Mathlib.Topology.LocallyConstant.Basic import Mathlib.Analysis.NormedSpace.Basic variable {F G : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] [NormedAddCommGroup G] [NormedSpace ℝ G] open scoped Topology open Filter Set variable {X Y Z : Type*} [TopologicalSpace X] {f g : X β†’ Y} {A : Set X} {x : X} section RestrictGermPredicate def RestrictGermPredicate (P : βˆ€ x : X, Germ (𝓝 x) Y β†’ Prop) (A : Set X) : βˆ€ x : X, Germ (𝓝 x) Y β†’ Prop := fun x Ο† ↦ Germ.liftOn Ο† (fun f ↦ x ∈ A β†’ βˆ€αΆ  y in 𝓝 x, P y f) haveI : βˆ€ f f' : X β†’ Y, f =αΆ [𝓝 x] f' β†’ (βˆ€αΆ  y in 𝓝 x, P y f) β†’ βˆ€αΆ  y in 𝓝 x, P y f' := by intro f f' hff' hf apply (hf.and <| Eventually.eventually_nhds hff').mono rintro y ⟨hy, hy'⟩ rwa [Germ.coe_eq.mpr (EventuallyEq.symm hy')] fun f f' hff' ↦ propext <| forall_congr' fun _ ↦ ⟨this f f' hff', this f' f hff'.symm⟩ theorem Filter.Eventually.germ_congr_set {P : βˆ€ x : X, Germ (𝓝 x) Y β†’ Prop} (hf : βˆ€αΆ  x in 𝓝˒ A, P x f) (h : βˆ€αΆ  z in 𝓝˒ A, g z = f z) : βˆ€αΆ  x in 𝓝˒ A, P x g := by rw [eventually_nhdsSet_iff_forall] at * intro x hx apply ((hf x hx).and (h x hx).eventually_nhds).mono intro y hy convert hy.1 using 1 exact Germ.coe_eq.mpr hy.2
Mathlib/Topology/Germ.lean
104
110
theorem restrictGermPredicate_congr {P : βˆ€ x : X, Germ (𝓝 x) Y β†’ Prop} (hf : RestrictGermPredicate P A x f) (h : βˆ€αΆ  z in 𝓝˒ A, g z = f z) : RestrictGermPredicate P A x g := by
intro hx apply ((hf hx).and <| (eventually_nhdsSet_iff_forall.mp h x hx).eventually_nhds).mono rintro y ⟨hy, h'y⟩ rwa [Germ.coe_eq.mpr h'y]
1,114
import Mathlib.Order.Filter.Germ import Mathlib.Topology.NhdsSet import Mathlib.Topology.LocallyConstant.Basic import Mathlib.Analysis.NormedSpace.Basic variable {F G : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] [NormedAddCommGroup G] [NormedSpace ℝ G] open scoped Topology open Filter Set variable {X Y Z : Type*} [TopologicalSpace X] {f g : X β†’ Y} {A : Set X} {x : X} section RestrictGermPredicate def RestrictGermPredicate (P : βˆ€ x : X, Germ (𝓝 x) Y β†’ Prop) (A : Set X) : βˆ€ x : X, Germ (𝓝 x) Y β†’ Prop := fun x Ο† ↦ Germ.liftOn Ο† (fun f ↦ x ∈ A β†’ βˆ€αΆ  y in 𝓝 x, P y f) haveI : βˆ€ f f' : X β†’ Y, f =αΆ [𝓝 x] f' β†’ (βˆ€αΆ  y in 𝓝 x, P y f) β†’ βˆ€αΆ  y in 𝓝 x, P y f' := by intro f f' hff' hf apply (hf.and <| Eventually.eventually_nhds hff').mono rintro y ⟨hy, hy'⟩ rwa [Germ.coe_eq.mpr (EventuallyEq.symm hy')] fun f f' hff' ↦ propext <| forall_congr' fun _ ↦ ⟨this f f' hff', this f' f hff'.symm⟩ theorem Filter.Eventually.germ_congr_set {P : βˆ€ x : X, Germ (𝓝 x) Y β†’ Prop} (hf : βˆ€αΆ  x in 𝓝˒ A, P x f) (h : βˆ€αΆ  z in 𝓝˒ A, g z = f z) : βˆ€αΆ  x in 𝓝˒ A, P x g := by rw [eventually_nhdsSet_iff_forall] at * intro x hx apply ((hf x hx).and (h x hx).eventually_nhds).mono intro y hy convert hy.1 using 1 exact Germ.coe_eq.mpr hy.2 theorem restrictGermPredicate_congr {P : βˆ€ x : X, Germ (𝓝 x) Y β†’ Prop} (hf : RestrictGermPredicate P A x f) (h : βˆ€αΆ  z in 𝓝˒ A, g z = f z) : RestrictGermPredicate P A x g := by intro hx apply ((hf hx).and <| (eventually_nhdsSet_iff_forall.mp h x hx).eventually_nhds).mono rintro y ⟨hy, h'y⟩ rwa [Germ.coe_eq.mpr h'y]
Mathlib/Topology/Germ.lean
112
115
theorem forall_restrictGermPredicate_iff {P : βˆ€ x : X, Germ (𝓝 x) Y β†’ Prop} : (βˆ€ x, RestrictGermPredicate P A x f) ↔ βˆ€αΆ  x in 𝓝˒ A, P x f := by
rw [eventually_nhdsSet_iff_forall] rfl
1,114
import Mathlib.Algebra.Order.Group.OrderIso import Mathlib.Algebra.Order.Monoid.OrderDual import Mathlib.Data.Set.Pointwise.Basic import Mathlib.Order.Bounds.OrderIso import Mathlib.Order.ConditionallyCompleteLattice.Basic #align_import algebra.bounds from "leanprover-community/mathlib"@"dd71334db81d0bd444af1ee339a29298bef40734" open Function Set open Pointwise section ConditionallyCompleteLattice section Right variable {ΞΉ G : Type*} [Group G] [ConditionallyCompleteLattice G] [CovariantClass G G (Function.swap (Β· * Β·)) (Β· ≀ Β·)] [Nonempty ΞΉ] {f : ΞΉ β†’ G} @[to_additive] theorem ciSup_mul (hf : BddAbove (range f)) (a : G) : (⨆ i, f i) * a = ⨆ i, f i * a := (OrderIso.mulRight a).map_ciSup hf #align csupr_mul ciSup_mul #align csupr_add ciSup_add @[to_additive]
Mathlib/Algebra/Bounds.lean
175
176
theorem ciSup_div (hf : BddAbove (range f)) (a : G) : (⨆ i, f i) / a = ⨆ i, f i / a := by
simp only [div_eq_mul_inv, ciSup_mul hf]
1,115
import Mathlib.Algebra.Order.Group.OrderIso import Mathlib.Algebra.Order.Monoid.OrderDual import Mathlib.Data.Set.Pointwise.Basic import Mathlib.Order.Bounds.OrderIso import Mathlib.Order.ConditionallyCompleteLattice.Basic #align_import algebra.bounds from "leanprover-community/mathlib"@"dd71334db81d0bd444af1ee339a29298bef40734" open Function Set open Pointwise section ConditionallyCompleteLattice section Right variable {ΞΉ G : Type*} [Group G] [ConditionallyCompleteLattice G] [CovariantClass G G (Function.swap (Β· * Β·)) (Β· ≀ Β·)] [Nonempty ΞΉ] {f : ΞΉ β†’ G} @[to_additive] theorem ciSup_mul (hf : BddAbove (range f)) (a : G) : (⨆ i, f i) * a = ⨆ i, f i * a := (OrderIso.mulRight a).map_ciSup hf #align csupr_mul ciSup_mul #align csupr_add ciSup_add @[to_additive] theorem ciSup_div (hf : BddAbove (range f)) (a : G) : (⨆ i, f i) / a = ⨆ i, f i / a := by simp only [div_eq_mul_inv, ciSup_mul hf] #align csupr_div ciSup_div #align csupr_sub ciSup_sub @[to_additive] theorem ciInf_mul (hf : BddBelow (range f)) (a : G) : (β¨… i, f i) * a = β¨… i, f i * a := (OrderIso.mulRight a).map_ciInf hf @[to_additive]
Mathlib/Algebra/Bounds.lean
185
186
theorem ciInf_div (hf : BddBelow (range f)) (a : G) : (β¨… i, f i) / a = β¨… i, f i / a := by
simp only [div_eq_mul_inv, ciInf_mul hf]
1,115
import Mathlib.Algebra.Bounds import Mathlib.Algebra.Order.Archimedean import Mathlib.Data.Real.Basic import Mathlib.Order.Interval.Set.Disjoint #align_import data.real.basic from "leanprover-community/mathlib"@"cb42593171ba005beaaf4549fcfe0dece9ada4c9" open scoped Classical open Pointwise CauSeq namespace Real instance instArchimedean : Archimedean ℝ := archimedean_iff_rat_le.2 fun x => Real.ind_mk x fun f => let ⟨M, _, H⟩ := f.bounded' 0 ⟨M, mk_le_of_forall_le ⟨0, fun i _ => Rat.cast_le.2 <| le_of_lt (abs_lt.1 (H i)).2⟩⟩ #align real.archimedean Real.instArchimedean noncomputable instance : FloorRing ℝ := Archimedean.floorRing _ theorem isCauSeq_iff_lift {f : β„• β†’ β„š} : IsCauSeq abs f ↔ IsCauSeq abs fun i => (f i : ℝ) where mp H Ξ΅ Ξ΅0 := let ⟨δ, Ξ΄0, δΡ⟩ := exists_pos_rat_lt Ξ΅0 (H _ Ξ΄0).imp fun i hi j ij => by dsimp; exact lt_trans (mod_cast hi _ ij) δΡ mpr H Ξ΅ Ξ΅0 := (H _ (Rat.cast_pos.2 Ξ΅0)).imp fun i hi j ij => by dsimp at hi; exact mod_cast hi _ ij #align real.is_cau_seq_iff_lift Real.isCauSeq_iff_lift theorem of_near (f : β„• β†’ β„š) (x : ℝ) (h : βˆ€ Ξ΅ > 0, βˆƒ i, βˆ€ j β‰₯ i, |(f j : ℝ) - x| < Ξ΅) : βˆƒ h', Real.mk ⟨f, h'⟩ = x := ⟨isCauSeq_iff_lift.2 (CauSeq.of_near _ (const abs x) h), sub_eq_zero.1 <| abs_eq_zero.1 <| (eq_of_le_of_forall_le_of_dense (abs_nonneg _)) fun _Ξ΅ Ξ΅0 => mk_near_of_forall_near <| (h _ Ξ΅0).imp fun _i h j ij => le_of_lt (h j ij)⟩ #align real.of_near Real.of_near theorem exists_floor (x : ℝ) : βˆƒ ub : β„€, (ub : ℝ) ≀ x ∧ βˆ€ z : β„€, (z : ℝ) ≀ x β†’ z ≀ ub := Int.exists_greatest_of_bdd (let ⟨n, hn⟩ := exists_int_gt x ⟨n, fun _ h' => Int.cast_le.1 <| le_trans h' <| le_of_lt hn⟩) (let ⟨n, hn⟩ := exists_int_lt x ⟨n, le_of_lt hn⟩) #align real.exists_floor Real.exists_floor
Mathlib/Data/Real/Archimedean.lean
58
106
theorem exists_isLUB {S : Set ℝ} (hne : S.Nonempty) (hbdd : BddAbove S) : βˆƒ x, IsLUB S x := by
rcases hne, hbdd with ⟨⟨L, hL⟩, ⟨U, hU⟩⟩ have : βˆ€ d : β„•, BddAbove { m : β„€ | βˆƒ y ∈ S, (m : ℝ) ≀ y * d } := by cases' exists_int_gt U with k hk refine fun d => ⟨k * d, fun z h => ?_⟩ rcases h with ⟨y, yS, hy⟩ refine Int.cast_le.1 (hy.trans ?_) push_cast exact mul_le_mul_of_nonneg_right ((hU yS).trans hk.le) d.cast_nonneg choose f hf using fun d : β„• => Int.exists_greatest_of_bdd (this d) ⟨⌊L * dβŒ‹, L, hL, Int.floor_le _⟩ have hf₁ : βˆ€ n > 0, βˆƒ y ∈ S, ((f n / n : β„š) : ℝ) ≀ y := fun n n0 => let ⟨y, yS, hy⟩ := (hf n).1 ⟨y, yS, by simpa using (div_le_iff (Nat.cast_pos.2 n0 : (_ : ℝ) < _)).2 hy⟩ have hfβ‚‚ : βˆ€ n > 0, βˆ€ y ∈ S, (y - ((n : β„•) : ℝ)⁻¹) < (f n / n : β„š) := by intro n n0 y yS have := (Int.sub_one_lt_floor _).trans_le (Int.cast_le.2 <| (hf n).2 _ ⟨y, yS, Int.floor_le _⟩) simp only [Rat.cast_div, Rat.cast_intCast, Rat.cast_natCast, gt_iff_lt] rwa [lt_div_iff (Nat.cast_pos.2 n0 : (_ : ℝ) < _), sub_mul, _root_.inv_mul_cancel] exact ne_of_gt (Nat.cast_pos.2 n0) have hg : IsCauSeq abs (fun n => f n / n : β„• β†’ β„š) := by intro Ξ΅ Ξ΅0 suffices βˆ€ j β‰₯ βŒˆΞ΅β»ΒΉβŒ‰β‚Š, βˆ€ k β‰₯ βŒˆΞ΅β»ΒΉβŒ‰β‚Š, (f j / j - f k / k : β„š) < Ξ΅ by refine ⟨_, fun j ij => abs_lt.2 ⟨?_, this _ ij _ le_rfl⟩⟩ rw [neg_lt, neg_sub] exact this _ le_rfl _ ij intro j ij k ik replace ij := le_trans (Nat.le_ceil _) (Nat.cast_le.2 ij) replace ik := le_trans (Nat.le_ceil _) (Nat.cast_le.2 ik) have j0 := Nat.cast_pos.1 ((inv_pos.2 Ξ΅0).trans_le ij) have k0 := Nat.cast_pos.1 ((inv_pos.2 Ξ΅0).trans_le ik) rcases hf₁ _ j0 with ⟨y, yS, hy⟩ refine lt_of_lt_of_le ((Rat.cast_lt (K := ℝ)).1 ?_) ((inv_le Ξ΅0 (Nat.cast_pos.2 k0)).1 ik) simpa using sub_lt_iff_lt_add'.2 (lt_of_le_of_lt hy <| sub_lt_iff_lt_add.1 <| hfβ‚‚ _ k0 _ yS) let g : CauSeq β„š abs := ⟨fun n => f n / n, hg⟩ refine ⟨mk g, ⟨fun x xS => ?_, fun y h => ?_⟩⟩ Β· refine le_of_forall_ge_of_dense fun z xz => ?_ cases' exists_nat_gt (x - z)⁻¹ with K hK refine le_mk_of_forall_le ⟨K, fun n nK => ?_⟩ replace xz := sub_pos.2 xz replace hK := hK.le.trans (Nat.cast_le.2 nK) have n0 : 0 < n := Nat.cast_pos.1 ((inv_pos.2 xz).trans_le hK) refine le_trans ?_ (hfβ‚‚ _ n0 _ xS).le rwa [le_sub_comm, inv_le (Nat.cast_pos.2 n0 : (_ : ℝ) < _) xz] Β· exact mk_le_of_forall_le ⟨1, fun n n1 => let ⟨x, xS, hx⟩ := hf₁ _ n1 le_trans hx (h xS)⟩
1,116
import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.Algebra.Order.Module.Pointwise import Mathlib.Data.Real.Archimedean #align_import data.real.pointwise from "leanprover-community/mathlib"@"dde670c9a3f503647fd5bfdf1037bad526d3397a" open Set open Pointwise variable {ΞΉ : Sort*} {Ξ± : Type*} [LinearOrderedField Ξ±] section MulActionWithZero variable [MulActionWithZero Ξ± ℝ] [OrderedSMul Ξ± ℝ] {a : Ξ±}
Mathlib/Data/Real/Pointwise.lean
37
46
theorem Real.sInf_smul_of_nonneg (ha : 0 ≀ a) (s : Set ℝ) : sInf (a β€’ s) = a β€’ sInf s := by
obtain rfl | hs := s.eq_empty_or_nonempty Β· rw [smul_set_empty, Real.sInf_empty, smul_zero] obtain rfl | ha' := ha.eq_or_lt Β· rw [zero_smul_set hs, zero_smul] exact csInf_singleton 0 by_cases h : BddBelow s Β· exact ((OrderIso.smulRight ha').map_csInf' hs h).symm Β· rw [Real.sInf_of_not_bddBelow (mt (bddBelow_smul_iff_of_pos ha').1 h), Real.sInf_of_not_bddBelow h, smul_zero]
1,117
import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.Algebra.Order.Module.Pointwise import Mathlib.Data.Real.Archimedean #align_import data.real.pointwise from "leanprover-community/mathlib"@"dde670c9a3f503647fd5bfdf1037bad526d3397a" open Set open Pointwise variable {ΞΉ : Sort*} {Ξ± : Type*} [LinearOrderedField Ξ±] section MulActionWithZero variable [MulActionWithZero Ξ± ℝ] [OrderedSMul Ξ± ℝ] {a : Ξ±} theorem Real.sInf_smul_of_nonneg (ha : 0 ≀ a) (s : Set ℝ) : sInf (a β€’ s) = a β€’ sInf s := by obtain rfl | hs := s.eq_empty_or_nonempty Β· rw [smul_set_empty, Real.sInf_empty, smul_zero] obtain rfl | ha' := ha.eq_or_lt Β· rw [zero_smul_set hs, zero_smul] exact csInf_singleton 0 by_cases h : BddBelow s Β· exact ((OrderIso.smulRight ha').map_csInf' hs h).symm Β· rw [Real.sInf_of_not_bddBelow (mt (bddBelow_smul_iff_of_pos ha').1 h), Real.sInf_of_not_bddBelow h, smul_zero] #align real.Inf_smul_of_nonneg Real.sInf_smul_of_nonneg theorem Real.smul_iInf_of_nonneg (ha : 0 ≀ a) (f : ΞΉ β†’ ℝ) : (a β€’ β¨… i, f i) = β¨… i, a β€’ f i := (Real.sInf_smul_of_nonneg ha _).symm.trans <| congr_arg sInf <| (range_comp _ _).symm #align real.smul_infi_of_nonneg Real.smul_iInf_of_nonneg
Mathlib/Data/Real/Pointwise.lean
53
62
theorem Real.sSup_smul_of_nonneg (ha : 0 ≀ a) (s : Set ℝ) : sSup (a β€’ s) = a β€’ sSup s := by
obtain rfl | hs := s.eq_empty_or_nonempty Β· rw [smul_set_empty, Real.sSup_empty, smul_zero] obtain rfl | ha' := ha.eq_or_lt Β· rw [zero_smul_set hs, zero_smul] exact csSup_singleton 0 by_cases h : BddAbove s Β· exact ((OrderIso.smulRight ha').map_csSup' hs h).symm Β· rw [Real.sSup_of_not_bddAbove (mt (bddAbove_smul_iff_of_pos ha').1 h), Real.sSup_of_not_bddAbove h, smul_zero]
1,117
import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.Algebra.Order.Module.Pointwise import Mathlib.Data.Real.Archimedean #align_import data.real.pointwise from "leanprover-community/mathlib"@"dde670c9a3f503647fd5bfdf1037bad526d3397a" open Set open Pointwise variable {ΞΉ : Sort*} {Ξ± : Type*} [LinearOrderedField Ξ±] section Module variable [Module Ξ± ℝ] [OrderedSMul Ξ± ℝ] {a : Ξ±}
Mathlib/Data/Real/Pointwise.lean
75
84
theorem Real.sInf_smul_of_nonpos (ha : a ≀ 0) (s : Set ℝ) : sInf (a β€’ s) = a β€’ sSup s := by
obtain rfl | hs := s.eq_empty_or_nonempty Β· rw [smul_set_empty, Real.sInf_empty, Real.sSup_empty, smul_zero] obtain rfl | ha' := ha.eq_or_lt Β· rw [zero_smul_set hs, zero_smul] exact csInf_singleton 0 by_cases h : BddAbove s Β· exact ((OrderIso.smulRightDual ℝ ha').map_csSup' hs h).symm Β· rw [Real.sInf_of_not_bddBelow (mt (bddBelow_smul_iff_of_neg ha').1 h), Real.sSup_of_not_bddAbove h, smul_zero]
1,117
import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.Algebra.Order.Module.Pointwise import Mathlib.Data.Real.Archimedean #align_import data.real.pointwise from "leanprover-community/mathlib"@"dde670c9a3f503647fd5bfdf1037bad526d3397a" open Set open Pointwise variable {ΞΉ : Sort*} {Ξ± : Type*} [LinearOrderedField Ξ±] section Module variable [Module Ξ± ℝ] [OrderedSMul Ξ± ℝ] {a : Ξ±} theorem Real.sInf_smul_of_nonpos (ha : a ≀ 0) (s : Set ℝ) : sInf (a β€’ s) = a β€’ sSup s := by obtain rfl | hs := s.eq_empty_or_nonempty Β· rw [smul_set_empty, Real.sInf_empty, Real.sSup_empty, smul_zero] obtain rfl | ha' := ha.eq_or_lt Β· rw [zero_smul_set hs, zero_smul] exact csInf_singleton 0 by_cases h : BddAbove s Β· exact ((OrderIso.smulRightDual ℝ ha').map_csSup' hs h).symm Β· rw [Real.sInf_of_not_bddBelow (mt (bddBelow_smul_iff_of_neg ha').1 h), Real.sSup_of_not_bddAbove h, smul_zero] #align real.Inf_smul_of_nonpos Real.sInf_smul_of_nonpos theorem Real.smul_iSup_of_nonpos (ha : a ≀ 0) (f : ΞΉ β†’ ℝ) : (a β€’ ⨆ i, f i) = β¨… i, a β€’ f i := (Real.sInf_smul_of_nonpos ha _).symm.trans <| congr_arg sInf <| (range_comp _ _).symm #align real.smul_supr_of_nonpos Real.smul_iSup_of_nonpos
Mathlib/Data/Real/Pointwise.lean
91
100
theorem Real.sSup_smul_of_nonpos (ha : a ≀ 0) (s : Set ℝ) : sSup (a β€’ s) = a β€’ sInf s := by
obtain rfl | hs := s.eq_empty_or_nonempty Β· rw [smul_set_empty, Real.sSup_empty, Real.sInf_empty, smul_zero] obtain rfl | ha' := ha.eq_or_lt Β· rw [zero_smul_set hs, zero_smul] exact csSup_singleton 0 by_cases h : BddBelow s Β· exact ((OrderIso.smulRightDual ℝ ha').map_csInf' hs h).symm Β· rw [Real.sSup_of_not_bddAbove (mt (bddAbove_smul_iff_of_neg ha').1 h), Real.sInf_of_not_bddBelow h, smul_zero]
1,117
import Mathlib.Algebra.Algebra.Defs import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Algebra.Order.Field.Canonical.Basic import Mathlib.Algebra.Order.Nonneg.Field import Mathlib.Algebra.Order.Nonneg.Floor import Mathlib.Data.Real.Pointwise import Mathlib.Order.ConditionallyCompleteLattice.Group import Mathlib.Tactic.GCongr.Core #align_import data.real.nnreal from "leanprover-community/mathlib"@"b1abe23ae96fef89ad30d9f4362c307f72a55010" open Function -- to ensure these instances are computable def NNReal := { r : ℝ // 0 ≀ r } deriving Zero, One, Semiring, StrictOrderedSemiring, CommMonoidWithZero, CommSemiring, SemilatticeInf, SemilatticeSup, DistribLattice, OrderedCommSemiring, CanonicallyOrderedCommSemiring, Inhabited #align nnreal NNReal namespace NNReal scoped notation "ℝβ‰₯0" => NNReal noncomputable instance : FloorSemiring ℝβ‰₯0 := Nonneg.floorSemiring instance instDenselyOrdered : DenselyOrdered ℝβ‰₯0 := Nonneg.instDenselyOrdered instance : OrderBot ℝβ‰₯0 := inferInstance instance : Archimedean ℝβ‰₯0 := Nonneg.archimedean noncomputable instance : Sub ℝβ‰₯0 := Nonneg.sub noncomputable instance : OrderedSub ℝβ‰₯0 := Nonneg.orderedSub noncomputable instance : CanonicallyLinearOrderedSemifield ℝβ‰₯0 := Nonneg.canonicallyLinearOrderedSemifield @[coe] def toReal : ℝβ‰₯0 β†’ ℝ := Subtype.val instance : Coe ℝβ‰₯0 ℝ := ⟨toReal⟩ -- Simp lemma to put back `n.val` into the normal form given by the coercion. @[simp] theorem val_eq_coe (n : ℝβ‰₯0) : n.val = n := rfl #align nnreal.val_eq_coe NNReal.val_eq_coe instance canLift : CanLift ℝ ℝβ‰₯0 toReal fun r => 0 ≀ r := Subtype.canLift _ #align nnreal.can_lift NNReal.canLift @[ext] protected theorem eq {n m : ℝβ‰₯0} : (n : ℝ) = (m : ℝ) β†’ n = m := Subtype.eq #align nnreal.eq NNReal.eq protected theorem eq_iff {n m : ℝβ‰₯0} : (n : ℝ) = (m : ℝ) ↔ n = m := Subtype.ext_iff.symm #align nnreal.eq_iff NNReal.eq_iff theorem ne_iff {x y : ℝβ‰₯0} : (x : ℝ) β‰  (y : ℝ) ↔ x β‰  y := not_congr <| NNReal.eq_iff #align nnreal.ne_iff NNReal.ne_iff protected theorem Β«forallΒ» {p : ℝβ‰₯0 β†’ Prop} : (βˆ€ x : ℝβ‰₯0, p x) ↔ βˆ€ (x : ℝ) (hx : 0 ≀ x), p ⟨x, hx⟩ := Subtype.forall #align nnreal.forall NNReal.forall protected theorem Β«existsΒ» {p : ℝβ‰₯0 β†’ Prop} : (βˆƒ x : ℝβ‰₯0, p x) ↔ βˆƒ (x : ℝ) (hx : 0 ≀ x), p ⟨x, hx⟩ := Subtype.exists #align nnreal.exists NNReal.exists noncomputable def _root_.Real.toNNReal (r : ℝ) : ℝβ‰₯0 := ⟨max r 0, le_max_right _ _⟩ #align real.to_nnreal Real.toNNReal theorem _root_.Real.coe_toNNReal (r : ℝ) (hr : 0 ≀ r) : (Real.toNNReal r : ℝ) = r := max_eq_left hr #align real.coe_to_nnreal Real.coe_toNNReal
Mathlib/Data/Real/NNReal.lean
125
126
theorem _root_.Real.toNNReal_of_nonneg {r : ℝ} (hr : 0 ≀ r) : r.toNNReal = ⟨r, hr⟩ := by
simp_rw [Real.toNNReal, max_eq_left hr]
1,118
import Mathlib.Data.Real.NNReal import Mathlib.RingTheory.Valuation.Basic noncomputable section open Function Multiplicative open scoped NNReal variable {R : Type*} [Ring R] {Ξ“β‚€ : Type*} [LinearOrderedCommGroupWithZero Ξ“β‚€] namespace Valuation class RankOne (v : Valuation R Ξ“β‚€) where hom : Ξ“β‚€ β†’*β‚€ ℝβ‰₯0 strictMono' : StrictMono hom nontrivial' : βˆƒ r : R, v r β‰  0 ∧ v r β‰  1 namespace RankOne variable (v : Valuation R Ξ“β‚€) [RankOne v] lemma strictMono : StrictMono (hom v) := strictMono' lemma nontrivial : βˆƒ r : R, v r β‰  0 ∧ v r β‰  1 := nontrivial'
Mathlib/RingTheory/Valuation/RankOne.lean
51
55
theorem zero_of_hom_zero {x : Ξ“β‚€} (hx : hom v x = 0) : x = 0 := by
refine (eq_of_le_of_not_lt (zero_le' (a := x)) fun h_lt ↦ ?_).symm have hs := strictMono v h_lt rw [_root_.map_zero, hx] at hs exact hs.false
1,119
import Mathlib.Data.Real.NNReal import Mathlib.RingTheory.Valuation.Basic noncomputable section open Function Multiplicative open scoped NNReal variable {R : Type*} [Ring R] {Ξ“β‚€ : Type*} [LinearOrderedCommGroupWithZero Ξ“β‚€] namespace Valuation class RankOne (v : Valuation R Ξ“β‚€) where hom : Ξ“β‚€ β†’*β‚€ ℝβ‰₯0 strictMono' : StrictMono hom nontrivial' : βˆƒ r : R, v r β‰  0 ∧ v r β‰  1 namespace RankOne variable (v : Valuation R Ξ“β‚€) [RankOne v] lemma strictMono : StrictMono (hom v) := strictMono' lemma nontrivial : βˆƒ r : R, v r β‰  0 ∧ v r β‰  1 := nontrivial' theorem zero_of_hom_zero {x : Ξ“β‚€} (hx : hom v x = 0) : x = 0 := by refine (eq_of_le_of_not_lt (zero_le' (a := x)) fun h_lt ↦ ?_).symm have hs := strictMono v h_lt rw [_root_.map_zero, hx] at hs exact hs.false theorem hom_eq_zero_iff {x : Ξ“β‚€} : RankOne.hom v x = 0 ↔ x = 0 := ⟨fun h ↦ zero_of_hom_zero v h, fun h ↦ by rw [h, _root_.map_zero]⟩ def unit : Ξ“β‚€Λ£ := Units.mk0 (v (nontrivial v).choose) ((nontrivial v).choose_spec).1
Mathlib/RingTheory/Valuation/RankOne.lean
67
69
theorem unit_ne_one : unit v β‰  1 := by
rw [Ne, ← Units.eq_iff, Units.val_one] exact ((nontrivial v).choose_spec ).2
1,119
import Mathlib.Analysis.Normed.Field.Basic import Mathlib.RingTheory.Valuation.RankOne import Mathlib.Topology.Algebra.Valuation noncomputable section open Filter Set Valuation open scoped NNReal variable {K : Type*} [hK : NormedField K] (h : IsNonarchimedean (norm : K β†’ ℝ)) namespace Valued variable {L : Type*} [Field L] {Ξ“β‚€ : Type*} [LinearOrderedCommGroupWithZero Ξ“β‚€] [val : Valued L Ξ“β‚€] [hv : RankOne val.v] def norm : L β†’ ℝ := fun x : L => hv.hom (Valued.v x)
Mathlib/Topology/Algebra/NormedValued.lean
68
68
theorem norm_nonneg (x : L) : 0 ≀ norm x := by
simp only [norm, NNReal.zero_le_coe]
1,120
import Mathlib.Analysis.Normed.Field.Basic import Mathlib.RingTheory.Valuation.RankOne import Mathlib.Topology.Algebra.Valuation noncomputable section open Filter Set Valuation open scoped NNReal variable {K : Type*} [hK : NormedField K] (h : IsNonarchimedean (norm : K β†’ ℝ)) namespace Valued variable {L : Type*} [Field L] {Ξ“β‚€ : Type*} [LinearOrderedCommGroupWithZero Ξ“β‚€] [val : Valued L Ξ“β‚€] [hv : RankOne val.v] def norm : L β†’ ℝ := fun x : L => hv.hom (Valued.v x) theorem norm_nonneg (x : L) : 0 ≀ norm x := by simp only [norm, NNReal.zero_le_coe]
Mathlib/Topology/Algebra/NormedValued.lean
70
72
theorem norm_add_le (x y : L) : norm (x + y) ≀ max (norm x) (norm y) := by
simp only [norm, NNReal.coe_le_coe, le_max_iff, StrictMono.le_iff_le hv.strictMono] exact le_max_iff.mp (Valuation.map_add_le_max' val.v _ _)
1,120
import Mathlib.Analysis.Normed.Field.Basic import Mathlib.RingTheory.Valuation.RankOne import Mathlib.Topology.Algebra.Valuation noncomputable section open Filter Set Valuation open scoped NNReal variable {K : Type*} [hK : NormedField K] (h : IsNonarchimedean (norm : K β†’ ℝ)) namespace Valued variable {L : Type*} [Field L] {Ξ“β‚€ : Type*} [LinearOrderedCommGroupWithZero Ξ“β‚€] [val : Valued L Ξ“β‚€] [hv : RankOne val.v] def norm : L β†’ ℝ := fun x : L => hv.hom (Valued.v x) theorem norm_nonneg (x : L) : 0 ≀ norm x := by simp only [norm, NNReal.zero_le_coe] theorem norm_add_le (x y : L) : norm (x + y) ≀ max (norm x) (norm y) := by simp only [norm, NNReal.coe_le_coe, le_max_iff, StrictMono.le_iff_le hv.strictMono] exact le_max_iff.mp (Valuation.map_add_le_max' val.v _ _)
Mathlib/Topology/Algebra/NormedValued.lean
74
75
theorem norm_eq_zero {x : L} (hx : norm x = 0) : x = 0 := by
simpa [norm, NNReal.coe_eq_zero, RankOne.hom_eq_zero_iff, zero_iff] using hx
1,120
import Mathlib.Data.Real.NNReal import Mathlib.Tactic.GCongr.Core #align_import analysis.normed.group.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" open Set open NNReal variable {ΞΉ R R' E F G : Type*} structure AddGroupSeminorm (G : Type*) [AddGroup G] where -- Porting note: can't extend `ZeroHom G ℝ` because otherwise `to_additive` won't work since -- we aren't using old structures protected toFun : G β†’ ℝ protected map_zero' : toFun 0 = 0 protected add_le' : βˆ€ r s, toFun (r + s) ≀ toFun r + toFun s protected neg' : βˆ€ r, toFun (-r) = toFun r #align add_group_seminorm AddGroupSeminorm @[to_additive] structure GroupSeminorm (G : Type*) [Group G] where protected toFun : G β†’ ℝ protected map_one' : toFun 1 = 0 protected mul_le' : βˆ€ x y, toFun (x * y) ≀ toFun x + toFun y protected inv' : βˆ€ x, toFun x⁻¹ = toFun x #align group_seminorm GroupSeminorm structure NonarchAddGroupSeminorm (G : Type*) [AddGroup G] extends ZeroHom G ℝ where protected add_le_max' : βˆ€ r s, toFun (r + s) ≀ max (toFun r) (toFun s) protected neg' : βˆ€ r, toFun (-r) = toFun r #align nonarch_add_group_seminorm NonarchAddGroupSeminorm structure AddGroupNorm (G : Type*) [AddGroup G] extends AddGroupSeminorm G where protected eq_zero_of_map_eq_zero' : βˆ€ x, toFun x = 0 β†’ x = 0 #align add_group_norm AddGroupNorm @[to_additive] structure GroupNorm (G : Type*) [Group G] extends GroupSeminorm G where protected eq_one_of_map_eq_zero' : βˆ€ x, toFun x = 0 β†’ x = 1 #align group_norm GroupNorm structure NonarchAddGroupNorm (G : Type*) [AddGroup G] extends NonarchAddGroupSeminorm G where protected eq_zero_of_map_eq_zero' : βˆ€ x, toFun x = 0 β†’ x = 0 #align nonarch_add_group_norm NonarchAddGroupNorm class NonarchAddGroupSeminormClass (F : Type*) (Ξ± : outParam Type*) [AddGroup Ξ±] [FunLike F Ξ± ℝ] extends NonarchimedeanHomClass F Ξ± ℝ : Prop where protected map_zero (f : F) : f 0 = 0 protected map_neg_eq_map' (f : F) (a : Ξ±) : f (-a) = f a #align nonarch_add_group_seminorm_class NonarchAddGroupSeminormClass class NonarchAddGroupNormClass (F : Type*) (Ξ± : outParam Type*) [AddGroup Ξ±] [FunLike F Ξ± ℝ] extends NonarchAddGroupSeminormClass F Ξ± : Prop where protected eq_zero_of_map_eq_zero (f : F) {a : Ξ±} : f a = 0 β†’ a = 0 #align nonarch_add_group_norm_class NonarchAddGroupNormClass section NonarchAddGroupSeminormClass variable [AddGroup E] [FunLike F E ℝ] [NonarchAddGroupSeminormClass F E] (f : F) (x y : E)
Mathlib/Analysis/Normed/Group/Seminorm.lean
148
150
theorem map_sub_le_max : f (x - y) ≀ max (f x) (f y) := by
rw [sub_eq_add_neg, ← NonarchAddGroupSeminormClass.map_neg_eq_map' f y] exact map_add_le_max _ _ _
1,121
import Mathlib.Algebra.Order.Ring.WithTop import Mathlib.Algebra.Order.Sub.WithTop import Mathlib.Data.Real.NNReal import Mathlib.Order.Interval.Set.WithBotTop #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Function Set NNReal variable {Ξ± : Type*} def ENNReal := WithTop ℝβ‰₯0 deriving Zero, AddCommMonoidWithOne, SemilatticeSup, DistribLattice, Nontrivial #align ennreal ENNReal @[inherit_doc] scoped[ENNReal] notation "ℝβ‰₯0∞" => ENNReal scoped[ENNReal] notation "∞" => (⊀ : ENNReal) namespace ENNReal instance : OrderBot ℝβ‰₯0∞ := inferInstanceAs (OrderBot (WithTop ℝβ‰₯0)) instance : BoundedOrder ℝβ‰₯0∞ := inferInstanceAs (BoundedOrder (WithTop ℝβ‰₯0)) instance : CharZero ℝβ‰₯0∞ := inferInstanceAs (CharZero (WithTop ℝβ‰₯0)) noncomputable instance : CanonicallyOrderedCommSemiring ℝβ‰₯0∞ := inferInstanceAs (CanonicallyOrderedCommSemiring (WithTop ℝβ‰₯0)) noncomputable instance : CompleteLinearOrder ℝβ‰₯0∞ := inferInstanceAs (CompleteLinearOrder (WithTop ℝβ‰₯0)) instance : DenselyOrdered ℝβ‰₯0∞ := inferInstanceAs (DenselyOrdered (WithTop ℝβ‰₯0)) noncomputable instance : CanonicallyLinearOrderedAddCommMonoid ℝβ‰₯0∞ := inferInstanceAs (CanonicallyLinearOrderedAddCommMonoid (WithTop ℝβ‰₯0)) noncomputable instance instSub : Sub ℝβ‰₯0∞ := inferInstanceAs (Sub (WithTop ℝβ‰₯0)) noncomputable instance : OrderedSub ℝβ‰₯0∞ := inferInstanceAs (OrderedSub (WithTop ℝβ‰₯0)) noncomputable instance : LinearOrderedAddCommMonoidWithTop ℝβ‰₯0∞ := inferInstanceAs (LinearOrderedAddCommMonoidWithTop (WithTop ℝβ‰₯0)) -- Porting note: rfc: redefine using pattern matching? noncomputable instance : Inv ℝβ‰₯0∞ := ⟨fun a => sInf { b | 1 ≀ a * b }⟩ noncomputable instance : DivInvMonoid ℝβ‰₯0∞ where variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} -- Porting note: are these 2 instances still required in Lean 4? instance covariantClass_mul_le : CovariantClass ℝβ‰₯0∞ ℝβ‰₯0∞ (Β· * Β·) (Β· ≀ Β·) := inferInstance #align ennreal.covariant_class_mul_le ENNReal.covariantClass_mul_le instance covariantClass_add_le : CovariantClass ℝβ‰₯0∞ ℝβ‰₯0∞ (Β· + Β·) (Β· ≀ Β·) := inferInstance #align ennreal.covariant_class_add_le ENNReal.covariantClass_add_le -- Porting note (#11215): TODO: add a `WithTop` instance and use it here noncomputable instance : LinearOrderedCommMonoidWithZero ℝβ‰₯0∞ := { inferInstanceAs (LinearOrderedAddCommMonoidWithTop ℝβ‰₯0∞), inferInstanceAs (CommSemiring ℝβ‰₯0∞) with mul_le_mul_left := fun _ _ => mul_le_mul_left' zero_le_one := zero_le 1 } noncomputable instance : Unique (AddUnits ℝβ‰₯0∞) where default := 0 uniq a := AddUnits.ext <| le_zero_iff.1 <| by rw [← a.add_neg]; exact le_self_add instance : Inhabited ℝβ‰₯0∞ := ⟨0⟩ @[coe, match_pattern] def ofNNReal : ℝβ‰₯0 β†’ ℝβ‰₯0∞ := WithTop.some instance : Coe ℝβ‰₯0 ℝβ‰₯0∞ := ⟨ofNNReal⟩ @[elab_as_elim, induction_eliminator, cases_eliminator] def recTopCoe {C : ℝβ‰₯0∞ β†’ Sort*} (top : C ∞) (coe : βˆ€ x : ℝβ‰₯0, C x) (x : ℝβ‰₯0∞) : C x := WithTop.recTopCoe top coe x instance canLift : CanLift ℝβ‰₯0∞ ℝβ‰₯0 ofNNReal (Β· β‰  ∞) := WithTop.canLift #align ennreal.can_lift ENNReal.canLift @[simp] theorem none_eq_top : (none : ℝβ‰₯0∞) = ∞ := rfl #align ennreal.none_eq_top ENNReal.none_eq_top @[simp] theorem some_eq_coe (a : ℝβ‰₯0) : (Option.some a : ℝβ‰₯0∞) = (↑a : ℝβ‰₯0∞) := rfl #align ennreal.some_eq_coe ENNReal.some_eq_coe @[simp] theorem some_eq_coe' (a : ℝβ‰₯0) : (WithTop.some a : ℝβ‰₯0∞) = (↑a : ℝβ‰₯0∞) := rfl lemma coe_injective : Injective ((↑) : ℝβ‰₯0 β†’ ℝβ‰₯0∞) := WithTop.coe_injective @[simp, norm_cast] lemma coe_inj : (p : ℝβ‰₯0∞) = q ↔ p = q := coe_injective.eq_iff #align ennreal.coe_eq_coe ENNReal.coe_inj lemma coe_ne_coe : (p : ℝβ‰₯0∞) β‰  q ↔ p β‰  q := coe_inj.not theorem range_coe' : range ofNNReal = Iio ∞ := WithTop.range_coe theorem range_coe : range ofNNReal = {∞}ᢜ := (isCompl_range_some_none ℝβ‰₯0).symm.compl_eq.symm protected def toNNReal : ℝβ‰₯0∞ β†’ ℝβ‰₯0 := WithTop.untop' 0 #align ennreal.to_nnreal ENNReal.toNNReal protected def toReal (a : ℝβ‰₯0∞) : Real := a.toNNReal #align ennreal.to_real ENNReal.toReal protected noncomputable def ofReal (r : Real) : ℝβ‰₯0∞ := r.toNNReal #align ennreal.of_real ENNReal.ofReal @[simp, norm_cast] theorem toNNReal_coe : (r : ℝβ‰₯0∞).toNNReal = r := rfl #align ennreal.to_nnreal_coe ENNReal.toNNReal_coe @[simp] theorem coe_toNNReal : βˆ€ {a : ℝβ‰₯0∞}, a β‰  ∞ β†’ ↑a.toNNReal = a | ofNNReal _, _ => rfl | ⊀, h => (h rfl).elim #align ennreal.coe_to_nnreal ENNReal.coe_toNNReal @[simp]
Mathlib/Data/ENNReal/Basic.lean
212
213
theorem ofReal_toReal {a : ℝβ‰₯0∞} (h : a β‰  ∞) : ENNReal.ofReal a.toReal = a := by
simp [ENNReal.toReal, ENNReal.ofReal, h]
1,122
import Mathlib.Algebra.BigOperators.WithTop import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.ENNReal.Basic #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} section Mul -- Porting note (#11215): TODO: generalize to `WithTop` @[mono, gcongr]
Mathlib/Data/ENNReal/Operations.lean
33
41
theorem mul_lt_mul (ac : a < c) (bd : b < d) : a * b < c * d := by
rcases lt_iff_exists_nnreal_btwn.1 ac with ⟨a', aa', a'c⟩ lift a to ℝβ‰₯0 using ne_top_of_lt aa' rcases lt_iff_exists_nnreal_btwn.1 bd with ⟨b', bb', b'd⟩ lift b to ℝβ‰₯0 using ne_top_of_lt bb' norm_cast at * calc ↑(a * b) < ↑(a' * b') := coe_lt_coe.2 (mul_lt_mulβ‚€ aa' bb') _ ≀ c * d := mul_le_mul' a'c.le b'd.le
1,123
import Mathlib.Algebra.BigOperators.WithTop import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.ENNReal.Basic #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} section Mul -- Porting note (#11215): TODO: generalize to `WithTop` @[mono, gcongr] theorem mul_lt_mul (ac : a < c) (bd : b < d) : a * b < c * d := by rcases lt_iff_exists_nnreal_btwn.1 ac with ⟨a', aa', a'c⟩ lift a to ℝβ‰₯0 using ne_top_of_lt aa' rcases lt_iff_exists_nnreal_btwn.1 bd with ⟨b', bb', b'd⟩ lift b to ℝβ‰₯0 using ne_top_of_lt bb' norm_cast at * calc ↑(a * b) < ↑(a' * b') := coe_lt_coe.2 (mul_lt_mulβ‚€ aa' bb') _ ≀ c * d := mul_le_mul' a'c.le b'd.le #align ennreal.mul_lt_mul ENNReal.mul_lt_mul -- TODO: generalize to `CovariantClass Ξ± Ξ± (Β· * Β·) (Β· ≀ Β·)` theorem mul_left_mono : Monotone (a * Β·) := fun _ _ => mul_le_mul' le_rfl #align ennreal.mul_left_mono ENNReal.mul_left_mono -- TODO: generalize to `CovariantClass Ξ± Ξ± (swap (Β· * Β·)) (Β· ≀ Β·)` theorem mul_right_mono : Monotone (Β· * a) := fun _ _ h => mul_le_mul' h le_rfl #align ennreal.mul_right_mono ENNReal.mul_right_mono -- Porting note (#11215): TODO: generalize to `WithTop` theorem pow_strictMono : βˆ€ {n : β„•}, n β‰  0 β†’ StrictMono fun x : ℝβ‰₯0∞ => x ^ n | 0, h => absurd rfl h | 1, _ => by simpa only [pow_one] using strictMono_id | n + 2, _ => fun x y h ↦ by simp_rw [pow_succ _ (n + 1)]; exact mul_lt_mul (pow_strictMono n.succ_ne_zero h) h #align ennreal.pow_strict_mono ENNReal.pow_strictMono @[gcongr] protected theorem pow_lt_pow_left (h : a < b) {n : β„•} (hn : n β‰  0) : a ^ n < b ^ n := ENNReal.pow_strictMono hn h theorem max_mul : max a b * c = max (a * c) (b * c) := mul_right_mono.map_max #align ennreal.max_mul ENNReal.max_mul theorem mul_max : a * max b c = max (a * b) (a * c) := mul_left_mono.map_max #align ennreal.mul_max ENNReal.mul_max -- Porting note (#11215): TODO: generalize to `WithTop`
Mathlib/Data/ENNReal/Operations.lean
71
77
theorem mul_left_strictMono (h0 : a β‰  0) (hinf : a β‰  ∞) : StrictMono (a * Β·) := by
lift a to ℝβ‰₯0 using hinf rw [coe_ne_zero] at h0 intro x y h contrapose! h simpa only [← mul_assoc, ← coe_mul, inv_mul_cancel h0, coe_one, one_mul] using mul_le_mul_left' h (↑a⁻¹)
1,123
import Mathlib.Algebra.BigOperators.WithTop import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.ENNReal.Basic #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} section OperationsAndOrder protected theorem pow_pos : 0 < a β†’ βˆ€ n : β„•, 0 < a ^ n := CanonicallyOrderedCommSemiring.pow_pos #align ennreal.pow_pos ENNReal.pow_pos protected theorem pow_ne_zero : a β‰  0 β†’ βˆ€ n : β„•, a ^ n β‰  0 := by simpa only [pos_iff_ne_zero] using ENNReal.pow_pos #align ennreal.pow_ne_zero ENNReal.pow_ne_zero
Mathlib/Data/ENNReal/Operations.lean
130
130
theorem not_lt_zero : Β¬a < 0 := by
simp
1,123
import Mathlib.Algebra.BigOperators.WithTop import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.ENNReal.Basic #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} section OperationsAndOrder protected theorem pow_pos : 0 < a β†’ βˆ€ n : β„•, 0 < a ^ n := CanonicallyOrderedCommSemiring.pow_pos #align ennreal.pow_pos ENNReal.pow_pos protected theorem pow_ne_zero : a β‰  0 β†’ βˆ€ n : β„•, a ^ n β‰  0 := by simpa only [pos_iff_ne_zero] using ENNReal.pow_pos #align ennreal.pow_ne_zero ENNReal.pow_ne_zero theorem not_lt_zero : Β¬a < 0 := by simp #align ennreal.not_lt_zero ENNReal.not_lt_zero protected theorem le_of_add_le_add_left : a β‰  ∞ β†’ a + b ≀ a + c β†’ b ≀ c := WithTop.le_of_add_le_add_left #align ennreal.le_of_add_le_add_left ENNReal.le_of_add_le_add_left protected theorem le_of_add_le_add_right : a β‰  ∞ β†’ b + a ≀ c + a β†’ b ≀ c := WithTop.le_of_add_le_add_right #align ennreal.le_of_add_le_add_right ENNReal.le_of_add_le_add_right @[gcongr] protected theorem add_lt_add_left : a β‰  ∞ β†’ b < c β†’ a + b < a + c := WithTop.add_lt_add_left #align ennreal.add_lt_add_left ENNReal.add_lt_add_left @[gcongr] protected theorem add_lt_add_right : a β‰  ∞ β†’ b < c β†’ b + a < c + a := WithTop.add_lt_add_right #align ennreal.add_lt_add_right ENNReal.add_lt_add_right protected theorem add_le_add_iff_left : a β‰  ∞ β†’ (a + b ≀ a + c ↔ b ≀ c) := WithTop.add_le_add_iff_left #align ennreal.add_le_add_iff_left ENNReal.add_le_add_iff_left protected theorem add_le_add_iff_right : a β‰  ∞ β†’ (b + a ≀ c + a ↔ b ≀ c) := WithTop.add_le_add_iff_right #align ennreal.add_le_add_iff_right ENNReal.add_le_add_iff_right protected theorem add_lt_add_iff_left : a β‰  ∞ β†’ (a + b < a + c ↔ b < c) := WithTop.add_lt_add_iff_left #align ennreal.add_lt_add_iff_left ENNReal.add_lt_add_iff_left protected theorem add_lt_add_iff_right : a β‰  ∞ β†’ (b + a < c + a ↔ b < c) := WithTop.add_lt_add_iff_right #align ennreal.add_lt_add_iff_right ENNReal.add_lt_add_iff_right protected theorem add_lt_add_of_le_of_lt : a β‰  ∞ β†’ a ≀ b β†’ c < d β†’ a + c < b + d := WithTop.add_lt_add_of_le_of_lt #align ennreal.add_lt_add_of_le_of_lt ENNReal.add_lt_add_of_le_of_lt protected theorem add_lt_add_of_lt_of_le : c β‰  ∞ β†’ a < b β†’ c ≀ d β†’ a + c < b + d := WithTop.add_lt_add_of_lt_of_le #align ennreal.add_lt_add_of_lt_of_le ENNReal.add_lt_add_of_lt_of_le instance contravariantClass_add_lt : ContravariantClass ℝβ‰₯0∞ ℝβ‰₯0∞ (Β· + Β·) (Β· < Β·) := WithTop.contravariantClass_add_lt #align ennreal.contravariant_class_add_lt ENNReal.contravariantClass_add_lt
Mathlib/Data/ENNReal/Operations.lean
177
178
theorem lt_add_right (ha : a β‰  ∞) (hb : b β‰  0) : a < a + b := by
rwa [← pos_iff_ne_zero, ← ENNReal.add_lt_add_iff_left ha, add_zero] at hb
1,123
import Mathlib.Algebra.BigOperators.WithTop import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.ENNReal.Basic #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} section OperationsAndInfty variable {Ξ± : Type*} @[simp] theorem add_eq_top : a + b = ∞ ↔ a = ∞ ∨ b = ∞ := WithTop.add_eq_top #align ennreal.add_eq_top ENNReal.add_eq_top @[simp] theorem add_lt_top : a + b < ∞ ↔ a < ∞ ∧ b < ∞ := WithTop.add_lt_top #align ennreal.add_lt_top ENNReal.add_lt_top
Mathlib/Data/ENNReal/Operations.lean
193
197
theorem toNNReal_add {r₁ rβ‚‚ : ℝβ‰₯0∞} (h₁ : r₁ β‰  ∞) (hβ‚‚ : rβ‚‚ β‰  ∞) : (r₁ + rβ‚‚).toNNReal = r₁.toNNReal + rβ‚‚.toNNReal := by
lift r₁ to ℝβ‰₯0 using h₁ lift rβ‚‚ to ℝβ‰₯0 using hβ‚‚ rfl
1,123
import Mathlib.Algebra.BigOperators.WithTop import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.ENNReal.Basic #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} section OperationsAndInfty variable {Ξ± : Type*} @[simp] theorem add_eq_top : a + b = ∞ ↔ a = ∞ ∨ b = ∞ := WithTop.add_eq_top #align ennreal.add_eq_top ENNReal.add_eq_top @[simp] theorem add_lt_top : a + b < ∞ ↔ a < ∞ ∧ b < ∞ := WithTop.add_lt_top #align ennreal.add_lt_top ENNReal.add_lt_top theorem toNNReal_add {r₁ rβ‚‚ : ℝβ‰₯0∞} (h₁ : r₁ β‰  ∞) (hβ‚‚ : rβ‚‚ β‰  ∞) : (r₁ + rβ‚‚).toNNReal = r₁.toNNReal + rβ‚‚.toNNReal := by lift r₁ to ℝβ‰₯0 using h₁ lift rβ‚‚ to ℝβ‰₯0 using hβ‚‚ rfl #align ennreal.to_nnreal_add ENNReal.toNNReal_add
Mathlib/Data/ENNReal/Operations.lean
200
200
theorem not_lt_top {x : ℝβ‰₯0∞} : Β¬x < ∞ ↔ x = ∞ := by
rw [lt_top_iff_ne_top, Classical.not_not]
1,123
import Mathlib.Algebra.BigOperators.WithTop import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.ENNReal.Basic #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} section OperationsAndInfty variable {Ξ± : Type*} @[simp] theorem add_eq_top : a + b = ∞ ↔ a = ∞ ∨ b = ∞ := WithTop.add_eq_top #align ennreal.add_eq_top ENNReal.add_eq_top @[simp] theorem add_lt_top : a + b < ∞ ↔ a < ∞ ∧ b < ∞ := WithTop.add_lt_top #align ennreal.add_lt_top ENNReal.add_lt_top theorem toNNReal_add {r₁ rβ‚‚ : ℝβ‰₯0∞} (h₁ : r₁ β‰  ∞) (hβ‚‚ : rβ‚‚ β‰  ∞) : (r₁ + rβ‚‚).toNNReal = r₁.toNNReal + rβ‚‚.toNNReal := by lift r₁ to ℝβ‰₯0 using h₁ lift rβ‚‚ to ℝβ‰₯0 using hβ‚‚ rfl #align ennreal.to_nnreal_add ENNReal.toNNReal_add theorem not_lt_top {x : ℝβ‰₯0∞} : Β¬x < ∞ ↔ x = ∞ := by rw [lt_top_iff_ne_top, Classical.not_not] #align ennreal.not_lt_top ENNReal.not_lt_top
Mathlib/Data/ENNReal/Operations.lean
203
203
theorem add_ne_top : a + b β‰  ∞ ↔ a β‰  ∞ ∧ b β‰  ∞ := by
simpa only [lt_top_iff_ne_top] using add_lt_top
1,123
import Mathlib.Algebra.BigOperators.WithTop import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.ENNReal.Basic #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} section OperationsAndInfty variable {Ξ± : Type*} @[simp] theorem add_eq_top : a + b = ∞ ↔ a = ∞ ∨ b = ∞ := WithTop.add_eq_top #align ennreal.add_eq_top ENNReal.add_eq_top @[simp] theorem add_lt_top : a + b < ∞ ↔ a < ∞ ∧ b < ∞ := WithTop.add_lt_top #align ennreal.add_lt_top ENNReal.add_lt_top theorem toNNReal_add {r₁ rβ‚‚ : ℝβ‰₯0∞} (h₁ : r₁ β‰  ∞) (hβ‚‚ : rβ‚‚ β‰  ∞) : (r₁ + rβ‚‚).toNNReal = r₁.toNNReal + rβ‚‚.toNNReal := by lift r₁ to ℝβ‰₯0 using h₁ lift rβ‚‚ to ℝβ‰₯0 using hβ‚‚ rfl #align ennreal.to_nnreal_add ENNReal.toNNReal_add theorem not_lt_top {x : ℝβ‰₯0∞} : Β¬x < ∞ ↔ x = ∞ := by rw [lt_top_iff_ne_top, Classical.not_not] #align ennreal.not_lt_top ENNReal.not_lt_top theorem add_ne_top : a + b β‰  ∞ ↔ a β‰  ∞ ∧ b β‰  ∞ := by simpa only [lt_top_iff_ne_top] using add_lt_top #align ennreal.add_ne_top ENNReal.add_ne_top
Mathlib/Data/ENNReal/Operations.lean
206
206
theorem mul_top' : a * ∞ = if a = 0 then 0 else ∞ := by
convert WithTop.mul_top' a
1,123
import Mathlib.Algebra.BigOperators.WithTop import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.ENNReal.Basic #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} section OperationsAndInfty variable {Ξ± : Type*} @[simp] theorem add_eq_top : a + b = ∞ ↔ a = ∞ ∨ b = ∞ := WithTop.add_eq_top #align ennreal.add_eq_top ENNReal.add_eq_top @[simp] theorem add_lt_top : a + b < ∞ ↔ a < ∞ ∧ b < ∞ := WithTop.add_lt_top #align ennreal.add_lt_top ENNReal.add_lt_top theorem toNNReal_add {r₁ rβ‚‚ : ℝβ‰₯0∞} (h₁ : r₁ β‰  ∞) (hβ‚‚ : rβ‚‚ β‰  ∞) : (r₁ + rβ‚‚).toNNReal = r₁.toNNReal + rβ‚‚.toNNReal := by lift r₁ to ℝβ‰₯0 using h₁ lift rβ‚‚ to ℝβ‰₯0 using hβ‚‚ rfl #align ennreal.to_nnreal_add ENNReal.toNNReal_add theorem not_lt_top {x : ℝβ‰₯0∞} : Β¬x < ∞ ↔ x = ∞ := by rw [lt_top_iff_ne_top, Classical.not_not] #align ennreal.not_lt_top ENNReal.not_lt_top theorem add_ne_top : a + b β‰  ∞ ↔ a β‰  ∞ ∧ b β‰  ∞ := by simpa only [lt_top_iff_ne_top] using add_lt_top #align ennreal.add_ne_top ENNReal.add_ne_top theorem mul_top' : a * ∞ = if a = 0 then 0 else ∞ := by convert WithTop.mul_top' a #align ennreal.mul_top ENNReal.mul_top' -- Porting note: added because `simp` no longer uses `WithTop` lemmas for `ℝβ‰₯0∞` @[simp] theorem mul_top (h : a β‰  0) : a * ∞ = ∞ := WithTop.mul_top h
Mathlib/Data/ENNReal/Operations.lean
212
212
theorem top_mul' : ∞ * a = if a = 0 then 0 else ∞ := by
convert WithTop.top_mul' a
1,123
import Mathlib.Algebra.BigOperators.WithTop import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.ENNReal.Basic #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} section OperationsAndInfty variable {Ξ± : Type*} @[simp] theorem add_eq_top : a + b = ∞ ↔ a = ∞ ∨ b = ∞ := WithTop.add_eq_top #align ennreal.add_eq_top ENNReal.add_eq_top @[simp] theorem add_lt_top : a + b < ∞ ↔ a < ∞ ∧ b < ∞ := WithTop.add_lt_top #align ennreal.add_lt_top ENNReal.add_lt_top theorem toNNReal_add {r₁ rβ‚‚ : ℝβ‰₯0∞} (h₁ : r₁ β‰  ∞) (hβ‚‚ : rβ‚‚ β‰  ∞) : (r₁ + rβ‚‚).toNNReal = r₁.toNNReal + rβ‚‚.toNNReal := by lift r₁ to ℝβ‰₯0 using h₁ lift rβ‚‚ to ℝβ‰₯0 using hβ‚‚ rfl #align ennreal.to_nnreal_add ENNReal.toNNReal_add theorem not_lt_top {x : ℝβ‰₯0∞} : Β¬x < ∞ ↔ x = ∞ := by rw [lt_top_iff_ne_top, Classical.not_not] #align ennreal.not_lt_top ENNReal.not_lt_top theorem add_ne_top : a + b β‰  ∞ ↔ a β‰  ∞ ∧ b β‰  ∞ := by simpa only [lt_top_iff_ne_top] using add_lt_top #align ennreal.add_ne_top ENNReal.add_ne_top theorem mul_top' : a * ∞ = if a = 0 then 0 else ∞ := by convert WithTop.mul_top' a #align ennreal.mul_top ENNReal.mul_top' -- Porting note: added because `simp` no longer uses `WithTop` lemmas for `ℝβ‰₯0∞` @[simp] theorem mul_top (h : a β‰  0) : a * ∞ = ∞ := WithTop.mul_top h theorem top_mul' : ∞ * a = if a = 0 then 0 else ∞ := by convert WithTop.top_mul' a #align ennreal.top_mul ENNReal.top_mul' -- Porting note: added because `simp` no longer uses `WithTop` lemmas for `ℝβ‰₯0∞` @[simp] theorem top_mul (h : a β‰  0) : ∞ * a = ∞ := WithTop.top_mul h theorem top_mul_top : ∞ * ∞ = ∞ := WithTop.top_mul_top #align ennreal.top_mul_top ENNReal.top_mul_top -- Porting note (#11215): TODO: assume `n β‰  0` instead of `0 < n` -- Porting note (#11215): TODO: generalize to `WithTop` theorem top_pow {n : β„•} (h : 0 < n) : ∞ ^ n = ∞ := Nat.le_induction (pow_one _) (fun m _ hm => by rw [pow_succ, hm, top_mul_top]) _ (Nat.succ_le_of_lt h) #align ennreal.top_pow ENNReal.top_pow theorem mul_eq_top : a * b = ∞ ↔ a β‰  0 ∧ b = ∞ ∨ a = ∞ ∧ b β‰  0 := WithTop.mul_eq_top_iff #align ennreal.mul_eq_top ENNReal.mul_eq_top theorem mul_lt_top : a β‰  ∞ β†’ b β‰  ∞ β†’ a * b < ∞ := WithTop.mul_lt_top #align ennreal.mul_lt_top ENNReal.mul_lt_top
Mathlib/Data/ENNReal/Operations.lean
235
235
theorem mul_ne_top : a β‰  ∞ β†’ b β‰  ∞ β†’ a * b β‰  ∞ := by
simpa only [lt_top_iff_ne_top] using mul_lt_top
1,123
import Mathlib.Algebra.BigOperators.WithTop import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.ENNReal.Basic #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} section OperationsAndInfty variable {Ξ± : Type*} @[simp] theorem add_eq_top : a + b = ∞ ↔ a = ∞ ∨ b = ∞ := WithTop.add_eq_top #align ennreal.add_eq_top ENNReal.add_eq_top @[simp] theorem add_lt_top : a + b < ∞ ↔ a < ∞ ∧ b < ∞ := WithTop.add_lt_top #align ennreal.add_lt_top ENNReal.add_lt_top theorem toNNReal_add {r₁ rβ‚‚ : ℝβ‰₯0∞} (h₁ : r₁ β‰  ∞) (hβ‚‚ : rβ‚‚ β‰  ∞) : (r₁ + rβ‚‚).toNNReal = r₁.toNNReal + rβ‚‚.toNNReal := by lift r₁ to ℝβ‰₯0 using h₁ lift rβ‚‚ to ℝβ‰₯0 using hβ‚‚ rfl #align ennreal.to_nnreal_add ENNReal.toNNReal_add theorem not_lt_top {x : ℝβ‰₯0∞} : Β¬x < ∞ ↔ x = ∞ := by rw [lt_top_iff_ne_top, Classical.not_not] #align ennreal.not_lt_top ENNReal.not_lt_top theorem add_ne_top : a + b β‰  ∞ ↔ a β‰  ∞ ∧ b β‰  ∞ := by simpa only [lt_top_iff_ne_top] using add_lt_top #align ennreal.add_ne_top ENNReal.add_ne_top theorem mul_top' : a * ∞ = if a = 0 then 0 else ∞ := by convert WithTop.mul_top' a #align ennreal.mul_top ENNReal.mul_top' -- Porting note: added because `simp` no longer uses `WithTop` lemmas for `ℝβ‰₯0∞` @[simp] theorem mul_top (h : a β‰  0) : a * ∞ = ∞ := WithTop.mul_top h theorem top_mul' : ∞ * a = if a = 0 then 0 else ∞ := by convert WithTop.top_mul' a #align ennreal.top_mul ENNReal.top_mul' -- Porting note: added because `simp` no longer uses `WithTop` lemmas for `ℝβ‰₯0∞` @[simp] theorem top_mul (h : a β‰  0) : ∞ * a = ∞ := WithTop.top_mul h theorem top_mul_top : ∞ * ∞ = ∞ := WithTop.top_mul_top #align ennreal.top_mul_top ENNReal.top_mul_top -- Porting note (#11215): TODO: assume `n β‰  0` instead of `0 < n` -- Porting note (#11215): TODO: generalize to `WithTop` theorem top_pow {n : β„•} (h : 0 < n) : ∞ ^ n = ∞ := Nat.le_induction (pow_one _) (fun m _ hm => by rw [pow_succ, hm, top_mul_top]) _ (Nat.succ_le_of_lt h) #align ennreal.top_pow ENNReal.top_pow theorem mul_eq_top : a * b = ∞ ↔ a β‰  0 ∧ b = ∞ ∨ a = ∞ ∧ b β‰  0 := WithTop.mul_eq_top_iff #align ennreal.mul_eq_top ENNReal.mul_eq_top theorem mul_lt_top : a β‰  ∞ β†’ b β‰  ∞ β†’ a * b < ∞ := WithTop.mul_lt_top #align ennreal.mul_lt_top ENNReal.mul_lt_top theorem mul_ne_top : a β‰  ∞ β†’ b β‰  ∞ β†’ a * b β‰  ∞ := by simpa only [lt_top_iff_ne_top] using mul_lt_top #align ennreal.mul_ne_top ENNReal.mul_ne_top theorem lt_top_of_mul_ne_top_left (h : a * b β‰  ∞) (hb : b β‰  0) : a < ∞ := lt_top_iff_ne_top.2 fun ha => h <| mul_eq_top.2 (Or.inr ⟨ha, hb⟩) #align ennreal.lt_top_of_mul_ne_top_left ENNReal.lt_top_of_mul_ne_top_left theorem lt_top_of_mul_ne_top_right (h : a * b β‰  ∞) (ha : a β‰  0) : b < ∞ := lt_top_of_mul_ne_top_left (by rwa [mul_comm]) ha #align ennreal.lt_top_of_mul_ne_top_right ENNReal.lt_top_of_mul_ne_top_right
Mathlib/Data/ENNReal/Operations.lean
246
252
theorem mul_lt_top_iff {a b : ℝβ‰₯0∞} : a * b < ∞ ↔ a < ∞ ∧ b < ∞ ∨ a = 0 ∨ b = 0 := by
constructor Β· intro h rw [← or_assoc, or_iff_not_imp_right, or_iff_not_imp_right] intro hb ha exact ⟨lt_top_of_mul_ne_top_left h.ne hb, lt_top_of_mul_ne_top_right h.ne ha⟩ Β· rintro (⟨ha, hb⟩ | rfl | rfl) <;> [exact mul_lt_top ha.ne hb.ne; simp; simp]
1,123
import Mathlib.Algebra.BigOperators.WithTop import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.ENNReal.Basic #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} section OperationsAndInfty variable {Ξ± : Type*} @[simp] theorem add_eq_top : a + b = ∞ ↔ a = ∞ ∨ b = ∞ := WithTop.add_eq_top #align ennreal.add_eq_top ENNReal.add_eq_top @[simp] theorem add_lt_top : a + b < ∞ ↔ a < ∞ ∧ b < ∞ := WithTop.add_lt_top #align ennreal.add_lt_top ENNReal.add_lt_top theorem toNNReal_add {r₁ rβ‚‚ : ℝβ‰₯0∞} (h₁ : r₁ β‰  ∞) (hβ‚‚ : rβ‚‚ β‰  ∞) : (r₁ + rβ‚‚).toNNReal = r₁.toNNReal + rβ‚‚.toNNReal := by lift r₁ to ℝβ‰₯0 using h₁ lift rβ‚‚ to ℝβ‰₯0 using hβ‚‚ rfl #align ennreal.to_nnreal_add ENNReal.toNNReal_add theorem not_lt_top {x : ℝβ‰₯0∞} : Β¬x < ∞ ↔ x = ∞ := by rw [lt_top_iff_ne_top, Classical.not_not] #align ennreal.not_lt_top ENNReal.not_lt_top theorem add_ne_top : a + b β‰  ∞ ↔ a β‰  ∞ ∧ b β‰  ∞ := by simpa only [lt_top_iff_ne_top] using add_lt_top #align ennreal.add_ne_top ENNReal.add_ne_top theorem mul_top' : a * ∞ = if a = 0 then 0 else ∞ := by convert WithTop.mul_top' a #align ennreal.mul_top ENNReal.mul_top' -- Porting note: added because `simp` no longer uses `WithTop` lemmas for `ℝβ‰₯0∞` @[simp] theorem mul_top (h : a β‰  0) : a * ∞ = ∞ := WithTop.mul_top h theorem top_mul' : ∞ * a = if a = 0 then 0 else ∞ := by convert WithTop.top_mul' a #align ennreal.top_mul ENNReal.top_mul' -- Porting note: added because `simp` no longer uses `WithTop` lemmas for `ℝβ‰₯0∞` @[simp] theorem top_mul (h : a β‰  0) : ∞ * a = ∞ := WithTop.top_mul h theorem top_mul_top : ∞ * ∞ = ∞ := WithTop.top_mul_top #align ennreal.top_mul_top ENNReal.top_mul_top -- Porting note (#11215): TODO: assume `n β‰  0` instead of `0 < n` -- Porting note (#11215): TODO: generalize to `WithTop` theorem top_pow {n : β„•} (h : 0 < n) : ∞ ^ n = ∞ := Nat.le_induction (pow_one _) (fun m _ hm => by rw [pow_succ, hm, top_mul_top]) _ (Nat.succ_le_of_lt h) #align ennreal.top_pow ENNReal.top_pow theorem mul_eq_top : a * b = ∞ ↔ a β‰  0 ∧ b = ∞ ∨ a = ∞ ∧ b β‰  0 := WithTop.mul_eq_top_iff #align ennreal.mul_eq_top ENNReal.mul_eq_top theorem mul_lt_top : a β‰  ∞ β†’ b β‰  ∞ β†’ a * b < ∞ := WithTop.mul_lt_top #align ennreal.mul_lt_top ENNReal.mul_lt_top theorem mul_ne_top : a β‰  ∞ β†’ b β‰  ∞ β†’ a * b β‰  ∞ := by simpa only [lt_top_iff_ne_top] using mul_lt_top #align ennreal.mul_ne_top ENNReal.mul_ne_top theorem lt_top_of_mul_ne_top_left (h : a * b β‰  ∞) (hb : b β‰  0) : a < ∞ := lt_top_iff_ne_top.2 fun ha => h <| mul_eq_top.2 (Or.inr ⟨ha, hb⟩) #align ennreal.lt_top_of_mul_ne_top_left ENNReal.lt_top_of_mul_ne_top_left theorem lt_top_of_mul_ne_top_right (h : a * b β‰  ∞) (ha : a β‰  0) : b < ∞ := lt_top_of_mul_ne_top_left (by rwa [mul_comm]) ha #align ennreal.lt_top_of_mul_ne_top_right ENNReal.lt_top_of_mul_ne_top_right theorem mul_lt_top_iff {a b : ℝβ‰₯0∞} : a * b < ∞ ↔ a < ∞ ∧ b < ∞ ∨ a = 0 ∨ b = 0 := by constructor Β· intro h rw [← or_assoc, or_iff_not_imp_right, or_iff_not_imp_right] intro hb ha exact ⟨lt_top_of_mul_ne_top_left h.ne hb, lt_top_of_mul_ne_top_right h.ne ha⟩ Β· rintro (⟨ha, hb⟩ | rfl | rfl) <;> [exact mul_lt_top ha.ne hb.ne; simp; simp] #align ennreal.mul_lt_top_iff ENNReal.mul_lt_top_iff
Mathlib/Data/ENNReal/Operations.lean
255
258
theorem mul_self_lt_top_iff {a : ℝβ‰₯0∞} : a * a < ⊀ ↔ a < ⊀ := by
rw [ENNReal.mul_lt_top_iff, and_self, or_self, or_iff_left_iff_imp] rintro rfl exact zero_lt_top
1,123
import Mathlib.Data.ENNReal.Operations #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal namespace ENNReal noncomputable section Inv variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} protected theorem div_eq_inv_mul : a / b = b⁻¹ * a := by rw [div_eq_mul_inv, mul_comm] #align ennreal.div_eq_inv_mul ENNReal.div_eq_inv_mul @[simp] theorem inv_zero : (0 : ℝβ‰₯0∞)⁻¹ = ∞ := show sInf { b : ℝβ‰₯0∞ | 1 ≀ 0 * b } = ∞ by simp #align ennreal.inv_zero ENNReal.inv_zero @[simp] theorem inv_top : ∞⁻¹ = 0 := bot_unique <| le_of_forall_le_of_dense fun a (h : 0 < a) => sInf_le <| by simp [*, h.ne', top_mul] #align ennreal.inv_top ENNReal.inv_top theorem coe_inv_le : (↑r⁻¹ : ℝβ‰₯0∞) ≀ (↑r)⁻¹ := le_sInf fun b (hb : 1 ≀ ↑r * b) => coe_le_iff.2 <| by rintro b rfl apply NNReal.inv_le_of_le_mul rwa [← coe_mul, ← coe_one, coe_le_coe] at hb #align ennreal.coe_inv_le ENNReal.coe_inv_le @[simp, norm_cast] theorem coe_inv (hr : r β‰  0) : (↑r⁻¹ : ℝβ‰₯0∞) = (↑r)⁻¹ := coe_inv_le.antisymm <| sInf_le <| mem_setOf.2 <| by rw [← coe_mul, mul_inv_cancel hr, coe_one] #align ennreal.coe_inv ENNReal.coe_inv @[norm_cast]
Mathlib/Data/ENNReal/Inv.lean
68
68
theorem coe_inv_two : ((2⁻¹ : ℝβ‰₯0) : ℝβ‰₯0∞) = 2⁻¹ := by
rw [coe_inv _root_.two_ne_zero, coe_two]
1,124
import Mathlib.Data.ENNReal.Operations #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal namespace ENNReal noncomputable section Inv variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} protected theorem div_eq_inv_mul : a / b = b⁻¹ * a := by rw [div_eq_mul_inv, mul_comm] #align ennreal.div_eq_inv_mul ENNReal.div_eq_inv_mul @[simp] theorem inv_zero : (0 : ℝβ‰₯0∞)⁻¹ = ∞ := show sInf { b : ℝβ‰₯0∞ | 1 ≀ 0 * b } = ∞ by simp #align ennreal.inv_zero ENNReal.inv_zero @[simp] theorem inv_top : ∞⁻¹ = 0 := bot_unique <| le_of_forall_le_of_dense fun a (h : 0 < a) => sInf_le <| by simp [*, h.ne', top_mul] #align ennreal.inv_top ENNReal.inv_top theorem coe_inv_le : (↑r⁻¹ : ℝβ‰₯0∞) ≀ (↑r)⁻¹ := le_sInf fun b (hb : 1 ≀ ↑r * b) => coe_le_iff.2 <| by rintro b rfl apply NNReal.inv_le_of_le_mul rwa [← coe_mul, ← coe_one, coe_le_coe] at hb #align ennreal.coe_inv_le ENNReal.coe_inv_le @[simp, norm_cast] theorem coe_inv (hr : r β‰  0) : (↑r⁻¹ : ℝβ‰₯0∞) = (↑r)⁻¹ := coe_inv_le.antisymm <| sInf_le <| mem_setOf.2 <| by rw [← coe_mul, mul_inv_cancel hr, coe_one] #align ennreal.coe_inv ENNReal.coe_inv @[norm_cast] theorem coe_inv_two : ((2⁻¹ : ℝβ‰₯0) : ℝβ‰₯0∞) = 2⁻¹ := by rw [coe_inv _root_.two_ne_zero, coe_two] #align ennreal.coe_inv_two ENNReal.coe_inv_two @[simp, norm_cast]
Mathlib/Data/ENNReal/Inv.lean
72
73
theorem coe_div (hr : r β‰  0) : (↑(p / r) : ℝβ‰₯0∞) = p / r := by
rw [div_eq_mul_inv, div_eq_mul_inv, coe_mul, coe_inv hr]
1,124
import Mathlib.Data.ENNReal.Operations #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal namespace ENNReal noncomputable section Inv variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} protected theorem div_eq_inv_mul : a / b = b⁻¹ * a := by rw [div_eq_mul_inv, mul_comm] #align ennreal.div_eq_inv_mul ENNReal.div_eq_inv_mul @[simp] theorem inv_zero : (0 : ℝβ‰₯0∞)⁻¹ = ∞ := show sInf { b : ℝβ‰₯0∞ | 1 ≀ 0 * b } = ∞ by simp #align ennreal.inv_zero ENNReal.inv_zero @[simp] theorem inv_top : ∞⁻¹ = 0 := bot_unique <| le_of_forall_le_of_dense fun a (h : 0 < a) => sInf_le <| by simp [*, h.ne', top_mul] #align ennreal.inv_top ENNReal.inv_top theorem coe_inv_le : (↑r⁻¹ : ℝβ‰₯0∞) ≀ (↑r)⁻¹ := le_sInf fun b (hb : 1 ≀ ↑r * b) => coe_le_iff.2 <| by rintro b rfl apply NNReal.inv_le_of_le_mul rwa [← coe_mul, ← coe_one, coe_le_coe] at hb #align ennreal.coe_inv_le ENNReal.coe_inv_le @[simp, norm_cast] theorem coe_inv (hr : r β‰  0) : (↑r⁻¹ : ℝβ‰₯0∞) = (↑r)⁻¹ := coe_inv_le.antisymm <| sInf_le <| mem_setOf.2 <| by rw [← coe_mul, mul_inv_cancel hr, coe_one] #align ennreal.coe_inv ENNReal.coe_inv @[norm_cast] theorem coe_inv_two : ((2⁻¹ : ℝβ‰₯0) : ℝβ‰₯0∞) = 2⁻¹ := by rw [coe_inv _root_.two_ne_zero, coe_two] #align ennreal.coe_inv_two ENNReal.coe_inv_two @[simp, norm_cast] theorem coe_div (hr : r β‰  0) : (↑(p / r) : ℝβ‰₯0∞) = p / r := by rw [div_eq_mul_inv, div_eq_mul_inv, coe_mul, coe_inv hr] #align ennreal.coe_div ENNReal.coe_div lemma coe_div_le : ↑(p / r) ≀ (p / r : ℝβ‰₯0∞) := by simpa only [div_eq_mul_inv, coe_mul] using mul_le_mul_left' coe_inv_le _
Mathlib/Data/ENNReal/Inv.lean
79
79
theorem div_zero (h : a β‰  0) : a / 0 = ∞ := by
simp [div_eq_mul_inv, h]
1,124
import Mathlib.Data.ENNReal.Operations #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal namespace ENNReal noncomputable section Inv variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} protected theorem div_eq_inv_mul : a / b = b⁻¹ * a := by rw [div_eq_mul_inv, mul_comm] #align ennreal.div_eq_inv_mul ENNReal.div_eq_inv_mul @[simp] theorem inv_zero : (0 : ℝβ‰₯0∞)⁻¹ = ∞ := show sInf { b : ℝβ‰₯0∞ | 1 ≀ 0 * b } = ∞ by simp #align ennreal.inv_zero ENNReal.inv_zero @[simp] theorem inv_top : ∞⁻¹ = 0 := bot_unique <| le_of_forall_le_of_dense fun a (h : 0 < a) => sInf_le <| by simp [*, h.ne', top_mul] #align ennreal.inv_top ENNReal.inv_top theorem coe_inv_le : (↑r⁻¹ : ℝβ‰₯0∞) ≀ (↑r)⁻¹ := le_sInf fun b (hb : 1 ≀ ↑r * b) => coe_le_iff.2 <| by rintro b rfl apply NNReal.inv_le_of_le_mul rwa [← coe_mul, ← coe_one, coe_le_coe] at hb #align ennreal.coe_inv_le ENNReal.coe_inv_le @[simp, norm_cast] theorem coe_inv (hr : r β‰  0) : (↑r⁻¹ : ℝβ‰₯0∞) = (↑r)⁻¹ := coe_inv_le.antisymm <| sInf_le <| mem_setOf.2 <| by rw [← coe_mul, mul_inv_cancel hr, coe_one] #align ennreal.coe_inv ENNReal.coe_inv @[norm_cast] theorem coe_inv_two : ((2⁻¹ : ℝβ‰₯0) : ℝβ‰₯0∞) = 2⁻¹ := by rw [coe_inv _root_.two_ne_zero, coe_two] #align ennreal.coe_inv_two ENNReal.coe_inv_two @[simp, norm_cast] theorem coe_div (hr : r β‰  0) : (↑(p / r) : ℝβ‰₯0∞) = p / r := by rw [div_eq_mul_inv, div_eq_mul_inv, coe_mul, coe_inv hr] #align ennreal.coe_div ENNReal.coe_div lemma coe_div_le : ↑(p / r) ≀ (p / r : ℝβ‰₯0∞) := by simpa only [div_eq_mul_inv, coe_mul] using mul_le_mul_left' coe_inv_le _ theorem div_zero (h : a β‰  0) : a / 0 = ∞ := by simp [div_eq_mul_inv, h] #align ennreal.div_zero ENNReal.div_zero instance : DivInvOneMonoid ℝβ‰₯0∞ := { inferInstanceAs (DivInvMonoid ℝβ‰₯0∞) with inv_one := by simpa only [coe_inv one_ne_zero, coe_one] using coe_inj.2 inv_one } protected theorem inv_pow : βˆ€ {a : ℝβ‰₯0∞} {n : β„•}, (a ^ n)⁻¹ = a⁻¹ ^ n | _, 0 => by simp only [pow_zero, inv_one] | ⊀, n + 1 => by simp [top_pow] | (a : ℝβ‰₯0), n + 1 => by rcases eq_or_ne a 0 with (rfl | ha) Β· simp [top_pow] Β· have := pow_ne_zero (n + 1) ha norm_cast rw [inv_pow] #align ennreal.inv_pow ENNReal.inv_pow protected theorem mul_inv_cancel (h0 : a β‰  0) (ht : a β‰  ∞) : a * a⁻¹ = 1 := by lift a to ℝβ‰₯0 using ht norm_cast at h0; norm_cast exact mul_inv_cancel h0 #align ennreal.mul_inv_cancel ENNReal.mul_inv_cancel protected theorem inv_mul_cancel (h0 : a β‰  0) (ht : a β‰  ∞) : a⁻¹ * a = 1 := mul_comm a a⁻¹ β–Έ ENNReal.mul_inv_cancel h0 ht #align ennreal.inv_mul_cancel ENNReal.inv_mul_cancel protected theorem div_mul_cancel (h0 : a β‰  0) (hI : a β‰  ∞) : b / a * a = b := by rw [div_eq_mul_inv, mul_assoc, ENNReal.inv_mul_cancel h0 hI, mul_one] #align ennreal.div_mul_cancel ENNReal.div_mul_cancel protected theorem mul_div_cancel' (h0 : a β‰  0) (hI : a β‰  ∞) : a * (b / a) = b := by rw [mul_comm, ENNReal.div_mul_cancel h0 hI] #align ennreal.mul_div_cancel' ENNReal.mul_div_cancel' -- Porting note: `simp only [div_eq_mul_inv, mul_comm, mul_assoc]` doesn't work in the following two protected theorem mul_comm_div : a / b * c = a * (c / b) := by simp only [div_eq_mul_inv, mul_right_comm, ← mul_assoc] #align ennreal.mul_comm_div ENNReal.mul_comm_div protected theorem mul_div_right_comm : a * b / c = a / c * b := by simp only [div_eq_mul_inv, mul_right_comm] #align ennreal.mul_div_right_comm ENNReal.mul_div_right_comm instance : InvolutiveInv ℝβ‰₯0∞ where inv_inv a := by by_cases a = 0 <;> cases a <;> simp_all [none_eq_top, some_eq_coe, -coe_inv, (coe_inv _).symm] @[simp] protected lemma inv_eq_one : a⁻¹ = 1 ↔ a = 1 := by rw [← inv_inj, inv_inv, inv_one] @[simp] theorem inv_eq_top : a⁻¹ = ∞ ↔ a = 0 := inv_zero β–Έ inv_inj #align ennreal.inv_eq_top ENNReal.inv_eq_top
Mathlib/Data/ENNReal/Inv.lean
133
133
theorem inv_ne_top : a⁻¹ β‰  ∞ ↔ a β‰  0 := by
simp
1,124
import Mathlib.Data.ENNReal.Operations #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal namespace ENNReal noncomputable section Inv variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} protected theorem div_eq_inv_mul : a / b = b⁻¹ * a := by rw [div_eq_mul_inv, mul_comm] #align ennreal.div_eq_inv_mul ENNReal.div_eq_inv_mul @[simp] theorem inv_zero : (0 : ℝβ‰₯0∞)⁻¹ = ∞ := show sInf { b : ℝβ‰₯0∞ | 1 ≀ 0 * b } = ∞ by simp #align ennreal.inv_zero ENNReal.inv_zero @[simp] theorem inv_top : ∞⁻¹ = 0 := bot_unique <| le_of_forall_le_of_dense fun a (h : 0 < a) => sInf_le <| by simp [*, h.ne', top_mul] #align ennreal.inv_top ENNReal.inv_top theorem coe_inv_le : (↑r⁻¹ : ℝβ‰₯0∞) ≀ (↑r)⁻¹ := le_sInf fun b (hb : 1 ≀ ↑r * b) => coe_le_iff.2 <| by rintro b rfl apply NNReal.inv_le_of_le_mul rwa [← coe_mul, ← coe_one, coe_le_coe] at hb #align ennreal.coe_inv_le ENNReal.coe_inv_le @[simp, norm_cast] theorem coe_inv (hr : r β‰  0) : (↑r⁻¹ : ℝβ‰₯0∞) = (↑r)⁻¹ := coe_inv_le.antisymm <| sInf_le <| mem_setOf.2 <| by rw [← coe_mul, mul_inv_cancel hr, coe_one] #align ennreal.coe_inv ENNReal.coe_inv @[norm_cast] theorem coe_inv_two : ((2⁻¹ : ℝβ‰₯0) : ℝβ‰₯0∞) = 2⁻¹ := by rw [coe_inv _root_.two_ne_zero, coe_two] #align ennreal.coe_inv_two ENNReal.coe_inv_two @[simp, norm_cast] theorem coe_div (hr : r β‰  0) : (↑(p / r) : ℝβ‰₯0∞) = p / r := by rw [div_eq_mul_inv, div_eq_mul_inv, coe_mul, coe_inv hr] #align ennreal.coe_div ENNReal.coe_div lemma coe_div_le : ↑(p / r) ≀ (p / r : ℝβ‰₯0∞) := by simpa only [div_eq_mul_inv, coe_mul] using mul_le_mul_left' coe_inv_le _ theorem div_zero (h : a β‰  0) : a / 0 = ∞ := by simp [div_eq_mul_inv, h] #align ennreal.div_zero ENNReal.div_zero instance : DivInvOneMonoid ℝβ‰₯0∞ := { inferInstanceAs (DivInvMonoid ℝβ‰₯0∞) with inv_one := by simpa only [coe_inv one_ne_zero, coe_one] using coe_inj.2 inv_one } protected theorem inv_pow : βˆ€ {a : ℝβ‰₯0∞} {n : β„•}, (a ^ n)⁻¹ = a⁻¹ ^ n | _, 0 => by simp only [pow_zero, inv_one] | ⊀, n + 1 => by simp [top_pow] | (a : ℝβ‰₯0), n + 1 => by rcases eq_or_ne a 0 with (rfl | ha) Β· simp [top_pow] Β· have := pow_ne_zero (n + 1) ha norm_cast rw [inv_pow] #align ennreal.inv_pow ENNReal.inv_pow protected theorem mul_inv_cancel (h0 : a β‰  0) (ht : a β‰  ∞) : a * a⁻¹ = 1 := by lift a to ℝβ‰₯0 using ht norm_cast at h0; norm_cast exact mul_inv_cancel h0 #align ennreal.mul_inv_cancel ENNReal.mul_inv_cancel protected theorem inv_mul_cancel (h0 : a β‰  0) (ht : a β‰  ∞) : a⁻¹ * a = 1 := mul_comm a a⁻¹ β–Έ ENNReal.mul_inv_cancel h0 ht #align ennreal.inv_mul_cancel ENNReal.inv_mul_cancel protected theorem div_mul_cancel (h0 : a β‰  0) (hI : a β‰  ∞) : b / a * a = b := by rw [div_eq_mul_inv, mul_assoc, ENNReal.inv_mul_cancel h0 hI, mul_one] #align ennreal.div_mul_cancel ENNReal.div_mul_cancel protected theorem mul_div_cancel' (h0 : a β‰  0) (hI : a β‰  ∞) : a * (b / a) = b := by rw [mul_comm, ENNReal.div_mul_cancel h0 hI] #align ennreal.mul_div_cancel' ENNReal.mul_div_cancel' -- Porting note: `simp only [div_eq_mul_inv, mul_comm, mul_assoc]` doesn't work in the following two protected theorem mul_comm_div : a / b * c = a * (c / b) := by simp only [div_eq_mul_inv, mul_right_comm, ← mul_assoc] #align ennreal.mul_comm_div ENNReal.mul_comm_div protected theorem mul_div_right_comm : a * b / c = a / c * b := by simp only [div_eq_mul_inv, mul_right_comm] #align ennreal.mul_div_right_comm ENNReal.mul_div_right_comm instance : InvolutiveInv ℝβ‰₯0∞ where inv_inv a := by by_cases a = 0 <;> cases a <;> simp_all [none_eq_top, some_eq_coe, -coe_inv, (coe_inv _).symm] @[simp] protected lemma inv_eq_one : a⁻¹ = 1 ↔ a = 1 := by rw [← inv_inj, inv_inv, inv_one] @[simp] theorem inv_eq_top : a⁻¹ = ∞ ↔ a = 0 := inv_zero β–Έ inv_inj #align ennreal.inv_eq_top ENNReal.inv_eq_top theorem inv_ne_top : a⁻¹ β‰  ∞ ↔ a β‰  0 := by simp #align ennreal.inv_ne_top ENNReal.inv_ne_top @[simp]
Mathlib/Data/ENNReal/Inv.lean
137
138
theorem inv_lt_top {x : ℝβ‰₯0∞} : x⁻¹ < ∞ ↔ 0 < x := by
simp only [lt_top_iff_ne_top, inv_ne_top, pos_iff_ne_zero]
1,124
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section Real variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0}
Mathlib/Data/ENNReal/Real.lean
37
40
theorem toReal_add (ha : a β‰  ∞) (hb : b β‰  ∞) : (a + b).toReal = a.toReal + b.toReal := by
lift a to ℝβ‰₯0 using ha lift b to ℝβ‰₯0 using hb rfl
1,125
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section Real variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toReal_add (ha : a β‰  ∞) (hb : b β‰  ∞) : (a + b).toReal = a.toReal + b.toReal := by lift a to ℝβ‰₯0 using ha lift b to ℝβ‰₯0 using hb rfl #align ennreal.to_real_add ENNReal.toReal_add
Mathlib/Data/ENNReal/Real.lean
43
47
theorem toReal_sub_of_le {a b : ℝβ‰₯0∞} (h : b ≀ a) (ha : a β‰  ∞) : (a - b).toReal = a.toReal - b.toReal := by
lift b to ℝβ‰₯0 using ne_top_of_le_ne_top ha h lift a to ℝβ‰₯0 using ha simp only [← ENNReal.coe_sub, ENNReal.coe_toReal, NNReal.coe_sub (ENNReal.coe_le_coe.mp h)]
1,125
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section Real variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toReal_add (ha : a β‰  ∞) (hb : b β‰  ∞) : (a + b).toReal = a.toReal + b.toReal := by lift a to ℝβ‰₯0 using ha lift b to ℝβ‰₯0 using hb rfl #align ennreal.to_real_add ENNReal.toReal_add theorem toReal_sub_of_le {a b : ℝβ‰₯0∞} (h : b ≀ a) (ha : a β‰  ∞) : (a - b).toReal = a.toReal - b.toReal := by lift b to ℝβ‰₯0 using ne_top_of_le_ne_top ha h lift a to ℝβ‰₯0 using ha simp only [← ENNReal.coe_sub, ENNReal.coe_toReal, NNReal.coe_sub (ENNReal.coe_le_coe.mp h)] #align ennreal.to_real_sub_of_le ENNReal.toReal_sub_of_le
Mathlib/Data/ENNReal/Real.lean
50
55
theorem le_toReal_sub {a b : ℝβ‰₯0∞} (hb : b β‰  ∞) : a.toReal - b.toReal ≀ (a - b).toReal := by
lift b to ℝβ‰₯0 using hb induction a Β· simp Β· simp only [← coe_sub, NNReal.sub_def, Real.coe_toNNReal', coe_toReal] exact le_max_left _ _
1,125
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section Real variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toReal_add (ha : a β‰  ∞) (hb : b β‰  ∞) : (a + b).toReal = a.toReal + b.toReal := by lift a to ℝβ‰₯0 using ha lift b to ℝβ‰₯0 using hb rfl #align ennreal.to_real_add ENNReal.toReal_add theorem toReal_sub_of_le {a b : ℝβ‰₯0∞} (h : b ≀ a) (ha : a β‰  ∞) : (a - b).toReal = a.toReal - b.toReal := by lift b to ℝβ‰₯0 using ne_top_of_le_ne_top ha h lift a to ℝβ‰₯0 using ha simp only [← ENNReal.coe_sub, ENNReal.coe_toReal, NNReal.coe_sub (ENNReal.coe_le_coe.mp h)] #align ennreal.to_real_sub_of_le ENNReal.toReal_sub_of_le theorem le_toReal_sub {a b : ℝβ‰₯0∞} (hb : b β‰  ∞) : a.toReal - b.toReal ≀ (a - b).toReal := by lift b to ℝβ‰₯0 using hb induction a Β· simp Β· simp only [← coe_sub, NNReal.sub_def, Real.coe_toNNReal', coe_toReal] exact le_max_left _ _ #align ennreal.le_to_real_sub ENNReal.le_toReal_sub theorem toReal_add_le : (a + b).toReal ≀ a.toReal + b.toReal := if ha : a = ∞ then by simp only [ha, top_add, top_toReal, zero_add, toReal_nonneg] else if hb : b = ∞ then by simp only [hb, add_top, top_toReal, add_zero, toReal_nonneg] else le_of_eq (toReal_add ha hb) #align ennreal.to_real_add_le ENNReal.toReal_add_le
Mathlib/Data/ENNReal/Real.lean
65
68
theorem ofReal_add {p q : ℝ} (hp : 0 ≀ p) (hq : 0 ≀ q) : ENNReal.ofReal (p + q) = ENNReal.ofReal p + ENNReal.ofReal q := by
rw [ENNReal.ofReal, ENNReal.ofReal, ENNReal.ofReal, ← coe_add, coe_inj, Real.toNNReal_add hp hq]
1,125
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section Real variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toReal_add (ha : a β‰  ∞) (hb : b β‰  ∞) : (a + b).toReal = a.toReal + b.toReal := by lift a to ℝβ‰₯0 using ha lift b to ℝβ‰₯0 using hb rfl #align ennreal.to_real_add ENNReal.toReal_add theorem toReal_sub_of_le {a b : ℝβ‰₯0∞} (h : b ≀ a) (ha : a β‰  ∞) : (a - b).toReal = a.toReal - b.toReal := by lift b to ℝβ‰₯0 using ne_top_of_le_ne_top ha h lift a to ℝβ‰₯0 using ha simp only [← ENNReal.coe_sub, ENNReal.coe_toReal, NNReal.coe_sub (ENNReal.coe_le_coe.mp h)] #align ennreal.to_real_sub_of_le ENNReal.toReal_sub_of_le theorem le_toReal_sub {a b : ℝβ‰₯0∞} (hb : b β‰  ∞) : a.toReal - b.toReal ≀ (a - b).toReal := by lift b to ℝβ‰₯0 using hb induction a Β· simp Β· simp only [← coe_sub, NNReal.sub_def, Real.coe_toNNReal', coe_toReal] exact le_max_left _ _ #align ennreal.le_to_real_sub ENNReal.le_toReal_sub theorem toReal_add_le : (a + b).toReal ≀ a.toReal + b.toReal := if ha : a = ∞ then by simp only [ha, top_add, top_toReal, zero_add, toReal_nonneg] else if hb : b = ∞ then by simp only [hb, add_top, top_toReal, add_zero, toReal_nonneg] else le_of_eq (toReal_add ha hb) #align ennreal.to_real_add_le ENNReal.toReal_add_le theorem ofReal_add {p q : ℝ} (hp : 0 ≀ p) (hq : 0 ≀ q) : ENNReal.ofReal (p + q) = ENNReal.ofReal p + ENNReal.ofReal q := by rw [ENNReal.ofReal, ENNReal.ofReal, ENNReal.ofReal, ← coe_add, coe_inj, Real.toNNReal_add hp hq] #align ennreal.of_real_add ENNReal.ofReal_add theorem ofReal_add_le {p q : ℝ} : ENNReal.ofReal (p + q) ≀ ENNReal.ofReal p + ENNReal.ofReal q := coe_le_coe.2 Real.toNNReal_add_le #align ennreal.of_real_add_le ENNReal.ofReal_add_le @[simp]
Mathlib/Data/ENNReal/Real.lean
76
79
theorem toReal_le_toReal (ha : a β‰  ∞) (hb : b β‰  ∞) : a.toReal ≀ b.toReal ↔ a ≀ b := by
lift a to ℝβ‰₯0 using ha lift b to ℝβ‰₯0 using hb norm_cast
1,125
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section Real variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toReal_add (ha : a β‰  ∞) (hb : b β‰  ∞) : (a + b).toReal = a.toReal + b.toReal := by lift a to ℝβ‰₯0 using ha lift b to ℝβ‰₯0 using hb rfl #align ennreal.to_real_add ENNReal.toReal_add theorem toReal_sub_of_le {a b : ℝβ‰₯0∞} (h : b ≀ a) (ha : a β‰  ∞) : (a - b).toReal = a.toReal - b.toReal := by lift b to ℝβ‰₯0 using ne_top_of_le_ne_top ha h lift a to ℝβ‰₯0 using ha simp only [← ENNReal.coe_sub, ENNReal.coe_toReal, NNReal.coe_sub (ENNReal.coe_le_coe.mp h)] #align ennreal.to_real_sub_of_le ENNReal.toReal_sub_of_le theorem le_toReal_sub {a b : ℝβ‰₯0∞} (hb : b β‰  ∞) : a.toReal - b.toReal ≀ (a - b).toReal := by lift b to ℝβ‰₯0 using hb induction a Β· simp Β· simp only [← coe_sub, NNReal.sub_def, Real.coe_toNNReal', coe_toReal] exact le_max_left _ _ #align ennreal.le_to_real_sub ENNReal.le_toReal_sub theorem toReal_add_le : (a + b).toReal ≀ a.toReal + b.toReal := if ha : a = ∞ then by simp only [ha, top_add, top_toReal, zero_add, toReal_nonneg] else if hb : b = ∞ then by simp only [hb, add_top, top_toReal, add_zero, toReal_nonneg] else le_of_eq (toReal_add ha hb) #align ennreal.to_real_add_le ENNReal.toReal_add_le theorem ofReal_add {p q : ℝ} (hp : 0 ≀ p) (hq : 0 ≀ q) : ENNReal.ofReal (p + q) = ENNReal.ofReal p + ENNReal.ofReal q := by rw [ENNReal.ofReal, ENNReal.ofReal, ENNReal.ofReal, ← coe_add, coe_inj, Real.toNNReal_add hp hq] #align ennreal.of_real_add ENNReal.ofReal_add theorem ofReal_add_le {p q : ℝ} : ENNReal.ofReal (p + q) ≀ ENNReal.ofReal p + ENNReal.ofReal q := coe_le_coe.2 Real.toNNReal_add_le #align ennreal.of_real_add_le ENNReal.ofReal_add_le @[simp] theorem toReal_le_toReal (ha : a β‰  ∞) (hb : b β‰  ∞) : a.toReal ≀ b.toReal ↔ a ≀ b := by lift a to ℝβ‰₯0 using ha lift b to ℝβ‰₯0 using hb norm_cast #align ennreal.to_real_le_to_real ENNReal.toReal_le_toReal @[gcongr] theorem toReal_mono (hb : b β‰  ∞) (h : a ≀ b) : a.toReal ≀ b.toReal := (toReal_le_toReal (ne_top_of_le_ne_top hb h) hb).2 h #align ennreal.to_real_mono ENNReal.toReal_mono -- Porting note (#10756): new lemma
Mathlib/Data/ENNReal/Real.lean
88
91
theorem toReal_mono' (h : a ≀ b) (ht : b = ∞ β†’ a = ∞) : a.toReal ≀ b.toReal := by
rcases eq_or_ne a ∞ with rfl | ha · exact toReal_nonneg · exact toReal_mono (mt ht ha) h
1,125
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section Real variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toReal_add (ha : a β‰  ∞) (hb : b β‰  ∞) : (a + b).toReal = a.toReal + b.toReal := by lift a to ℝβ‰₯0 using ha lift b to ℝβ‰₯0 using hb rfl #align ennreal.to_real_add ENNReal.toReal_add theorem toReal_sub_of_le {a b : ℝβ‰₯0∞} (h : b ≀ a) (ha : a β‰  ∞) : (a - b).toReal = a.toReal - b.toReal := by lift b to ℝβ‰₯0 using ne_top_of_le_ne_top ha h lift a to ℝβ‰₯0 using ha simp only [← ENNReal.coe_sub, ENNReal.coe_toReal, NNReal.coe_sub (ENNReal.coe_le_coe.mp h)] #align ennreal.to_real_sub_of_le ENNReal.toReal_sub_of_le theorem le_toReal_sub {a b : ℝβ‰₯0∞} (hb : b β‰  ∞) : a.toReal - b.toReal ≀ (a - b).toReal := by lift b to ℝβ‰₯0 using hb induction a Β· simp Β· simp only [← coe_sub, NNReal.sub_def, Real.coe_toNNReal', coe_toReal] exact le_max_left _ _ #align ennreal.le_to_real_sub ENNReal.le_toReal_sub theorem toReal_add_le : (a + b).toReal ≀ a.toReal + b.toReal := if ha : a = ∞ then by simp only [ha, top_add, top_toReal, zero_add, toReal_nonneg] else if hb : b = ∞ then by simp only [hb, add_top, top_toReal, add_zero, toReal_nonneg] else le_of_eq (toReal_add ha hb) #align ennreal.to_real_add_le ENNReal.toReal_add_le theorem ofReal_add {p q : ℝ} (hp : 0 ≀ p) (hq : 0 ≀ q) : ENNReal.ofReal (p + q) = ENNReal.ofReal p + ENNReal.ofReal q := by rw [ENNReal.ofReal, ENNReal.ofReal, ENNReal.ofReal, ← coe_add, coe_inj, Real.toNNReal_add hp hq] #align ennreal.of_real_add ENNReal.ofReal_add theorem ofReal_add_le {p q : ℝ} : ENNReal.ofReal (p + q) ≀ ENNReal.ofReal p + ENNReal.ofReal q := coe_le_coe.2 Real.toNNReal_add_le #align ennreal.of_real_add_le ENNReal.ofReal_add_le @[simp] theorem toReal_le_toReal (ha : a β‰  ∞) (hb : b β‰  ∞) : a.toReal ≀ b.toReal ↔ a ≀ b := by lift a to ℝβ‰₯0 using ha lift b to ℝβ‰₯0 using hb norm_cast #align ennreal.to_real_le_to_real ENNReal.toReal_le_toReal @[gcongr] theorem toReal_mono (hb : b β‰  ∞) (h : a ≀ b) : a.toReal ≀ b.toReal := (toReal_le_toReal (ne_top_of_le_ne_top hb h) hb).2 h #align ennreal.to_real_mono ENNReal.toReal_mono -- Porting note (#10756): new lemma theorem toReal_mono' (h : a ≀ b) (ht : b = ∞ β†’ a = ∞) : a.toReal ≀ b.toReal := by rcases eq_or_ne a ∞ with rfl | ha Β· exact toReal_nonneg Β· exact toReal_mono (mt ht ha) h @[simp]
Mathlib/Data/ENNReal/Real.lean
94
97
theorem toReal_lt_toReal (ha : a β‰  ∞) (hb : b β‰  ∞) : a.toReal < b.toReal ↔ a < b := by
lift a to ℝβ‰₯0 using ha lift b to ℝβ‰₯0 using hb norm_cast
1,125
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section Real variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toReal_add (ha : a β‰  ∞) (hb : b β‰  ∞) : (a + b).toReal = a.toReal + b.toReal := by lift a to ℝβ‰₯0 using ha lift b to ℝβ‰₯0 using hb rfl #align ennreal.to_real_add ENNReal.toReal_add theorem toReal_sub_of_le {a b : ℝβ‰₯0∞} (h : b ≀ a) (ha : a β‰  ∞) : (a - b).toReal = a.toReal - b.toReal := by lift b to ℝβ‰₯0 using ne_top_of_le_ne_top ha h lift a to ℝβ‰₯0 using ha simp only [← ENNReal.coe_sub, ENNReal.coe_toReal, NNReal.coe_sub (ENNReal.coe_le_coe.mp h)] #align ennreal.to_real_sub_of_le ENNReal.toReal_sub_of_le theorem le_toReal_sub {a b : ℝβ‰₯0∞} (hb : b β‰  ∞) : a.toReal - b.toReal ≀ (a - b).toReal := by lift b to ℝβ‰₯0 using hb induction a Β· simp Β· simp only [← coe_sub, NNReal.sub_def, Real.coe_toNNReal', coe_toReal] exact le_max_left _ _ #align ennreal.le_to_real_sub ENNReal.le_toReal_sub theorem toReal_add_le : (a + b).toReal ≀ a.toReal + b.toReal := if ha : a = ∞ then by simp only [ha, top_add, top_toReal, zero_add, toReal_nonneg] else if hb : b = ∞ then by simp only [hb, add_top, top_toReal, add_zero, toReal_nonneg] else le_of_eq (toReal_add ha hb) #align ennreal.to_real_add_le ENNReal.toReal_add_le theorem ofReal_add {p q : ℝ} (hp : 0 ≀ p) (hq : 0 ≀ q) : ENNReal.ofReal (p + q) = ENNReal.ofReal p + ENNReal.ofReal q := by rw [ENNReal.ofReal, ENNReal.ofReal, ENNReal.ofReal, ← coe_add, coe_inj, Real.toNNReal_add hp hq] #align ennreal.of_real_add ENNReal.ofReal_add theorem ofReal_add_le {p q : ℝ} : ENNReal.ofReal (p + q) ≀ ENNReal.ofReal p + ENNReal.ofReal q := coe_le_coe.2 Real.toNNReal_add_le #align ennreal.of_real_add_le ENNReal.ofReal_add_le @[simp] theorem toReal_le_toReal (ha : a β‰  ∞) (hb : b β‰  ∞) : a.toReal ≀ b.toReal ↔ a ≀ b := by lift a to ℝβ‰₯0 using ha lift b to ℝβ‰₯0 using hb norm_cast #align ennreal.to_real_le_to_real ENNReal.toReal_le_toReal @[gcongr] theorem toReal_mono (hb : b β‰  ∞) (h : a ≀ b) : a.toReal ≀ b.toReal := (toReal_le_toReal (ne_top_of_le_ne_top hb h) hb).2 h #align ennreal.to_real_mono ENNReal.toReal_mono -- Porting note (#10756): new lemma theorem toReal_mono' (h : a ≀ b) (ht : b = ∞ β†’ a = ∞) : a.toReal ≀ b.toReal := by rcases eq_or_ne a ∞ with rfl | ha Β· exact toReal_nonneg Β· exact toReal_mono (mt ht ha) h @[simp] theorem toReal_lt_toReal (ha : a β‰  ∞) (hb : b β‰  ∞) : a.toReal < b.toReal ↔ a < b := by lift a to ℝβ‰₯0 using ha lift b to ℝβ‰₯0 using hb norm_cast #align ennreal.to_real_lt_to_real ENNReal.toReal_lt_toReal @[gcongr] theorem toReal_strict_mono (hb : b β‰  ∞) (h : a < b) : a.toReal < b.toReal := (toReal_lt_toReal h.ne_top hb).2 h #align ennreal.to_real_strict_mono ENNReal.toReal_strict_mono @[gcongr] theorem toNNReal_mono (hb : b β‰  ∞) (h : a ≀ b) : a.toNNReal ≀ b.toNNReal := toReal_mono hb h #align ennreal.to_nnreal_mono ENNReal.toNNReal_mono -- Porting note (#10756): new lemma
Mathlib/Data/ENNReal/Real.lean
114
117
theorem toReal_le_add' (hle : a ≀ b + c) (hb : b = ∞ β†’ a = ∞) (hc : c = ∞ β†’ a = ∞) : a.toReal ≀ b.toReal + c.toReal := by
refine le_trans (toReal_mono' hle ?_) toReal_add_le simpa only [add_eq_top, or_imp] using And.intro hb hc
1,125
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section Real variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toReal_add (ha : a β‰  ∞) (hb : b β‰  ∞) : (a + b).toReal = a.toReal + b.toReal := by lift a to ℝβ‰₯0 using ha lift b to ℝβ‰₯0 using hb rfl #align ennreal.to_real_add ENNReal.toReal_add theorem toReal_sub_of_le {a b : ℝβ‰₯0∞} (h : b ≀ a) (ha : a β‰  ∞) : (a - b).toReal = a.toReal - b.toReal := by lift b to ℝβ‰₯0 using ne_top_of_le_ne_top ha h lift a to ℝβ‰₯0 using ha simp only [← ENNReal.coe_sub, ENNReal.coe_toReal, NNReal.coe_sub (ENNReal.coe_le_coe.mp h)] #align ennreal.to_real_sub_of_le ENNReal.toReal_sub_of_le theorem le_toReal_sub {a b : ℝβ‰₯0∞} (hb : b β‰  ∞) : a.toReal - b.toReal ≀ (a - b).toReal := by lift b to ℝβ‰₯0 using hb induction a Β· simp Β· simp only [← coe_sub, NNReal.sub_def, Real.coe_toNNReal', coe_toReal] exact le_max_left _ _ #align ennreal.le_to_real_sub ENNReal.le_toReal_sub theorem toReal_add_le : (a + b).toReal ≀ a.toReal + b.toReal := if ha : a = ∞ then by simp only [ha, top_add, top_toReal, zero_add, toReal_nonneg] else if hb : b = ∞ then by simp only [hb, add_top, top_toReal, add_zero, toReal_nonneg] else le_of_eq (toReal_add ha hb) #align ennreal.to_real_add_le ENNReal.toReal_add_le theorem ofReal_add {p q : ℝ} (hp : 0 ≀ p) (hq : 0 ≀ q) : ENNReal.ofReal (p + q) = ENNReal.ofReal p + ENNReal.ofReal q := by rw [ENNReal.ofReal, ENNReal.ofReal, ENNReal.ofReal, ← coe_add, coe_inj, Real.toNNReal_add hp hq] #align ennreal.of_real_add ENNReal.ofReal_add theorem ofReal_add_le {p q : ℝ} : ENNReal.ofReal (p + q) ≀ ENNReal.ofReal p + ENNReal.ofReal q := coe_le_coe.2 Real.toNNReal_add_le #align ennreal.of_real_add_le ENNReal.ofReal_add_le @[simp] theorem toReal_le_toReal (ha : a β‰  ∞) (hb : b β‰  ∞) : a.toReal ≀ b.toReal ↔ a ≀ b := by lift a to ℝβ‰₯0 using ha lift b to ℝβ‰₯0 using hb norm_cast #align ennreal.to_real_le_to_real ENNReal.toReal_le_toReal @[gcongr] theorem toReal_mono (hb : b β‰  ∞) (h : a ≀ b) : a.toReal ≀ b.toReal := (toReal_le_toReal (ne_top_of_le_ne_top hb h) hb).2 h #align ennreal.to_real_mono ENNReal.toReal_mono -- Porting note (#10756): new lemma theorem toReal_mono' (h : a ≀ b) (ht : b = ∞ β†’ a = ∞) : a.toReal ≀ b.toReal := by rcases eq_or_ne a ∞ with rfl | ha Β· exact toReal_nonneg Β· exact toReal_mono (mt ht ha) h @[simp] theorem toReal_lt_toReal (ha : a β‰  ∞) (hb : b β‰  ∞) : a.toReal < b.toReal ↔ a < b := by lift a to ℝβ‰₯0 using ha lift b to ℝβ‰₯0 using hb norm_cast #align ennreal.to_real_lt_to_real ENNReal.toReal_lt_toReal @[gcongr] theorem toReal_strict_mono (hb : b β‰  ∞) (h : a < b) : a.toReal < b.toReal := (toReal_lt_toReal h.ne_top hb).2 h #align ennreal.to_real_strict_mono ENNReal.toReal_strict_mono @[gcongr] theorem toNNReal_mono (hb : b β‰  ∞) (h : a ≀ b) : a.toNNReal ≀ b.toNNReal := toReal_mono hb h #align ennreal.to_nnreal_mono ENNReal.toNNReal_mono -- Porting note (#10756): new lemma theorem toReal_le_add' (hle : a ≀ b + c) (hb : b = ∞ β†’ a = ∞) (hc : c = ∞ β†’ a = ∞) : a.toReal ≀ b.toReal + c.toReal := by refine le_trans (toReal_mono' hle ?_) toReal_add_le simpa only [add_eq_top, or_imp] using And.intro hb hc -- Porting note (#10756): new lemma theorem toReal_le_add (hle : a ≀ b + c) (hb : b β‰  ∞) (hc : c β‰  ∞) : a.toReal ≀ b.toReal + c.toReal := toReal_le_add' hle (flip absurd hb) (flip absurd hc) @[simp] theorem toNNReal_le_toNNReal (ha : a β‰  ∞) (hb : b β‰  ∞) : a.toNNReal ≀ b.toNNReal ↔ a ≀ b := ⟨fun h => by rwa [← coe_toNNReal ha, ← coe_toNNReal hb, coe_le_coe], toNNReal_mono hb⟩ #align ennreal.to_nnreal_le_to_nnreal ENNReal.toNNReal_le_toNNReal
Mathlib/Data/ENNReal/Real.lean
132
133
theorem toNNReal_strict_mono (hb : b β‰  ∞) (h : a < b) : a.toNNReal < b.toNNReal := by
simpa [← ENNReal.coe_lt_coe, hb, h.ne_top]
1,125
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section iInf variable {ΞΉ : Sort*} {f g : ΞΉ β†’ ℝβ‰₯0∞} variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0}
Mathlib/Data/ENNReal/Real.lean
541
545
theorem toNNReal_iInf (hf : βˆ€ i, f i β‰  ∞) : (iInf f).toNNReal = β¨… i, (f i).toNNReal := by
cases isEmpty_or_nonempty ΞΉ Β· rw [iInf_of_empty, top_toNNReal, NNReal.iInf_empty] Β· lift f to ΞΉ β†’ ℝβ‰₯0 using hf simp_rw [← coe_iInf, toNNReal_coe]
1,125
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section iInf variable {ΞΉ : Sort*} {f g : ΞΉ β†’ ℝβ‰₯0∞} variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toNNReal_iInf (hf : βˆ€ i, f i β‰  ∞) : (iInf f).toNNReal = β¨… i, (f i).toNNReal := by cases isEmpty_or_nonempty ΞΉ Β· rw [iInf_of_empty, top_toNNReal, NNReal.iInf_empty] Β· lift f to ΞΉ β†’ ℝβ‰₯0 using hf simp_rw [← coe_iInf, toNNReal_coe] #align ennreal.to_nnreal_infi ENNReal.toNNReal_iInf
Mathlib/Data/ENNReal/Real.lean
548
553
theorem toNNReal_sInf (s : Set ℝβ‰₯0∞) (hs : βˆ€ r ∈ s, r β‰  ∞) : (sInf s).toNNReal = sInf (ENNReal.toNNReal '' s) := by
have hf : βˆ€ i, ((↑) : s β†’ ℝβ‰₯0∞) i β‰  ∞ := fun ⟨r, rs⟩ => hs r rs -- Porting note: `← sInf_image'` had to be replaced by `← image_eq_range` as the lemmas are used -- in a different order. simpa only [← sInf_range, ← image_eq_range, Subtype.range_coe_subtype] using (toNNReal_iInf hf)
1,125
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section iInf variable {ΞΉ : Sort*} {f g : ΞΉ β†’ ℝβ‰₯0∞} variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toNNReal_iInf (hf : βˆ€ i, f i β‰  ∞) : (iInf f).toNNReal = β¨… i, (f i).toNNReal := by cases isEmpty_or_nonempty ΞΉ Β· rw [iInf_of_empty, top_toNNReal, NNReal.iInf_empty] Β· lift f to ΞΉ β†’ ℝβ‰₯0 using hf simp_rw [← coe_iInf, toNNReal_coe] #align ennreal.to_nnreal_infi ENNReal.toNNReal_iInf theorem toNNReal_sInf (s : Set ℝβ‰₯0∞) (hs : βˆ€ r ∈ s, r β‰  ∞) : (sInf s).toNNReal = sInf (ENNReal.toNNReal '' s) := by have hf : βˆ€ i, ((↑) : s β†’ ℝβ‰₯0∞) i β‰  ∞ := fun ⟨r, rs⟩ => hs r rs -- Porting note: `← sInf_image'` had to be replaced by `← image_eq_range` as the lemmas are used -- in a different order. simpa only [← sInf_range, ← image_eq_range, Subtype.range_coe_subtype] using (toNNReal_iInf hf) #align ennreal.to_nnreal_Inf ENNReal.toNNReal_sInf
Mathlib/Data/ENNReal/Real.lean
556
561
theorem toNNReal_iSup (hf : βˆ€ i, f i β‰  ∞) : (iSup f).toNNReal = ⨆ i, (f i).toNNReal := by
lift f to ΞΉ β†’ ℝβ‰₯0 using hf simp_rw [toNNReal_coe] by_cases h : BddAbove (range f) Β· rw [← coe_iSup h, toNNReal_coe] Β· rw [NNReal.iSup_of_not_bddAbove h, iSup_coe_eq_top.2 h, top_toNNReal]
1,125
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section iInf variable {ΞΉ : Sort*} {f g : ΞΉ β†’ ℝβ‰₯0∞} variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toNNReal_iInf (hf : βˆ€ i, f i β‰  ∞) : (iInf f).toNNReal = β¨… i, (f i).toNNReal := by cases isEmpty_or_nonempty ΞΉ Β· rw [iInf_of_empty, top_toNNReal, NNReal.iInf_empty] Β· lift f to ΞΉ β†’ ℝβ‰₯0 using hf simp_rw [← coe_iInf, toNNReal_coe] #align ennreal.to_nnreal_infi ENNReal.toNNReal_iInf theorem toNNReal_sInf (s : Set ℝβ‰₯0∞) (hs : βˆ€ r ∈ s, r β‰  ∞) : (sInf s).toNNReal = sInf (ENNReal.toNNReal '' s) := by have hf : βˆ€ i, ((↑) : s β†’ ℝβ‰₯0∞) i β‰  ∞ := fun ⟨r, rs⟩ => hs r rs -- Porting note: `← sInf_image'` had to be replaced by `← image_eq_range` as the lemmas are used -- in a different order. simpa only [← sInf_range, ← image_eq_range, Subtype.range_coe_subtype] using (toNNReal_iInf hf) #align ennreal.to_nnreal_Inf ENNReal.toNNReal_sInf theorem toNNReal_iSup (hf : βˆ€ i, f i β‰  ∞) : (iSup f).toNNReal = ⨆ i, (f i).toNNReal := by lift f to ΞΉ β†’ ℝβ‰₯0 using hf simp_rw [toNNReal_coe] by_cases h : BddAbove (range f) Β· rw [← coe_iSup h, toNNReal_coe] Β· rw [NNReal.iSup_of_not_bddAbove h, iSup_coe_eq_top.2 h, top_toNNReal] #align ennreal.to_nnreal_supr ENNReal.toNNReal_iSup
Mathlib/Data/ENNReal/Real.lean
564
569
theorem toNNReal_sSup (s : Set ℝβ‰₯0∞) (hs : βˆ€ r ∈ s, r β‰  ∞) : (sSup s).toNNReal = sSup (ENNReal.toNNReal '' s) := by
have hf : βˆ€ i, ((↑) : s β†’ ℝβ‰₯0∞) i β‰  ∞ := fun ⟨r, rs⟩ => hs r rs -- Porting note: `← sSup_image'` had to be replaced by `← image_eq_range` as the lemmas are used -- in a different order. simpa only [← sSup_range, ← image_eq_range, Subtype.range_coe_subtype] using (toNNReal_iSup hf)
1,125
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section iInf variable {ΞΉ : Sort*} {f g : ΞΉ β†’ ℝβ‰₯0∞} variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toNNReal_iInf (hf : βˆ€ i, f i β‰  ∞) : (iInf f).toNNReal = β¨… i, (f i).toNNReal := by cases isEmpty_or_nonempty ΞΉ Β· rw [iInf_of_empty, top_toNNReal, NNReal.iInf_empty] Β· lift f to ΞΉ β†’ ℝβ‰₯0 using hf simp_rw [← coe_iInf, toNNReal_coe] #align ennreal.to_nnreal_infi ENNReal.toNNReal_iInf theorem toNNReal_sInf (s : Set ℝβ‰₯0∞) (hs : βˆ€ r ∈ s, r β‰  ∞) : (sInf s).toNNReal = sInf (ENNReal.toNNReal '' s) := by have hf : βˆ€ i, ((↑) : s β†’ ℝβ‰₯0∞) i β‰  ∞ := fun ⟨r, rs⟩ => hs r rs -- Porting note: `← sInf_image'` had to be replaced by `← image_eq_range` as the lemmas are used -- in a different order. simpa only [← sInf_range, ← image_eq_range, Subtype.range_coe_subtype] using (toNNReal_iInf hf) #align ennreal.to_nnreal_Inf ENNReal.toNNReal_sInf theorem toNNReal_iSup (hf : βˆ€ i, f i β‰  ∞) : (iSup f).toNNReal = ⨆ i, (f i).toNNReal := by lift f to ΞΉ β†’ ℝβ‰₯0 using hf simp_rw [toNNReal_coe] by_cases h : BddAbove (range f) Β· rw [← coe_iSup h, toNNReal_coe] Β· rw [NNReal.iSup_of_not_bddAbove h, iSup_coe_eq_top.2 h, top_toNNReal] #align ennreal.to_nnreal_supr ENNReal.toNNReal_iSup theorem toNNReal_sSup (s : Set ℝβ‰₯0∞) (hs : βˆ€ r ∈ s, r β‰  ∞) : (sSup s).toNNReal = sSup (ENNReal.toNNReal '' s) := by have hf : βˆ€ i, ((↑) : s β†’ ℝβ‰₯0∞) i β‰  ∞ := fun ⟨r, rs⟩ => hs r rs -- Porting note: `← sSup_image'` had to be replaced by `← image_eq_range` as the lemmas are used -- in a different order. simpa only [← sSup_range, ← image_eq_range, Subtype.range_coe_subtype] using (toNNReal_iSup hf) #align ennreal.to_nnreal_Sup ENNReal.toNNReal_sSup
Mathlib/Data/ENNReal/Real.lean
572
573
theorem toReal_iInf (hf : βˆ€ i, f i β‰  ∞) : (iInf f).toReal = β¨… i, (f i).toReal := by
simp only [ENNReal.toReal, toNNReal_iInf hf, NNReal.coe_iInf]
1,125
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section iInf variable {ΞΉ : Sort*} {f g : ΞΉ β†’ ℝβ‰₯0∞} variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toNNReal_iInf (hf : βˆ€ i, f i β‰  ∞) : (iInf f).toNNReal = β¨… i, (f i).toNNReal := by cases isEmpty_or_nonempty ΞΉ Β· rw [iInf_of_empty, top_toNNReal, NNReal.iInf_empty] Β· lift f to ΞΉ β†’ ℝβ‰₯0 using hf simp_rw [← coe_iInf, toNNReal_coe] #align ennreal.to_nnreal_infi ENNReal.toNNReal_iInf theorem toNNReal_sInf (s : Set ℝβ‰₯0∞) (hs : βˆ€ r ∈ s, r β‰  ∞) : (sInf s).toNNReal = sInf (ENNReal.toNNReal '' s) := by have hf : βˆ€ i, ((↑) : s β†’ ℝβ‰₯0∞) i β‰  ∞ := fun ⟨r, rs⟩ => hs r rs -- Porting note: `← sInf_image'` had to be replaced by `← image_eq_range` as the lemmas are used -- in a different order. simpa only [← sInf_range, ← image_eq_range, Subtype.range_coe_subtype] using (toNNReal_iInf hf) #align ennreal.to_nnreal_Inf ENNReal.toNNReal_sInf theorem toNNReal_iSup (hf : βˆ€ i, f i β‰  ∞) : (iSup f).toNNReal = ⨆ i, (f i).toNNReal := by lift f to ΞΉ β†’ ℝβ‰₯0 using hf simp_rw [toNNReal_coe] by_cases h : BddAbove (range f) Β· rw [← coe_iSup h, toNNReal_coe] Β· rw [NNReal.iSup_of_not_bddAbove h, iSup_coe_eq_top.2 h, top_toNNReal] #align ennreal.to_nnreal_supr ENNReal.toNNReal_iSup theorem toNNReal_sSup (s : Set ℝβ‰₯0∞) (hs : βˆ€ r ∈ s, r β‰  ∞) : (sSup s).toNNReal = sSup (ENNReal.toNNReal '' s) := by have hf : βˆ€ i, ((↑) : s β†’ ℝβ‰₯0∞) i β‰  ∞ := fun ⟨r, rs⟩ => hs r rs -- Porting note: `← sSup_image'` had to be replaced by `← image_eq_range` as the lemmas are used -- in a different order. simpa only [← sSup_range, ← image_eq_range, Subtype.range_coe_subtype] using (toNNReal_iSup hf) #align ennreal.to_nnreal_Sup ENNReal.toNNReal_sSup theorem toReal_iInf (hf : βˆ€ i, f i β‰  ∞) : (iInf f).toReal = β¨… i, (f i).toReal := by simp only [ENNReal.toReal, toNNReal_iInf hf, NNReal.coe_iInf] #align ennreal.to_real_infi ENNReal.toReal_iInf
Mathlib/Data/ENNReal/Real.lean
576
578
theorem toReal_sInf (s : Set ℝβ‰₯0∞) (hf : βˆ€ r ∈ s, r β‰  ∞) : (sInf s).toReal = sInf (ENNReal.toReal '' s) := by
simp only [ENNReal.toReal, toNNReal_sInf s hf, NNReal.coe_sInf, Set.image_image]
1,125
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section iInf variable {ΞΉ : Sort*} {f g : ΞΉ β†’ ℝβ‰₯0∞} variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toNNReal_iInf (hf : βˆ€ i, f i β‰  ∞) : (iInf f).toNNReal = β¨… i, (f i).toNNReal := by cases isEmpty_or_nonempty ΞΉ Β· rw [iInf_of_empty, top_toNNReal, NNReal.iInf_empty] Β· lift f to ΞΉ β†’ ℝβ‰₯0 using hf simp_rw [← coe_iInf, toNNReal_coe] #align ennreal.to_nnreal_infi ENNReal.toNNReal_iInf theorem toNNReal_sInf (s : Set ℝβ‰₯0∞) (hs : βˆ€ r ∈ s, r β‰  ∞) : (sInf s).toNNReal = sInf (ENNReal.toNNReal '' s) := by have hf : βˆ€ i, ((↑) : s β†’ ℝβ‰₯0∞) i β‰  ∞ := fun ⟨r, rs⟩ => hs r rs -- Porting note: `← sInf_image'` had to be replaced by `← image_eq_range` as the lemmas are used -- in a different order. simpa only [← sInf_range, ← image_eq_range, Subtype.range_coe_subtype] using (toNNReal_iInf hf) #align ennreal.to_nnreal_Inf ENNReal.toNNReal_sInf theorem toNNReal_iSup (hf : βˆ€ i, f i β‰  ∞) : (iSup f).toNNReal = ⨆ i, (f i).toNNReal := by lift f to ΞΉ β†’ ℝβ‰₯0 using hf simp_rw [toNNReal_coe] by_cases h : BddAbove (range f) Β· rw [← coe_iSup h, toNNReal_coe] Β· rw [NNReal.iSup_of_not_bddAbove h, iSup_coe_eq_top.2 h, top_toNNReal] #align ennreal.to_nnreal_supr ENNReal.toNNReal_iSup theorem toNNReal_sSup (s : Set ℝβ‰₯0∞) (hs : βˆ€ r ∈ s, r β‰  ∞) : (sSup s).toNNReal = sSup (ENNReal.toNNReal '' s) := by have hf : βˆ€ i, ((↑) : s β†’ ℝβ‰₯0∞) i β‰  ∞ := fun ⟨r, rs⟩ => hs r rs -- Porting note: `← sSup_image'` had to be replaced by `← image_eq_range` as the lemmas are used -- in a different order. simpa only [← sSup_range, ← image_eq_range, Subtype.range_coe_subtype] using (toNNReal_iSup hf) #align ennreal.to_nnreal_Sup ENNReal.toNNReal_sSup theorem toReal_iInf (hf : βˆ€ i, f i β‰  ∞) : (iInf f).toReal = β¨… i, (f i).toReal := by simp only [ENNReal.toReal, toNNReal_iInf hf, NNReal.coe_iInf] #align ennreal.to_real_infi ENNReal.toReal_iInf theorem toReal_sInf (s : Set ℝβ‰₯0∞) (hf : βˆ€ r ∈ s, r β‰  ∞) : (sInf s).toReal = sInf (ENNReal.toReal '' s) := by simp only [ENNReal.toReal, toNNReal_sInf s hf, NNReal.coe_sInf, Set.image_image] #align ennreal.to_real_Inf ENNReal.toReal_sInf
Mathlib/Data/ENNReal/Real.lean
581
582
theorem toReal_iSup (hf : βˆ€ i, f i β‰  ∞) : (iSup f).toReal = ⨆ i, (f i).toReal := by
simp only [ENNReal.toReal, toNNReal_iSup hf, NNReal.coe_iSup]
1,125
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section iInf variable {ΞΉ : Sort*} {f g : ΞΉ β†’ ℝβ‰₯0∞} variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toNNReal_iInf (hf : βˆ€ i, f i β‰  ∞) : (iInf f).toNNReal = β¨… i, (f i).toNNReal := by cases isEmpty_or_nonempty ΞΉ Β· rw [iInf_of_empty, top_toNNReal, NNReal.iInf_empty] Β· lift f to ΞΉ β†’ ℝβ‰₯0 using hf simp_rw [← coe_iInf, toNNReal_coe] #align ennreal.to_nnreal_infi ENNReal.toNNReal_iInf theorem toNNReal_sInf (s : Set ℝβ‰₯0∞) (hs : βˆ€ r ∈ s, r β‰  ∞) : (sInf s).toNNReal = sInf (ENNReal.toNNReal '' s) := by have hf : βˆ€ i, ((↑) : s β†’ ℝβ‰₯0∞) i β‰  ∞ := fun ⟨r, rs⟩ => hs r rs -- Porting note: `← sInf_image'` had to be replaced by `← image_eq_range` as the lemmas are used -- in a different order. simpa only [← sInf_range, ← image_eq_range, Subtype.range_coe_subtype] using (toNNReal_iInf hf) #align ennreal.to_nnreal_Inf ENNReal.toNNReal_sInf theorem toNNReal_iSup (hf : βˆ€ i, f i β‰  ∞) : (iSup f).toNNReal = ⨆ i, (f i).toNNReal := by lift f to ΞΉ β†’ ℝβ‰₯0 using hf simp_rw [toNNReal_coe] by_cases h : BddAbove (range f) Β· rw [← coe_iSup h, toNNReal_coe] Β· rw [NNReal.iSup_of_not_bddAbove h, iSup_coe_eq_top.2 h, top_toNNReal] #align ennreal.to_nnreal_supr ENNReal.toNNReal_iSup theorem toNNReal_sSup (s : Set ℝβ‰₯0∞) (hs : βˆ€ r ∈ s, r β‰  ∞) : (sSup s).toNNReal = sSup (ENNReal.toNNReal '' s) := by have hf : βˆ€ i, ((↑) : s β†’ ℝβ‰₯0∞) i β‰  ∞ := fun ⟨r, rs⟩ => hs r rs -- Porting note: `← sSup_image'` had to be replaced by `← image_eq_range` as the lemmas are used -- in a different order. simpa only [← sSup_range, ← image_eq_range, Subtype.range_coe_subtype] using (toNNReal_iSup hf) #align ennreal.to_nnreal_Sup ENNReal.toNNReal_sSup theorem toReal_iInf (hf : βˆ€ i, f i β‰  ∞) : (iInf f).toReal = β¨… i, (f i).toReal := by simp only [ENNReal.toReal, toNNReal_iInf hf, NNReal.coe_iInf] #align ennreal.to_real_infi ENNReal.toReal_iInf theorem toReal_sInf (s : Set ℝβ‰₯0∞) (hf : βˆ€ r ∈ s, r β‰  ∞) : (sInf s).toReal = sInf (ENNReal.toReal '' s) := by simp only [ENNReal.toReal, toNNReal_sInf s hf, NNReal.coe_sInf, Set.image_image] #align ennreal.to_real_Inf ENNReal.toReal_sInf theorem toReal_iSup (hf : βˆ€ i, f i β‰  ∞) : (iSup f).toReal = ⨆ i, (f i).toReal := by simp only [ENNReal.toReal, toNNReal_iSup hf, NNReal.coe_iSup] #align ennreal.to_real_supr ENNReal.toReal_iSup
Mathlib/Data/ENNReal/Real.lean
585
587
theorem toReal_sSup (s : Set ℝβ‰₯0∞) (hf : βˆ€ r ∈ s, r β‰  ∞) : (sSup s).toReal = sSup (ENNReal.toReal '' s) := by
simp only [ENNReal.toReal, toNNReal_sSup s hf, NNReal.coe_sSup, Set.image_image]
1,125