Ltac paco_pre3 := let X := fresh "_paco_X_" in
generalize _paco_mark_cons; repeat intro;
apply _paco_pre3; intro X;
match goal with
| |- _ ?e0 ?e1 ?e2 => unfold X; clear X; paco_cont3 e0 e1 e2
end.Ltac paco_post_match3 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 4
*)

Ltac paco_cont4 e0 e1 e2 e3 :=
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
let x3 := fresh "_paco_v_" in let EQ3 := fresh "_paco_EQ_" in
paco_convert e3 x3 EQ3;
paco_convert e2 x2 EQ2;
paco_convert e1 x1 EQ1;
paco_convert e0 x0 EQ0;
intros x0 EQ0;
intros x1 EQ1;
intros x2 EQ2;
intros x3 EQ3;
generalize (conj EQ0 (conj EQ1 (conj EQ2 EQ3))); clear EQ0 EQ1 EQ2 EQ3;
move x0 at top; move x1 at top; move x2 at top; move x3 at top;
paco_generalize_hyp _paco_mark; revert x0 x1 x2 x3.

Lemma _paco_pre4: forall T0 T1 T2 T3 (gf: rel4 T0 T1 T2 T3) x0 x1 x2 x3 (X: let gf' := gf in gf' x0 x1 x2 x3), gf x0 x1 x2 x3.