Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 8cc2ff4

Browse files
committed
refactor(order/{bounded, rel_classes}): Moved bounded into the set namespace (#11594)
As per the [Zulip discussion](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/bounded.2Emono). Closes #11589.
1 parent b834415 commit 8cc2ff4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/order/bounded.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ the same ideas, or similar results with a few minor differences. The file is div
1515
different general ideas.
1616
-/
1717

18+
namespace set
1819
variables {α : Type*} {r : α → α → Prop} {s t : set α}
1920

2021
/-! ### Subsets of bounded and unbounded sets -/
@@ -328,3 +329,5 @@ theorem bounded_gt_inter_gt [linear_order α] [no_min_order α] (a : α) :
328329
theorem unbounded_gt_inter_gt [linear_order α] [no_min_order α] (a : α) :
329330
unbounded (>) (s ∩ {b | b < a}) ↔ unbounded (>) s :=
330331
@unbounded_lt_inter_lt (order_dual α) s _ _ a
332+
333+
end set

src/order/rel_classes.lean

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,11 @@ instance prod.lex.is_well_order [is_well_order α r] [is_well_order β s] :
281281
end,
282282
wf := prod.lex_wf is_well_order.wf is_well_order.wf }
283283

284-
/-- An unbounded or cofinal set -/
284+
namespace set
285+
286+
/-- An unbounded or cofinal set. -/
285287
def unbounded (r : α → α → Prop) (s : set α) : Prop := ∀ a, ∃ b ∈ s, ¬ r b a
286-
/-- A bounded or final set -/
288+
/-- A bounded or final set. Not to be confused with `metric.bounded`. -/
287289
def bounded (r : α → α → Prop) (s : set α) : Prop := ∃ a, ∀ b ∈ s, r b a
288290

289291
@[simp] lemma not_bounded_iff {r : α → α → Prop} (s : set α) : ¬bounded r s ↔ unbounded r s :=
@@ -292,6 +294,8 @@ by simp only [bounded, unbounded, not_forall, not_exists, exists_prop, not_and,
292294
@[simp] lemma not_unbounded_iff {r : α → α → Prop} (s : set α) : ¬unbounded r s ↔ bounded r s :=
293295
by rw [not_iff_comm, not_bounded_iff]
294296

297+
end set
298+
295299
namespace prod
296300

297301
instance is_refl_preimage_fst {r : α → α → Prop} [h : is_refl α r] :

0 commit comments

Comments
 (0)