Zulip Chat Archive
Stream: Is there code for X?
Topic: Set.Icc, Set.Ico, Set.Ici are not open in R
Aaron Hill (Oct 07 2024 at 13:21):
Is there a theorem that gives ¬ IsOpen
for the various closed/half-closed intervals, assuming that we're dealing with the real numbers with the usual topology?
Ruben Van de Velde (Oct 07 2024 at 13:42):
Not seeing anything obvious from a quick loogle search
Ruben Van de Velde (Oct 07 2024 at 13:50):
Here's one approach:
import Mathlib
example : ¬ IsOpen (Set.Icc (0 : ℝ) 1) := by
rw [← interior_eq_iff_isOpen, Set.ext_iff, not_forall]
use 1
simp
Bjørn Kjos-Hanssen (Oct 07 2024 at 19:18):
Just remarking that Set.Icc a b
is open if a>b
.
example (a b : ℝ) (h : a ≤ b): ¬ IsOpen (Set.Icc a b) := by
have : a ∈ Set.Icc a b := by simp;linarith
have : ¬ b+1 ∈ Set.Icc a b := by simp
have h₀: ¬ IsClopen (Set.Icc a b) := by
rw [isClopen_iff]
intro hc;cases hc <;> simp_all
exact fun hc => h₀ ⟨isClosed_Icc,hc⟩
Last updated: May 02 2025 at 03:31 UTC