MathlibAnnex/Topology/ClosureSpace/Maps.lean
Exact source · gss-v0.5.0
Fixed commit original · Raw UTF-8 source · Back to GSS Companion
Select a source link from a manuscript to highlight its exact range.
Technical identity
- Commit
ac405356bb98afed954da9b9c795d23cc8d5d149- SHA-256
5a35a3a6f70dc294fd56e8cfa873c14cb3ba9e9f29f599486556162eec641ade- Bytes
- 7047
1/-2Copyright (c) 2026 Ryotaro Tanaka. All rights reserved.3Released under Apache 2.0 license as described in the file LICENSE.4Authors: Ryotaro Tanaka5-/6module78public import MathlibAnnex.Topology.ClosureSpace.Basic9public import Mathlib.Data.Set.Finite.Basic1011/-!12# Maps of closure spaces1314Continuity and finite continuity are distinct predicates. A continuous finite15homeomorphism has no assumption of ordinary continuity for its inverse.16-/1718@[expose] public section1920set_option autoImplicit false2122universe u v w2324namespace ClosureSpace2526variable {α : Type u} {β : Type v} {γ : Type w}2728/-- Preservation of closure in the forward direction. -/29def Continuous (c : ClosureSpace α) (d : ClosureSpace β) (f : α → β) : Prop :=30∀ s : Set α, f '' c.closure s ⊆ d.closure (f '' s)3132/-- Preservation of closure, tested only on finite subsets of the domain. -/33def FinitelyContinuous (c : ClosureSpace α) (d : ClosureSpace β) (f : α → β) : Prop :=34∀ s : Set α, s.Finite → f '' c.closure s ⊆ d.closure (f '' s)3536theorem continuous_id (c : ClosureSpace α) : c.Continuous c id := by37intro s x hx38rcases hx with ⟨y, hy, rfl⟩39change y ∈ c.closure (id '' s)40rw [Set.image_id]41exact hy4243theorem Continuous.comp {c : ClosureSpace α} {d : ClosureSpace β} {e : ClosureSpace γ}44{f : α → β} {g : β → γ} (hg : d.Continuous e g) (hf : c.Continuous d f) :45c.Continuous e (g ∘ f) := by46intro s z hz47rcases hz with ⟨x, hx, rfl⟩48have hfx : f x ∈ d.closure (f '' s) := hf s ⟨x, hx, rfl⟩49have hgfx := hg (f '' s) ⟨f x, hfx, rfl⟩50simpa only [Set.image_image, Function.comp_def] using hgfx5152theorem Continuous.finitelyContinuous {c : ClosureSpace α} {d : ClosureSpace β}53{f : α → β} (hf : c.Continuous d f) : c.FinitelyContinuous d f :=54fun s _ => hf s5556theorem FinitelyContinuous.comp {c : ClosureSpace α} {d : ClosureSpace β}57{e : ClosureSpace γ} {f : α → β} {g : β → γ}58(hg : d.FinitelyContinuous e g) (hf : c.FinitelyContinuous d f) :59c.FinitelyContinuous e (g ∘ f) := by60intro s hs z hz61rcases hz with ⟨x, hx, rfl⟩62have hfx := hf s hs ⟨x, hx, rfl⟩63have hgfx := hg (f '' s) (hs.image f) ⟨f x, hfx, rfl⟩64simpa only [Set.image_image, Function.comp_def] using hgfx6566/-- Closed-preimage characterization, valid without finite-union preservation. -/67theorem continuous_iff_isClosed_preimage (c : ClosureSpace α) (d : ClosureSpace β)68(f : α → β) : c.Continuous d f ↔69∀ t : Set β, d.IsClosed t → c.IsClosed (f ⁻¹' t) := by70constructor71· intro hf t ht72apply (c.isClosed_iff_closure_subset _).273intro x hx74exact d.closure_min (Set.image_preimage_subset f t) ht75(hf (f ⁻¹' t) ⟨x, hx, rfl⟩)76· intro h s y hy77rcases hy with ⟨x, hx, rfl⟩78have ht := h (d.closure (f '' s)) (d.isClosed_closure (f '' s))79apply c.closure_min (t := f ⁻¹' d.closure (f '' s)) ?_ ht hx80intro a ha81exact d.subset_closure (f '' s) ⟨a, ha, rfl⟩8283/-- A bijection that is continuous in both directions. -/84structure Homeomorph (c : ClosureSpace α) (d : ClosureSpace β) extends α ≃ β where85continuous_toFun : c.Continuous d toFun86continuous_invFun : d.Continuous c invFun8788namespace Homeomorph8990variable {c : ClosureSpace α} {d : ClosureSpace β} {e : ClosureSpace γ}9192/-- Reverse a homeomorphism. -/93def symm (h : Homeomorph c d) : Homeomorph d c where94toEquiv := h.toEquiv.symm95continuous_toFun := h.continuous_invFun96continuous_invFun := h.continuous_toFun9798/-- The identity homeomorphism. -/99def refl (c : ClosureSpace α) : Homeomorph c c where100toEquiv := Equiv.refl α101continuous_toFun := continuous_id c102continuous_invFun := continuous_id c103104/-- Compose homeomorphisms. -/105def trans (h : Homeomorph c d) (k : Homeomorph d e) : Homeomorph c e where106toEquiv := h.toEquiv.trans k.toEquiv107continuous_toFun := k.continuous_toFun.comp h.continuous_toFun108continuous_invFun := h.continuous_invFun.comp k.continuous_invFun109110/-- A homeomorphism transports the full closure exactly. -/111theorem image_closure (h : Homeomorph c d) (s : Set α) :112h.toEquiv '' c.closure s = d.closure (h.toEquiv '' s) := by113apply Set.Subset.antisymm (h.continuous_toFun s)114intro y hy115have hx := h.continuous_invFun (h.toEquiv '' s) ⟨y, hy, rfl⟩116change h.toEquiv.symm y ∈ c.closure (h.toEquiv.symm '' (h.toEquiv '' s)) at hx117have hs : h.toEquiv.symm '' (h.toEquiv '' s) = s := by118apply Set.ext119intro x120simp only [Set.mem_image]121constructor122· rintro ⟨z, ⟨a, ha, rfl⟩, hx⟩123have hx' : a = x := (h.toEquiv.symm_apply_apply a).symm.trans hx124exact hx' ▸ ha125· intro hx126exact ⟨h.toEquiv x, ⟨x, hx, rfl⟩, h.toEquiv.symm_apply_apply x⟩127rw [hs] at hx128exact ⟨h.toEquiv.symm y, hx, h.toEquiv.apply_symm_apply y⟩129130/-- A bijection commuting with closure is a homeomorphism. -/131def ofImageClosure (c : ClosureSpace α) (d : ClosureSpace β) (e : α ≃ β)132(he : ∀ s : Set α, e '' c.closure s = d.closure (e '' s)) : Homeomorph c d where133toEquiv := e134continuous_toFun s := (he s).subset135continuous_invFun := by136intro t x hx137rcases hx with ⟨y, hy, rfl⟩138have ht : e '' (e.symm '' t) = t := by139apply Set.ext140intro z141constructor142· rintro ⟨a, ⟨b, hb, rfl⟩, hz⟩143have hz' : b = z := (e.apply_symm_apply b).symm.trans hz144exact hz' ▸ hb145· intro hz146exact ⟨e.symm z, ⟨z, hz, rfl⟩, e.apply_symm_apply z⟩147have hy' : y ∈ e '' c.closure (e.symm '' t) := by148rw [he, ht]149exact hy150rcases hy' with ⟨a, ha, rfl⟩151change e.symm (e a) ∈ c.closure (e.symm '' t)152simpa only [Equiv.symm_apply_apply] using ha153154end Homeomorph155156/-- A bijection with finite continuity in both directions. -/157structure FiniteHomeomorph (c : ClosureSpace α) (d : ClosureSpace β) extends α ≃ β where158finitelyContinuous_toFun : c.FinitelyContinuous d toFun159finitelyContinuous_invFun : d.FinitelyContinuous c invFun160161/-- A finite homeomorphism whose forward map is continuous.162Ordinary continuity of the inverse is deliberately not a field. -/163structure ContinuousFiniteHomeomorph (c : ClosureSpace α) (d : ClosureSpace β)164extends FiniteHomeomorph c d where165continuous_toFun : c.Continuous d toFun166167/-- Forget full continuity and retain finite continuity. -/168def Homeomorph.toFiniteHomeomorph {c : ClosureSpace α} {d : ClosureSpace β}169(h : Homeomorph c d) : FiniteHomeomorph c d where170toEquiv := h.toEquiv171finitelyContinuous_toFun := h.continuous_toFun.finitelyContinuous172finitelyContinuous_invFun := h.continuous_invFun.finitelyContinuous173174/-- Reverse a finite homeomorphism. -/175def FiniteHomeomorph.symm {c : ClosureSpace α} {d : ClosureSpace β}176(h : FiniteHomeomorph c d) : FiniteHomeomorph d c where177toEquiv := h.toEquiv.symm178finitelyContinuous_toFun := h.finitelyContinuous_invFun179finitelyContinuous_invFun := h.finitelyContinuous_toFun180181end ClosureSpace