Section dimension_one.
Variable A : nat -> Prop.
Variable YA : (nat -> nat) -> nat.
Definition FYA (x n : nat) := n + S (enumerate YA x).
unfold increasing, FYA in |- *.
intros; apply plus_lt_compat_r; trivial with arith.
Qed.
Hint Resolve increasing_FYA.
intro YAfull; unfold enumerate in |- *; simple induction x.
apply (YAfull (fun n : nat => n)).
unfold increasing in |- *; trivial with arith.
intros y H.
change (A (FYA y (YA (FYA y)))) in |- *.
apply YAfull; auto with arith.
Qed.
Variable B : nat -> Prop.
Variable YB : (nat -> nat) -> nat.
intro YBfull.
apply YBfull.
apply increasing_enumerate.
Qed.
intros YAfull YBfull; split.
apply enumerate_YA; trivial with arith.
apply YB_enumerate_YA; trivial with arith.
Qed.
End dimension_one.
Definition inter (A B : nat -> Prop) (n : nat) := A n /\ B n.
Definition combine (YA YB : (nat -> nat) -> nat) (f : nat -> nat) :=
enumerate (fun g : nat -> nat => YA (fun x : nat => f (g x)))
((fun g : nat -> nat => YB (fun x : nat => f (g x)))
(enumerate (fun g : nat -> nat => YA (fun x : nat => f (g x))))).

Theorem Ramsey1 :
forall (A B : nat -> Prop) (YA YB : (nat -> nat) -> nat),
full A YA -> full B YB -> full (inter A B) (combine YA YB).