Zulip Chat Archive
Stream: new members
Topic: Intersection of intervals
Iocta (Dec 19 2024 at 00:53):
Is there a theorem that the intersection of two intervals is an interval, likeinter (Icc a b) (Icc c d) = Icc a d
and likewise with Ioo Ioc
, etc?
Iocta (Dec 19 2024 at 01:49):
theorem Ioo_inter_Ioo (la ra lb rb : ℝ) :
Set.Ioo la ra ∩ Set.Ioo lb rb = Set.Ioo (la ⊓ lb) (ra ⊔ rb) := by
apply Set.ext
intro x
simp
apply Iff.intro
{
intro h
let ⟨⟨hal, har⟩, ⟨hbl, hbr⟩⟩ := h
simp_all
}
{
intro h
let ⟨hl, hr⟩ := h
apply And.intro
{ simp_all only [and_self] }
{ simp_all only [and_self] }
}
Iocta (Dec 19 2024 at 01:57):
There are 16 of these and they all have identical proofs. There must be a way to handle this situation.
Eric Wieser (Dec 19 2024 at 01:59):
docs#Set.Ioo_inter_Ioo interestingly says something different!
Eric Wieser (Dec 19 2024 at 02:01):
Oh, your proof is incompelte!
Eric Wieser (Dec 19 2024 at 02:01):
There is an error on the }
s
Iocta (Dec 19 2024 at 03:24):
oo
ps , yeah swapped the operators
Iocta (Dec 19 2024 at 03:25):
UI didn't make it very easy to notice - just one squiggly underneath the }
Iocta (Dec 19 2024 at 04:43):
How come there's no Icc_inter_Ioo
?
Philippe Duchon (Dec 19 2024 at 08:34):
You cannot know whether the intersection of a closed interval and an open one will be open or closed (either on the left or the right) if you don't have a hypothesis on the corresponding interval bounds, this is my guess.
Last updated: May 02 2025 at 03:31 UTC