Ltac paco_pre2 := let X := fresh "_paco_X_" in
generalize _paco_mark_cons; repeat intro;
apply _paco_pre2; intro X;
match goal with
| |- _ ?e0 ?e1 => unfold X; clear X; paco_cont2 e0 e1
end.Ltac paco_post_match2 INC tac1 tac2 :=
let cr := fresh "_paco_cr_" in intros cr INC; repeat (red in INC);
match goal with [H: ?x |- _] => match x with
| forall _ _, (pacoid _) _ _ -> _ => clear H; tac1 cr
| forall _ _, ?pr _ _ -> _ => paco_post_var INC pr cr; tac2 pr cr
| _ => tac1 cr
end end.(** *** Arity 3
*)

Ltac paco_cont3 e0 e1 e2 :=
let x0 := fresh "_paco_v_" in let EQ0 := fresh "_paco_EQ_" in
let x1 := fresh "_paco_v_" in let EQ1 := fresh "_paco_EQ_" in
let x2 := fresh "_paco_v_" in let EQ2 := fresh "_paco_EQ_" in
paco_convert e2 x2 EQ2;
paco_convert e1 x1 EQ1;
paco_convert e0 x0 EQ0;
intros x0 EQ0;
intros x1 EQ1;
intros x2 EQ2;
generalize (conj EQ0 (conj EQ1 EQ2)); clear EQ0 EQ1 EQ2;
move x0 at top; move x1 at top; move x2 at top;
paco_generalize_hyp _paco_mark; revert x0 x1 x2.

Lemma _paco_pre3: forall T0 T1 T2 (gf: rel3 T0 T1 T2) x0 x1 x2 (X: let gf' := gf in gf' x0 x1 x2), gf x0 x1 x2.