Definition compact_sum_map {X: Type} {F F0: X -> Type} (l: list X)
(f: ListType (map (fun x => F x -> F0 x) l)): compact_sum (map F l) -> compact_sum (map F0 l).

(* Specifications: *)
Lemma compact_sum_map_single: forall {X: Type} {F F0: X -> Type} (x: X)
(f: F x -> F0 x) (v: F x),
compact_sum_map (x :: nil) (Cons f Nil) v = f v.
Lemma compact_sum_map_cons_inl: forall {X: Type} {F F0: X -> Type} (x x0: X) (l: list X)
(f: F x -> F0 x) (fl: ListType (map (fun x => F x -> F0 x) (x0 :: l)))
(v: F x),
compact_sum_map (x :: x0 :: l) (Cons f fl) (inl v) = inl (f v).
Lemma compact_sum_map_cons_inr: forall {X: Type} {F F0: X -> Type} (x x0: X) (l: list X)
(f: F x -> F0 x) (fl: ListType (map (fun x => F x -> F0 x) (x0 :: l)))
(vl: compact_sum (map F (x0 :: l))),
compact_sum_map (x :: x0 :: l) (Cons f fl) (inr vl) = inr (compact_sum_map _ fl vl).