import Mathlib
-- https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/API.2Ftactic.20for.20subspace.20topology
example : β (s t : Set β), IsClosed s β closure (s β© t) β© t β s β© t
example ( s t : Set β ) ( hs : IsClosed : {X : Type} β [inst : TopologicalSpace X] β Set X β Prop
IsClosed s ) : closure : {X : Type} β [inst : TopologicalSpace X] β Set X β Set X
closure ( s β© t ) β© t β s β© t := by
simp only [ Set.subset_inter_iff : β {Ξ± : Type ?u.694} {s t r : Set Ξ±}, r β s β© t β r β s β§ r β t
Set.subset_inter_iff, Set.inter_subset_right : β {Ξ± : Type ?u.719} {s t : Set Ξ±}, s β© t β t
Set.inter_subset_right, and_true : β (p : Prop), (p β§ True) = p
and_true] s, t : Set β hs : IsClosed s
closure (s β© t) β© t β s
intro x hx : x β closure (s β© t) β© t
hx s, t : Set β hs : IsClosed s x : β hx : x β closure (s β© t) β© t
x β s
obtain β¨hxst, _hxtβ© : x β closure (s β© t) β© t
β¨hxst : x β closure (s β© t)
hxst β¨hxst, _hxtβ© : x β closure (s β© t) β© t
, _hxt β¨hxst, _hxtβ© : x β closure (s β© t) β© t
β© := hx : x β closure (s β© t) β© t
hx s, t : Set β hs : IsClosed s x : β hxst : x β closure (s β© t) _hxt : x β t
intro x β s
have hsub : closure (s β© t) β s
hsub : closure : {X : Type} β [inst : TopologicalSpace X] β Set X β Set X
closure ( s β© t ) β s := s, t : Set β hs : IsClosed s x : β hxst : x β closure (s β© t) _hxt : x β t
intro x β s
by
rw [ s, t : Set β hs : IsClosed s x : β hxst : x β closure (s β© t) _hxt : x β t
closure (s β© t) β s
propext : β {a b : Prop}, (a β b) β a = b
propext ( IsClosed.closure_subset_iff : β {X : Type} {s t : Set X} [inst : TopologicalSpace X], IsClosed t β (closure s β t β s β t)
IsClosed.closure_subset_iff hs ) s, t : Set β hs : IsClosed s x : β hxst : x β closure (s β© t) _hxt : x β t
s β© t β s
] s, t : Set β hs : IsClosed s x : β hxst : x β closure (s β© t) _hxt : x β t
s β© t β s
exact Set.inter_subset_left : β {Ξ± : Type} {s t : Set Ξ±}, s β© t β s
Set.inter_subset_left
exact hsub : closure (s β© t) β s
hsub hxst : x β closure (s β© t)
hxst
example : β (s t : Set β), IsClosed (s β© t) β closure (s β© t) β© t β s β© t
example ( s t : Set β ) ( hst : IsClosed : {X : Type} β [inst : TopologicalSpace X] β Set X β Prop
IsClosed ( s β© t )) : closure : {X : Type} β [inst : TopologicalSpace X] β Set X β Set X
closure ( s β© t ) β© t β s β© t := by
simp only [ Set.subset_inter_iff : β {Ξ± : Type ?u.2189} {s t r : Set Ξ±}, r β s β© t β r β s β§ r β t
Set.subset_inter_iff, Set.inter_subset_right : β {Ξ± : Type ?u.2214} {s t : Set Ξ±}, s β© t β t
Set.inter_subset_right, and_true : β (p : Prop), (p β§ True) = p
and_true] s, t : Set β hst : IsClosed (s β© t)
closure (s β© t) β© t β s
intro x hx : x β closure (s β© t) β© t
hx s, t : Set β hst : IsClosed (s β© t) x : β hx : x β closure (s β© t) β© t
x β s
obtain β¨hxst, _hxtβ© : x β closure (s β© t) β© t
β¨hxst : x β closure (s β© t)
hxst β¨hxst, _hxtβ© : x β closure (s β© t) β© t
, _hxt β¨hxst, _hxtβ© : x β closure (s β© t) β© t
β© := hx : x β closure (s β© t) β© t
hx s, t : Set β hst : IsClosed (s β© t) x : β hxst : x β closure (s β© t) _hxt : x β t
intro x β s
have _hclosed : IsClosed (closure (s β© t))
_hclosed : IsClosed : {X : Type} β [inst : TopologicalSpace X] β Set X β Prop
IsClosed ( closure : {X : Type} β [inst : TopologicalSpace X] β Set X β Set X
closure ( s β© t )) := s, t : Set β hst : IsClosed (s β© t) x : β hxst : x β closure (s β© t) _hxt : x β t
intro x β s
by
exact isClosed_closure : β {X : Type} {s : Set X} [inst : TopologicalSpace X], IsClosed (closure s)
isClosed_closure
have hsub : ( s β© t ) β s := s, t : Set β hst : IsClosed (s β© t) x : β hxst : x β closure (s β© t) _hxt : x β t _hclosed : IsClosed (closure (s β© t))
intro x β s
by exact Set.inter_subset_left : β {Ξ± : Type} {s t : Set Ξ±}, s β© t β s
Set.inter_subset_left
have hsub'' : closure (s β© t) β s β© t
hsub'' : closure : {X : Type} β [inst : TopologicalSpace X] β Set X β Set X
closure ( s β© t ) β ( s β© t ) := s, t : Set β hst : IsClosed (s β© t) x : β hxst : x β closure (s β© t) _hxt : x β t _hclosed : IsClosed (closure (s β© t)) hsub : s β© t β s
intro x β s
by
rw [ s, t : Set β hst : IsClosed (s β© t) x : β hxst : x β closure (s β© t) _hxt : x β t _hclosed : IsClosed (closure (s β© t)) hsub : s β© t β s
closure (s β© t) β s β© t
propext : β {a b : Prop}, (a β b) β a = b
propext ( IsClosed.closure_subset_iff : β {X : Type} {s t : Set X} [inst : TopologicalSpace X], IsClosed t β (closure s β t β s β t)
IsClosed.closure_subset_iff hst ) s, t : Set β hst : IsClosed (s β© t) x : β hxst : x β closure (s β© t) _hxt : x β t _hclosed : IsClosed (closure (s β© t)) hsub : s β© t β s
s β© t β s β© t
]
exact hsub ( hsub'' : closure (s β© t) β s β© t
hsub'' hxst : x β closure (s β© t)
hxst )
done Warning: ' done' tactic does nothing
note: this linter can be disabled with `set_option linter.unusedTactic false`
example : β (s t : Set β), IsClosed (s β© t) β closure (s β© t) β© t β s β© t
example ( s t : Set β ) ( hst : IsClosed : {X : Type} β [inst : TopologicalSpace X] β Set X β Prop
IsClosed ( s β© t )) : closure : {X : Type} β [inst : TopologicalSpace X] β Set X β Set X
closure ( s β© t ) β© t β s β© t := by
simp only [ Set.subset_inter_iff : β {Ξ± : Type ?u.4483} {s t r : Set Ξ±}, r β s β© t β r β s β§ r β t
Set.subset_inter_iff, Set.inter_subset_right : β {Ξ± : Type ?u.4508} {s t : Set Ξ±}, s β© t β t
Set.inter_subset_right, and_true : β (p : Prop), (p β§ True) = p
and_true] s, t : Set β hst : IsClosed (s β© t)
closure (s β© t) β© t β s
intro x hx : x β closure (s β© t) β© t
hx s, t : Set β hst : IsClosed (s β© t) x : β hx : x β closure (s β© t) β© t
x β s
obtain β¨hxst, _β© : x β closure (s β© t) β© t
β¨hxst : x β closure (s β© t)
hxst β¨hxst, _β© : x β closure (s β© t) β© t
, _ β¨hxst, _β© : x β closure (s β© t) β© t
β© := hx : x β closure (s β© t) β© t
hx s, t : Set β hst : IsClosed (s β© t) x : β hxst : x β closure (s β© t) rightβ : x β t
intro x β s
have h : ( s β© t ) β s := s, t : Set β hst : IsClosed (s β© t) x : β hxst : x β closure (s β© t) rightβ : x β t
intro x β s
by exact Set.inter_subset_left : β {Ξ± : Type} {s t : Set Ξ±}, s β© t β s
Set.inter_subset_left
have hsub : closure (s β© t) β s β© t
hsub : closure : {X : Type} β [inst : TopologicalSpace X] β Set X β Set X
closure ( s β© t ) β ( s β© t ) := s, t : Set β hst : IsClosed (s β© t) x : β hxst : x β closure (s β© t) rightβ : x β t h : s β© t β s
intro x β s
by
rw [ s, t : Set β hst : IsClosed (s β© t) x : β hxst : x β closure (s β© t) rightβ : x β t h : s β© t β s
closure (s β© t) β s β© t
propext : β {a b : Prop}, (a β b) β a = b
propext ( IsClosed.closure_subset_iff : β {X : Type} {s t : Set X} [inst : TopologicalSpace X], IsClosed t β (closure s β t β s β t)
IsClosed.closure_subset_iff hst ) s, t : Set β hst : IsClosed (s β© t) x : β hxst : x β closure (s β© t) rightβ : x β t h : s β© t β s
s β© t β s β© t
]
exact h ( hsub : closure (s β© t) β s β© t
hsub hxst : x β closure (s β© t)
hxst )
done Warning: ' done' tactic does nothing
note: this linter can be disabled with `set_option linter.unusedTactic false`
variable { X } [ TopologicalSpace : Type u_1 β Type u_1
TopologicalSpace X ]
def restrict : (A : Set X) β Set X β Set βA
restrict ( A : Set : Type u_1 β Type u_1
Set X ) : Set : Type u_1 β Type u_1
Set X β Set : Type u_1 β Type u_1
Set A := fun B β¦ { x | β x β B }
-- @[simp]
-- lemma restrict_coe {A : Set X} ( C : Set X) : (Subtype.val β»ΒΉ' C : Set A) = (restrict A C) := rfl
example : β {X : Type u_1} (s t : Set X), restrict t s = Subtype.val β»ΒΉ' s
example ( s t : Set : Type u_1 β Type u_1
Set X ) : restrict : {X : Type u_1} β (A : Set X) β Set X β Set βA
restrict t s = ( Subtype.val : {Ξ± : Type u_1} β {p : Ξ± β Prop} β Subtype p β Ξ±
Subtype.val β»ΒΉ' s : Set : Type u_1 β Type u_1
Set t ) := by
ext x X : Type u_1instβ : TopologicalSpace X s, t : Set X x : β t
h x β restrict t s β x β Subtype.val β»ΒΉ' s
simp [ restrict : {X : Type ?u.5837} β (A : Set X) β Set X β Set βA
restrict]
example : β {X : Type u_1} [inst : TopologicalSpace X] (s t : Set X), IsClosed (restrict t s) β closure (s β© t) β© t β s β© t
example Warning: declaration uses ' sorry ' ( s t : Set : Type u_1 β Type u_1
Set X ) ( hs : IsClosed (restrict t s)
hs : IsClosed : {X : Type u_1} β [inst : TopologicalSpace X] β Set X β Prop
IsClosed ( restrict : {X : Type u_1} β (A : Set X) β Set X β Set βA
restrict t s )) : closure : {X : Type u_1} β [inst : TopologicalSpace X] β Set X β Set X
closure ( s β© t ) β© t β s β© t := by
simp only [ Set.subset_inter_iff : β {Ξ± : Type ?u.7071} {s t r : Set Ξ±}, r β s β© t β r β s β§ r β t
Set.subset_inter_iff, Set.inter_subset_right : β {Ξ± : Type ?u.7096} {s t : Set Ξ±}, s β© t β t
Set.inter_subset_right, and_true : β (p : Prop), (p β§ True) = p
and_true] X : Type u_1instβ : TopologicalSpace X s, t : Set X hs : IsClosed (restrict t s)
closure (s β© t) β© t β s
intro x hx : x β closure (s β© t) β© t
hx X : Type u_1instβ : TopologicalSpace X s, t : Set X hs : IsClosed (restrict t s) x : X hx : x β closure (s β© t) β© t
x β s
obtain β¨hxst, _β© : x β closure (s β© t) β© t
β¨hxst : x β closure (s β© t)
hxst β¨hxst, _β© : x β closure (s β© t) β© t
, _ β¨hxst, _β© : x β closure (s β© t) β© t
β© := hx : x β closure (s β© t) β© t
hx X : Type u_1instβ : TopologicalSpace X s, t : Set X hs : IsClosed (restrict t s) x : X hxst : x β closure (s β© t) rightβ : x β t
intro x β s
have h : ( s β© t ) β s := X : Type u_1instβ : TopologicalSpace X s, t : Set X hs : IsClosed (restrict t s) x : X hxst : x β closure (s β© t) rightβ : x β t
intro x β s
by exact Set.inter_subset_left : β {Ξ± : Type u_1} {s t : Set Ξ±}, s β© t β s
Set.inter_subset_left
have hsub : closure (restrict t s) β restrict t s
hsub : closure : {X : Type u_1} β [inst : TopologicalSpace X] β Set X β Set X
closure ( restrict : {X : Type u_1} β (A : Set X) β Set X β Set βA
restrict t s ) β ( restrict : {X : Type u_1} β (A : Set X) β Set X β Set βA
restrict t s ) := X : Type u_1instβ : TopologicalSpace X s, t : Set X hs : IsClosed (restrict t s) x : X hxst : x β closure (s β© t) rightβ : x β t h : s β© t β s
intro x β s
by rwa [ X : Type u_1instβ : TopologicalSpace X s, t : Set X hs : IsClosed (restrict t s) x : X hxst : x β closure (s β© t) rightβ : x β t h : s β© t β s
closure (restrict t s) β restrict t s
IsClosed.closure_subset_iff : β {X : Type u_1} {s t : Set X} [inst : TopologicalSpace X], IsClosed t β (closure s β t β s β t)
IsClosed.closure_subset_iffX : Type u_1instβ : TopologicalSpace X s, t : Set X hs : IsClosed (restrict t s) x : X hxst : x β closure (s β© t) rightβ : x β t h : s β© t β s
restrict t s β restrict t s
] X : Type u_1instβ : TopologicalSpace X s, t : Set X hs : IsClosed (restrict t s) x : X hxst : x β closure (s β© t) rightβ : x β t h : s β© t β s
IsClosed (restrict t s)
have hsub' : restrict t s β closure (restrict t s)
hsub' : ( restrict : {X : Type u_1} β (A : Set X) β Set X β Set βA
restrict t s ) β closure : {X : Type u_1} β [inst : TopologicalSpace X] β Set X β Set X
closure ( restrict : {X : Type u_1} β (A : Set X) β Set X β Set βA
restrict t s ) := X : Type u_1instβ : TopologicalSpace X s, t : Set X hs : IsClosed (restrict t s) x : X hxst : x β closure (s β© t) rightβ : x β t h : s β© t β s hsub : closure (restrict t s) β restrict t s
intro x β s
by exact subset_closure : β {X : Type u_1} {s : Set X} [inst : TopologicalSpace X], s β closure s
subset_closure
have hsub'' : s β© t β closure (s β© t)
hsub'' : ( s β© t ) β closure : {X : Type u_1} β [inst : TopologicalSpace X] β Set X β Set X
closure ( s β© t ) := X : Type u_1instβ : TopologicalSpace X s, t : Set X hs : IsClosed (restrict t s) x : X hxst : x β closure (s β© t) rightβ : x β t h : s β© t β s hsub : closure (restrict t s) β restrict t s hsub' : restrict t s β closure (restrict t s)
intro x β s
by exact subset_closure : β {X : Type u_1} {s : Set X} [inst : TopologicalSpace X], s β closure s
subset_closure
have he : restrict t s = closure (restrict t s)
he : ( restrict : {X : Type u_1} β (A : Set X) β Set X β Set βA
restrict t s ) = closure : {X : Type u_1} β [inst : TopologicalSpace X] β Set X β Set X
closure ( restrict : {X : Type u_1} β (A : Set X) β Set X β Set βA
restrict t s ) := X : Type u_1instβ : TopologicalSpace X s, t : Set X hs : IsClosed (restrict t s) x : X hxst : x β closure (s β© t) rightβ : x β t h : s β© t β s hsub : closure (restrict t s) β restrict t s hsub' : restrict t s β closure (restrict t s) hsub'' : s β© t β closure (s β© t)
intro x β s
by exact Set.Subset.antisymm : β {Ξ± : Type u_1} {a b : Set Ξ±}, a β b β b β a β a = b
Set.Subset.antisymm hsub' : restrict t s β closure (restrict t s)
hsub' hsub : closure (restrict t s) β restrict t s
hsub
-- have hq : (restrict t s) β t := sorry
obtain β¨y, β¨hy, hy'β©β© : IsOpen (restrict t s)αΆ
β¨y β¨y, β¨hy, hy'β©β© : IsOpen (restrict t s)αΆ
, β¨hy, hy'β© : IsOpen y β§ Subtype.val β»ΒΉ' y = (restrict t s)αΆ
β¨hy β¨hy, hy'β© : IsOpen y β§ Subtype.val β»ΒΉ' y = (restrict t s)αΆ
, hy' : Subtype.val β»ΒΉ' y = (restrict t s)αΆ
hy' β¨hy, hy'β© : IsOpen y β§ Subtype.val β»ΒΉ' y = (restrict t s)αΆ
β©β¨y, β¨hy, hy'β©β© : IsOpen (restrict t s)αΆ
β© := hs : IsClosed (restrict t s)
hs X : Type u_1instβ : TopologicalSpace X s, t : Set X x : X hxst : x β closure (s β© t) rightβ : x β t h : s β© t β s hsub : closure (restrict t s) β restrict t s hsub' : restrict t s β closure (restrict t s) hsub'' : s β© t β closure (s β© t) he : restrict t s = closure (restrict t s) y : Set X hy : IsOpen y hy' : Subtype.val β»ΒΉ' y = (restrict t s)αΆ
intro.mk.intro.intro x β s
-- have h' : (s β© t) β (restrict t s) := by
-- rw?
sorry
done Warning: ' done' tactic does nothing
note: this linter can be disabled with `set_option linter.unusedTactic false`
-- example (s t : Set X) (hs : IsClosed (Subtype.val β»ΒΉ' s : Set t)) : closure (s β© t) β© t β s β© t := by
-- suffices : closure (Subtype.val β»ΒΉ' s : Set t) β (Subtype.val β»ΒΉ' s : Set t)
-- Β· convert Set.image_subset Subtype.val this <;> simp [embedding_subtype_val.closure_eq_preimage_closure_image]
-- rwa [IsClosed.closure_subset_iff]
variable {Ξ± : Type u} {Ξ² : Type v}
def image (f : Ξ± β Ξ²) (s : Set Ξ±) : Set Ξ² := {f x | x β s}
def preimage (f : Ξ± β Ξ²) (s : Set Ξ²) : Set Ξ± := { x | f x β s }
variable (s t : Set X) in
#check IsClosed (Subtype.val β»ΒΉ' s) : Prop IsClosed : {X : Type u_1} β [inst : TopologicalSpace X] β Set X β Prop
IsClosed ( Set.preimage : {Ξ± Ξ² : Type u_1} β (Ξ± β Ξ²) β Set Ξ² β Set Ξ±
Set.preimage Subtype.val : {Ξ± : Type u_1} β {p : Ξ± β Prop} β Subtype p β Ξ±
Subtype.val s )
example : β {X : Type u_1} [inst : TopologicalSpace X] (s t : Set X), IsClosed (Subtype.val β»ΒΉ' s) β closure (s β© t) β© t β s β© t
example Warning: declaration uses ' sorry ' ( s t : Set : Type u_1 β Type u_1
Set X ) ( hs : IsClosed (Subtype.val β»ΒΉ' s)
hs : IsClosed : {X : Type u_1} β [inst : TopologicalSpace X] β Set X β Prop
IsClosed ( Subtype.val : {Ξ± : Type u_1} β {p : Ξ± β Prop} β Subtype p β Ξ±
Subtype.val β»ΒΉ' s : Set : Type u_1 β Type u_1
Set t )) : closure : {X : Type u_1} β [inst : TopologicalSpace X] β Set X β Set X
closure ( s β© t ) β© t β s β© t := by
sorry
done Warning: ' done' tactic does nothing
note: this linter can be disabled with `set_option linter.unusedTactic false`
-- example (s t : Set β) (hs : IsOpen s): closure (s β© t) β© t β s β© t := by
-- simp only [Set.subset_inter_iff, Set.inter_subset_right, and_true]
-- intro x hx
-- obtain β¨hxst, hxtβ© := hx
-- rw [mem_closure_iff] at hxst
-- have h := hxst s hs
-- have he : (s β© (s β© t)) = s β© t := by
-- simp only [Set.inter_eq_right, Set.inter_subset_left]
-- have hne (hu: Set.Nonempty (s β© t)) : Set.Nonempty (s β© (s β© t)) := by
-- rw [he]
-- exact hu
-- done
-- open Set
-- example (s t : Set β) : closure (s β© t) β© t β s β© t := by
-- rw [β Subtype.image_preimage_val, β Subtype.image_preimage_val,
-- image_subset_image_iff Subtype.val_injective]
-- intros t ht
-- rw [mem_preimage, β closure_subtype] at ht
-- revert ht t
-- apply IsClosed.closure_subset