Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat(MetricSpace): add Metric.biInter_gt_ball etc #20262

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Mathlib/Order/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,13 @@ theorem eq_of_le_of_forall_ge_of_dense [LinearOrder α] [DenselyOrdered α] {a
(h₂ : ∀ a₃ < a₁, a₃ ≤ a₂) : a₁ = a₂ :=
(le_of_forall_ge_of_dense h₂).antisymm h₁

theorem forall_lt_le_iff [LinearOrder α] [DenselyOrdered α] {a b : α} : (∀ c < a, c ≤ b) ↔ a ≤ b :=
⟨le_of_forall_ge_of_dense, fun hab _c hca ↦ hca.le.trans hab⟩

theorem forall_gt_ge_iff [LinearOrder α] [DenselyOrdered α] {a b : α} :
(∀ c, a < c → b ≤ c) ↔ b ≤ a :=
forall_lt_le_iff (α := αᵒᵈ)

theorem dense_or_discrete [LinearOrder α] (a₁ a₂ : α) :
(∃ a, a₁ < a ∧ a < a₂) ∨ (∀ a, a₁ < a → a₂ ≤ a) ∧ ∀ a < a₂, a ≤ a₁ :=
or_iff_not_imp_left.2 fun h ↦
Expand Down
18 changes: 18 additions & 0 deletions Mathlib/Topology/MetricSpace/Pseudo/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,22 @@ lemma exists_isCompact_closedBall [WeaklyLocallyCompactSpace α] (x : α) :
eventually_nhdsWithin_of_eventually_nhds (eventually_isCompact_closedBall x)
simpa only [and_comm] using (this.and self_mem_nhdsWithin).exists

theorem biInter_gt_closedBall (x : α) (r : ℝ) : ⋂ r' > r, closedBall x r' = closedBall x r := by
ext
simp [forall_gt_ge_iff]

theorem biInter_gt_ball (x : α) (r : ℝ) : ⋂ r' > r, ball x r' = closedBall x r := by
ext
simp [forall_lt_iff_le']

theorem biUnion_lt_ball (x : α) (r : ℝ) : ⋃ r' < r, ball x r' = ball x r := by
ext
rw [← not_iff_not]
simp [forall_lt_le_iff]

theorem biUnion_lt_closedBall (x : α) (r : ℝ) : ⋃ r' < r, closedBall x r' = ball x r := by
ext
rw [← not_iff_not]
simp [forall_lt_iff_le]

end Metric
Loading