@@ -664,24 +664,34 @@ end disjoint
664
664
theorem set.disjoint_diff {a b : set α} : disjoint a (b \ a) :=
665
665
disjoint_iff.2 (inter_diff_self _ _)
666
666
667
- section
668
- open set
669
- set_option eqn_compiler.zeta true
667
+ namespace set
668
+ variables (t : α → set β)
670
669
671
- noncomputable def set.bUnion_eq_sigma_of_disjoint {α β} {s : set α} {t : α → set β}
672
- (h : pairwise_on s (disjoint on t)) : (⋃i∈s, t i) ≃ (Σi:s, t i.val) :=
673
- let f : (Σi:s, t i.val) → (⋃i∈s, t i) := λ⟨⟨a, ha⟩, ⟨b, hb⟩⟩, ⟨b, mem_bUnion ha hb⟩ in
674
- have injective f,
675
- from assume ⟨⟨a₁, ha₁⟩, ⟨b₁, hb₁⟩⟩ ⟨⟨a₂, ha₂⟩, ⟨b₂, hb₂⟩⟩ eq,
670
+ def sigma_to_Union (x : Σi, t i) : (⋃i, t i) := ⟨x.2 , mem_Union.2 ⟨x.1 , x.2 .2 ⟩⟩
671
+
672
+ lemma surjective_sigma_to_Union : surjective (sigma_to_Union t)
673
+ | ⟨b, hb⟩ := have ∃a, b ∈ t a, by simpa using hb, let ⟨a, hb⟩ := this in ⟨⟨a, ⟨b, hb⟩⟩, rfl⟩
674
+
675
+ lemma injective_sigma_to_Union (h : ∀i j, i ≠ j → disjoint (t i) (t j)) :
676
+ injective (sigma_to_Union t)
677
+ | ⟨a₁, ⟨b₁, h₁⟩⟩ ⟨a₂, ⟨b₂, h₂⟩⟩ eq :=
676
678
have b_eq : b₁ = b₂, from congr_arg subtype.val eq,
677
679
have a_eq : a₁ = a₂, from classical.by_contradiction $ assume ne,
678
- have b₁ ∈ t a₁ ∩ t a₂, from ⟨hb₁, b_eq.symm ▸ hb₂⟩,
679
- h _ ha₁ _ ha₂ ne this ,
680
- sigma.eq (subtype.eq a_eq) (subtype.eq $ by subst b_eq; subst a_eq),
681
- have surjective f,
682
- from assume ⟨b, hb⟩,
683
- have ∃a∈s, b ∈ t a, by simpa using hb,
684
- let ⟨a, ha, hb⟩ := this in ⟨⟨⟨a, ha⟩, ⟨b, hb⟩⟩, rfl⟩,
685
- (equiv.of_bijective ⟨‹injective f›, ‹surjective f›⟩).symm
680
+ have b₁ ∈ t a₁ ∩ t a₂, from ⟨h₁, b_eq.symm ▸ h₂⟩,
681
+ h _ _ ne this ,
682
+ sigma.eq a_eq $ subtype.eq $ by subst b_eq; subst a_eq
686
683
687
- end
684
+ lemma bijective_sigma_to_Union (h : ∀i j, i ≠ j → disjoint (t i) (t j)) :
685
+ bijective (sigma_to_Union t) :=
686
+ ⟨injective_sigma_to_Union t h, surjective_sigma_to_Union t⟩
687
+
688
+ noncomputable def Union_eq_sigma_of_disjoint {t : α → set β}
689
+ (h : ∀i j, i ≠ j → disjoint (t i) (t j)) : (⋃i, t i) ≃ (Σi, t i) :=
690
+ (equiv.of_bijective $ bijective_sigma_to_Union t h).symm
691
+
692
+ noncomputable def bUnion_eq_sigma_of_disjoint {s : set α} {t : α → set β}
693
+ (h : pairwise_on s (disjoint on t)) : (⋃i∈s, t i) ≃ (Σi:s, t i.val) :=
694
+ equiv.trans (equiv.set_congr (bUnion_eq_Union _ _)) $ Union_eq_sigma_of_disjoint $
695
+ assume ⟨i, hi⟩ ⟨j, hj⟩ ne, h _ hi _ hj $ assume eq, ne $ subtype.eq eq
696
+
697
+ end set
0 commit comments