Zulip Chat Archive
Stream: Is there code for X?
Topic: closed interval not neighborhood of edge
llllvvuu (Feb 18 2024 at 02:21):
I tried a few spellings, nothing came up for exact?
/apply?
/aesop?
/etc:
import Mathlib
open scoped Topology
lemma foo {a b : โ} : Set.Icc a b โ ๐ a := by
by_contra hc
obtain โจฮต, ฮต_pos, ฮต_in_iccโฉ := Metric.mem_nhds_iff.mp hc
have h_mem : a - ฮต/2 โ Metric.ball a ฮต := mem_ball_iff_norm'.mpr (by simp [ฮต_pos, abs_of_pos])
have h_nmem : a - ฮต/2 โ Set.Icc a b := Set.not_mem_Icc_of_lt (by linarith)
exact h_nmem (ฮต_in_icc h_mem)
lemma bar {a b c : โ} : Set.Icc a b โ ๐ c โ a < c โง c < b := by
constructor
ยท sorry
ยท exact fun โจh1, h2โฉ โฆ Icc_mem_nhds h1 h2
lemma baz {a b c : โ} : Set.Icc a b โ ๐ c โ Set.Ioo a b โ ๐ c := by
constructor
ยท sorry
ยท exact fun h โฆ Filter.mem_of_superset h Set.Ioo_subset_Icc_self
Do we have something like this?
Patrick Massot (Feb 18 2024 at 03:11):
I would be surprised if this is in Mathlib. They look pretty useless. What are you trying to do with those lemmas?
llllvvuu (Feb 18 2024 at 03:45):
I have (not #mwe unfortunately):
def Rectangle (z w : โ) : Set โ := [[z.re, w.re]] รโ [[z.im, w.im]]
lemma RectanglePullToNhdOfPole' {f : โ โ โ} {zโ zโ zโ zโ p : โ}
-- ...
(hp : Rectangle zโ zโ โ ๐ p) (hz : Rectangle zโ zโ โ Rectangle zโ zโ)
(fHolo : HolomorphicOn f (Rectangle zโ zโ \ {p})) :
RectangleIntegral f zโ zโ = RectangleIntegral f zโ zโ := by
sorry
and I need p
to not be on the edge of the inner rectangle. But maybe I should take instead of (hp : Rectangle zโ zโ โ ๐ p)
, just directly (hp : zโ < p.re โง ...)
?
Junyan Xu (Feb 18 2024 at 09:38):
import Mathlib
open scoped Topology
lemma bar {a b c : โ} : Set.Icc a b โ ๐ c โ a < c โง c < b := by
rw [โ mem_interior_iff_mem_nhds, interior_Icc]; rfl
lemma foo {a b : โ} : Set.Icc a b โ ๐ a := by
rw [bar]; exact (irrefl _ ยท.1)
lemma baz {a b c : โ} : Set.Icc a b โ ๐ c โ Set.Ioo a b โ ๐ c := by
rw [โ interior_Icc]; exact interior_mem_nhds.symm
Yury G. Kudryashov (Mar 05 2024 at 15:58):
bar
above looks like a reasonable simp
lemma for mathlib, probably with Ioo
spelling on the right.
llllvvuu (Mar 05 2024 at 18:21):
https://github.com/leanprover-community/mathlib4/pull/11178
Last updated: May 02 2025 at 03:31 UTC