Fixpoint zip {X} (f1 f2 : nat -> X) n :=
  match n with
  | O => f1 O
  | S O => f2 0
  | S (S n) => zip (fun n => f1 (S n)) (fun n => f2 (S n)) n
  end.

Lemma ramsey_inf_bin {X} (A1 A2 : X -> Prop) (P : nat -> X -> Prop) : (forall P, P \/ ~P) -> infinite (fun n => exists x, (A1 x \/ A2 x) /\ P n x) -> infinite (fun n => exists x, A1 x /\ P n x) \/ infinite (fun n => exists x, A2 x /\ P n x).