@@ -198,25 +198,48 @@ def connected_component_in (F : set α) (x : F) : set α := coe '' (connected_co
198
198
theorem mem_connected_component {x : α} : x ∈ connected_component x :=
199
199
mem_sUnion_of_mem (mem_singleton x) ⟨is_connected_singleton.is_preconnected, mem_singleton x⟩
200
200
201
+ theorem is_preconnected_connected_component {x : α} : is_preconnected (connected_component x) :=
202
+ is_preconnected_sUnion x _ (λ _, and.right) (λ _, and.left)
203
+
201
204
theorem is_connected_connected_component {x : α} : is_connected (connected_component x) :=
202
- ⟨⟨x, mem_connected_component⟩, is_preconnected_sUnion x _ (λ _, and.right) (λ _, and.left) ⟩
205
+ ⟨⟨x, mem_connected_component⟩, is_preconnected_connected_component ⟩
203
206
204
- theorem subset_connected_component {x : α} {s : set α} (H1 : is_preconnected s) (H2 : x ∈ s) :
205
- s ⊆ connected_component x :=
207
+ theorem is_preconnected. subset_connected_component {x : α} {s : set α}
208
+ (H1 : is_preconnected s) (H2 : x ∈ s) : s ⊆ connected_component x :=
206
209
λ z hz, mem_sUnion_of_mem hz ⟨H1, H2⟩
207
210
211
+ theorem is_connected.subset_connected_component {x : α} {s : set α}
212
+ (H1 : is_connected s) (H2 : x ∈ s) : s ⊆ connected_component x :=
213
+ H1.2 .subset_connected_component H2
214
+
215
+ theorem connected_component_eq {x y : α} (h : y ∈ connected_component x) :
216
+ connected_component x = connected_component y :=
217
+ eq_of_subset_of_subset
218
+ (is_connected_connected_component.subset_connected_component h)
219
+ (is_connected_connected_component.subset_connected_component
220
+ (set.mem_of_mem_of_subset mem_connected_component
221
+ (is_connected_connected_component.subset_connected_component h)))
222
+
223
+ lemma connected_component_disjoint {x y : α} (h : connected_component x ≠ connected_component y) :
224
+ disjoint (connected_component x) (connected_component y) :=
225
+ set.disjoint_left.2 (λ a h1 h2, h
226
+ ((connected_component_eq h1).trans (connected_component_eq h2).symm))
227
+
208
228
theorem is_closed_connected_component {x : α} :
209
229
is_closed (connected_component x) :=
210
230
closure_eq_iff_is_closed.1 $ subset.antisymm
211
- (subset_connected_component
212
- is_connected_connected_component.closure.is_preconnected
231
+ (is_connected_connected_component.closure.subset_connected_component
213
232
(subset_closure mem_connected_component))
214
233
subset_closure
215
234
235
+ lemma continuous.image_connected_component_subset {β : Type *} [topological_space β] {f : α → β}
236
+ (h : continuous f) (a : α) : f '' connected_component a ⊆ connected_component (f a) :=
237
+ (is_connected_connected_component.image f h.continuous_on).subset_connected_component
238
+ ((mem_image f (connected_component a) (f a)).2 ⟨a, mem_connected_component, rfl⟩)
239
+
216
240
theorem irreducible_component_subset_connected_component {x : α} :
217
241
irreducible_component x ⊆ connected_component x :=
218
- subset_connected_component
219
- is_irreducible_irreducible_component.is_connected.is_preconnected
242
+ is_irreducible_irreducible_component.is_connected.subset_connected_component
220
243
mem_irreducible_component
221
244
222
245
/-- A preconnected space is one where there is no non-trivial open partition. -/
@@ -246,9 +269,9 @@ begin
246
269
split,
247
270
{ rintros ⟨h, ⟨x⟩⟩,
248
271
exactI ⟨x, eq_univ_of_univ_subset $
249
- subset_connected_component is_preconnected_univ (mem_univ x)⟩ },
272
+ is_preconnected_univ.subset_connected_component (mem_univ x)⟩ },
250
273
{ rintros ⟨x, h⟩,
251
- haveI : preconnected_space α := ⟨by {rw ← h, exact is_connected_connected_component. 2 }⟩,
274
+ haveI : preconnected_space α := ⟨by { rw ← h, exact is_preconnected_connected_component }⟩,
252
275
exact ⟨⟨x⟩⟩ }
253
276
end
254
277
@@ -489,6 +512,116 @@ begin
489
512
exact h,
490
513
end
491
514
515
+ /-- The preimage of a connected component is connected if the function has connected fibers
516
+ and a subset is closed iff the preimage is. -/
517
+ lemma preimage_connected_component_connected {β : Type *} [topological_space β] {f : α → β}
518
+ (connected_fibers : ∀ t : β, is_connected (f ⁻¹' {t}))
519
+ (hcl : ∀ (T : set β), is_closed T ↔ is_closed (f ⁻¹' T)) (t : β) :
520
+ is_connected (f ⁻¹' connected_component t) :=
521
+ begin
522
+ -- The following proof is essentially https://stacks.math.columbia.edu/tag/0377
523
+ -- although the statement is slightly different
524
+ have hf : function.surjective f := function.surjective.of_comp (λ t : β, (connected_fibers t).1 ),
525
+
526
+ split,
527
+ { cases hf t with s hs,
528
+ use s,
529
+ rw [mem_preimage, hs],
530
+ exact mem_connected_component },
531
+
532
+ have hT : is_closed (f ⁻¹' connected_component t) :=
533
+ (hcl (connected_component t)).1 is_closed_connected_component,
534
+
535
+ -- To show it's preconnected we decompose (f ⁻¹' connected_component t) as a subset of two
536
+ -- closed disjoint sets in α. We want to show that it's a subset of either.
537
+ rw is_preconnected_iff_subset_of_fully_disjoint_closed hT,
538
+ intros u v hu hv huv uv_disj,
539
+
540
+ -- To do this we decompose connected_component t into T₁ and T₂
541
+ -- we will show that connected_component t is a subset of either and hence
542
+ -- (f ⁻¹' connected_component t) is a subset of u or v
543
+ let T₁ := {t' ∈ connected_component t | f ⁻¹' {t'} ⊆ u},
544
+ let T₂ := {t' ∈ connected_component t | f ⁻¹' {t'} ⊆ v},
545
+
546
+ have fiber_decomp : ∀ t' ∈ connected_component t, f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v,
547
+ { intros t' ht',
548
+ apply is_preconnected_iff_subset_of_disjoint_closed.1 (connected_fibers t').2 u v hu hv,
549
+ { exact subset.trans (hf.preimage_subset_preimage_iff.2 (singleton_subset_iff.2 ht')) huv },
550
+ rw uv_disj,
551
+ exact inter_empty _ },
552
+
553
+ have T₁_u : f ⁻¹' T₁ = (f ⁻¹' connected_component t) ∩ u,
554
+ { apply eq_of_subset_of_subset,
555
+ { rw ←bUnion_preimage_singleton,
556
+ refine bUnion_subset (λ t' ht', subset_inter _ ht'.2 ),
557
+ rw [hf.preimage_subset_preimage_iff, singleton_subset_iff],
558
+ exact ht'.1 },
559
+ rintros a ⟨hat, hau⟩,
560
+ constructor,
561
+ { exact mem_preimage.1 hat },
562
+ dsimp only,
563
+ cases fiber_decomp (f a) (mem_preimage.1 hat),
564
+ { exact h },
565
+ { exfalso,
566
+ rw ←not_nonempty_iff_eq_empty at uv_disj,
567
+ exact uv_disj (nonempty_of_mem (mem_inter hau (h rfl))) } },
568
+ -- This proof is exactly the same as the above (modulo some symmetry)
569
+ have T₂_v : f ⁻¹' T₂ = (f ⁻¹' connected_component t) ∩ v,
570
+ { apply eq_of_subset_of_subset,
571
+ { rw ←bUnion_preimage_singleton,
572
+ refine bUnion_subset (λ t' ht', subset_inter _ ht'.2 ),
573
+ rw [hf.preimage_subset_preimage_iff, singleton_subset_iff],
574
+ exact ht'.1 },
575
+ rintros a ⟨hat, hav⟩,
576
+ constructor,
577
+ { exact mem_preimage.1 hat },
578
+ dsimp only,
579
+ cases fiber_decomp (f a) (mem_preimage.1 hat),
580
+ { exfalso,
581
+ rw ←not_nonempty_iff_eq_empty at uv_disj,
582
+ exact uv_disj (nonempty_of_mem (mem_inter (h rfl) hav)) },
583
+ { exact h } },
584
+
585
+ -- Now we show T₁, T₂ are closed, cover connected_component t and are disjoint.
586
+ have hT₁ : is_closed T₁ := ((hcl T₁).2 (T₁_u.symm ▸ (is_closed_inter hT hu))),
587
+ have hT₂ : is_closed T₂ := ((hcl T₂).2 (T₂_v.symm ▸ (is_closed_inter hT hv))),
588
+
589
+ have T_decomp : connected_component t ⊆ T₁ ∪ T₂,
590
+ { intros t' ht',
591
+ rw mem_union t' T₁ T₂,
592
+ cases fiber_decomp t' ht' with htu htv,
593
+ { left, exact ⟨ht', htu⟩ },
594
+ right, exact ⟨ht', htv⟩ },
595
+
596
+ have T_disjoint : T₁ ∩ T₂ = ∅,
597
+ { rw ←image_preimage_eq (T₁ ∩ T₂) hf,
598
+ suffices : f ⁻¹' (T₁ ∩ T₂) = ∅,
599
+ { rw this , exact image_empty _ },
600
+ rw [preimage_inter, T₁_u, T₂_v],
601
+ rw inter_comm at uv_disj,
602
+ conv
603
+ { congr,
604
+ rw [inter_assoc],
605
+ congr, skip,
606
+ rw [←inter_assoc, inter_comm, ←inter_assoc, uv_disj, empty_inter], },
607
+ exact inter_empty _ },
608
+
609
+ -- Now we do cases on whether (connected_component t) is a subset of T₁ or T₂ to show
610
+ -- that the preimage is a subset of u or v.
611
+ cases (is_preconnected_iff_subset_of_fully_disjoint_closed is_closed_connected_component).1
612
+ is_preconnected_connected_component T₁ T₂ hT₁ hT₂ T_decomp T_disjoint,
613
+ { left,
614
+ rw subset.antisymm_iff at T₁_u,
615
+ suffices : f ⁻¹' connected_component t ⊆ f ⁻¹' T₁,
616
+ { exact subset.trans (subset.trans this T₁_u.1 ) (inter_subset_right _ _) },
617
+ exact preimage_mono h },
618
+ right,
619
+ rw subset.antisymm_iff at T₂_v,
620
+ suffices : f ⁻¹' connected_component t ⊆ f ⁻¹' T₂,
621
+ { exact subset.trans (subset.trans this T₂_v.1 ) (inter_subset_right _ _) },
622
+ exact preimage_mono h,
623
+ end
624
+
492
625
end preconnected
493
626
494
627
section totally_disconnected
@@ -528,6 +661,61 @@ instance subtype.totally_disconnected_space {α : Type*} {p : α → Prop} [topo
528
661
totally_disconnected_space.is_totally_disconnected_univ (subtype.val '' s) (set.subset_univ _)
529
662
((is_preconnected.image h2 _) (continuous.continuous_on (@continuous_subtype_val _ _ p))))⟩
530
663
664
+ /-- A space is totally disconnected iff its connected components are subsingletons. -/
665
+ lemma totally_disconnected_space_iff_connected_component_subsingleton :
666
+ totally_disconnected_space α ↔ ∀ x : α, subsingleton (connected_component x) :=
667
+ begin
668
+ split,
669
+ { intros h x,
670
+ apply h.1 ,
671
+ { exact subset_univ _ },
672
+ exact is_preconnected_connected_component },
673
+ intro h, constructor,
674
+ intros s s_sub hs,
675
+ rw subsingleton_coe,
676
+ by_cases s.nonempty,
677
+ { choose x hx using h,
678
+ have H := h x,
679
+ rw subsingleton_coe at H,
680
+ exact H.mono (hs.subset_connected_component hx) },
681
+ rw not_nonempty_iff_eq_empty at h,
682
+ rw h,
683
+ exact subsingleton_empty,
684
+ end
685
+
686
+ /-- A space is totally disconnected iff its connected components are singletons. -/
687
+ lemma totally_disconnected_space_iff_connected_component_singleton :
688
+ totally_disconnected_space α ↔ ∀ x : α, connected_component x = {x} :=
689
+ begin
690
+ split,
691
+ { intros h x,
692
+ rw totally_disconnected_space_iff_connected_component_subsingleton at h,
693
+ specialize h x,
694
+ rw subsingleton_coe at h,
695
+ rw h.eq_singleton_of_mem,
696
+ exact mem_connected_component },
697
+ intro h,
698
+ rw totally_disconnected_space_iff_connected_component_subsingleton,
699
+ intro x,
700
+ rw [h x, subsingleton_coe],
701
+ exact subsingleton_singleton,
702
+ end
703
+
704
+ /-- The image of a connected component in a totally disconnected space is a singleton. -/
705
+ @[simp] lemma continuous.image_connected_component_eq_singleton {β : Type *} [topological_space β]
706
+ [totally_disconnected_space β] {f : α → β} (h : continuous f) (a : α) :
707
+ f '' connected_component a = {f a} :=
708
+ begin
709
+ have ha : subsingleton (f '' connected_component a),
710
+ { apply _inst_3.1 ,
711
+ { exact subset_univ _ },
712
+ apply is_preconnected_connected_component.image,
713
+ exact h.continuous_on },
714
+ rw subsingleton_coe at ha,
715
+ rw ha.eq_singleton_of_mem,
716
+ exact ⟨a, mem_connected_component, refl (f a)⟩,
717
+ end
718
+
531
719
end totally_disconnected
532
720
533
721
section totally_separated
@@ -568,3 +756,113 @@ instance totally_separated_space.of_discrete
568
756
⟨λ a _ b _ h, ⟨{b}ᶜ, {b}, is_open_discrete _, is_open_discrete _, by simpa⟩⟩
569
757
570
758
end totally_separated
759
+
760
+ section connected_component_setoid
761
+
762
+ /-- The setoid of connected components of a topological space -/
763
+ def connected_component_setoid (α : Type *) [topological_space α] : setoid α :=
764
+ ⟨λ x y, connected_component x = connected_component y,
765
+ ⟨λ x, by trivial, λ x y h1, h1.symm, λ x y z h1 h2, h1.trans h2⟩⟩
766
+ -- see Note [lower instance priority]
767
+ local attribute [instance, priority 100 ] connected_component_setoid
768
+
769
+ lemma connected_component_rel_iff {x y : α} : ⟦x⟧ = ⟦y⟧ ↔
770
+ connected_component x = connected_component y :=
771
+ ⟨λ h, quotient.exact h, λ h, quotient.sound h⟩
772
+
773
+ /-- The quotient of a space by its connected components -/
774
+ def pi0 (α : Type u) [topological_space α] := quotient (connected_component_setoid α)
775
+
776
+ localized " notation `π₀` := pi0" in topological_space
777
+
778
+ instance [inhabited α] : inhabited (π₀ α) := ⟨quotient.mk (default _)⟩
779
+ instance pi0.topological_space : topological_space (π₀ α) := quotient.topological_space
780
+
781
+ lemma continuous.image_eq_of_equiv {β : Type *} [topological_space β] [totally_disconnected_space β]
782
+ {f : α → β} (h : continuous f) (a b : α) (hab : a ≈ b) : f a = f b :=
783
+ singleton_eq_singleton_iff.1 $
784
+ h.image_connected_component_eq_singleton a ▸
785
+ h.image_connected_component_eq_singleton b ▸ hab ▸ rfl
786
+
787
+ /-- The lift to `π₀ α` of a continuous map from `α` to a totally disconnected space -/
788
+ def continuous.pi0_lift {β : Type *} [topological_space β] [totally_disconnected_space β] {f : α → β}
789
+ (h : continuous f) : π₀ α → β :=
790
+ quotient.lift f h.image_eq_of_equiv
791
+
792
+ @[continuity] lemma continuous.pi0_lift_continuous {β : Type *} [topological_space β]
793
+ [totally_disconnected_space β] {f : α → β} (h : continuous f) : continuous h.pi0_lift :=
794
+ continuous_quotient_lift h.image_eq_of_equiv h
795
+
796
+ @[simp] lemma continuous.pi0_lift_factors {β : Type *} [topological_space β]
797
+ [totally_disconnected_space β] {f : α → β} (h : continuous f) :
798
+ h.pi0_lift ∘ quotient.mk = f := rfl
799
+
800
+ lemma continuous.pi0_lift_unique {β : Type *} [topological_space β] [totally_disconnected_space β]
801
+ {f : α → β} (h : continuous f) (g : π₀ α → β) (hg : g ∘ quotient.mk = f) : g = h.pi0_lift :=
802
+ by { subst hg, ext1 x, exact quotient.induction_on x (λ a, refl _) }
803
+
804
+ lemma pi0_lift_unique' {β : Type *} (g₁ : π₀ α → β) (g₂ : π₀ α → β)
805
+ (hg : g₁ ∘ quotient.mk = g₂ ∘ quotient.mk ) : g₁ = g₂ :=
806
+ begin
807
+ ext1 x,
808
+ refine quotient.induction_on x (λ a, _),
809
+ change (g₁ ∘ quotient.mk) a = (g₂ ∘ quotient.mk) a,
810
+ rw hg,
811
+ end
812
+
813
+ /-- The preimage of a singleton in `π₀` is the connected component of an element in the
814
+ equivalence class. -/
815
+ lemma pi0_preimage_singleton {t : α} : connected_component t = quotient.mk ⁻¹' {⟦t⟧} :=
816
+ begin
817
+ apply set.eq_of_subset_of_subset; intros a ha,
818
+ { have H : ⟦a⟧ = ⟦t⟧ := quotient.sound (connected_component_eq ha).symm,
819
+ rw [mem_preimage, H],
820
+ exact mem_singleton ⟦t⟧ },
821
+ rw [mem_preimage, mem_singleton_iff] at ha,
822
+ have ha' : connected_component a = connected_component t := quotient.exact ha,
823
+ rw ←ha',
824
+ exact mem_connected_component,
825
+ end
826
+
827
+ /-- The preimage of the image of a set under the quotient map to `π₀ α` is the union of the
828
+ connected components of the elements in it. -/
829
+ lemma pi0_preimage_image (U : set α) :
830
+ quotient.mk ⁻¹' (quotient.mk '' U) = ⋃ (x : α) (h : x ∈ U), connected_component x :=
831
+ begin
832
+ apply set.eq_of_subset_of_subset,
833
+ { rintros a ⟨b, hb, hab⟩,
834
+ refine mem_Union.2 ⟨b, mem_Union.2 ⟨hb, _⟩⟩,
835
+ rw connected_component_rel_iff.1 hab,
836
+ exact mem_connected_component },
837
+ refine Union_subset (λ a, Union_subset (λ ha, _)),
838
+ rw [pi0_preimage_singleton, (surjective_quotient_mk _).preimage_subset_preimage_iff,
839
+ singleton_subset_iff],
840
+ exact ⟨a, ha, refl _⟩,
841
+ end
842
+
843
+ instance pi0.totally_disconnected_space :
844
+ totally_disconnected_space (π₀ α) :=
845
+ begin
846
+ rw totally_disconnected_space_iff_connected_component_singleton,
847
+ refine λ x, quotient.induction_on x (λ a, _),
848
+ apply eq_of_subset_of_subset _ (singleton_subset_iff.2 mem_connected_component),
849
+ rw subset_singleton_iff,
850
+ refine λ x, quotient.induction_on x (λ b hb, _),
851
+ rw [connected_component_rel_iff, connected_component_eq],
852
+ suffices : is_preconnected (quotient.mk ⁻¹' connected_component ⟦a⟧),
853
+ { apply mem_of_subset_of_mem (this.subset_connected_component hb),
854
+ exact mem_preimage.2 mem_connected_component },
855
+ apply (@preimage_connected_component_connected _ _ _ _ _ _ _ _).2 ,
856
+ { refine λ t, quotient.induction_on t (λ s, _),
857
+ rw ←pi0_preimage_singleton,
858
+ exact is_connected_connected_component },
859
+ refine λ T, ⟨λ hT, hT.preimage continuous_quotient_mk, λ hT, _⟩,
860
+ rwa [←is_open_compl_iff, ←preimage_compl, quotient_map_quotient_mk.is_open_preimage] at hT,
861
+ end
862
+
863
+ /-- Functoriality of `π₀` -/
864
+ def continuous.pi0_map {β : Type *} [topological_space β] {f : α → β} (h : continuous f) :
865
+ π₀ α → π₀ β :=
866
+ continuous.pi0_lift (continuous_quotient_mk.comp h)
867
+
868
+ end connected_component_setoid
0 commit comments