Require Export Families.
Require Export Image.
Set Implicit Arguments.
Section IndexedFamilies.
Variable A T:Type.
Definition IndexedFamily := A -> Ensemble T.
Variable F:IndexedFamily.
Inductive IndexedUnion : Ensemble T :=
| indexed_union_intro: forall (a:A) (x:T),
In (F a) x -> In IndexedUnion x.
Inductive IndexedIntersection : Ensemble T :=
| indexed_intersection_intro: forall (x:T),
(forall a:A, In (F a) x) -> In IndexedIntersection x.
End IndexedFamilies.
Section IndexedFamilyFacts.

(* Specifications: *)
(* unions and intersections over subsets of the index set *)
Lemma sub_indexed_union: forall {A B T:Type} (f:A->B)
(F:IndexedFamily B T),
let subF := (fun a:A => F (f a)) in
Included (IndexedUnion subF) (IndexedUnion F).
Lemma sub_indexed_intersection: forall {A B T:Type} (f:A->B)
(F:IndexedFamily B T),
let subF := (fun a:A => F (f a)) in
Included (IndexedIntersection F) (IndexedIntersection subF).
Lemma empty_indexed_intersection: forall {T:Type}
(F:IndexedFamily False T),
IndexedIntersection F = Full_set.
Lemma empty_indexed_union: forall {T:Type}
(F:IndexedFamily False T),
IndexedUnion F = Empty_set.