Program Instance liftGenUnsized {A B} (f : A -> B) (g : G A)
`{Unsized _ g} : Unsized (liftGen f g).
Next Obligation.
by rewrite ! semLiftGenSize (unsized s1 s2).
Qed.
Program Instance liftGenMonotonic {A B} (f : A -> B) (g : G A)
`{SizeMonotonic _ g} : SizeMonotonic (liftGen f g).
Next Obligation.
rewrite ! semLiftGenSize. apply imset_incl. by apply monotonic.
Qed.

(* Specifications: *)
Lemma semLiftGen2Size {A1 A2 B} (f: A1 -> A2 -> B) (g1 : G A1) (g2 : G A2) s :
semGenSize (liftGen2 f g1 g2) s <-->
f @2: (semGenSize g1 s, semGenSize g2 s).
Lemma semLiftGen2SizeMonotonic {A1 A2 B} (f: A1 -> A2 -> B)
(g1 : G A1) (g2 : G A2)
`{SizeMonotonic _ g1} `{SizeMonotonic _ g2} :
semGen (liftGen2 f g1 g2) <--> f @2: (semGen g1, semGen g2).
Lemma semLiftGen2Unsized1 {A1 A2 B} (f: A1 -> A2 -> B)
(g1 : G A1) (g2 : G A2) `{Unsized _ g1}:
semGen (liftGen2 f g1 g2) <--> f @2: (semGen g1, semGen g2).
Lemma semLiftGen2Unsized2 {A1 A2 B} (f: A1 -> A2 -> B)
(g1 : G A1) (g2 : G A2) `{Unsized _ g2}:
semGen (liftGen2 f g1 g2) <--> f @2: (semGen g1, semGen g2).
Lemma semLiftGen3Size :
forall {A1 A2 A3 B} (f: A1 -> A2 -> A3 -> B)
(g1: G A1) (g2: G A2) (g3: G A3) size,
semGenSize (liftGen3 f g1 g2 g3) size <-->
fun b =>
exists a1, semGenSize g1 size a1 /\
(exists a2, semGenSize g2 size a2 /\
(exists a3, semGenSize g3 size a3 /\
(f a1 a2 a3) = b)).