topology.algebra.order.upper_lower
⟷
Mathlib.Topology.Algebra.Order.UpperLower
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(last sync)
@@ -5,6 +5,7 @@ Authors: Yaël Dillies
-/
import algebra.order.upper_lower
import topology.algebra.group.basic
+import topology.order.basic
/-!
# Topological facts about upper/lower/order-connected sets
@@ -46,7 +47,33 @@ instance ordered_comm_group.to_has_upper_lower_closure [ordered_comm_group α]
is_open_upper_closure := λ s hs, by { rw [←mul_one s, ←mul_upper_closure], exact hs.mul_right },
is_open_lower_closure := λ s hs, by { rw [←mul_one s, ←mul_lower_closure], exact hs.mul_right } }
-variables [preorder α] [has_upper_lower_closure α] {s : set α}
+variables [preorder α]
+
+section order_closed_topology
+variables [order_closed_topology α] {s : set α}
+
+@[simp] lemma upper_bounds_closure (s : set α) :
+ upper_bounds (closure s : set α) = upper_bounds s :=
+ext $ λ a, by simp_rw [mem_upper_bounds_iff_subset_Iic, is_closed_Iic.closure_subset_iff]
+
+@[simp] lemma lower_bounds_closure (s : set α) :
+ lower_bounds (closure s : set α) = lower_bounds s :=
+ext $ λ a, by simp_rw [mem_lower_bounds_iff_subset_Ici, is_closed_Ici.closure_subset_iff]
+
+@[simp] lemma bdd_above_closure : bdd_above (closure s) ↔ bdd_above s :=
+by simp_rw [bdd_above, upper_bounds_closure]
+
+@[simp] lemma bdd_below_closure : bdd_below (closure s) ↔ bdd_below s :=
+by simp_rw [bdd_below, lower_bounds_closure]
+
+alias bdd_above_closure ↔ bdd_above.of_closure bdd_above.closure
+alias bdd_below_closure ↔ bdd_below.of_closure bdd_below.closure
+
+attribute [protected] bdd_above.closure bdd_below.closure
+
+end order_closed_topology
+
+variables [has_upper_lower_closure α] {s : set α}
protected lemma is_upper_set.closure : is_upper_set s → is_upper_set (closure s) :=
has_upper_lower_closure.is_upper_set_closure _
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
Upper/lower sets on a linear order themselves form a linear order.
@@ -85,7 +85,7 @@ protected lemma is_upper_set.interior (h : is_upper_set s) : is_upper_set (inter
by { rw [←is_lower_set_compl, ←closure_compl], exact h.compl.closure }
protected lemma is_lower_set.interior (h : is_lower_set s) : is_lower_set (interior s) :=
-h.of_dual.interior
+h.to_dual.interior
protected lemma set.ord_connected.interior (h : s.ord_connected) : (interior s).ord_connected :=
begin
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
Results about upper sets in normed ordered groups.
@@ -16,11 +16,10 @@ The topological closure and interior of an upper/lower/order-connected set is an
upper/lower/order-connected set (with the notable exception of the closure of an order-connected
set).
-## Notes
+## Implementation notes
-The lemmas don't mention additive/multiplicative operations. As a result, we decide to prime the
-multiplicative lemma names to indicate that there is probably a common generalisation to each pair
-of additive/multiplicative lemma.
+The same lemmas are true in the additive/multiplicative worlds. To avoid code duplication, we
+provide `has_upper_lower_closure`, an ad hoc axiomatisation of the properties we need.
-/
open function set
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(first ported)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -52,10 +52,10 @@ instance (priority := 100) OrderedCommGroup.to_hasUpperLowerClosure [OrderedComm
where
isUpperSet_closure s h x y hxy hx :=
closure_mono (h.smul_subset <| one_le_div'.2 hxy) <| by rw [closure_smul];
- exact ⟨x, hx, div_mul_cancel' _ _⟩
+ exact ⟨x, hx, div_mul_cancel _ _⟩
isLowerSet_closure s h x y hxy hx :=
closure_mono (h.smul_subset <| div_le_one'.2 hxy) <| by rw [closure_smul];
- exact ⟨x, hx, div_mul_cancel' _ _⟩
+ exact ⟨x, hx, div_mul_cancel _ _⟩
isOpen_upperClosure s hs := by rw [← mul_one s, ← mul_upperClosure]; exact hs.mul_right
isOpen_lowerClosure s hs := by rw [← mul_one s, ← mul_lowerClosure]; exact hs.mul_right
#align ordered_comm_group.to_has_upper_lower_closure OrderedCommGroup.to_hasUpperLowerClosure
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -68,25 +68,33 @@ section OrderClosedTopology
variable [OrderClosedTopology α] {s : Set α}
+#print upperBounds_closure /-
@[simp]
theorem upperBounds_closure (s : Set α) : upperBounds (closure s : Set α) = upperBounds s :=
ext fun a => by simp_rw [mem_upperBounds_iff_subset_Iic, is_closed_Iic.closure_subset_iff]
#align upper_bounds_closure upperBounds_closure
+-/
+#print lowerBounds_closure /-
@[simp]
theorem lowerBounds_closure (s : Set α) : lowerBounds (closure s : Set α) = lowerBounds s :=
ext fun a => by simp_rw [mem_lowerBounds_iff_subset_Ici, is_closed_Ici.closure_subset_iff]
#align lower_bounds_closure lowerBounds_closure
+-/
+#print bddAbove_closure /-
@[simp]
theorem bddAbove_closure : BddAbove (closure s) ↔ BddAbove s := by
simp_rw [BddAbove, upperBounds_closure]
#align bdd_above_closure bddAbove_closure
+-/
+#print bddBelow_closure /-
@[simp]
theorem bddBelow_closure : BddBelow (closure s) ↔ BddBelow s := by
simp_rw [BddBelow, lowerBounds_closure]
#align bdd_below_closure bddBelow_closure
+-/
alias ⟨BddAbove.of_closure, BddAbove.closure⟩ := bddAbove_closure
#align bdd_above.of_closure BddAbove.of_closure
mathlib commit https://github.com/leanprover-community/mathlib/commit/b1abe23ae96fef89ad30d9f4362c307f72a55010
@@ -5,8 +5,9 @@ Authors: Yaël Dillies
-/
import Algebra.Order.UpperLower
import Topology.Algebra.Group.Basic
+import Topology.Order.Basic
-#align_import topology.algebra.order.upper_lower from "leanprover-community/mathlib"@"c0c52abb75074ed8b73a948341f50521fbf43b4c"
+#align_import topology.algebra.order.upper_lower from "leanprover-community/mathlib"@"b1abe23ae96fef89ad30d9f4362c307f72a55010"
/-!
# Topological facts about upper/lower/order-connected sets
@@ -61,7 +62,45 @@ instance (priority := 100) OrderedCommGroup.to_hasUpperLowerClosure [OrderedComm
#align ordered_add_comm_group.to_has_upper_lower_closure OrderedAddCommGroup.to_hasUpperLowerClosure
-/
-variable [Preorder α] [HasUpperLowerClosure α] {s : Set α}
+variable [Preorder α]
+
+section OrderClosedTopology
+
+variable [OrderClosedTopology α] {s : Set α}
+
+@[simp]
+theorem upperBounds_closure (s : Set α) : upperBounds (closure s : Set α) = upperBounds s :=
+ ext fun a => by simp_rw [mem_upperBounds_iff_subset_Iic, is_closed_Iic.closure_subset_iff]
+#align upper_bounds_closure upperBounds_closure
+
+@[simp]
+theorem lowerBounds_closure (s : Set α) : lowerBounds (closure s : Set α) = lowerBounds s :=
+ ext fun a => by simp_rw [mem_lowerBounds_iff_subset_Ici, is_closed_Ici.closure_subset_iff]
+#align lower_bounds_closure lowerBounds_closure
+
+@[simp]
+theorem bddAbove_closure : BddAbove (closure s) ↔ BddAbove s := by
+ simp_rw [BddAbove, upperBounds_closure]
+#align bdd_above_closure bddAbove_closure
+
+@[simp]
+theorem bddBelow_closure : BddBelow (closure s) ↔ BddBelow s := by
+ simp_rw [BddBelow, lowerBounds_closure]
+#align bdd_below_closure bddBelow_closure
+
+alias ⟨BddAbove.of_closure, BddAbove.closure⟩ := bddAbove_closure
+#align bdd_above.of_closure BddAbove.of_closure
+#align bdd_above.closure BddAbove.closure
+
+alias ⟨BddBelow.of_closure, BddBelow.closure⟩ := bddBelow_closure
+#align bdd_below.of_closure BddBelow.of_closure
+#align bdd_below.closure BddBelow.closure
+
+attribute [protected] BddAbove.closure BddBelow.closure
+
+end OrderClosedTopology
+
+variable [HasUpperLowerClosure α] {s : Set α}
#print IsUpperSet.closure /-
protected theorem IsUpperSet.closure : IsUpperSet s → IsUpperSet (closure s) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2022 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
-import Mathbin.Algebra.Order.UpperLower
-import Mathbin.Topology.Algebra.Group.Basic
+import Algebra.Order.UpperLower
+import Topology.Algebra.Group.Basic
#align_import topology.algebra.order.upper_lower from "leanprover-community/mathlib"@"c0c52abb75074ed8b73a948341f50521fbf43b4c"
mathlib commit https://github.com/leanprover-community/mathlib/commit/c0c52abb75074ed8b73a948341f50521fbf43b4c
@@ -6,7 +6,7 @@ Authors: Yaël Dillies
import Mathbin.Algebra.Order.UpperLower
import Mathbin.Topology.Algebra.Group.Basic
-#align_import topology.algebra.order.upper_lower from "leanprover-community/mathlib"@"992efbda6f85a5c9074375d3c7cb9764c64d8f72"
+#align_import topology.algebra.order.upper_lower from "leanprover-community/mathlib"@"c0c52abb75074ed8b73a948341f50521fbf43b4c"
/-!
# Topological facts about upper/lower/order-connected sets
@@ -116,7 +116,7 @@ protected theorem IsUpperSet.interior (h : IsUpperSet s) : IsUpperSet (interior
#print IsLowerSet.interior /-
protected theorem IsLowerSet.interior (h : IsLowerSet s) : IsLowerSet (interior s) :=
- h.ofDual.interior
+ h.toDual.interior
#align is_lower_set.interior IsLowerSet.interior
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2022 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-
-! This file was ported from Lean 3 source module topology.algebra.order.upper_lower
-! leanprover-community/mathlib commit 992efbda6f85a5c9074375d3c7cb9764c64d8f72
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.Order.UpperLower
import Mathbin.Topology.Algebra.Group.Basic
+#align_import topology.algebra.order.upper_lower from "leanprover-community/mathlib"@"992efbda6f85a5c9074375d3c7cb9764c64d8f72"
+
/-!
# Topological facts about upper/lower/order-connected sets
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -46,6 +46,7 @@ class HasUpperLowerClosure (α : Type _) [TopologicalSpace α] [Preorder α] : P
variable {α : Type _} [TopologicalSpace α]
+#print OrderedCommGroup.to_hasUpperLowerClosure /-
-- See note [lower instance priority]
@[to_additive]
instance (priority := 100) OrderedCommGroup.to_hasUpperLowerClosure [OrderedCommGroup α]
@@ -61,6 +62,7 @@ instance (priority := 100) OrderedCommGroup.to_hasUpperLowerClosure [OrderedComm
isOpen_lowerClosure s hs := by rw [← mul_one s, ← mul_lowerClosure]; exact hs.mul_right
#align ordered_comm_group.to_has_upper_lower_closure OrderedCommGroup.to_hasUpperLowerClosure
#align ordered_add_comm_group.to_has_upper_lower_closure OrderedAddCommGroup.to_hasUpperLowerClosure
+-/
variable [Preorder α] [HasUpperLowerClosure α] {s : Set α}
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -30,7 +30,7 @@ provide `has_upper_lower_closure`, an ad hoc axiomatisation of the properties we
open Function Set
-open Pointwise
+open scoped Pointwise
#print HasUpperLowerClosure /-
/-- Ad hoc class stating that the closure of an upper set is an upper set. This is used to state
@@ -64,13 +64,17 @@ instance (priority := 100) OrderedCommGroup.to_hasUpperLowerClosure [OrderedComm
variable [Preorder α] [HasUpperLowerClosure α] {s : Set α}
+#print IsUpperSet.closure /-
protected theorem IsUpperSet.closure : IsUpperSet s → IsUpperSet (closure s) :=
HasUpperLowerClosure.isUpperSet_closure _
#align is_upper_set.closure IsUpperSet.closure
+-/
+#print IsLowerSet.closure /-
protected theorem IsLowerSet.closure : IsLowerSet s → IsLowerSet (closure s) :=
HasUpperLowerClosure.isLowerSet_closure _
#align is_lower_set.closure IsLowerSet.closure
+-/
#print IsOpen.upperClosure /-
protected theorem IsOpen.upperClosure : IsOpen s → IsOpen (upperClosure s : Set α) :=
@@ -91,6 +95,7 @@ instance : HasUpperLowerClosure αᵒᵈ
isOpen_upperClosure := @IsOpen.lowerClosure α _ _ _
isOpen_lowerClosure := @IsOpen.upperClosure α _ _ _
+#print IsUpperSet.interior /-
/-
Note: `s.ord_connected` does not imply `(closure s).ord_connected`, as we can see by taking
`s := Ioo 0 1 × Ioo 1 2 ∪ Ioo 2 3 × Ioo 0 1` because then
@@ -108,10 +113,13 @@ oooooxx
protected theorem IsUpperSet.interior (h : IsUpperSet s) : IsUpperSet (interior s) := by
rw [← isLowerSet_compl, ← closure_compl]; exact h.compl.closure
#align is_upper_set.interior IsUpperSet.interior
+-/
+#print IsLowerSet.interior /-
protected theorem IsLowerSet.interior (h : IsLowerSet s) : IsLowerSet (interior s) :=
h.ofDual.interior
#align is_lower_set.interior IsLowerSet.interior
+-/
#print Set.OrdConnected.interior /-
protected theorem Set.OrdConnected.interior (h : s.OrdConnected) : (interior s).OrdConnected :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -46,12 +46,6 @@ class HasUpperLowerClosure (α : Type _) [TopologicalSpace α] [Preorder α] : P
variable {α : Type _} [TopologicalSpace α]
-/- warning: ordered_comm_group.to_has_upper_lower_closure -> OrderedCommGroup.to_hasUpperLowerClosure is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : OrderedCommGroup.{u1} α] [_inst_3 : ContinuousConstSMul.{u1, u1} α α _inst_1 (Mul.toSMul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α (OrderedCommGroup.toCommGroup.{u1} α _inst_2)))))))], HasUpperLowerClosure.{u1} α _inst_1 (PartialOrder.toPreorder.{u1} α (OrderedCommGroup.toPartialOrder.{u1} α _inst_2))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : OrderedCommGroup.{u1} α] [_inst_3 : ContinuousConstSMul.{u1, u1} α α _inst_1 (MulAction.toSMul.{u1, u1} α α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α (OrderedCommGroup.toCommGroup.{u1} α _inst_2)))) (Monoid.toMulAction.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α (OrderedCommGroup.toCommGroup.{u1} α _inst_2))))))], HasUpperLowerClosure.{u1} α _inst_1 (PartialOrder.toPreorder.{u1} α (OrderedCommGroup.toPartialOrder.{u1} α _inst_2))
-Case conversion may be inaccurate. Consider using '#align ordered_comm_group.to_has_upper_lower_closure OrderedCommGroup.to_hasUpperLowerClosureₓ'. -/
-- See note [lower instance priority]
@[to_additive]
instance (priority := 100) OrderedCommGroup.to_hasUpperLowerClosure [OrderedCommGroup α]
@@ -70,22 +64,10 @@ instance (priority := 100) OrderedCommGroup.to_hasUpperLowerClosure [OrderedComm
variable [Preorder α] [HasUpperLowerClosure α] {s : Set α}
-/- warning: is_upper_set.closure -> IsUpperSet.closure is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : HasUpperLowerClosure.{u1} α _inst_1 _inst_2] {s : Set.{u1} α}, (IsUpperSet.{u1} α (Preorder.toHasLe.{u1} α _inst_2) s) -> (IsUpperSet.{u1} α (Preorder.toHasLe.{u1} α _inst_2) (closure.{u1} α _inst_1 s))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : HasUpperLowerClosure.{u1} α _inst_1 _inst_2] {s : Set.{u1} α}, (IsUpperSet.{u1} α (Preorder.toLE.{u1} α _inst_2) s) -> (IsUpperSet.{u1} α (Preorder.toLE.{u1} α _inst_2) (closure.{u1} α _inst_1 s))
-Case conversion may be inaccurate. Consider using '#align is_upper_set.closure IsUpperSet.closureₓ'. -/
protected theorem IsUpperSet.closure : IsUpperSet s → IsUpperSet (closure s) :=
HasUpperLowerClosure.isUpperSet_closure _
#align is_upper_set.closure IsUpperSet.closure
-/- warning: is_lower_set.closure -> IsLowerSet.closure is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : HasUpperLowerClosure.{u1} α _inst_1 _inst_2] {s : Set.{u1} α}, (IsLowerSet.{u1} α (Preorder.toHasLe.{u1} α _inst_2) s) -> (IsLowerSet.{u1} α (Preorder.toHasLe.{u1} α _inst_2) (closure.{u1} α _inst_1 s))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : HasUpperLowerClosure.{u1} α _inst_1 _inst_2] {s : Set.{u1} α}, (IsLowerSet.{u1} α (Preorder.toLE.{u1} α _inst_2) s) -> (IsLowerSet.{u1} α (Preorder.toLE.{u1} α _inst_2) (closure.{u1} α _inst_1 s))
-Case conversion may be inaccurate. Consider using '#align is_lower_set.closure IsLowerSet.closureₓ'. -/
protected theorem IsLowerSet.closure : IsLowerSet s → IsLowerSet (closure s) :=
HasUpperLowerClosure.isLowerSet_closure _
#align is_lower_set.closure IsLowerSet.closure
@@ -109,12 +91,6 @@ instance : HasUpperLowerClosure αᵒᵈ
isOpen_upperClosure := @IsOpen.lowerClosure α _ _ _
isOpen_lowerClosure := @IsOpen.upperClosure α _ _ _
-/- warning: is_upper_set.interior -> IsUpperSet.interior is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : HasUpperLowerClosure.{u1} α _inst_1 _inst_2] {s : Set.{u1} α}, (IsUpperSet.{u1} α (Preorder.toHasLe.{u1} α _inst_2) s) -> (IsUpperSet.{u1} α (Preorder.toHasLe.{u1} α _inst_2) (interior.{u1} α _inst_1 s))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : HasUpperLowerClosure.{u1} α _inst_1 _inst_2] {s : Set.{u1} α}, (IsUpperSet.{u1} α (Preorder.toLE.{u1} α _inst_2) s) -> (IsUpperSet.{u1} α (Preorder.toLE.{u1} α _inst_2) (interior.{u1} α _inst_1 s))
-Case conversion may be inaccurate. Consider using '#align is_upper_set.interior IsUpperSet.interiorₓ'. -/
/-
Note: `s.ord_connected` does not imply `(closure s).ord_connected`, as we can see by taking
`s := Ioo 0 1 × Ioo 1 2 ∪ Ioo 2 3 × Ioo 0 1` because then
@@ -133,12 +109,6 @@ protected theorem IsUpperSet.interior (h : IsUpperSet s) : IsUpperSet (interior
rw [← isLowerSet_compl, ← closure_compl]; exact h.compl.closure
#align is_upper_set.interior IsUpperSet.interior
-/- warning: is_lower_set.interior -> IsLowerSet.interior is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : HasUpperLowerClosure.{u1} α _inst_1 _inst_2] {s : Set.{u1} α}, (IsLowerSet.{u1} α (Preorder.toHasLe.{u1} α _inst_2) s) -> (IsLowerSet.{u1} α (Preorder.toHasLe.{u1} α _inst_2) (interior.{u1} α _inst_1 s))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : HasUpperLowerClosure.{u1} α _inst_1 _inst_2] {s : Set.{u1} α}, (IsLowerSet.{u1} α (Preorder.toLE.{u1} α _inst_2) s) -> (IsLowerSet.{u1} α (Preorder.toLE.{u1} α _inst_2) (interior.{u1} α _inst_1 s))
-Case conversion may be inaccurate. Consider using '#align is_lower_set.interior IsLowerSet.interiorₓ'. -/
protected theorem IsLowerSet.interior (h : IsLowerSet s) : IsLowerSet (interior s) :=
h.ofDual.interior
#align is_lower_set.interior IsLowerSet.interior
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -58,21 +58,13 @@ instance (priority := 100) OrderedCommGroup.to_hasUpperLowerClosure [OrderedComm
[ContinuousConstSMul α α] : HasUpperLowerClosure α
where
isUpperSet_closure s h x y hxy hx :=
- closure_mono (h.smul_subset <| one_le_div'.2 hxy) <|
- by
- rw [closure_smul]
+ closure_mono (h.smul_subset <| one_le_div'.2 hxy) <| by rw [closure_smul];
exact ⟨x, hx, div_mul_cancel' _ _⟩
isLowerSet_closure s h x y hxy hx :=
- closure_mono (h.smul_subset <| div_le_one'.2 hxy) <|
- by
- rw [closure_smul]
+ closure_mono (h.smul_subset <| div_le_one'.2 hxy) <| by rw [closure_smul];
exact ⟨x, hx, div_mul_cancel' _ _⟩
- isOpen_upperClosure s hs := by
- rw [← mul_one s, ← mul_upperClosure]
- exact hs.mul_right
- isOpen_lowerClosure s hs := by
- rw [← mul_one s, ← mul_lowerClosure]
- exact hs.mul_right
+ isOpen_upperClosure s hs := by rw [← mul_one s, ← mul_upperClosure]; exact hs.mul_right
+ isOpen_lowerClosure s hs := by rw [← mul_one s, ← mul_lowerClosure]; exact hs.mul_right
#align ordered_comm_group.to_has_upper_lower_closure OrderedCommGroup.to_hasUpperLowerClosure
#align ordered_add_comm_group.to_has_upper_lower_closure OrderedAddCommGroup.to_hasUpperLowerClosure
@@ -137,10 +129,8 @@ oooooxx
oooooxx
```
-/
-protected theorem IsUpperSet.interior (h : IsUpperSet s) : IsUpperSet (interior s) :=
- by
- rw [← isLowerSet_compl, ← closure_compl]
- exact h.compl.closure
+protected theorem IsUpperSet.interior (h : IsUpperSet s) : IsUpperSet (interior s) := by
+ rw [← isLowerSet_compl, ← closure_compl]; exact h.compl.closure
#align is_upper_set.interior IsUpperSet.interior
/- warning: is_lower_set.interior -> IsLowerSet.interior is a dubious translation:
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -78,17 +78,25 @@ instance (priority := 100) OrderedCommGroup.to_hasUpperLowerClosure [OrderedComm
variable [Preorder α] [HasUpperLowerClosure α] {s : Set α}
-#print IsUpperSet.closure /-
+/- warning: is_upper_set.closure -> IsUpperSet.closure is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : HasUpperLowerClosure.{u1} α _inst_1 _inst_2] {s : Set.{u1} α}, (IsUpperSet.{u1} α (Preorder.toHasLe.{u1} α _inst_2) s) -> (IsUpperSet.{u1} α (Preorder.toHasLe.{u1} α _inst_2) (closure.{u1} α _inst_1 s))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : HasUpperLowerClosure.{u1} α _inst_1 _inst_2] {s : Set.{u1} α}, (IsUpperSet.{u1} α (Preorder.toLE.{u1} α _inst_2) s) -> (IsUpperSet.{u1} α (Preorder.toLE.{u1} α _inst_2) (closure.{u1} α _inst_1 s))
+Case conversion may be inaccurate. Consider using '#align is_upper_set.closure IsUpperSet.closureₓ'. -/
protected theorem IsUpperSet.closure : IsUpperSet s → IsUpperSet (closure s) :=
HasUpperLowerClosure.isUpperSet_closure _
#align is_upper_set.closure IsUpperSet.closure
--/
-#print IsLowerSet.closure /-
+/- warning: is_lower_set.closure -> IsLowerSet.closure is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : HasUpperLowerClosure.{u1} α _inst_1 _inst_2] {s : Set.{u1} α}, (IsLowerSet.{u1} α (Preorder.toHasLe.{u1} α _inst_2) s) -> (IsLowerSet.{u1} α (Preorder.toHasLe.{u1} α _inst_2) (closure.{u1} α _inst_1 s))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : HasUpperLowerClosure.{u1} α _inst_1 _inst_2] {s : Set.{u1} α}, (IsLowerSet.{u1} α (Preorder.toLE.{u1} α _inst_2) s) -> (IsLowerSet.{u1} α (Preorder.toLE.{u1} α _inst_2) (closure.{u1} α _inst_1 s))
+Case conversion may be inaccurate. Consider using '#align is_lower_set.closure IsLowerSet.closureₓ'. -/
protected theorem IsLowerSet.closure : IsLowerSet s → IsLowerSet (closure s) :=
HasUpperLowerClosure.isLowerSet_closure _
#align is_lower_set.closure IsLowerSet.closure
--/
#print IsOpen.upperClosure /-
protected theorem IsOpen.upperClosure : IsOpen s → IsOpen (upperClosure s : Set α) :=
@@ -109,7 +117,12 @@ instance : HasUpperLowerClosure αᵒᵈ
isOpen_upperClosure := @IsOpen.lowerClosure α _ _ _
isOpen_lowerClosure := @IsOpen.upperClosure α _ _ _
-#print IsUpperSet.interior /-
+/- warning: is_upper_set.interior -> IsUpperSet.interior is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : HasUpperLowerClosure.{u1} α _inst_1 _inst_2] {s : Set.{u1} α}, (IsUpperSet.{u1} α (Preorder.toHasLe.{u1} α _inst_2) s) -> (IsUpperSet.{u1} α (Preorder.toHasLe.{u1} α _inst_2) (interior.{u1} α _inst_1 s))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : HasUpperLowerClosure.{u1} α _inst_1 _inst_2] {s : Set.{u1} α}, (IsUpperSet.{u1} α (Preorder.toLE.{u1} α _inst_2) s) -> (IsUpperSet.{u1} α (Preorder.toLE.{u1} α _inst_2) (interior.{u1} α _inst_1 s))
+Case conversion may be inaccurate. Consider using '#align is_upper_set.interior IsUpperSet.interiorₓ'. -/
/-
Note: `s.ord_connected` does not imply `(closure s).ord_connected`, as we can see by taking
`s := Ioo 0 1 × Ioo 1 2 ∪ Ioo 2 3 × Ioo 0 1` because then
@@ -129,13 +142,16 @@ protected theorem IsUpperSet.interior (h : IsUpperSet s) : IsUpperSet (interior
rw [← isLowerSet_compl, ← closure_compl]
exact h.compl.closure
#align is_upper_set.interior IsUpperSet.interior
--/
-#print IsLowerSet.interior /-
+/- warning: is_lower_set.interior -> IsLowerSet.interior is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : HasUpperLowerClosure.{u1} α _inst_1 _inst_2] {s : Set.{u1} α}, (IsLowerSet.{u1} α (Preorder.toHasLe.{u1} α _inst_2) s) -> (IsLowerSet.{u1} α (Preorder.toHasLe.{u1} α _inst_2) (interior.{u1} α _inst_1 s))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : HasUpperLowerClosure.{u1} α _inst_1 _inst_2] {s : Set.{u1} α}, (IsLowerSet.{u1} α (Preorder.toLE.{u1} α _inst_2) s) -> (IsLowerSet.{u1} α (Preorder.toLE.{u1} α _inst_2) (interior.{u1} α _inst_1 s))
+Case conversion may be inaccurate. Consider using '#align is_lower_set.interior IsLowerSet.interiorₓ'. -/
protected theorem IsLowerSet.interior (h : IsLowerSet s) : IsLowerSet (interior s) :=
h.ofDual.interior
#align is_lower_set.interior IsLowerSet.interior
--/
#print Set.OrdConnected.interior /-
protected theorem Set.OrdConnected.interior (h : s.OrdConnected) : (interior s).OrdConnected :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce7e9d53d4bbc38065db3b595cd5bd73c323bc1d
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
! This file was ported from Lean 3 source module topology.algebra.order.upper_lower
-! leanprover-community/mathlib commit f47581155c818e6361af4e4fda60d27d020c226b
+! leanprover-community/mathlib commit 992efbda6f85a5c9074375d3c7cb9764c64d8f72
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -21,11 +21,10 @@ The topological closure and interior of an upper/lower/order-connected set is an
upper/lower/order-connected set (with the notable exception of the closure of an order-connected
set).
-## Notes
+## Implementation notes
-The lemmas don't mention additive/multiplicative operations. As a result, we decide to prime the
-multiplicative lemma names to indicate that there is probably a common generalisation to each pair
-of additive/multiplicative lemma.
+The same lemmas are true in the additive/multiplicative worlds. To avoid code duplication, we
+provide `has_upper_lower_closure`, an ad hoc axiomatisation of the properties we need.
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/21e3562c5e12d846c7def5eff8cdbc520d7d4936
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
! This file was ported from Lean 3 source module topology.algebra.order.upper_lower
-! leanprover-community/mathlib commit 4330aae21f538b862f8aead371cfb6ee556398f1
+! leanprover-community/mathlib commit f47581155c818e6361af4e4fda60d27d020c226b
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -14,6 +14,9 @@ import Mathbin.Topology.Algebra.Group.Basic
/-!
# Topological facts about upper/lower/order-connected sets
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
The topological closure and interior of an upper/lower/order-connected set is an
upper/lower/order-connected set (with the notable exception of the closure of an order-connected
set).
mathlib commit https://github.com/leanprover-community/mathlib/commit/195fcd60ff2bfe392543bceb0ec2adcdb472db4c
@@ -30,6 +30,7 @@ open Function Set
open Pointwise
+#print HasUpperLowerClosure /-
/-- Ad hoc class stating that the closure of an upper set is an upper set. This is used to state
lemmas that do not mention algebraic operations for both the additive and multiplicative versions
simultaneously. If you find a satisfying replacement for this typeclass, please remove it! -/
@@ -39,9 +40,16 @@ class HasUpperLowerClosure (α : Type _) [TopologicalSpace α] [Preorder α] : P
isOpen_upperClosure : ∀ s : Set α, IsOpen s → IsOpen (upperClosure s : Set α)
isOpen_lowerClosure : ∀ s : Set α, IsOpen s → IsOpen (lowerClosure s : Set α)
#align has_upper_lower_closure HasUpperLowerClosure
+-/
variable {α : Type _} [TopologicalSpace α]
+/- warning: ordered_comm_group.to_has_upper_lower_closure -> OrderedCommGroup.to_hasUpperLowerClosure is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : OrderedCommGroup.{u1} α] [_inst_3 : ContinuousConstSMul.{u1, u1} α α _inst_1 (Mul.toSMul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α (OrderedCommGroup.toCommGroup.{u1} α _inst_2)))))))], HasUpperLowerClosure.{u1} α _inst_1 (PartialOrder.toPreorder.{u1} α (OrderedCommGroup.toPartialOrder.{u1} α _inst_2))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : OrderedCommGroup.{u1} α] [_inst_3 : ContinuousConstSMul.{u1, u1} α α _inst_1 (MulAction.toSMul.{u1, u1} α α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α (OrderedCommGroup.toCommGroup.{u1} α _inst_2)))) (Monoid.toMulAction.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α (OrderedCommGroup.toCommGroup.{u1} α _inst_2))))))], HasUpperLowerClosure.{u1} α _inst_1 (PartialOrder.toPreorder.{u1} α (OrderedCommGroup.toPartialOrder.{u1} α _inst_2))
+Case conversion may be inaccurate. Consider using '#align ordered_comm_group.to_has_upper_lower_closure OrderedCommGroup.to_hasUpperLowerClosureₓ'. -/
-- See note [lower instance priority]
@[to_additive]
instance (priority := 100) OrderedCommGroup.to_hasUpperLowerClosure [OrderedCommGroup α]
@@ -68,21 +76,29 @@ instance (priority := 100) OrderedCommGroup.to_hasUpperLowerClosure [OrderedComm
variable [Preorder α] [HasUpperLowerClosure α] {s : Set α}
+#print IsUpperSet.closure /-
protected theorem IsUpperSet.closure : IsUpperSet s → IsUpperSet (closure s) :=
HasUpperLowerClosure.isUpperSet_closure _
#align is_upper_set.closure IsUpperSet.closure
+-/
+#print IsLowerSet.closure /-
protected theorem IsLowerSet.closure : IsLowerSet s → IsLowerSet (closure s) :=
HasUpperLowerClosure.isLowerSet_closure _
#align is_lower_set.closure IsLowerSet.closure
+-/
+#print IsOpen.upperClosure /-
protected theorem IsOpen.upperClosure : IsOpen s → IsOpen (upperClosure s : Set α) :=
HasUpperLowerClosure.isOpen_upperClosure _
#align is_open.upper_closure IsOpen.upperClosure
+-/
+#print IsOpen.lowerClosure /-
protected theorem IsOpen.lowerClosure : IsOpen s → IsOpen (lowerClosure s : Set α) :=
HasUpperLowerClosure.isOpen_lowerClosure _
#align is_open.lower_closure IsOpen.lowerClosure
+-/
instance : HasUpperLowerClosure αᵒᵈ
where
@@ -91,6 +107,7 @@ instance : HasUpperLowerClosure αᵒᵈ
isOpen_upperClosure := @IsOpen.lowerClosure α _ _ _
isOpen_lowerClosure := @IsOpen.upperClosure α _ _ _
+#print IsUpperSet.interior /-
/-
Note: `s.ord_connected` does not imply `(closure s).ord_connected`, as we can see by taking
`s := Ioo 0 1 × Ioo 1 2 ∪ Ioo 2 3 × Ioo 0 1` because then
@@ -110,15 +127,20 @@ protected theorem IsUpperSet.interior (h : IsUpperSet s) : IsUpperSet (interior
rw [← isLowerSet_compl, ← closure_compl]
exact h.compl.closure
#align is_upper_set.interior IsUpperSet.interior
+-/
+#print IsLowerSet.interior /-
protected theorem IsLowerSet.interior (h : IsLowerSet s) : IsLowerSet (interior s) :=
h.ofDual.interior
#align is_lower_set.interior IsLowerSet.interior
+-/
+#print Set.OrdConnected.interior /-
protected theorem Set.OrdConnected.interior (h : s.OrdConnected) : (interior s).OrdConnected :=
by
rw [← h.upper_closure_inter_lower_closure, interior_inter]
exact
(upperClosure s).upper.interior.OrdConnected.inter (lowerClosure s).lower.interior.OrdConnected
#align set.ord_connected.interior Set.OrdConnected.interior
+-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
mul
-div
cancellation lemmas (#11530)
Lemma names around cancellation of multiplication and division are a mess.
This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero
lemma name, the Group
lemma, the AddGroup
lemma name).
| Statement | New name | Old name | |
@@ -45,11 +45,11 @@ instance (priority := 100) OrderedCommGroup.to_hasUpperLowerClosure [OrderedComm
isUpperSet_closure s h x y hxy hx :=
closure_mono (h.smul_subset <| one_le_div'.2 hxy) <| by
rw [closure_smul]
- exact ⟨x, hx, div_mul_cancel' _ _⟩
+ exact ⟨x, hx, div_mul_cancel _ _⟩
isLowerSet_closure s h x y hxy hx :=
closure_mono (h.smul_subset <| div_le_one'.2 hxy) <| by
rw [closure_smul]
- exact ⟨x, hx, div_mul_cancel' _ _⟩
+ exact ⟨x, hx, div_mul_cancel _ _⟩
isOpen_upperClosure s hs := by
rw [← mul_one s, ← mul_upperClosure]
exact hs.mul_right
upperBounds_closure
, lowerBounds_closure
, bddAbove_closure
, bddBelow_closure
.IsAntichain.interior_eq_empty
.nhds_left'_le_nhds_ne
and nhds_right'_le_nhds_ne
to a Preorder
.Partly forward-ports https://github.com/leanprover-community/mathlib/pull/16976
@@ -6,7 +6,7 @@ Authors: Yaël Dillies
import Mathlib.Algebra.Order.UpperLower
import Mathlib.Topology.Algebra.Group.Basic
-#align_import topology.algebra.order.upper_lower from "leanprover-community/mathlib"@"c0c52abb75074ed8b73a948341f50521fbf43b4c"
+#align_import topology.algebra.order.upper_lower from "leanprover-community/mathlib"@"b1abe23ae96fef89ad30d9f4362c307f72a55010"
/-!
# Topological facts about upper/lower/order-connected sets
Match https://github.com/leanprover-community/mathlib/pull/19068
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -6,7 +6,7 @@ Authors: Yaël Dillies
import Mathlib.Algebra.Order.UpperLower
import Mathlib.Topology.Algebra.Group.Basic
-#align_import topology.algebra.order.upper_lower from "leanprover-community/mathlib"@"992efbda6f85a5c9074375d3c7cb9764c64d8f72"
+#align_import topology.algebra.order.upper_lower from "leanprover-community/mathlib"@"c0c52abb75074ed8b73a948341f50521fbf43b4c"
/-!
# Topological facts about upper/lower/order-connected sets
@@ -104,7 +104,7 @@ protected theorem IsUpperSet.interior (h : IsUpperSet s) : IsUpperSet (interior
#align is_upper_set.interior IsUpperSet.interior
protected theorem IsLowerSet.interior (h : IsLowerSet s) : IsLowerSet (interior s) :=
- h.ofDual.interior
+ h.toDual.interior
#align is_lower_set.interior IsLowerSet.interior
protected theorem Set.OrdConnected.interior (h : s.OrdConnected) : (interior s).OrdConnected := by
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -29,14 +29,14 @@ open Pointwise
/-- Ad hoc class stating that the closure of an upper set is an upper set. This is used to state
lemmas that do not mention algebraic operations for both the additive and multiplicative versions
simultaneously. If you find a satisfying replacement for this typeclass, please remove it! -/
-class HasUpperLowerClosure (α : Type _) [TopologicalSpace α] [Preorder α] : Prop where
+class HasUpperLowerClosure (α : Type*) [TopologicalSpace α] [Preorder α] : Prop where
isUpperSet_closure : ∀ s : Set α, IsUpperSet s → IsUpperSet (closure s)
isLowerSet_closure : ∀ s : Set α, IsLowerSet s → IsLowerSet (closure s)
isOpen_upperClosure : ∀ s : Set α, IsOpen s → IsOpen (upperClosure s : Set α)
isOpen_lowerClosure : ∀ s : Set α, IsOpen s → IsOpen (lowerClosure s : Set α)
#align has_upper_lower_closure HasUpperLowerClosure
-variable {α : Type _} [TopologicalSpace α]
+variable {α : Type*} [TopologicalSpace α]
-- See note [lower instance priority]
@[to_additive]
@@ -2,15 +2,12 @@
Copyright (c) 2022 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-
-! This file was ported from Lean 3 source module topology.algebra.order.upper_lower
-! leanprover-community/mathlib commit 992efbda6f85a5c9074375d3c7cb9764c64d8f72
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.Order.UpperLower
import Mathlib.Topology.Algebra.Group.Basic
+#align_import topology.algebra.order.upper_lower from "leanprover-community/mathlib"@"992efbda6f85a5c9074375d3c7cb9764c64d8f72"
+
/-!
# Topological facts about upper/lower/order-connected sets
by
s! (#3825)
This PR puts, with one exception, every single remaining by
that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh
. The exception is when the by
begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.
Essentially this is s/\n *by$/ by/g
, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated by
s".
@@ -44,16 +44,13 @@ variable {α : Type _} [TopologicalSpace α]
-- See note [lower instance priority]
@[to_additive]
instance (priority := 100) OrderedCommGroup.to_hasUpperLowerClosure [OrderedCommGroup α]
- [ContinuousConstSMul α α] : HasUpperLowerClosure α
- where
+ [ContinuousConstSMul α α] : HasUpperLowerClosure α where
isUpperSet_closure s h x y hxy hx :=
- closure_mono (h.smul_subset <| one_le_div'.2 hxy) <|
- by
+ closure_mono (h.smul_subset <| one_le_div'.2 hxy) <| by
rw [closure_smul]
exact ⟨x, hx, div_mul_cancel' _ _⟩
isLowerSet_closure s h x y hxy hx :=
- closure_mono (h.smul_subset <| div_le_one'.2 hxy) <|
- by
+ closure_mono (h.smul_subset <| div_le_one'.2 hxy) <| by
rw [closure_smul]
exact ⟨x, hx, div_mul_cancel' _ _⟩
isOpen_upperClosure s hs := by
Topology.Algebra.Order.UpperLower
docstring (#2896)
Match https://github.com/leanprover-community/mathlib/pull/17257
Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
! This file was ported from Lean 3 source module topology.algebra.order.upper_lower
-! leanprover-community/mathlib commit 4330aae21f538b862f8aead371cfb6ee556398f1
+! leanprover-community/mathlib commit 992efbda6f85a5c9074375d3c7cb9764c64d8f72
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -18,11 +18,10 @@ The topological closure and interior of an upper/lower/order-connected set is an
upper/lower/order-connected set (with the notable exception of the closure of an order-connected
set).
-## Notes
+## Implementation notes
-The lemmas don't mention additive/multiplicative operations. As a result, we decide to prime the
-multiplicative lemma names to indicate that there is probably a common generalisation to each pair
-of additive/multiplicative lemma.
+The same lemmas are true in the additive/multiplicative worlds. To avoid code duplication, we
+provide `HasUpperLowerClosure`, an ad hoc axiomatisation of the properties we need.
-/
The unported dependencies are