formal
stringlengths
41
427k
informal
stringclasses
1 value
TopCat.partialSections.nonempty ** J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : IsCofilteredOrEmpty J h : ∀ (j : J), Nonempty ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) ⊢ Set.Nonempty (partialSections F H) ** cases isEmpty_or_nonempty J ** case inr J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : IsCofilteredOrEmpty J h : ∀ (j : J), Nonempty ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) h✝ : Nonempty J ⊢ Set.Nonempty (partialSections F H) ** haveI : IsCofiltered J := ⟨⟩ ** case inr J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : IsCofilteredOrEmpty J h : ∀ (j : J), Nonempty ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) h✝ : Nonempty J this : IsCofiltered J ⊢ Set.Nonempty (partialSections F H) ** use fun j : J => if hj : j ∈ G then F.map (IsCofiltered.infTo G H hj) (h (IsCofiltered.inf G H)).some else (h _).some ** case h J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : IsCofilteredOrEmpty J h : ∀ (j : J), Nonempty ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) h✝ : Nonempty J this : IsCofiltered J ⊢ (fun j => if hj : j ∈ G then ↑(F.map (IsCofiltered.infTo G H hj)) (Nonempty.some (_ : Nonempty ↑(F.obj (IsCofiltered.inf G H)))) else Nonempty.some (_ : Nonempty ↑(F.obj j))) ∈ partialSections F H ** rintro ⟨X, Y, hX, hY, f⟩ hf ** case h.mk.mk.mk.mk J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : IsCofilteredOrEmpty J h : ∀ (j : J), Nonempty ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) h✝ : Nonempty J this : IsCofiltered J X Y : J hX : X ∈ G hY : Y ∈ G f : X ⟶ Y hf : { fst := X, snd := { fst := Y, snd := { fst := hX, snd := { fst := hY, snd := f } } } } ∈ H ⊢ ↑(F.map { fst := X, snd := { fst := Y, snd := { fst := hX, snd := { fst := hY, snd := f } } } }.snd.snd.snd.snd) ((fun j => if hj : j ∈ G then ↑(F.map (IsCofiltered.infTo G H hj)) (Nonempty.some (_ : Nonempty ↑(F.obj (IsCofiltered.inf G H)))) else Nonempty.some (_ : Nonempty ↑(F.obj j))) { fst := X, snd := { fst := Y, snd := { fst := hX, snd := { fst := hY, snd := f } } } }.fst) = (fun j => if hj : j ∈ G then ↑(F.map (IsCofiltered.infTo G H hj)) (Nonempty.some (_ : Nonempty ↑(F.obj (IsCofiltered.inf G H)))) else Nonempty.some (_ : Nonempty ↑(F.obj j))) { fst := X, snd := { fst := Y, snd := { fst := hX, snd := { fst := hY, snd := f } } } }.snd.fst ** dsimp only ** case h.mk.mk.mk.mk J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : IsCofilteredOrEmpty J h : ∀ (j : J), Nonempty ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) h✝ : Nonempty J this : IsCofiltered J X Y : J hX : X ∈ G hY : Y ∈ G f : X ⟶ Y hf : { fst := X, snd := { fst := Y, snd := { fst := hX, snd := { fst := hY, snd := f } } } } ∈ H ⊢ ↑(F.map f) (if hj : X ∈ G then ↑(F.map (IsCofiltered.infTo G H hj)) (Nonempty.some (_ : Nonempty ↑(F.obj (IsCofiltered.inf G H)))) else Nonempty.some (_ : Nonempty ↑(F.obj X))) = if hj : Y ∈ G then ↑(F.map (IsCofiltered.infTo G H hj)) (Nonempty.some (_ : Nonempty ↑(F.obj (IsCofiltered.inf G H)))) else Nonempty.some (_ : Nonempty ↑(F.obj Y)) ** rwa [dif_pos hX, dif_pos hY, ← comp_app, ← F.map_comp, @IsCofiltered.infTo_commutes _ _ _ G H] ** case inl J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : IsCofilteredOrEmpty J h : ∀ (j : J), Nonempty ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) h✝ : IsEmpty J ⊢ Set.Nonempty (partialSections F H) ** exact ⟨isEmptyElim, fun {j} => IsEmpty.elim' inferInstance j.1⟩ ** Qed
TopCat.partialSections.directed ** J : Type u inst✝ : SmallCategory J F : J ⥤ TopCat ⊢ Directed Superset fun G => partialSections F G.snd ** intro A B ** J : Type u inst✝ : SmallCategory J F : J ⥤ TopCat A B : TopCat.FiniteDiagram J ⊢ ∃ z, (fun G => partialSections F G.snd) A ⊇ (fun G => partialSections F G.snd) z ∧ (fun G => partialSections F G.snd) B ⊇ (fun G => partialSections F G.snd) z ** let ιA : FiniteDiagramArrow A.1 → FiniteDiagramArrow (A.1 ⊔ B.1) := fun f => ⟨f.1, f.2.1, Finset.mem_union_left _ f.2.2.1, Finset.mem_union_left _ f.2.2.2.1, f.2.2.2.2⟩ ** J : Type u inst✝ : SmallCategory J F : J ⥤ TopCat A B : TopCat.FiniteDiagram J ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } ⊢ ∃ z, (fun G => partialSections F G.snd) A ⊇ (fun G => partialSections F G.snd) z ∧ (fun G => partialSections F G.snd) B ⊇ (fun G => partialSections F G.snd) z ** let ιB : FiniteDiagramArrow B.1 → FiniteDiagramArrow (A.1 ⊔ B.1) := fun f => ⟨f.1, f.2.1, Finset.mem_union_right _ f.2.2.1, Finset.mem_union_right _ f.2.2.2.1, f.2.2.2.2⟩ ** J : Type u inst✝ : SmallCategory J F : J ⥤ TopCat A B : TopCat.FiniteDiagram J ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } ιB : TopCat.FiniteDiagramArrow B.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } ⊢ ∃ z, (fun G => partialSections F G.snd) A ⊇ (fun G => partialSections F G.snd) z ∧ (fun G => partialSections F G.snd) B ⊇ (fun G => partialSections F G.snd) z ** refine' ⟨⟨A.1 ⊔ B.1, A.2.image ιA ⊔ B.2.image ιB⟩, _, _⟩ ** case refine'_1 J : Type u inst✝ : SmallCategory J F : J ⥤ TopCat A B : TopCat.FiniteDiagram J ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } ιB : TopCat.FiniteDiagramArrow B.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } ⊢ (fun G => partialSections F G.snd) A ⊇ (fun G => partialSections F G.snd) { fst := A.fst ⊔ B.fst, snd := Finset.image ιA A.snd ⊔ Finset.image ιB B.snd } ** rintro u hu f hf ** case refine'_1 J : Type u inst✝ : SmallCategory J F : J ⥤ TopCat A B : TopCat.FiniteDiagram J ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } ιB : TopCat.FiniteDiagramArrow B.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } u : (j : J) → ↑(F.obj j) hu : u ∈ (fun G => partialSections F G.snd) { fst := A.fst ⊔ B.fst, snd := Finset.image ιA A.snd ⊔ Finset.image ιB B.snd } f : TopCat.FiniteDiagramArrow A.fst hf : f ∈ A.snd ⊢ ↑(F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst ** have : ιA f ∈ A.2.image ιA ⊔ B.2.image ιB := by apply Finset.mem_union_left rw [Finset.mem_image] refine' ⟨f, hf, rfl⟩ ** case refine'_1 J : Type u inst✝ : SmallCategory J F : J ⥤ TopCat A B : TopCat.FiniteDiagram J ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } ιB : TopCat.FiniteDiagramArrow B.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } u : (j : J) → ↑(F.obj j) hu : u ∈ (fun G => partialSections F G.snd) { fst := A.fst ⊔ B.fst, snd := Finset.image ιA A.snd ⊔ Finset.image ιB B.snd } f : TopCat.FiniteDiagramArrow A.fst hf : f ∈ A.snd this : ιA f ∈ Finset.image ιA A.snd ⊔ Finset.image ιB B.snd ⊢ ↑(F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst ** exact hu this ** J : Type u inst✝ : SmallCategory J F : J ⥤ TopCat A B : TopCat.FiniteDiagram J ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } ιB : TopCat.FiniteDiagramArrow B.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } u : (j : J) → ↑(F.obj j) hu : u ∈ (fun G => partialSections F G.snd) { fst := A.fst ⊔ B.fst, snd := Finset.image ιA A.snd ⊔ Finset.image ιB B.snd } f : TopCat.FiniteDiagramArrow A.fst hf : f ∈ A.snd ⊢ ιA f ∈ Finset.image ιA A.snd ⊔ Finset.image ιB B.snd ** apply Finset.mem_union_left ** case h J : Type u inst✝ : SmallCategory J F : J ⥤ TopCat A B : TopCat.FiniteDiagram J ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } ιB : TopCat.FiniteDiagramArrow B.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } u : (j : J) → ↑(F.obj j) hu : u ∈ (fun G => partialSections F G.snd) { fst := A.fst ⊔ B.fst, snd := Finset.image ιA A.snd ⊔ Finset.image ιB B.snd } f : TopCat.FiniteDiagramArrow A.fst hf : f ∈ A.snd ⊢ ιA f ∈ Finset.image ιA A.snd ** rw [Finset.mem_image] ** case h J : Type u inst✝ : SmallCategory J F : J ⥤ TopCat A B : TopCat.FiniteDiagram J ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } ιB : TopCat.FiniteDiagramArrow B.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } u : (j : J) → ↑(F.obj j) hu : u ∈ (fun G => partialSections F G.snd) { fst := A.fst ⊔ B.fst, snd := Finset.image ιA A.snd ⊔ Finset.image ιB B.snd } f : TopCat.FiniteDiagramArrow A.fst hf : f ∈ A.snd ⊢ ∃ a, a ∈ A.snd ∧ ιA a = ιA f ** refine' ⟨f, hf, rfl⟩ ** case refine'_2 J : Type u inst✝ : SmallCategory J F : J ⥤ TopCat A B : TopCat.FiniteDiagram J ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } ιB : TopCat.FiniteDiagramArrow B.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } ⊢ (fun G => partialSections F G.snd) B ⊇ (fun G => partialSections F G.snd) { fst := A.fst ⊔ B.fst, snd := Finset.image ιA A.snd ⊔ Finset.image ιB B.snd } ** rintro u hu f hf ** case refine'_2 J : Type u inst✝ : SmallCategory J F : J ⥤ TopCat A B : TopCat.FiniteDiagram J ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } ιB : TopCat.FiniteDiagramArrow B.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } u : (j : J) → ↑(F.obj j) hu : u ∈ (fun G => partialSections F G.snd) { fst := A.fst ⊔ B.fst, snd := Finset.image ιA A.snd ⊔ Finset.image ιB B.snd } f : TopCat.FiniteDiagramArrow B.fst hf : f ∈ B.snd ⊢ ↑(F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst ** have : ιB f ∈ A.2.image ιA ⊔ B.2.image ιB := by apply Finset.mem_union_right rw [Finset.mem_image] refine' ⟨f, hf, rfl⟩ ** case refine'_2 J : Type u inst✝ : SmallCategory J F : J ⥤ TopCat A B : TopCat.FiniteDiagram J ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } ιB : TopCat.FiniteDiagramArrow B.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } u : (j : J) → ↑(F.obj j) hu : u ∈ (fun G => partialSections F G.snd) { fst := A.fst ⊔ B.fst, snd := Finset.image ιA A.snd ⊔ Finset.image ιB B.snd } f : TopCat.FiniteDiagramArrow B.fst hf : f ∈ B.snd this : ιB f ∈ Finset.image ιA A.snd ⊔ Finset.image ιB B.snd ⊢ ↑(F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst ** exact hu this ** J : Type u inst✝ : SmallCategory J F : J ⥤ TopCat A B : TopCat.FiniteDiagram J ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } ιB : TopCat.FiniteDiagramArrow B.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } u : (j : J) → ↑(F.obj j) hu : u ∈ (fun G => partialSections F G.snd) { fst := A.fst ⊔ B.fst, snd := Finset.image ιA A.snd ⊔ Finset.image ιB B.snd } f : TopCat.FiniteDiagramArrow B.fst hf : f ∈ B.snd ⊢ ιB f ∈ Finset.image ιA A.snd ⊔ Finset.image ιB B.snd ** apply Finset.mem_union_right ** case h J : Type u inst✝ : SmallCategory J F : J ⥤ TopCat A B : TopCat.FiniteDiagram J ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } ιB : TopCat.FiniteDiagramArrow B.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } u : (j : J) → ↑(F.obj j) hu : u ∈ (fun G => partialSections F G.snd) { fst := A.fst ⊔ B.fst, snd := Finset.image ιA A.snd ⊔ Finset.image ιB B.snd } f : TopCat.FiniteDiagramArrow B.fst hf : f ∈ B.snd ⊢ ιB f ∈ Finset.image ιB B.snd ** rw [Finset.mem_image] ** case h J : Type u inst✝ : SmallCategory J F : J ⥤ TopCat A B : TopCat.FiniteDiagram J ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } ιB : TopCat.FiniteDiagramArrow B.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) := fun f => { fst := f.fst, snd := { fst := f.snd.fst, snd := { fst := (_ : f.fst ∈ A.fst ∪ B.fst), snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } } u : (j : J) → ↑(F.obj j) hu : u ∈ (fun G => partialSections F G.snd) { fst := A.fst ⊔ B.fst, snd := Finset.image ιA A.snd ⊔ Finset.image ιB B.snd } f : TopCat.FiniteDiagramArrow B.fst hf : f ∈ B.snd ⊢ ∃ a, a ∈ B.snd ∧ ιB a = ιB f ** refine' ⟨f, hf, rfl⟩ ** Qed
TopCat.partialSections.closed ** J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : ∀ (j : J), T2Space ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) ⊢ IsClosed (partialSections F H) ** have : partialSections F H = ⋂ (f : FiniteDiagramArrow G) (_ : f ∈ H), {u | F.map f.2.2.2.2 (u f.1) = u f.2.1} := by ext1 simp only [Set.mem_iInter, Set.mem_setOf_eq] rfl ** J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : ∀ (j : J), T2Space ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) this : partialSections F H = ⋂ f ∈ H, {u | ↑(F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst} ⊢ IsClosed (partialSections F H) ** rw [this] ** J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : ∀ (j : J), T2Space ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) this : partialSections F H = ⋂ f ∈ H, {u | ↑(F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst} ⊢ IsClosed (⋂ f ∈ H, {u | ↑(F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst}) ** apply isClosed_biInter ** case h J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : ∀ (j : J), T2Space ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) this : partialSections F H = ⋂ f ∈ H, {u | ↑(F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst} ⊢ ∀ (i : TopCat.FiniteDiagramArrow G), (i ∈ fun i => i ∈ H.val) → IsClosed {u | ↑(F.map i.snd.snd.snd.snd) (u i.fst) = u i.snd.fst} ** intro f _ ** case h J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : ∀ (j : J), T2Space ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) this : partialSections F H = ⋂ f ∈ H, {u | ↑(F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst} f : TopCat.FiniteDiagramArrow G a✝ : f ∈ fun i => i ∈ H.val ⊢ IsClosed {u | ↑(F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst} ** have : T2Space ((forget TopCat).obj (F.obj f.snd.fst)) := inferInstanceAs (T2Space (F.obj f.snd.fst)) ** case h J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : ∀ (j : J), T2Space ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) this✝ : partialSections F H = ⋂ f ∈ H, {u | ↑(F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst} f : TopCat.FiniteDiagramArrow G a✝ : f ∈ fun i => i ∈ H.val this : T2Space ((forget TopCat).obj (F.obj f.snd.fst)) ⊢ IsClosed {u | ↑(F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst} ** apply isClosed_eq ** J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : ∀ (j : J), T2Space ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) ⊢ partialSections F H = ⋂ f ∈ H, {u | ↑(F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst} ** ext1 ** case h J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : ∀ (j : J), T2Space ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) x✝ : (j : J) → ↑(F.obj j) ⊢ x✝ ∈ partialSections F H ↔ x✝ ∈ ⋂ f ∈ H, {u | ↑(F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst} ** simp only [Set.mem_iInter, Set.mem_setOf_eq] ** case h J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : ∀ (j : J), T2Space ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) x✝ : (j : J) → ↑(F.obj j) ⊢ x✝ ∈ partialSections F H ↔ ∀ (i : TopCat.FiniteDiagramArrow G), i ∈ H → ↑(F.map i.snd.snd.snd.snd) (x✝ i.fst) = x✝ i.snd.fst ** rfl ** case h.hf J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : ∀ (j : J), T2Space ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) this✝ : partialSections F H = ⋂ f ∈ H, {u | ↑(F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst} f : TopCat.FiniteDiagramArrow G a✝ : f ∈ fun i => i ∈ H.val this : T2Space ((forget TopCat).obj (F.obj f.snd.fst)) ⊢ Continuous fun x => ↑(F.map f.snd.snd.snd.snd) (x f.fst) ** exact (F.map f.snd.snd.snd.snd).continuous.comp (continuous_apply f.fst) ** case h.hg J : Type u inst✝¹ : SmallCategory J F : J ⥤ TopCat inst✝ : ∀ (j : J), T2Space ↑(F.obj j) G : Finset J H : Finset (TopCat.FiniteDiagramArrow G) this✝ : partialSections F H = ⋂ f ∈ H, {u | ↑(F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst} f : TopCat.FiniteDiagramArrow G a✝ : f ∈ fun i => i ∈ H.val this : T2Space ((forget TopCat).obj (F.obj f.snd.fst)) ⊢ Continuous fun x => x f.snd.fst ** continuity ** Qed
TopCat.nonempty_limitCone_of_compact_t2_cofiltered_system ** J : Type u inst✝⁴ : SmallCategory J F✝ : J ⥤ TopCat F : J ⥤ TopCatMax inst✝³ : IsCofilteredOrEmpty J inst✝² : ∀ (j : J), Nonempty ↑(F.obj j) inst✝¹ : ∀ (j : J), CompactSpace ↑(F.obj j) inst✝ : ∀ (j : J), T2Space ↑(F.obj j) ⊢ Nonempty ↑(limitCone F).pt ** classical obtain ⟨u, hu⟩ := IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed (fun G => partialSections F _) (partialSections.directed F) (fun G => partialSections.nonempty F _) (fun G => IsClosed.isCompact (partialSections.closed F _)) fun G => partialSections.closed F _ use u intro X Y f let G : FiniteDiagram J := ⟨{X, Y}, {⟨X, Y, by simp only [true_or_iff, eq_self_iff_true, Finset.mem_insert], by simp only [eq_self_iff_true, or_true_iff, Finset.mem_insert, Finset.mem_singleton], f⟩}⟩ exact hu _ ⟨G, rfl⟩ (Finset.mem_singleton_self _) ** J : Type u inst✝⁴ : SmallCategory J F✝ : J ⥤ TopCat F : J ⥤ TopCatMax inst✝³ : IsCofilteredOrEmpty J inst✝² : ∀ (j : J), Nonempty ↑(F.obj j) inst✝¹ : ∀ (j : J), CompactSpace ↑(F.obj j) inst✝ : ∀ (j : J), T2Space ↑(F.obj j) ⊢ Nonempty ↑(limitCone F).pt ** obtain ⟨u, hu⟩ := IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed (fun G => partialSections F _) (partialSections.directed F) (fun G => partialSections.nonempty F _) (fun G => IsClosed.isCompact (partialSections.closed F _)) fun G => partialSections.closed F _ ** case intro J : Type u inst✝⁴ : SmallCategory J F✝ : J ⥤ TopCat F : J ⥤ TopCatMax inst✝³ : IsCofilteredOrEmpty J inst✝² : ∀ (j : J), Nonempty ↑(F.obj j) inst✝¹ : ∀ (j : J), CompactSpace ↑(F.obj j) inst✝ : ∀ (j : J), T2Space ↑(F.obj j) u : (j : J) → ↑(F.obj j) hu : u ∈ ⋂ i, partialSections F i.snd ⊢ Nonempty ↑(limitCone F).pt ** use u ** case property J : Type u inst✝⁴ : SmallCategory J F✝ : J ⥤ TopCat F : J ⥤ TopCatMax inst✝³ : IsCofilteredOrEmpty J inst✝² : ∀ (j : J), Nonempty ↑(F.obj j) inst✝¹ : ∀ (j : J), CompactSpace ↑(F.obj j) inst✝ : ∀ (j : J), T2Space ↑(F.obj j) u : (j : J) → ↑(F.obj j) hu : u ∈ ⋂ i, partialSections F i.snd ⊢ u ∈ {u | ∀ {i j : J} (f : i ⟶ j), ↑(F.map f) (u i) = u j} ** intro X Y f ** case property J : Type u inst✝⁴ : SmallCategory J F✝ : J ⥤ TopCat F : J ⥤ TopCatMax inst✝³ : IsCofilteredOrEmpty J inst✝² : ∀ (j : J), Nonempty ↑(F.obj j) inst✝¹ : ∀ (j : J), CompactSpace ↑(F.obj j) inst✝ : ∀ (j : J), T2Space ↑(F.obj j) u : (j : J) → ↑(F.obj j) hu : u ∈ ⋂ i, partialSections F i.snd X Y : J f : X ⟶ Y ⊢ ↑(F.map f) (u X) = u Y ** let G : FiniteDiagram J := ⟨{X, Y}, {⟨X, Y, by simp only [true_or_iff, eq_self_iff_true, Finset.mem_insert], by simp only [eq_self_iff_true, or_true_iff, Finset.mem_insert, Finset.mem_singleton], f⟩}⟩ ** case property J : Type u inst✝⁴ : SmallCategory J F✝ : J ⥤ TopCat F : J ⥤ TopCatMax inst✝³ : IsCofilteredOrEmpty J inst✝² : ∀ (j : J), Nonempty ↑(F.obj j) inst✝¹ : ∀ (j : J), CompactSpace ↑(F.obj j) inst✝ : ∀ (j : J), T2Space ↑(F.obj j) u : (j : J) → ↑(F.obj j) hu : u ∈ ⋂ i, partialSections F i.snd X Y : J f : X ⟶ Y G : TopCat.FiniteDiagram J := { fst := {X, Y}, snd := {{ fst := X, snd := { fst := Y, snd := { fst := (_ : X ∈ {X, Y}), snd := { fst := (_ : Y ∈ {X, Y}), snd := f } } } }} } ⊢ ↑(F.map f) (u X) = u Y ** exact hu _ ⟨G, rfl⟩ (Finset.mem_singleton_self _) ** J : Type u inst✝⁴ : SmallCategory J F✝ : J ⥤ TopCat F : J ⥤ TopCatMax inst✝³ : IsCofilteredOrEmpty J inst✝² : ∀ (j : J), Nonempty ↑(F.obj j) inst✝¹ : ∀ (j : J), CompactSpace ↑(F.obj j) inst✝ : ∀ (j : J), T2Space ↑(F.obj j) u : (j : J) → ↑(F.obj j) hu : u ∈ ⋂ i, partialSections F i.snd X Y : J f : X ⟶ Y ⊢ X ∈ {X, Y} ** simp only [true_or_iff, eq_self_iff_true, Finset.mem_insert] ** J : Type u inst✝⁴ : SmallCategory J F✝ : J ⥤ TopCat F : J ⥤ TopCatMax inst✝³ : IsCofilteredOrEmpty J inst✝² : ∀ (j : J), Nonempty ↑(F.obj j) inst✝¹ : ∀ (j : J), CompactSpace ↑(F.obj j) inst✝ : ∀ (j : J), T2Space ↑(F.obj j) u : (j : J) → ↑(F.obj j) hu : u ∈ ⋂ i, partialSections F i.snd X Y : J f : X ⟶ Y ⊢ Y ∈ {X, Y} ** simp only [eq_self_iff_true, or_true_iff, Finset.mem_insert, Finset.mem_singleton] ** Qed
EMetric.le_infEdist ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β d : ℝ≥0∞ ⊢ d ≤ infEdist x s ↔ ∀ (y : α), y ∈ s → d ≤ edist x y ** simp only [infEdist, le_iInf_iff] ** Qed
EMetric.infEdist_lt_iff ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β r : ℝ≥0∞ ⊢ infEdist x s < r ↔ ∃ y, y ∈ s ∧ edist x y < r ** simp_rw [infEdist, iInf_lt_iff, exists_prop] ** Qed
EMetric.infEdist_le_infEdist_add_edist ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β ⊢ ⨅ z ∈ s, edist y z + edist x y = (⨅ z ∈ s, edist y z) + edist x y ** simp only [ENNReal.iInf_add] ** Qed
EMetric.infEdist_le_edist_add_infEdist ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β ⊢ infEdist x s ≤ edist x y + infEdist y s ** rw [add_comm] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β ⊢ infEdist x s ≤ infEdist y s + edist x y ** exact infEdist_le_infEdist_add_edist ** Qed
EMetric.edist_le_infEdist_add_ediam ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β hy : y ∈ s ⊢ edist x y ≤ infEdist x s + diam s ** simp_rw [infEdist, ENNReal.iInf_add] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β hy : y ∈ s ⊢ edist x y ≤ ⨅ i ∈ s, edist x i + diam s ** refine le_iInf₂ fun i hi => ?_ ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β hy : y ∈ s i : α hi : i ∈ s ⊢ edist x y ≤ edist x i + diam s ** calc edist x y ≤ edist x i + edist i y := edist_triangle _ _ _ _ ≤ edist x i + diam s := add_le_add le_rfl (edist_le_diam_of_mem hi hy) ** Qed
EMetric.continuous_infEdist ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β ⊢ 1 ≠ ⊤ ** simp ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β ⊢ ∀ (x y : α), infEdist x s ≤ infEdist y s + 1 * edist x y ** simp only [one_mul, infEdist_le_infEdist_add_edist, forall₂_true_iff] ** Qed
EMetric.infEdist_closure ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β ⊢ infEdist x (closure s) = infEdist x s ** refine' le_antisymm (infEdist_anti subset_closure) _ ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β ⊢ infEdist x s ≤ infEdist x (closure s) ** refine' ENNReal.le_of_forall_pos_le_add fun ε εpos h => _ ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β ε : ℝ≥0 εpos : 0 < ε h : infEdist x (closure s) < ⊤ ⊢ infEdist x s ≤ infEdist x (closure s) + ↑ε ** have ε0 : 0 < (ε / 2 : ℝ≥0∞) := by simpa [pos_iff_ne_zero] using εpos ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β ε : ℝ≥0 εpos : 0 < ε h : infEdist x (closure s) < ⊤ ε0 : 0 < ↑ε / 2 ⊢ infEdist x s ≤ infEdist x (closure s) + ↑ε ** have : infEdist x (closure s) < infEdist x (closure s) + ε / 2 := ENNReal.lt_add_right h.ne ε0.ne' ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β ε : ℝ≥0 εpos : 0 < ε h : infEdist x (closure s) < ⊤ ε0 : 0 < ↑ε / 2 this : infEdist x (closure s) < infEdist x (closure s) + ↑ε / 2 ⊢ infEdist x s ≤ infEdist x (closure s) + ↑ε ** rcases infEdist_lt_iff.mp this with ⟨y, ycs, hy⟩ ** case intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y✝ : α s t : Set α Φ : α → β ε : ℝ≥0 εpos : 0 < ε h : infEdist x (closure s) < ⊤ ε0 : 0 < ↑ε / 2 this : infEdist x (closure s) < infEdist x (closure s) + ↑ε / 2 y : α ycs : y ∈ closure s hy : edist x y < infEdist x (closure s) + ↑ε / 2 ⊢ infEdist x s ≤ infEdist x (closure s) + ↑ε ** rcases EMetric.mem_closure_iff.1 ycs (ε / 2) ε0 with ⟨z, zs, dyz⟩ ** case intro.intro.intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y✝ : α s t : Set α Φ : α → β ε : ℝ≥0 εpos : 0 < ε h : infEdist x (closure s) < ⊤ ε0 : 0 < ↑ε / 2 this : infEdist x (closure s) < infEdist x (closure s) + ↑ε / 2 y : α ycs : y ∈ closure s hy : edist x y < infEdist x (closure s) + ↑ε / 2 z : α zs : z ∈ s dyz : edist y z < ↑ε / 2 ⊢ infEdist x s ≤ infEdist x (closure s) + ↑ε ** calc infEdist x s ≤ edist x z := infEdist_le_edist_of_mem zs _ ≤ edist x y + edist y z := (edist_triangle _ _ _) _ ≤ infEdist x (closure s) + ε / 2 + ε / 2 := (add_le_add (le_of_lt hy) (le_of_lt dyz)) _ = infEdist x (closure s) + ↑ε := by rw [add_assoc, ENNReal.add_halves] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β ε : ℝ≥0 εpos : 0 < ε h : infEdist x (closure s) < ⊤ ⊢ 0 < ↑ε / 2 ** simpa [pos_iff_ne_zero] using εpos ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y✝ : α s t : Set α Φ : α → β ε : ℝ≥0 εpos : 0 < ε h : infEdist x (closure s) < ⊤ ε0 : 0 < ↑ε / 2 this : infEdist x (closure s) < infEdist x (closure s) + ↑ε / 2 y : α ycs : y ∈ closure s hy : edist x y < infEdist x (closure s) + ↑ε / 2 z : α zs : z ∈ s dyz : edist y z < ↑ε / 2 ⊢ infEdist x (closure s) + ↑ε / 2 + ↑ε / 2 = infEdist x (closure s) + ↑ε ** rw [add_assoc, ENNReal.add_halves] ** Qed
EMetric.mem_closure_iff_infEdist_zero ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β h : x ∈ closure s ⊢ infEdist x s = 0 ** rw [← infEdist_closure] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β h : x ∈ closure s ⊢ infEdist x (closure s) = 0 ** exact infEdist_zero_of_mem h ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β h : infEdist x s = 0 ε : ℝ≥0∞ εpos : ε > 0 ⊢ infEdist x s < ε ** rwa [h] ** Qed
EMetric.mem_iff_infEdist_zero_of_closed ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β h : IsClosed s ⊢ x ∈ s ↔ infEdist x s = 0 ** rw [← mem_closure_iff_infEdist_zero, h.closure_eq] ** Qed
EMetric.infEdist_pos_iff_not_mem_closure ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β x : α E : Set α ⊢ 0 < infEdist x E ↔ ¬x ∈ closure E ** rw [mem_closure_iff_infEdist_zero, pos_iff_ne_zero] ** Qed
EMetric.infEdist_closure_pos_iff_not_mem_closure ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β x : α E : Set α ⊢ 0 < infEdist x (closure E) ↔ ¬x ∈ closure E ** rw [infEdist_closure, infEdist_pos_iff_not_mem_closure] ** Qed
EMetric.exists_real_pos_lt_infEdist_of_not_mem_closure ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β x : α E : Set α h : ¬x ∈ closure E ⊢ ∃ ε, 0 < ε ∧ ENNReal.ofReal ε < infEdist x E ** rw [← infEdist_pos_iff_not_mem_closure, ENNReal.lt_iff_exists_real_btwn] at h ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β x : α E : Set α h : ∃ r, 0 ≤ r ∧ 0 < ENNReal.ofReal r ∧ ENNReal.ofReal r < infEdist x E ⊢ ∃ ε, 0 < ε ∧ ENNReal.ofReal ε < infEdist x E ** rcases h with ⟨ε, ⟨_, ⟨ε_pos, ε_lt⟩⟩⟩ ** case intro.intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β x : α E : Set α ε : ℝ left✝ : 0 ≤ ε ε_pos : 0 < ENNReal.ofReal ε ε_lt : ENNReal.ofReal ε < infEdist x E ⊢ ∃ ε, 0 < ε ∧ ENNReal.ofReal ε < infEdist x E ** exact ⟨ε, ⟨ENNReal.ofReal_pos.mp ε_pos, ε_lt⟩⟩ ** Qed
EMetric.disjoint_closedBall_of_lt_infEdist ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β r : ℝ≥0∞ h : r < infEdist x s ⊢ Disjoint (closedBall x r) s ** rw [disjoint_left] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β r : ℝ≥0∞ h : r < infEdist x s ⊢ ∀ ⦃a : α⦄, a ∈ closedBall x r → ¬a ∈ s ** intro y hy h'y ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y✝ : α s t : Set α Φ : α → β r : ℝ≥0∞ h : r < infEdist x s y : α hy : y ∈ closedBall x r h'y : y ∈ s ⊢ False ** apply lt_irrefl (infEdist x s) ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y✝ : α s t : Set α Φ : α → β r : ℝ≥0∞ h : r < infEdist x s y : α hy : y ∈ closedBall x r h'y : y ∈ s ⊢ infEdist x s < infEdist x s ** calc infEdist x s ≤ edist x y := infEdist_le_edist_of_mem h'y _ ≤ r := by rwa [mem_closedBall, edist_comm] at hy _ < infEdist x s := h ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y✝ : α s t : Set α Φ : α → β r : ℝ≥0∞ h : r < infEdist x s y : α hy : y ∈ closedBall x r h'y : y ∈ s ⊢ edist x y ≤ r ** rwa [mem_closedBall, edist_comm] at hy ** Qed
EMetric.infEdist_image ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β hΦ : Isometry Φ ⊢ infEdist (Φ x) (Φ '' t) = infEdist x t ** simp only [infEdist, iInf_image, hΦ.edist_eq] ** Qed
IsOpen.exists_iUnion_isClosed ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U ⊢ ∃ F, (∀ (n : ℕ), IsClosed (F n)) ∧ (∀ (n : ℕ), F n ⊆ U) ∧ ⋃ n, F n = U ∧ Monotone F ** obtain ⟨a, a_pos, a_lt_one⟩ : ∃ a : ℝ≥0∞, 0 < a ∧ a < 1 := exists_between zero_lt_one ** case intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 ⊢ ∃ F, (∀ (n : ℕ), IsClosed (F n)) ∧ (∀ (n : ℕ), F n ⊆ U) ∧ ⋃ n, F n = U ∧ Monotone F ** let F := fun n : ℕ => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) ** case intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) ⊢ ∃ F, (∀ (n : ℕ), IsClosed (F n)) ∧ (∀ (n : ℕ), F n ⊆ U) ∧ ⋃ n, F n = U ∧ Monotone F ** have F_subset : ∀ n, F n ⊆ U := fun n x hx ↦ by by_contra h have : infEdist x Uᶜ ≠ 0 := ((ENNReal.pow_pos a_pos _).trans_le hx).ne' exact this (infEdist_zero_of_mem h) ** case intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) F_subset : ∀ (n : ℕ), F n ⊆ U ⊢ ∃ F, (∀ (n : ℕ), IsClosed (F n)) ∧ (∀ (n : ℕ), F n ⊆ U) ∧ ⋃ n, F n = U ∧ Monotone F ** refine ⟨F, fun n => IsClosed.preimage continuous_infEdist isClosed_Ici, F_subset, ?_, ?_⟩ ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) n : ℕ x : α hx : x ∈ F n ⊢ x ∈ U ** by_contra h ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) n : ℕ x : α hx : x ∈ F n h : ¬x ∈ U ⊢ False ** have : infEdist x Uᶜ ≠ 0 := ((ENNReal.pow_pos a_pos _).trans_le hx).ne' ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) n : ℕ x : α hx : x ∈ F n h : ¬x ∈ U this : infEdist x Uᶜ ≠ 0 ⊢ False ** exact this (infEdist_zero_of_mem h) ** case intro.intro.refine_1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) F_subset : ∀ (n : ℕ), F n ⊆ U ⊢ ⋃ n, F n = U ** refine' Subset.antisymm (by simp only [iUnion_subset_iff, F_subset, forall_const]) fun x hx => _ ** case intro.intro.refine_1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) F_subset : ∀ (n : ℕ), F n ⊆ U x : α hx : x ∈ U ⊢ x ∈ ⋃ n, F n ** have : ¬x ∈ Uᶜ := by simpa using hx ** case intro.intro.refine_1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) F_subset : ∀ (n : ℕ), F n ⊆ U x : α hx : x ∈ U this : ¬x ∈ Uᶜ ⊢ x ∈ ⋃ n, F n ** rw [mem_iff_infEdist_zero_of_closed hU.isClosed_compl] at this ** case intro.intro.refine_1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) F_subset : ∀ (n : ℕ), F n ⊆ U x : α hx : x ∈ U this : ¬infEdist x Uᶜ = 0 ⊢ x ∈ ⋃ n, F n ** have B : 0 < infEdist x Uᶜ := by simpa [pos_iff_ne_zero] using this ** case intro.intro.refine_1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) F_subset : ∀ (n : ℕ), F n ⊆ U x : α hx : x ∈ U this : ¬infEdist x Uᶜ = 0 B : 0 < infEdist x Uᶜ ⊢ x ∈ ⋃ n, F n ** have : Filter.Tendsto (fun n => a ^ n) atTop (𝓝 0) := ENNReal.tendsto_pow_atTop_nhds_0_of_lt_1 a_lt_one ** case intro.intro.refine_1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) F_subset : ∀ (n : ℕ), F n ⊆ U x : α hx : x ∈ U this✝ : ¬infEdist x Uᶜ = 0 B : 0 < infEdist x Uᶜ this : Tendsto (fun n => a ^ n) atTop (𝓝 0) ⊢ x ∈ ⋃ n, F n ** rcases ((tendsto_order.1 this).2 _ B).exists with ⟨n, hn⟩ ** case intro.intro.refine_1.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) F_subset : ∀ (n : ℕ), F n ⊆ U x : α hx : x ∈ U this✝ : ¬infEdist x Uᶜ = 0 B : 0 < infEdist x Uᶜ this : Tendsto (fun n => a ^ n) atTop (𝓝 0) n : ℕ hn : a ^ n < infEdist x Uᶜ ⊢ x ∈ ⋃ n, F n ** simp only [mem_iUnion, mem_Ici, mem_preimage] ** case intro.intro.refine_1.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) F_subset : ∀ (n : ℕ), F n ⊆ U x : α hx : x ∈ U this✝ : ¬infEdist x Uᶜ = 0 B : 0 < infEdist x Uᶜ this : Tendsto (fun n => a ^ n) atTop (𝓝 0) n : ℕ hn : a ^ n < infEdist x Uᶜ ⊢ ∃ i, a ^ i ≤ infEdist x Uᶜ ** exact ⟨n, hn.le⟩ ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) F_subset : ∀ (n : ℕ), F n ⊆ U ⊢ ⋃ n, F n ⊆ U ** simp only [iUnion_subset_iff, F_subset, forall_const] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) F_subset : ∀ (n : ℕ), F n ⊆ U x : α hx : x ∈ U ⊢ ¬x ∈ Uᶜ ** simpa using hx ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) F_subset : ∀ (n : ℕ), F n ⊆ U x : α hx : x ∈ U this : ¬infEdist x Uᶜ = 0 ⊢ 0 < infEdist x Uᶜ ** simpa [pos_iff_ne_zero] using this ** case intro.intro.refine_2 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) F_subset : ∀ (n : ℕ), F n ⊆ U ⊢ Monotone F ** intro m n hmn x hx ** case intro.intro.refine_2 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) F_subset : ∀ (n : ℕ), F n ⊆ U m n : ℕ hmn : m ≤ n x : α hx : x ∈ F m ⊢ x ∈ F n ** simp only [mem_Ici, mem_preimage] at hx ⊢ ** case intro.intro.refine_2 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β U : Set α hU : IsOpen U a : ℝ≥0∞ a_pos : 0 < a a_lt_one : a < 1 F : ℕ → Set α := fun n => (fun x => infEdist x Uᶜ) ⁻¹' Ici (a ^ n) F_subset : ∀ (n : ℕ), F n ⊆ U m n : ℕ hmn : m ≤ n x : α hx : a ^ m ≤ infEdist x Uᶜ ⊢ a ^ n ≤ infEdist x Uᶜ ** apply le_trans (pow_le_pow_of_le_one' a_lt_one.le hmn) hx ** Qed
IsCompact.exists_infEdist_eq_edist ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β hs : IsCompact s hne : Set.Nonempty s x : α ⊢ ∃ y, y ∈ s ∧ infEdist x s = edist x y ** have A : Continuous fun y => edist x y := continuous_const.edist continuous_id ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β hs : IsCompact s hne : Set.Nonempty s x : α A : Continuous fun y => edist x y ⊢ ∃ y, y ∈ s ∧ infEdist x s = edist x y ** obtain ⟨y, ys, hy⟩ : ∃ y ∈ s, ∀ z, z ∈ s → edist x y ≤ edist x z := hs.exists_forall_le hne A.continuousOn ** case intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y✝ : α s t : Set α Φ : α → β hs : IsCompact s hne : Set.Nonempty s x : α A : Continuous fun y => edist x y y : α ys : y ∈ s hy : ∀ (z : α), z ∈ s → edist x y ≤ edist x z ⊢ ∃ y, y ∈ s ∧ infEdist x s = edist x y ** exact ⟨y, ys, le_antisymm (infEdist_le_edist_of_mem ys) (by rwa [le_infEdist])⟩ ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y✝ : α s t : Set α Φ : α → β hs : IsCompact s hne : Set.Nonempty s x : α A : Continuous fun y => edist x y y : α ys : y ∈ s hy : ∀ (z : α), z ∈ s → edist x y ≤ edist x z ⊢ edist x y ≤ infEdist x s ** rwa [le_infEdist] ** Qed
EMetric.exists_pos_forall_lt_edist ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β hs : IsCompact s ht : IsClosed t hst : Disjoint s t ⊢ ∃ r, 0 < r ∧ ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ t → ↑r < edist x y ** rcases s.eq_empty_or_nonempty with (rfl | hne) ** case inr ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t : Set α Φ : α → β hs : IsCompact s ht : IsClosed t hst : Disjoint s t hne : Set.Nonempty s ⊢ ∃ r, 0 < r ∧ ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ t → ↑r < edist x y ** obtain ⟨x, hx, h⟩ : ∃ x ∈ s, ∀ y ∈ s, infEdist x t ≤ infEdist y t := hs.exists_forall_le hne continuous_infEdist.continuousOn ** case inr.intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β hs : IsCompact s ht : IsClosed t hst : Disjoint s t hne : Set.Nonempty s x : α hx : x ∈ s h : ∀ (y : α), y ∈ s → infEdist x t ≤ infEdist y t ⊢ ∃ r, 0 < r ∧ ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ t → ↑r < edist x y ** have : 0 < infEdist x t := pos_iff_ne_zero.2 fun H => hst.le_bot ⟨hx, (mem_iff_infEdist_zero_of_closed ht).mpr H⟩ ** case inr.intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β hs : IsCompact s ht : IsClosed t hst : Disjoint s t hne : Set.Nonempty s x : α hx : x ∈ s h : ∀ (y : α), y ∈ s → infEdist x t ≤ infEdist y t this : 0 < infEdist x t ⊢ ∃ r, 0 < r ∧ ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ t → ↑r < edist x y ** rcases ENNReal.lt_iff_exists_nnreal_btwn.1 this with ⟨r, h₀, hr⟩ ** case inr.intro.intro.intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t : Set α Φ : α → β hs : IsCompact s ht : IsClosed t hst : Disjoint s t hne : Set.Nonempty s x : α hx : x ∈ s h : ∀ (y : α), y ∈ s → infEdist x t ≤ infEdist y t this : 0 < infEdist x t r : ℝ≥0 h₀ : 0 < ↑r hr : ↑r < infEdist x t ⊢ ∃ r, 0 < r ∧ ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ t → ↑r < edist x y ** exact ⟨r, ENNReal.coe_pos.mp h₀, fun y hy z hz => hr.trans_le <| le_infEdist.1 (h y hy) z hz⟩ ** case inl ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α t : Set α Φ : α → β ht : IsClosed t hs : IsCompact ∅ hst : Disjoint ∅ t ⊢ ∃ r, 0 < r ∧ ∀ (x : α), x ∈ ∅ → ∀ (y : α), y ∈ t → ↑r < edist x y ** use 1 ** case h ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α t : Set α Φ : α → β ht : IsClosed t hs : IsCompact ∅ hst : Disjoint ∅ t ⊢ 0 < 1 ∧ ∀ (x : α), x ∈ ∅ → ∀ (y : α), y ∈ t → ↑1 < edist x y ** simp ** Qed
EMetric.hausdorffEdist_self ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ hausdorffEdist s s = 0 ** simp only [hausdorffEdist_def, sup_idem, ENNReal.iSup_eq_zero] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ ∀ (i : α), i ∈ s → infEdist i s = 0 ** exact fun x hx => infEdist_zero_of_mem hx ** Qed
EMetric.hausdorffEdist_comm ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ hausdorffEdist s t = hausdorffEdist t s ** simp only [hausdorffEdist_def] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ (⨆ x ∈ s, infEdist x t) ⊔ ⨆ y ∈ t, infEdist y s = (⨆ y ∈ t, infEdist y s) ⊔ ⨆ x ∈ s, infEdist x t ** apply sup_comm ** Qed
EMetric.hausdorffEdist_le_of_infEdist ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β r : ℝ≥0∞ H1 : ∀ (x : α), x ∈ s → infEdist x t ≤ r H2 : ∀ (x : α), x ∈ t → infEdist x s ≤ r ⊢ hausdorffEdist s t ≤ r ** simp only [hausdorffEdist_def, sup_le_iff, iSup_le_iff] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β r : ℝ≥0∞ H1 : ∀ (x : α), x ∈ s → infEdist x t ≤ r H2 : ∀ (x : α), x ∈ t → infEdist x s ≤ r ⊢ (∀ (i : α), i ∈ s → infEdist i t ≤ r) ∧ ∀ (i : α), i ∈ t → infEdist i s ≤ r ** exact ⟨H1, H2⟩ ** Qed
EMetric.hausdorffEdist_le_of_mem_edist ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β r : ℝ≥0∞ H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ edist x y ≤ r H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ edist x y ≤ r ⊢ hausdorffEdist s t ≤ r ** refine hausdorffEdist_le_of_infEdist (fun x xs ↦ ?_) (fun x xt ↦ ?_) ** case refine_1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t u : Set α Φ : α → β r : ℝ≥0∞ H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ edist x y ≤ r H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ edist x y ≤ r x : α xs : x ∈ s ⊢ infEdist x t ≤ r ** rcases H1 x xs with ⟨y, yt, hy⟩ ** case refine_1.intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y✝ : α s t u : Set α Φ : α → β r : ℝ≥0∞ H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ edist x y ≤ r H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ edist x y ≤ r x : α xs : x ∈ s y : α yt : y ∈ t hy : edist x y ≤ r ⊢ infEdist x t ≤ r ** exact le_trans (infEdist_le_edist_of_mem yt) hy ** case refine_2 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t u : Set α Φ : α → β r : ℝ≥0∞ H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ edist x y ≤ r H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ edist x y ≤ r x : α xt : x ∈ t ⊢ infEdist x s ≤ r ** rcases H2 x xt with ⟨y, ys, hy⟩ ** case refine_2.intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y✝ : α s t u : Set α Φ : α → β r : ℝ≥0∞ H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ edist x y ≤ r H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ edist x y ≤ r x : α xt : x ∈ t y : α ys : y ∈ s hy : edist x y ≤ r ⊢ infEdist x s ≤ r ** exact le_trans (infEdist_le_edist_of_mem ys) hy ** Qed
EMetric.infEdist_le_hausdorffEdist_of_mem ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β h : x ∈ s ⊢ infEdist x t ≤ hausdorffEdist s t ** rw [hausdorffEdist_def] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β h : x ∈ s ⊢ infEdist x t ≤ (⨆ x ∈ s, infEdist x t) ⊔ ⨆ y ∈ t, infEdist y s ** refine le_trans ?_ le_sup_left ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β h : x ∈ s ⊢ infEdist x t ≤ ⨆ x ∈ s, infEdist x t ** exact le_iSup₂ (α := ℝ≥0∞) x h ** Qed
EMetric.infEdist_le_infEdist_add_hausdorffEdist ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ε : ℝ≥0 εpos : 0 < ε h : infEdist x s + hausdorffEdist s t < ⊤ ⊢ infEdist x t ≤ infEdist x s + hausdorffEdist s t + ↑ε ** have ε0 : (ε / 2 : ℝ≥0∞) ≠ 0 := by simpa [pos_iff_ne_zero] using εpos ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ε : ℝ≥0 εpos : 0 < ε h : infEdist x s + hausdorffEdist s t < ⊤ ε0 : ↑ε / 2 ≠ 0 ⊢ infEdist x t ≤ infEdist x s + hausdorffEdist s t + ↑ε ** have : infEdist x s < infEdist x s + ε / 2 := ENNReal.lt_add_right (ENNReal.add_lt_top.1 h).1.ne ε0 ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ε : ℝ≥0 εpos : 0 < ε h : infEdist x s + hausdorffEdist s t < ⊤ ε0 : ↑ε / 2 ≠ 0 this : infEdist x s < infEdist x s + ↑ε / 2 ⊢ infEdist x t ≤ infEdist x s + hausdorffEdist s t + ↑ε ** rcases infEdist_lt_iff.mp this with ⟨y, ys, dxy⟩ ** case intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y✝ : α s t u : Set α Φ : α → β ε : ℝ≥0 εpos : 0 < ε h : infEdist x s + hausdorffEdist s t < ⊤ ε0 : ↑ε / 2 ≠ 0 this : infEdist x s < infEdist x s + ↑ε / 2 y : α ys : y ∈ s dxy : edist x y < infEdist x s + ↑ε / 2 ⊢ infEdist x t ≤ infEdist x s + hausdorffEdist s t + ↑ε ** have : hausdorffEdist s t < hausdorffEdist s t + ε / 2 := ENNReal.lt_add_right (ENNReal.add_lt_top.1 h).2.ne ε0 ** case intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y✝ : α s t u : Set α Φ : α → β ε : ℝ≥0 εpos : 0 < ε h : infEdist x s + hausdorffEdist s t < ⊤ ε0 : ↑ε / 2 ≠ 0 this✝ : infEdist x s < infEdist x s + ↑ε / 2 y : α ys : y ∈ s dxy : edist x y < infEdist x s + ↑ε / 2 this : hausdorffEdist s t < hausdorffEdist s t + ↑ε / 2 ⊢ infEdist x t ≤ infEdist x s + hausdorffEdist s t + ↑ε ** rcases exists_edist_lt_of_hausdorffEdist_lt ys this with ⟨z, zt, dyz⟩ ** case intro.intro.intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y✝ : α s t u : Set α Φ : α → β ε : ℝ≥0 εpos : 0 < ε h : infEdist x s + hausdorffEdist s t < ⊤ ε0 : ↑ε / 2 ≠ 0 this✝ : infEdist x s < infEdist x s + ↑ε / 2 y : α ys : y ∈ s dxy : edist x y < infEdist x s + ↑ε / 2 this : hausdorffEdist s t < hausdorffEdist s t + ↑ε / 2 z : α zt : z ∈ t dyz : edist y z < hausdorffEdist s t + ↑ε / 2 ⊢ infEdist x t ≤ infEdist x s + hausdorffEdist s t + ↑ε ** calc infEdist x t ≤ edist x z := infEdist_le_edist_of_mem zt _ ≤ edist x y + edist y z := (edist_triangle _ _ _) _ ≤ infEdist x s + ε / 2 + (hausdorffEdist s t + ε / 2) := (add_le_add dxy.le dyz.le) _ = infEdist x s + hausdorffEdist s t + ε := by simp [ENNReal.add_halves, add_comm, add_left_comm] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ε : ℝ≥0 εpos : 0 < ε h : infEdist x s + hausdorffEdist s t < ⊤ ⊢ ↑ε / 2 ≠ 0 ** simpa [pos_iff_ne_zero] using εpos ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y✝ : α s t u : Set α Φ : α → β ε : ℝ≥0 εpos : 0 < ε h : infEdist x s + hausdorffEdist s t < ⊤ ε0 : ↑ε / 2 ≠ 0 this✝ : infEdist x s < infEdist x s + ↑ε / 2 y : α ys : y ∈ s dxy : edist x y < infEdist x s + ↑ε / 2 this : hausdorffEdist s t < hausdorffEdist s t + ↑ε / 2 z : α zt : z ∈ t dyz : edist y z < hausdorffEdist s t + ↑ε / 2 ⊢ infEdist x s + ↑ε / 2 + (hausdorffEdist s t + ↑ε / 2) = infEdist x s + hausdorffEdist s t + ↑ε ** simp [ENNReal.add_halves, add_comm, add_left_comm] ** Qed
EMetric.hausdorffEdist_image ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β h : Isometry Φ ⊢ hausdorffEdist (Φ '' s) (Φ '' t) = hausdorffEdist s t ** simp only [hausdorffEdist_def, iSup_image, infEdist_image h] ** Qed
EMetric.hausdorffEdist_le_ediam ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β hs : Set.Nonempty s ht : Set.Nonempty t ⊢ hausdorffEdist s t ≤ diam (s ∪ t) ** rcases hs with ⟨x, xs⟩ ** case intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t u : Set α Φ : α → β ht : Set.Nonempty t x : α xs : x ∈ s ⊢ hausdorffEdist s t ≤ diam (s ∪ t) ** rcases ht with ⟨y, yt⟩ ** case intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y✝ : α s t u : Set α Φ : α → β x : α xs : x ∈ s y : α yt : y ∈ t ⊢ hausdorffEdist s t ≤ diam (s ∪ t) ** refine' hausdorffEdist_le_of_mem_edist _ _ ** case intro.intro.refine'_1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y✝ : α s t u : Set α Φ : α → β x : α xs : x ∈ s y : α yt : y ∈ t ⊢ ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ edist x y ≤ diam (s ∪ t) ** intro z hz ** case intro.intro.refine'_1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y✝ : α s t u : Set α Φ : α → β x : α xs : x ∈ s y : α yt : y ∈ t z : α hz : z ∈ s ⊢ ∃ y, y ∈ t ∧ edist z y ≤ diam (s ∪ t) ** exact ⟨y, yt, edist_le_diam_of_mem (subset_union_left _ _ hz) (subset_union_right _ _ yt)⟩ ** case intro.intro.refine'_2 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y✝ : α s t u : Set α Φ : α → β x : α xs : x ∈ s y : α yt : y ∈ t ⊢ ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ edist x y ≤ diam (s ∪ t) ** intro z hz ** case intro.intro.refine'_2 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y✝ : α s t u : Set α Φ : α → β x : α xs : x ∈ s y : α yt : y ∈ t z : α hz : z ∈ t ⊢ ∃ y, y ∈ s ∧ edist z y ≤ diam (s ∪ t) ** exact ⟨x, xs, edist_le_diam_of_mem (subset_union_right _ _ hz) (subset_union_left _ _ xs)⟩ ** Qed
EMetric.hausdorffEdist_triangle ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ hausdorffEdist s u ≤ hausdorffEdist s t + hausdorffEdist t u ** rw [hausdorffEdist_def] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ (⨆ x ∈ s, infEdist x u) ⊔ ⨆ y ∈ u, infEdist y s ≤ hausdorffEdist s t + hausdorffEdist t u ** simp only [sup_le_iff, iSup_le_iff] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ (∀ (i : α), i ∈ s → infEdist i u ≤ hausdorffEdist s t + hausdorffEdist t u) ∧ ∀ (i : α), i ∈ u → infEdist i s ≤ hausdorffEdist s t + hausdorffEdist t u ** constructor ** case left ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ ∀ (i : α), i ∈ s → infEdist i u ≤ hausdorffEdist s t + hausdorffEdist t u ** show ∀ x ∈ s, infEdist x u ≤ hausdorffEdist s t + hausdorffEdist t u ** case left ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ ∀ (x : α), x ∈ s → infEdist x u ≤ hausdorffEdist s t + hausdorffEdist t u ** exact fun x xs => calc infEdist x u ≤ infEdist x t + hausdorffEdist t u := infEdist_le_infEdist_add_hausdorffEdist _ ≤ hausdorffEdist s t + hausdorffEdist t u := add_le_add_right (infEdist_le_hausdorffEdist_of_mem xs) _ ** case right ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ ∀ (i : α), i ∈ u → infEdist i s ≤ hausdorffEdist s t + hausdorffEdist t u ** show ∀ x ∈ u, infEdist x s ≤ hausdorffEdist s t + hausdorffEdist t u ** case right ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ ∀ (x : α), x ∈ u → infEdist x s ≤ hausdorffEdist s t + hausdorffEdist t u ** exact fun x xu => calc infEdist x s ≤ infEdist x t + hausdorffEdist t s := infEdist_le_infEdist_add_hausdorffEdist _ ≤ hausdorffEdist u t + hausdorffEdist t s := add_le_add_right (infEdist_le_hausdorffEdist_of_mem xu) _ _ = hausdorffEdist s t + hausdorffEdist t u := by simp [hausdorffEdist_comm, add_comm] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t u : Set α Φ : α → β x : α xu : x ∈ u ⊢ hausdorffEdist u t + hausdorffEdist t s = hausdorffEdist s t + hausdorffEdist t u ** simp [hausdorffEdist_comm, add_comm] ** Qed
EMetric.hausdorffEdist_zero_iff_closure_eq_closure ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ hausdorffEdist s t = 0 ↔ closure s = closure t ** simp only [hausdorffEdist_def, ENNReal.sup_eq_zero, ENNReal.iSup_eq_zero, ← subset_def, ← mem_closure_iff_infEdist_zero, subset_antisymm_iff, isClosed_closure.closure_subset_iff] ** Qed
EMetric.hausdorffEdist_self_closure ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ hausdorffEdist s (closure s) = 0 ** rw [hausdorffEdist_zero_iff_closure_eq_closure, closure_closure] ** Qed
EMetric.hausdorffEdist_closure₁ ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ hausdorffEdist (closure s) t = hausdorffEdist s t ** refine' le_antisymm _ _ ** case refine'_1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ hausdorffEdist (closure s) t ≤ hausdorffEdist s t ** calc _ ≤ hausdorffEdist (closure s) s + hausdorffEdist s t := hausdorffEdist_triangle _ = hausdorffEdist s t := by simp [hausdorffEdist_comm] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ hausdorffEdist (closure s) s + hausdorffEdist s t = hausdorffEdist s t ** simp [hausdorffEdist_comm] ** case refine'_2 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ hausdorffEdist s t ≤ hausdorffEdist (closure s) t ** calc _ ≤ hausdorffEdist s (closure s) + hausdorffEdist (closure s) t := hausdorffEdist_triangle _ = hausdorffEdist (closure s) t := by simp ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ hausdorffEdist s (closure s) + hausdorffEdist (closure s) t = hausdorffEdist (closure s) t ** simp ** Qed
EMetric.hausdorffEdist_closure₂ ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ hausdorffEdist s (closure t) = hausdorffEdist s t ** simp [@hausdorffEdist_comm _ _ s _] ** Qed
EMetric.hausdorffEdist_closure ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ⊢ hausdorffEdist (closure s) (closure t) = hausdorffEdist s t ** simp ** Qed
EMetric.hausdorffEdist_zero_iff_eq_of_closed ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β hs : IsClosed s ht : IsClosed t ⊢ hausdorffEdist s t = 0 ↔ s = t ** rw [hausdorffEdist_zero_iff_closure_eq_closure, hs.closure_eq, ht.closure_eq] ** Qed
EMetric.hausdorffEdist_empty ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β ne : Set.Nonempty s ⊢ hausdorffEdist s ∅ = ⊤ ** rcases ne with ⟨x, xs⟩ ** case intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t u : Set α Φ : α → β x : α xs : x ∈ s ⊢ hausdorffEdist s ∅ = ⊤ ** have : infEdist x ∅ ≤ hausdorffEdist s ∅ := infEdist_le_hausdorffEdist_of_mem xs ** case intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x✝ y : α s t u : Set α Φ : α → β x : α xs : x ∈ s this : infEdist x ∅ ≤ hausdorffEdist s ∅ ⊢ hausdorffEdist s ∅ = ⊤ ** simpa using this ** Qed
EMetric.empty_or_nonempty_of_hausdorffEdist_ne_top ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β fin : hausdorffEdist s t ≠ ⊤ ⊢ s = ∅ ∧ t = ∅ ∨ Set.Nonempty s ∧ Set.Nonempty t ** cases' s.eq_empty_or_nonempty with hs hs ** case inl ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β fin : hausdorffEdist s t ≠ ⊤ hs : s = ∅ ⊢ s = ∅ ∧ t = ∅ ∨ Set.Nonempty s ∧ Set.Nonempty t ** cases' t.eq_empty_or_nonempty with ht ht ** case inl.inl ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β fin : hausdorffEdist s t ≠ ⊤ hs : s = ∅ ht : t = ∅ ⊢ s = ∅ ∧ t = ∅ ∨ Set.Nonempty s ∧ Set.Nonempty t ** exact Or.inl ⟨hs, ht⟩ ** case inl.inr ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β fin : hausdorffEdist s t ≠ ⊤ hs : s = ∅ ht : Set.Nonempty t ⊢ s = ∅ ∧ t = ∅ ∨ Set.Nonempty s ∧ Set.Nonempty t ** rw [hausdorffEdist_comm] at fin ** case inl.inr ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β fin : hausdorffEdist t s ≠ ⊤ hs : s = ∅ ht : Set.Nonempty t ⊢ s = ∅ ∧ t = ∅ ∨ Set.Nonempty s ∧ Set.Nonempty t ** exact Or.inr ⟨nonempty_of_hausdorffEdist_ne_top ht fin, ht⟩ ** case inr ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α inst✝ : PseudoEMetricSpace β x y : α s t u : Set α Φ : α → β fin : hausdorffEdist s t ≠ ⊤ hs : Set.Nonempty s ⊢ s = ∅ ∧ t = ∅ ∨ Set.Nonempty s ∧ Set.Nonempty t ** exact Or.inr ⟨hs, nonempty_of_hausdorffEdist_ne_top hs fin⟩ ** Qed
Metric.infDist_eq_iInf ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ infDist x s = ⨅ y, dist x ↑y ** rw [infDist, infEdist, iInf_subtype', ENNReal.toReal_iInf] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ ⨅ i, ENNReal.toReal (edist x ↑i) = ⨅ y, dist x ↑y ** simp only [dist_edist] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ ∀ (i : { y // y ∈ s }), edist x ↑i ≠ ⊤ ** exact fun _ ↦ edist_ne_top _ _ ** Qed
Metric.infDist_empty ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ infDist x ∅ = 0 ** simp [infDist] ** Qed
Metric.infEdist_ne_top ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : Set.Nonempty s ⊢ infEdist x s ≠ ⊤ ** rcases h with ⟨y, hy⟩ ** case intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y✝ : α Φ : α → β y : α hy : y ∈ s ⊢ infEdist x s ≠ ⊤ ** exact ne_top_of_le_ne_top (edist_ne_top _ _) (infEdist_le_edist_of_mem hy) ** Qed
Metric.infEdist_eq_top_iff ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ infEdist x s = ⊤ ↔ s = ∅ ** rcases s.eq_empty_or_nonempty with rfl | hs <;> simp [*, Nonempty.ne_empty, infEdist_ne_top] ** Qed
Metric.infDist_zero_of_mem ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : x ∈ s ⊢ infDist x s = 0 ** simp [infEdist_zero_of_mem h, infDist] ** Qed
Metric.infDist_singleton ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ infDist x {y} = dist x y ** simp [infDist, dist_edist] ** Qed
Metric.infDist_le_dist_of_mem ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : y ∈ s ⊢ infDist x s ≤ dist x y ** rw [dist_edist, infDist] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : y ∈ s ⊢ ENNReal.toReal (infEdist x s) ≤ ENNReal.toReal (edist x y) ** exact ENNReal.toReal_mono (edist_ne_top _ _) (infEdist_le_edist_of_mem h) ** Qed
Metric.infDist_lt_iff ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ hs : Set.Nonempty s ⊢ infDist x s < r ↔ ∃ y, y ∈ s ∧ dist x y < r ** simp_rw [infDist, ← ENNReal.lt_ofReal_iff_toReal_lt (infEdist_ne_top hs), infEdist_lt_iff, ENNReal.lt_ofReal_iff_toReal_lt (edist_ne_top _ _), ← dist_edist] ** Qed
Metric.infDist_le_infDist_add_dist ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ infDist x s ≤ infDist y s + dist x y ** rw [infDist, infDist, dist_edist] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ ENNReal.toReal (infEdist x s) ≤ ENNReal.toReal (infEdist y s) + ENNReal.toReal (edist x y) ** refine ENNReal.toReal_le_add' infEdist_le_infEdist_add_edist ?_ (flip absurd (edist_ne_top _ _)) ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ infEdist y s = ⊤ → infEdist x s = ⊤ ** simp only [infEdist_eq_top_iff, imp_self] ** Qed
Metric.dist_le_infDist_add_diam ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β hs : Bornology.IsBounded s hy : y ∈ s ⊢ dist x y ≤ infDist x s + diam s ** rw [infDist, diam, dist_edist] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β hs : Bornology.IsBounded s hy : y ∈ s ⊢ ENNReal.toReal (edist x y) ≤ ENNReal.toReal (infEdist x s) + ENNReal.toReal (EMetric.diam s) ** exact toReal_le_add (edist_le_infEdist_add_ediam hy) (infEdist_ne_top ⟨y, hy⟩) hs.ediam_ne_top ** Qed
Metric.infDist_closure ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ infDist x (closure s) = infDist x s ** simp [infDist, infEdist_closure] ** Qed
Metric.infDist_zero_of_mem_closure ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β hx : x ∈ closure s ⊢ infDist x s = 0 ** rw [← infDist_closure] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β hx : x ∈ closure s ⊢ infDist x (closure s) = 0 ** exact infDist_zero_of_mem hx ** Qed
Metric.mem_closure_iff_infDist_zero ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : Set.Nonempty s ⊢ x ∈ closure s ↔ infDist x s = 0 ** simp [mem_closure_iff_infEdist_zero, infDist, ENNReal.toReal_eq_zero_iff, infEdist_ne_top h] ** Qed
IsClosed.mem_iff_infDist_zero ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : IsClosed s hs : Set.Nonempty s ⊢ x ∈ s ↔ infDist x s = 0 ** rw [← mem_closure_iff_infDist_zero hs, h.closure_eq] ** Qed
IsClosed.not_mem_iff_infDist_pos ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : IsClosed s hs : Set.Nonempty s ⊢ ¬x ∈ s ↔ 0 < infDist x s ** simp [h.mem_iff_infDist_zero hs, infDist_nonneg.gt_iff_ne] ** Qed
Metric.continuousAt_inv_infDist_pt ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : ¬x ∈ closure s ⊢ ContinuousAt (fun x => (infDist x s)⁻¹) x ** rcases s.eq_empty_or_nonempty with (rfl | hs) ** case inl ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β t u : Set α x y : α Φ : α → β h : ¬x ∈ closure ∅ ⊢ ContinuousAt (fun x => (infDist x ∅)⁻¹) x ** simp only [infDist_empty, continuousAt_const] ** case inr ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : ¬x ∈ closure s hs : Set.Nonempty s ⊢ ContinuousAt (fun x => (infDist x s)⁻¹) x ** refine (continuous_infDist_pt s).continuousAt.inv₀ ?_ ** case inr ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : ¬x ∈ closure s hs : Set.Nonempty s ⊢ infDist x s ≠ 0 ** rwa [Ne.def, ← mem_closure_iff_infDist_zero hs] ** Qed
Metric.infDist_image ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β hΦ : Isometry Φ ⊢ infDist (Φ x) (Φ '' t) = infDist x t ** simp [infDist, infEdist_image hΦ] ** Qed
Metric.infDist_inter_closedBall_of_mem ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : y ∈ s ⊢ infDist x (s ∩ closedBall x (dist y x)) = infDist x s ** replace h : y ∈ s ∩ closedBall x (dist y x) := ⟨h, mem_closedBall.2 le_rfl⟩ ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : y ∈ s ∩ closedBall x (dist y x) ⊢ infDist x (s ∩ closedBall x (dist y x)) = infDist x s ** refine le_antisymm ?_ (infDist_le_infDist_of_subset (inter_subset_left _ _) ⟨y, h⟩) ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : y ∈ s ∩ closedBall x (dist y x) ⊢ infDist x (s ∩ closedBall x (dist y x)) ≤ infDist x s ** refine' not_lt.1 fun hlt => _ ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : y ∈ s ∩ closedBall x (dist y x) hlt : infDist x s < infDist x (s ∩ closedBall x (dist y x)) ⊢ False ** rcases (infDist_lt_iff ⟨y, h.1⟩).mp hlt with ⟨z, hzs, hz⟩ ** case intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : y ∈ s ∩ closedBall x (dist y x) hlt : infDist x s < infDist x (s ∩ closedBall x (dist y x)) z : α hzs : z ∈ s hz : dist x z < infDist x (s ∩ closedBall x (dist y x)) ⊢ False ** cases' le_or_lt (dist z x) (dist y x) with hle hlt ** case intro.intro.inl ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : y ∈ s ∩ closedBall x (dist y x) hlt : infDist x s < infDist x (s ∩ closedBall x (dist y x)) z : α hzs : z ∈ s hz : dist x z < infDist x (s ∩ closedBall x (dist y x)) hle : dist z x ≤ dist y x ⊢ False ** exact hz.not_le (infDist_le_dist_of_mem ⟨hzs, hle⟩) ** case intro.intro.inr ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : y ∈ s ∩ closedBall x (dist y x) hlt✝ : infDist x s < infDist x (s ∩ closedBall x (dist y x)) z : α hzs : z ∈ s hz : dist x z < infDist x (s ∩ closedBall x (dist y x)) hlt : dist y x < dist z x ⊢ False ** rw [dist_comm z, dist_comm y] at hlt ** case intro.intro.inr ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : y ∈ s ∩ closedBall x (dist y x) hlt✝ : infDist x s < infDist x (s ∩ closedBall x (dist y x)) z : α hzs : z ∈ s hz : dist x z < infDist x (s ∩ closedBall x (dist y x)) hlt : dist x y < dist x z ⊢ False ** exact (hlt.trans hz).not_le (infDist_le_dist_of_mem h) ** Qed
IsCompact.exists_infDist_eq_dist ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y✝ : α Φ : α → β h : IsCompact s hne : Set.Nonempty s x y : α hys : y ∈ s hy : infEdist x s = edist x y ⊢ infDist x s = dist x y ** rw [infDist, dist_edist, hy] ** Qed
IsClosed.exists_infDist_eq_dist ** ι : Sort u_1 α : Type u β : Type v inst✝² : PseudoMetricSpace α inst✝¹ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β inst✝ : ProperSpace α h : IsClosed s hne : Set.Nonempty s x : α ⊢ ∃ y, y ∈ s ∧ infDist x s = dist x y ** rcases hne with ⟨z, hz⟩ ** case intro ι : Sort u_1 α : Type u β : Type v inst✝² : PseudoMetricSpace α inst✝¹ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β inst✝ : ProperSpace α h : IsClosed s x z : α hz : z ∈ s ⊢ ∃ y, y ∈ s ∧ infDist x s = dist x y ** rw [← infDist_inter_closedBall_of_mem hz] ** case intro ι : Sort u_1 α : Type u β : Type v inst✝² : PseudoMetricSpace α inst✝¹ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β inst✝ : ProperSpace α h : IsClosed s x z : α hz : z ∈ s ⊢ ∃ y, y ∈ s ∧ infDist x (s ∩ closedBall x (dist z x)) = dist x y ** set t := s ∩ closedBall x (dist z x) ** case intro ι : Sort u_1 α : Type u β : Type v inst✝² : PseudoMetricSpace α inst✝¹ : PseudoMetricSpace β s t✝ u : Set α x✝ y : α Φ : α → β inst✝ : ProperSpace α h : IsClosed s x z : α hz : z ∈ s t : Set α := s ∩ closedBall x (dist z x) ⊢ ∃ y, y ∈ s ∧ infDist x t = dist x y ** have htc : IsCompact t := (isCompact_closedBall x (dist z x)).inter_left h ** case intro ι : Sort u_1 α : Type u β : Type v inst✝² : PseudoMetricSpace α inst✝¹ : PseudoMetricSpace β s t✝ u : Set α x✝ y : α Φ : α → β inst✝ : ProperSpace α h : IsClosed s x z : α hz : z ∈ s t : Set α := s ∩ closedBall x (dist z x) htc : IsCompact t ⊢ ∃ y, y ∈ s ∧ infDist x t = dist x y ** have htne : t.Nonempty := ⟨z, hz, mem_closedBall.2 le_rfl⟩ ** case intro ι : Sort u_1 α : Type u β : Type v inst✝² : PseudoMetricSpace α inst✝¹ : PseudoMetricSpace β s t✝ u : Set α x✝ y : α Φ : α → β inst✝ : ProperSpace α h : IsClosed s x z : α hz : z ∈ s t : Set α := s ∩ closedBall x (dist z x) htc : IsCompact t htne : Set.Nonempty t ⊢ ∃ y, y ∈ s ∧ infDist x t = dist x y ** obtain ⟨y, ⟨hys, -⟩, hyd⟩ : ∃ y ∈ t, infDist x t = dist x y := htc.exists_infDist_eq_dist htne x ** case intro.intro.intro.intro ι : Sort u_1 α : Type u β : Type v inst✝² : PseudoMetricSpace α inst✝¹ : PseudoMetricSpace β s t✝ u : Set α x✝ y✝ : α Φ : α → β inst✝ : ProperSpace α h : IsClosed s x z : α hz : z ∈ s t : Set α := s ∩ closedBall x (dist z x) htc : IsCompact t htne : Set.Nonempty t y : α hyd : infDist x t = dist x y hys : y ∈ s ⊢ ∃ y, y ∈ s ∧ infDist x t = dist x y ** exact ⟨y, hys, hyd⟩ ** Qed
Metric.exists_mem_closure_infDist_eq_dist ** ι : Sort u_1 α : Type u β : Type v inst✝² : PseudoMetricSpace α inst✝¹ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β inst✝ : ProperSpace α hne : Set.Nonempty s x : α ⊢ ∃ y, y ∈ closure s ∧ infDist x s = dist x y ** simpa only [infDist_closure] using isClosed_closure.exists_infDist_eq_dist hne.closure x ** Qed
Metric.hausdorffDist_nonneg ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ 0 ≤ hausdorffDist s t ** simp [hausdorffDist] ** Qed
Metric.hausdorffEdist_ne_top_of_nonempty_of_bounded ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β hs : Set.Nonempty s ht : Set.Nonempty t bs : Bornology.IsBounded s bt : Bornology.IsBounded t ⊢ hausdorffEdist s t ≠ ⊤ ** rcases hs with ⟨cs, hcs⟩ ** case intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ht : Set.Nonempty t bs : Bornology.IsBounded s bt : Bornology.IsBounded t cs : α hcs : cs ∈ s ⊢ hausdorffEdist s t ≠ ⊤ ** rcases ht with ⟨ct, hct⟩ ** case intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β bs : Bornology.IsBounded s bt : Bornology.IsBounded t cs : α hcs : cs ∈ s ct : α hct : ct ∈ t ⊢ hausdorffEdist s t ≠ ⊤ ** rcases bs.subset_closedBall ct with ⟨rs, hrs⟩ ** case intro.intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β bs : Bornology.IsBounded s bt : Bornology.IsBounded t cs : α hcs : cs ∈ s ct : α hct : ct ∈ t rs : ℝ hrs : s ⊆ closedBall ct rs ⊢ hausdorffEdist s t ≠ ⊤ ** rcases bt.subset_closedBall cs with ⟨rt, hrt⟩ ** case intro.intro.intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β bs : Bornology.IsBounded s bt : Bornology.IsBounded t cs : α hcs : cs ∈ s ct : α hct : ct ∈ t rs : ℝ hrs : s ⊆ closedBall ct rs rt : ℝ hrt : t ⊆ closedBall cs rt this : hausdorffEdist s t ≤ ENNReal.ofReal (max rs rt) ⊢ hausdorffEdist s t ≠ ⊤ ** exact ne_top_of_le_ne_top ENNReal.ofReal_ne_top this ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β bs : Bornology.IsBounded s bt : Bornology.IsBounded t cs : α hcs : cs ∈ s ct : α hct : ct ∈ t rs : ℝ hrs : s ⊆ closedBall ct rs rt : ℝ hrt : t ⊆ closedBall cs rt ⊢ hausdorffEdist s t ≤ ENNReal.ofReal (max rs rt) ** apply hausdorffEdist_le_of_mem_edist ** case H1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β bs : Bornology.IsBounded s bt : Bornology.IsBounded t cs : α hcs : cs ∈ s ct : α hct : ct ∈ t rs : ℝ hrs : s ⊆ closedBall ct rs rt : ℝ hrt : t ⊆ closedBall cs rt ⊢ ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ edist x y ≤ ENNReal.ofReal (max rs rt) ** intro x xs ** case H1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β bs : Bornology.IsBounded s bt : Bornology.IsBounded t cs : α hcs : cs ∈ s ct : α hct : ct ∈ t rs : ℝ hrs : s ⊆ closedBall ct rs rt : ℝ hrt : t ⊆ closedBall cs rt x : α xs : x ∈ s ⊢ ∃ y, y ∈ t ∧ edist x y ≤ ENNReal.ofReal (max rs rt) ** exists ct, hct ** case H1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β bs : Bornology.IsBounded s bt : Bornology.IsBounded t cs : α hcs : cs ∈ s ct : α hct : ct ∈ t rs : ℝ hrs : s ⊆ closedBall ct rs rt : ℝ hrt : t ⊆ closedBall cs rt x : α xs : x ∈ s ⊢ edist x ct ≤ ENNReal.ofReal (max rs rt) ** have : dist x ct ≤ max rs rt := le_trans (hrs xs) (le_max_left _ _) ** case H1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β bs : Bornology.IsBounded s bt : Bornology.IsBounded t cs : α hcs : cs ∈ s ct : α hct : ct ∈ t rs : ℝ hrs : s ⊆ closedBall ct rs rt : ℝ hrt : t ⊆ closedBall cs rt x : α xs : x ∈ s this : dist x ct ≤ max rs rt ⊢ edist x ct ≤ ENNReal.ofReal (max rs rt) ** rwa [edist_dist, ENNReal.ofReal_le_ofReal_iff] ** case H1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β bs : Bornology.IsBounded s bt : Bornology.IsBounded t cs : α hcs : cs ∈ s ct : α hct : ct ∈ t rs : ℝ hrs : s ⊆ closedBall ct rs rt : ℝ hrt : t ⊆ closedBall cs rt x : α xs : x ∈ s this : dist x ct ≤ max rs rt ⊢ 0 ≤ max rs rt ** exact le_trans dist_nonneg this ** case H2 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β bs : Bornology.IsBounded s bt : Bornology.IsBounded t cs : α hcs : cs ∈ s ct : α hct : ct ∈ t rs : ℝ hrs : s ⊆ closedBall ct rs rt : ℝ hrt : t ⊆ closedBall cs rt ⊢ ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ edist x y ≤ ENNReal.ofReal (max rs rt) ** intro x xt ** case H2 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β bs : Bornology.IsBounded s bt : Bornology.IsBounded t cs : α hcs : cs ∈ s ct : α hct : ct ∈ t rs : ℝ hrs : s ⊆ closedBall ct rs rt : ℝ hrt : t ⊆ closedBall cs rt x : α xt : x ∈ t ⊢ ∃ y, y ∈ s ∧ edist x y ≤ ENNReal.ofReal (max rs rt) ** exists cs, hcs ** case H2 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β bs : Bornology.IsBounded s bt : Bornology.IsBounded t cs : α hcs : cs ∈ s ct : α hct : ct ∈ t rs : ℝ hrs : s ⊆ closedBall ct rs rt : ℝ hrt : t ⊆ closedBall cs rt x : α xt : x ∈ t ⊢ edist x cs ≤ ENNReal.ofReal (max rs rt) ** have : dist x cs ≤ max rs rt := le_trans (hrt xt) (le_max_right _ _) ** case H2 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β bs : Bornology.IsBounded s bt : Bornology.IsBounded t cs : α hcs : cs ∈ s ct : α hct : ct ∈ t rs : ℝ hrs : s ⊆ closedBall ct rs rt : ℝ hrt : t ⊆ closedBall cs rt x : α xt : x ∈ t this : dist x cs ≤ max rs rt ⊢ edist x cs ≤ ENNReal.ofReal (max rs rt) ** rwa [edist_dist, ENNReal.ofReal_le_ofReal_iff] ** case H2 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β bs : Bornology.IsBounded s bt : Bornology.IsBounded t cs : α hcs : cs ∈ s ct : α hct : ct ∈ t rs : ℝ hrs : s ⊆ closedBall ct rs rt : ℝ hrt : t ⊆ closedBall cs rt x : α xt : x ∈ t this : dist x cs ≤ max rs rt ⊢ 0 ≤ max rs rt ** exact le_trans dist_nonneg this ** Qed
Metric.hausdorffDist_self_zero ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ hausdorffDist s s = 0 ** simp [hausdorffDist] ** Qed
Metric.hausdorffDist_comm ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ hausdorffDist s t = hausdorffDist t s ** simp [hausdorffDist, hausdorffEdist_comm] ** Qed
Metric.hausdorffDist_empty ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ hausdorffDist s ∅ = 0 ** cases' s.eq_empty_or_nonempty with h h ** case inl ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : s = ∅ ⊢ hausdorffDist s ∅ = 0 ** simp [h] ** case inr ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : Set.Nonempty s ⊢ hausdorffDist s ∅ = 0 ** simp [hausdorffDist, hausdorffEdist_empty h] ** Qed
Metric.hausdorffDist_empty' ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ hausdorffDist ∅ s = 0 ** simp [hausdorffDist_comm] ** Qed
Metric.hausdorffDist_le_of_infDist ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → infDist x t ≤ r H2 : ∀ (x : α), x ∈ t → infDist x s ≤ r ⊢ hausdorffDist s t ≤ r ** by_cases h1 : hausdorffEdist s t = ⊤ ** case neg ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → infDist x t ≤ r H2 : ∀ (x : α), x ∈ t → infDist x s ≤ r h1 : ¬hausdorffEdist s t = ⊤ ⊢ hausdorffDist s t ≤ r ** cases' s.eq_empty_or_nonempty with hs hs ** case neg.inr ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → infDist x t ≤ r H2 : ∀ (x : α), x ∈ t → infDist x s ≤ r h1 : ¬hausdorffEdist s t = ⊤ hs : Set.Nonempty s ⊢ hausdorffDist s t ≤ r ** cases' t.eq_empty_or_nonempty with ht ht ** case neg.inr.inr ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → infDist x t ≤ r H2 : ∀ (x : α), x ∈ t → infDist x s ≤ r h1 : ¬hausdorffEdist s t = ⊤ hs : Set.Nonempty s ht : Set.Nonempty t this : hausdorffEdist s t ≤ ENNReal.ofReal r ⊢ hausdorffDist s t ≤ r ** rwa [hausdorffDist, ← ENNReal.toReal_ofReal hr, ENNReal.toReal_le_toReal h1 ENNReal.ofReal_ne_top] ** case pos ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → infDist x t ≤ r H2 : ∀ (x : α), x ∈ t → infDist x s ≤ r h1 : hausdorffEdist s t = ⊤ ⊢ hausdorffDist s t ≤ r ** rwa [hausdorffDist, h1, ENNReal.top_toReal] ** case neg.inl ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → infDist x t ≤ r H2 : ∀ (x : α), x ∈ t → infDist x s ≤ r h1 : ¬hausdorffEdist s t = ⊤ hs : s = ∅ ⊢ hausdorffDist s t ≤ r ** rwa [hs, hausdorffDist_empty'] ** case neg.inr.inl ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → infDist x t ≤ r H2 : ∀ (x : α), x ∈ t → infDist x s ≤ r h1 : ¬hausdorffEdist s t = ⊤ hs : Set.Nonempty s ht : t = ∅ ⊢ hausdorffDist s t ≤ r ** rwa [ht, hausdorffDist_empty] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → infDist x t ≤ r H2 : ∀ (x : α), x ∈ t → infDist x s ≤ r h1 : ¬hausdorffEdist s t = ⊤ hs : Set.Nonempty s ht : Set.Nonempty t ⊢ hausdorffEdist s t ≤ ENNReal.ofReal r ** apply hausdorffEdist_le_of_infEdist _ _ ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → infDist x t ≤ r H2 : ∀ (x : α), x ∈ t → infDist x s ≤ r h1 : ¬hausdorffEdist s t = ⊤ hs : Set.Nonempty s ht : Set.Nonempty t ⊢ ∀ (x : α), x ∈ s → infEdist x t ≤ ENNReal.ofReal r ** intro x hx ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → infDist x t ≤ r H2 : ∀ (x : α), x ∈ t → infDist x s ≤ r h1 : ¬hausdorffEdist s t = ⊤ hs : Set.Nonempty s ht : Set.Nonempty t x : α hx : x ∈ s ⊢ infEdist x t ≤ ENNReal.ofReal r ** have I := H1 x hx ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → infDist x t ≤ r H2 : ∀ (x : α), x ∈ t → infDist x s ≤ r h1 : ¬hausdorffEdist s t = ⊤ hs : Set.Nonempty s ht : Set.Nonempty t x : α hx : x ∈ s I : infDist x t ≤ r ⊢ infEdist x t ≤ ENNReal.ofReal r ** rwa [infDist, ← ENNReal.toReal_ofReal hr, ENNReal.toReal_le_toReal (infEdist_ne_top ht) ENNReal.ofReal_ne_top] at I ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → infDist x t ≤ r H2 : ∀ (x : α), x ∈ t → infDist x s ≤ r h1 : ¬hausdorffEdist s t = ⊤ hs : Set.Nonempty s ht : Set.Nonempty t ⊢ ∀ (x : α), x ∈ t → infEdist x s ≤ ENNReal.ofReal r ** intro x hx ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → infDist x t ≤ r H2 : ∀ (x : α), x ∈ t → infDist x s ≤ r h1 : ¬hausdorffEdist s t = ⊤ hs : Set.Nonempty s ht : Set.Nonempty t x : α hx : x ∈ t ⊢ infEdist x s ≤ ENNReal.ofReal r ** have I := H2 x hx ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → infDist x t ≤ r H2 : ∀ (x : α), x ∈ t → infDist x s ≤ r h1 : ¬hausdorffEdist s t = ⊤ hs : Set.Nonempty s ht : Set.Nonempty t x : α hx : x ∈ t I : infDist x s ≤ r ⊢ infEdist x s ≤ ENNReal.ofReal r ** rwa [infDist, ← ENNReal.toReal_ofReal hr, ENNReal.toReal_le_toReal (infEdist_ne_top hs) ENNReal.ofReal_ne_top] at I ** Qed
Metric.hausdorffDist_le_of_mem_dist ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ dist x y ≤ r H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ dist x y ≤ r ⊢ hausdorffDist s t ≤ r ** apply hausdorffDist_le_of_infDist hr ** case H1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ dist x y ≤ r H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ dist x y ≤ r ⊢ ∀ (x : α), x ∈ s → infDist x t ≤ r ** intro x xs ** case H1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ dist x y ≤ r H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ dist x y ≤ r x : α xs : x ∈ s ⊢ infDist x t ≤ r ** rcases H1 x xs with ⟨y, yt, hy⟩ ** case H1.intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y✝ : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ dist x y ≤ r H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ dist x y ≤ r x : α xs : x ∈ s y : α yt : y ∈ t hy : dist x y ≤ r ⊢ infDist x t ≤ r ** exact le_trans (infDist_le_dist_of_mem yt) hy ** case H2 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ dist x y ≤ r H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ dist x y ≤ r ⊢ ∀ (x : α), x ∈ t → infDist x s ≤ r ** intro x xt ** case H2 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ dist x y ≤ r H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ dist x y ≤ r x : α xt : x ∈ t ⊢ infDist x s ≤ r ** rcases H2 x xt with ⟨y, ys, hy⟩ ** case H2.intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y✝ : α Φ : α → β r : ℝ hr : 0 ≤ r H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ dist x y ≤ r H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ dist x y ≤ r x : α xt : x ∈ t y : α ys : y ∈ s hy : dist x y ≤ r ⊢ infDist x s ≤ r ** exact le_trans (infDist_le_dist_of_mem ys) hy ** Qed
Metric.hausdorffDist_le_diam ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β hs : Set.Nonempty s bs : Bornology.IsBounded s ht : Set.Nonempty t bt : Bornology.IsBounded t ⊢ hausdorffDist s t ≤ diam (s ∪ t) ** rcases hs with ⟨x, xs⟩ ** case intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y : α Φ : α → β bs : Bornology.IsBounded s ht : Set.Nonempty t bt : Bornology.IsBounded t x : α xs : x ∈ s ⊢ hausdorffDist s t ≤ diam (s ∪ t) ** rcases ht with ⟨y, yt⟩ ** case intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y✝ : α Φ : α → β bs : Bornology.IsBounded s bt : Bornology.IsBounded t x : α xs : x ∈ s y : α yt : y ∈ t ⊢ hausdorffDist s t ≤ diam (s ∪ t) ** refine hausdorffDist_le_of_mem_dist diam_nonneg ?_ ?_ ** case intro.intro.refine_1 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y✝ : α Φ : α → β bs : Bornology.IsBounded s bt : Bornology.IsBounded t x : α xs : x ∈ s y : α yt : y ∈ t ⊢ ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ dist x y ≤ diam (s ∪ t) ** exact fun z hz => ⟨y, yt, dist_le_diam_of_mem (bs.union bt) (subset_union_left _ _ hz) (subset_union_right _ _ yt)⟩ ** case intro.intro.refine_2 ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x✝ y✝ : α Φ : α → β bs : Bornology.IsBounded s bt : Bornology.IsBounded t x : α xs : x ∈ s y : α yt : y ∈ t ⊢ ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ dist x y ≤ diam (s ∪ t) ** exact fun z hz => ⟨x, xs, dist_le_diam_of_mem (bs.union bt) (subset_union_right _ _ hz) (subset_union_left _ _ xs)⟩ ** Qed
Metric.exists_dist_lt_of_hausdorffDist_lt ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ h : x ∈ s H : hausdorffDist s t < r fin : hausdorffEdist s t ≠ ⊤ ⊢ ∃ y, y ∈ t ∧ dist x y < r ** have r0 : 0 < r := lt_of_le_of_lt hausdorffDist_nonneg H ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ h : x ∈ s H : hausdorffDist s t < r fin : hausdorffEdist s t ≠ ⊤ r0 : 0 < r ⊢ ∃ y, y ∈ t ∧ dist x y < r ** have : hausdorffEdist s t < ENNReal.ofReal r := by rwa [hausdorffDist, ← ENNReal.toReal_ofReal (le_of_lt r0), ENNReal.toReal_lt_toReal fin ENNReal.ofReal_ne_top] at H ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ h : x ∈ s H : hausdorffDist s t < r fin : hausdorffEdist s t ≠ ⊤ r0 : 0 < r this : hausdorffEdist s t < ENNReal.ofReal r ⊢ ∃ y, y ∈ t ∧ dist x y < r ** rcases exists_edist_lt_of_hausdorffEdist_lt h this with ⟨y, hy, yr⟩ ** case intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y✝ : α Φ : α → β r : ℝ h : x ∈ s H : hausdorffDist s t < r fin : hausdorffEdist s t ≠ ⊤ r0 : 0 < r this : hausdorffEdist s t < ENNReal.ofReal r y : α hy : y ∈ t yr : edist x y < ENNReal.ofReal r ⊢ ∃ y, y ∈ t ∧ dist x y < r ** rw [edist_dist, ENNReal.ofReal_lt_ofReal_iff r0] at yr ** case intro.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y✝ : α Φ : α → β r : ℝ h : x ∈ s H : hausdorffDist s t < r fin : hausdorffEdist s t ≠ ⊤ r0 : 0 < r this : hausdorffEdist s t < ENNReal.ofReal r y : α hy : y ∈ t yr : dist x y < r ⊢ ∃ y, y ∈ t ∧ dist x y < r ** exact ⟨y, hy, yr⟩ ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ h : x ∈ s H : hausdorffDist s t < r fin : hausdorffEdist s t ≠ ⊤ r0 : 0 < r ⊢ hausdorffEdist s t < ENNReal.ofReal r ** rwa [hausdorffDist, ← ENNReal.toReal_ofReal (le_of_lt r0), ENNReal.toReal_lt_toReal fin ENNReal.ofReal_ne_top] at H ** Qed
Metric.exists_dist_lt_of_hausdorffDist_lt' ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ h : y ∈ t H : hausdorffDist s t < r fin : hausdorffEdist s t ≠ ⊤ ⊢ ∃ x, x ∈ s ∧ dist x y < r ** rw [hausdorffDist_comm] at H ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ h : y ∈ t H : hausdorffDist t s < r fin : hausdorffEdist s t ≠ ⊤ ⊢ ∃ x, x ∈ s ∧ dist x y < r ** rw [hausdorffEdist_comm] at fin ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β r : ℝ h : y ∈ t H : hausdorffDist t s < r fin : hausdorffEdist t s ≠ ⊤ ⊢ ∃ x, x ∈ s ∧ dist x y < r ** simpa [dist_comm] using exists_dist_lt_of_hausdorffDist_lt h H fin ** Qed
Metric.infDist_le_infDist_add_hausdorffDist ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β fin : hausdorffEdist s t ≠ ⊤ ⊢ infDist x t ≤ infDist x s + hausdorffDist s t ** refine toReal_le_add' infEdist_le_infEdist_add_hausdorffEdist (fun h ↦ ?_) (flip absurd fin) ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β fin : hausdorffEdist s t ≠ ⊤ h : infEdist x s = ⊤ ⊢ infEdist x t = ⊤ ** rw [infEdist_eq_top_iff, ← not_nonempty_iff_eq_empty] at h ⊢ ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β fin : hausdorffEdist s t ≠ ⊤ h : ¬Set.Nonempty s ⊢ ¬Set.Nonempty t ** rw [hausdorffEdist_comm] at fin ** Qed
Metric.hausdorffDist_image ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β h : Isometry Φ ⊢ hausdorffDist (Φ '' s) (Φ '' t) = hausdorffDist s t ** simp [hausdorffDist, hausdorffEdist_image h] ** Qed
Metric.hausdorffDist_triangle ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β fin : hausdorffEdist s t ≠ ⊤ ⊢ hausdorffDist s u ≤ hausdorffDist s t + hausdorffDist t u ** refine toReal_le_add' hausdorffEdist_triangle (flip absurd fin) (not_imp_not.1 fun h ↦ ?_) ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β fin : hausdorffEdist s t ≠ ⊤ h : ¬hausdorffEdist s u = ⊤ ⊢ ¬hausdorffEdist t u = ⊤ ** rw [hausdorffEdist_comm] at fin ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β fin : hausdorffEdist t s ≠ ⊤ h : ¬hausdorffEdist s u = ⊤ ⊢ ¬hausdorffEdist t u = ⊤ ** exact ne_top_of_le_ne_top (add_ne_top.2 ⟨fin, h⟩) hausdorffEdist_triangle ** Qed
Metric.hausdorffDist_triangle' ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β fin : hausdorffEdist t u ≠ ⊤ ⊢ hausdorffDist s u ≤ hausdorffDist s t + hausdorffDist t u ** rw [hausdorffEdist_comm] at fin ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β fin : hausdorffEdist u t ≠ ⊤ ⊢ hausdorffDist s u ≤ hausdorffDist s t + hausdorffDist t u ** have I : hausdorffDist u s ≤ hausdorffDist u t + hausdorffDist t s := hausdorffDist_triangle fin ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β fin : hausdorffEdist u t ≠ ⊤ I : hausdorffDist u s ≤ hausdorffDist u t + hausdorffDist t s ⊢ hausdorffDist s u ≤ hausdorffDist s t + hausdorffDist t u ** simpa [add_comm, hausdorffDist_comm] using I ** Qed
Metric.hausdorffDist_self_closure ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ hausdorffDist s (closure s) = 0 ** simp [hausdorffDist] ** Qed
Metric.hausdorffDist_closure₁ ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ hausdorffDist (closure s) t = hausdorffDist s t ** simp [hausdorffDist] ** Qed
Metric.hausdorffDist_closure₂ ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ hausdorffDist s (closure t) = hausdorffDist s t ** simp [hausdorffDist] ** Qed
Metric.hausdorffDist_closure ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β ⊢ hausdorffDist (closure s) (closure t) = hausdorffDist s t ** simp [hausdorffDist] ** Qed
Metric.hausdorffDist_zero_iff_closure_eq_closure ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β fin : hausdorffEdist s t ≠ ⊤ ⊢ hausdorffDist s t = 0 ↔ closure s = closure t ** simp [← hausdorffEdist_zero_iff_closure_eq_closure, hausdorffDist, ENNReal.toReal_eq_zero_iff, fin] ** Qed
IsClosed.hausdorffDist_zero_iff_eq ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoMetricSpace α inst✝ : PseudoMetricSpace β s t u : Set α x y : α Φ : α → β hs : IsClosed s ht : IsClosed t fin : hausdorffEdist s t ≠ ⊤ ⊢ hausdorffDist s t = 0 ↔ s = t ** simp [← hausdorffEdist_zero_iff_eq_of_closed hs ht, hausdorffDist, ENNReal.toReal_eq_zero_iff, fin] ** Qed
Metric.thickening_empty ** ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ✝ : ℝ s : Set α x : α δ : ℝ ⊢ thickening δ ∅ = ∅ ** simp only [thickening, setOf_false, infEdist_empty, not_top_lt] ** Qed
Metric.frontier_thickening_disjoint ** ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ : ℝ s : Set α x : α A : Set α ⊢ Pairwise (Disjoint on fun r => frontier (thickening r A)) ** refine' (pairwise_disjoint_on _).2 fun r₁ r₂ hr => _ ** ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ : ℝ s : Set α x : α A : Set α r₁ r₂ : ℝ hr : r₁ < r₂ ⊢ Disjoint (frontier (thickening r₁ A)) (frontier (thickening r₂ A)) ** cases' le_total r₁ 0 with h₁ h₁ ** case inr ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ : ℝ s : Set α x : α A : Set α r₁ r₂ : ℝ hr : r₁ < r₂ h₁ : 0 ≤ r₁ ⊢ Disjoint (frontier (thickening r₁ A)) (frontier (thickening r₂ A)) ** refine' ((disjoint_singleton.2 fun h => hr.ne _).preimage _).mono (frontier_thickening_subset _) (frontier_thickening_subset _) ** case inr ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ : ℝ s : Set α x : α A : Set α r₁ r₂ : ℝ hr : r₁ < r₂ h₁ : 0 ≤ r₁ h : ENNReal.ofReal r₁ = ENNReal.ofReal r₂ ⊢ r₁ = r₂ ** apply_fun ENNReal.toReal at h ** case inr ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ : ℝ s : Set α x : α A : Set α r₁ r₂ : ℝ hr : r₁ < r₂ h₁ : 0 ≤ r₁ h : ENNReal.toReal (ENNReal.ofReal r₁) = ENNReal.toReal (ENNReal.ofReal r₂) ⊢ r₁ = r₂ ** rwa [ENNReal.toReal_ofReal h₁, ENNReal.toReal_ofReal (h₁.trans hr.le)] at h ** case inl ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ : ℝ s : Set α x : α A : Set α r₁ r₂ : ℝ hr : r₁ < r₂ h₁ : r₁ ≤ 0 ⊢ Disjoint (frontier (thickening r₁ A)) (frontier (thickening r₂ A)) ** simp [thickening_of_nonpos h₁] ** Qed
Metric.mem_thickening_iff ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α δ : ℝ s : Set α x✝ : α X : Type u inst✝ : PseudoMetricSpace X E : Set X x : X ⊢ x ∈ thickening δ E ↔ ∃ z, z ∈ E ∧ dist x z < δ ** have key_iff : ∀ z : X, edist x z < ENNReal.ofReal δ ↔ dist x z < δ := fun z ↦ by rw [dist_edist, lt_ofReal_iff_toReal_lt (edist_ne_top _ _)] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α δ : ℝ s : Set α x✝ : α X : Type u inst✝ : PseudoMetricSpace X E : Set X x : X key_iff : ∀ (z : X), edist x z < ENNReal.ofReal δ ↔ dist x z < δ ⊢ x ∈ thickening δ E ↔ ∃ z, z ∈ E ∧ dist x z < δ ** simp_rw [mem_thickening_iff_exists_edist_lt, key_iff] ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α δ : ℝ s : Set α x✝ : α X : Type u inst✝ : PseudoMetricSpace X E : Set X x z : X ⊢ edist x z < ENNReal.ofReal δ ↔ dist x z < δ ** rw [dist_edist, lt_ofReal_iff_toReal_lt (edist_ne_top _ _)] ** Qed
Metric.thickening_singleton ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α δ✝ : ℝ s : Set α x✝ : α X : Type u inst✝ : PseudoMetricSpace X δ : ℝ x : X ⊢ thickening δ {x} = ball x δ ** ext ** case h ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α δ✝ : ℝ s : Set α x✝¹ : α X : Type u inst✝ : PseudoMetricSpace X δ : ℝ x x✝ : X ⊢ x✝ ∈ thickening δ {x} ↔ x✝ ∈ ball x δ ** simp [mem_thickening_iff] ** Qed
Metric.ball_subset_thickening ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α δ✝ : ℝ s : Set α x✝ : α X : Type u inst✝ : PseudoMetricSpace X x : X E : Set X hx : x ∈ E δ : ℝ ⊢ ball x δ ⊆ thickening δ {x} ** simp [Subset.rfl] ** Qed
Metric.thickening_eq_biUnion_ball ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α δ✝ : ℝ s : Set α x : α X : Type u inst✝ : PseudoMetricSpace X δ : ℝ E : Set X ⊢ thickening δ E = ⋃ x ∈ E, ball x δ ** ext x ** case h ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α δ✝ : ℝ s : Set α x✝ : α X : Type u inst✝ : PseudoMetricSpace X δ : ℝ E : Set X x : X ⊢ x ∈ thickening δ E ↔ x ∈ ⋃ x ∈ E, ball x δ ** simp only [mem_iUnion₂, exists_prop] ** case h ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α δ✝ : ℝ s : Set α x✝ : α X : Type u inst✝ : PseudoMetricSpace X δ : ℝ E : Set X x : X ⊢ x ∈ thickening δ E ↔ ∃ i, i ∈ E ∧ x ∈ ball i δ ** exact mem_thickening_iff ** Qed
Bornology.IsBounded.thickening ** ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α δ✝ : ℝ s : Set α x : α X : Type u inst✝ : PseudoMetricSpace X δ : ℝ E : Set X h : Bornology.IsBounded E ⊢ Bornology.IsBounded (thickening δ E) ** rcases E.eq_empty_or_nonempty with rfl | ⟨x, hx⟩ ** case inl ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α δ✝ : ℝ s : Set α x : α X : Type u inst✝ : PseudoMetricSpace X δ : ℝ h : Bornology.IsBounded ∅ ⊢ Bornology.IsBounded (thickening δ ∅) ** simp ** case inr.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α δ✝ : ℝ s : Set α x✝ : α X : Type u inst✝ : PseudoMetricSpace X δ : ℝ E : Set X h : Bornology.IsBounded E x : X hx : x ∈ E ⊢ Bornology.IsBounded (thickening δ E) ** refine (isBounded_iff_subset_closedBall x).2 ⟨δ + diam E, fun y hy ↦ ?_⟩ ** case inr.intro ι : Sort u_1 α : Type u β : Type v inst✝¹ : PseudoEMetricSpace α δ✝ : ℝ s : Set α x✝ : α X : Type u inst✝ : PseudoMetricSpace X δ : ℝ E : Set X h : Bornology.IsBounded E x : X hx : x ∈ E y : X hy : y ∈ thickening δ E ⊢ y ∈ closedBall x (δ + diam E) ** calc dist y x ≤ infDist y E + diam E := dist_le_infDist_add_diam (x := y) h hx _ ≤ δ + diam E := add_le_add_right ((mem_thickening_iff_infDist_lt ⟨x, hx⟩).1 hy).le _ ** Qed
Metric.mem_cthickening_of_dist_le ** ι : Sort u_1 α✝ : Type u β : Type v inst✝¹ : PseudoEMetricSpace α✝ δ✝ ε : ℝ s t : Set α✝ x✝ : α✝ α : Type u_2 inst✝ : PseudoMetricSpace α x y : α δ : ℝ E : Set α h : y ∈ E h' : dist x y ≤ δ ⊢ x ∈ cthickening δ E ** apply mem_cthickening_of_edist_le x y δ E h ** ι : Sort u_1 α✝ : Type u β : Type v inst✝¹ : PseudoEMetricSpace α✝ δ✝ ε : ℝ s t : Set α✝ x✝ : α✝ α : Type u_2 inst✝ : PseudoMetricSpace α x y : α δ : ℝ E : Set α h : y ∈ E h' : dist x y ≤ δ ⊢ edist x y ≤ ENNReal.ofReal δ ** rw [edist_dist] ** ι : Sort u_1 α✝ : Type u β : Type v inst✝¹ : PseudoEMetricSpace α✝ δ✝ ε : ℝ s t : Set α✝ x✝ : α✝ α : Type u_2 inst✝ : PseudoMetricSpace α x y : α δ : ℝ E : Set α h : y ∈ E h' : dist x y ≤ δ ⊢ ENNReal.ofReal (dist x y) ≤ ENNReal.ofReal δ ** exact ENNReal.ofReal_le_ofReal h' ** Qed
Metric.cthickening_empty ** ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ✝ ε : ℝ s t : Set α x : α δ : ℝ ⊢ cthickening δ ∅ = ∅ ** simp only [cthickening, ENNReal.ofReal_ne_top, setOf_false, infEdist_empty, top_le_iff] ** Qed
Metric.cthickening_of_nonpos ** ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ✝ ε : ℝ s t : Set α x : α δ : ℝ hδ : δ ≤ 0 E : Set α ⊢ cthickening δ E = closure E ** ext x ** case h ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ✝ ε : ℝ s t : Set α x✝ : α δ : ℝ hδ : δ ≤ 0 E : Set α x : α ⊢ x ∈ cthickening δ E ↔ x ∈ closure E ** simp [mem_closure_iff_infEdist_zero, cthickening, ENNReal.ofReal_eq_zero.2 hδ] ** Qed
Metric.cthickening_max_zero ** ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ✝ ε : ℝ s t : Set α x : α δ : ℝ E : Set α ⊢ cthickening (max 0 δ) E = cthickening δ E ** cases le_total δ 0 <;> simp [cthickening_of_nonpos, *] ** Qed
Metric.cthickening_singleton ** ι : Sort u_1 α✝ : Type u β : Type v inst✝¹ : PseudoEMetricSpace α✝ δ✝ ε : ℝ s t : Set α✝ x✝ : α✝ α : Type u_2 inst✝ : PseudoMetricSpace α x : α δ : ℝ hδ : 0 ≤ δ ⊢ cthickening δ {x} = closedBall x δ ** ext y ** case h ι : Sort u_1 α✝ : Type u β : Type v inst✝¹ : PseudoEMetricSpace α✝ δ✝ ε : ℝ s t : Set α✝ x✝ : α✝ α : Type u_2 inst✝ : PseudoMetricSpace α x : α δ : ℝ hδ : 0 ≤ δ y : α ⊢ y ∈ cthickening δ {x} ↔ y ∈ closedBall x δ ** simp [cthickening, edist_dist, ENNReal.ofReal_le_ofReal_iff hδ] ** Qed
Metric.closedBall_subset_cthickening_singleton ** ι : Sort u_1 α✝ : Type u β : Type v inst✝¹ : PseudoEMetricSpace α✝ δ✝ ε : ℝ s t : Set α✝ x✝ : α✝ α : Type u_2 inst✝ : PseudoMetricSpace α x : α δ : ℝ ⊢ closedBall x δ ⊆ cthickening δ {x} ** rcases lt_or_le δ 0 with (hδ | hδ) ** case inl ι : Sort u_1 α✝ : Type u β : Type v inst✝¹ : PseudoEMetricSpace α✝ δ✝ ε : ℝ s t : Set α✝ x✝ : α✝ α : Type u_2 inst✝ : PseudoMetricSpace α x : α δ : ℝ hδ : δ < 0 ⊢ closedBall x δ ⊆ cthickening δ {x} ** simp only [closedBall_eq_empty.mpr hδ, empty_subset] ** case inr ι : Sort u_1 α✝ : Type u β : Type v inst✝¹ : PseudoEMetricSpace α✝ δ✝ ε : ℝ s t : Set α✝ x✝ : α✝ α : Type u_2 inst✝ : PseudoMetricSpace α x : α δ : ℝ hδ : 0 ≤ δ ⊢ closedBall x δ ⊆ cthickening δ {x} ** simp only [cthickening_singleton x hδ, Subset.rfl] ** Qed
Metric.thickening_subset_cthickening ** ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ✝ ε : ℝ s t : Set α x : α δ : ℝ E : Set α ⊢ thickening δ E ⊆ cthickening δ E ** intro x hx ** ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ✝ ε : ℝ s t : Set α x✝ : α δ : ℝ E : Set α x : α hx : x ∈ thickening δ E ⊢ x ∈ cthickening δ E ** rw [thickening, mem_setOf_eq] at hx ** ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ✝ ε : ℝ s t : Set α x✝ : α δ : ℝ E : Set α x : α hx : infEdist x E < ENNReal.ofReal δ ⊢ x ∈ cthickening δ E ** exact hx.le ** Qed
Bornology.IsBounded.cthickening ** ι : Sort u_1 α✝ : Type u β : Type v inst✝¹ : PseudoEMetricSpace α✝ δ✝ ε : ℝ s t : Set α✝ x : α✝ α : Type u_2 inst✝ : PseudoMetricSpace α δ : ℝ E : Set α h : Bornology.IsBounded E ⊢ Bornology.IsBounded (Metric.cthickening δ E) ** have : IsBounded (thickening (max (δ + 1) 1) E) := h.thickening ** ι : Sort u_1 α✝ : Type u β : Type v inst✝¹ : PseudoEMetricSpace α✝ δ✝ ε : ℝ s t : Set α✝ x : α✝ α : Type u_2 inst✝ : PseudoMetricSpace α δ : ℝ E : Set α h : Bornology.IsBounded E this : Bornology.IsBounded (thickening (max (δ + 1) 1) E) ⊢ Bornology.IsBounded (Metric.cthickening δ E) ** apply this.subset ** ι : Sort u_1 α✝ : Type u β : Type v inst✝¹ : PseudoEMetricSpace α✝ δ✝ ε : ℝ s t : Set α✝ x : α✝ α : Type u_2 inst✝ : PseudoMetricSpace α δ : ℝ E : Set α h : Bornology.IsBounded E this : Bornology.IsBounded (thickening (max (δ + 1) 1) E) ⊢ Metric.cthickening δ E ⊆ thickening (max (δ + 1) 1) E ** exact cthickening_subset_thickening' (zero_lt_one.trans_le (le_max_right _ _)) ((lt_add_one _).trans_le (le_max_left _ _)) _ ** Qed
Metric.closure_subset_cthickening ** ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ✝ ε : ℝ s t : Set α x : α δ : ℝ E : Set α ⊢ closure E ⊆ cthickening δ E ** rw [← cthickening_of_nonpos (min_le_right δ 0)] ** ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ✝ ε : ℝ s t : Set α x : α δ : ℝ E : Set α ⊢ cthickening (min δ 0) E ⊆ cthickening δ E ** exact cthickening_mono (min_le_left δ 0) E ** Qed
Metric.closure_subset_thickening ** ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ✝ ε : ℝ s t : Set α x : α δ : ℝ δ_pos : 0 < δ E : Set α ⊢ closure E ⊆ thickening δ E ** rw [← cthickening_zero] ** ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ✝ ε : ℝ s t : Set α x : α δ : ℝ δ_pos : 0 < δ E : Set α ⊢ cthickening 0 E ⊆ thickening δ E ** exact cthickening_subset_thickening' δ_pos δ_pos E ** Qed
Metric.thickening_union ** ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ✝ ε : ℝ s✝ t✝ : Set α x : α δ : ℝ s t : Set α ⊢ thickening δ (s ∪ t) = thickening δ s ∪ thickening δ t ** simp_rw [thickening, infEdist_union, inf_eq_min, min_lt_iff, setOf_or] ** Qed
Metric.cthickening_union ** ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ✝ ε : ℝ s✝ t✝ : Set α x : α δ : ℝ s t : Set α ⊢ cthickening δ (s ∪ t) = cthickening δ s ∪ cthickening δ t ** simp_rw [cthickening, infEdist_union, inf_eq_min, min_le_iff, setOf_or] ** Qed
Metric.thickening_iUnion ** ι : Sort u_1 α : Type u β : Type v inst✝ : PseudoEMetricSpace α δ✝ ε : ℝ s t : Set α x : α δ : ℝ f : ι → Set α ⊢ thickening δ (⋃ i, f i) = ⋃ i, thickening δ (f i) ** simp_rw [thickening, infEdist_iUnion, iInf_lt_iff, setOf_exists] ** Qed