Metamath Proof Explorer


Theorem ramcl

Description: Ramsey's theorem: the Ramsey number is an integer for every finite coloring and set of upper bounds. (Contributed by Mario Carneiro, 23-Apr-2015)

Ref Expression
Assertion ramcl M 0 R Fin F : R 0 M Ramsey F 0

Proof

Step Hyp Ref Expression
1 nn0ex 0 V
2 simpr M 0 R Fin R Fin
3 elmapg 0 V R Fin F 0 R F : R 0
4 1 2 3 sylancr M 0 R Fin F 0 R F : R 0
5 oveq1 x = 0 x Ramsey f = 0 Ramsey f
6 5 eleq1d x = 0 x Ramsey f 0 0 Ramsey f 0
7 6 ralbidv x = 0 f 0 R x Ramsey f 0 f 0 R 0 Ramsey f 0
8 7 imbi2d x = 0 R Fin f 0 R x Ramsey f 0 R Fin f 0 R 0 Ramsey f 0
9 oveq1 x = m x Ramsey f = m Ramsey f
10 9 eleq1d x = m x Ramsey f 0 m Ramsey f 0
11 10 ralbidv x = m f 0 R x Ramsey f 0 f 0 R m Ramsey f 0
12 11 imbi2d x = m R Fin f 0 R x Ramsey f 0 R Fin f 0 R m Ramsey f 0
13 oveq1 x = m + 1 x Ramsey f = m + 1 Ramsey f
14 13 eleq1d x = m + 1 x Ramsey f 0 m + 1 Ramsey f 0
15 14 ralbidv x = m + 1 f 0 R x Ramsey f 0 f 0 R m + 1 Ramsey f 0
16 15 imbi2d x = m + 1 R Fin f 0 R x Ramsey f 0 R Fin f 0 R m + 1 Ramsey f 0
17 oveq1 x = M x Ramsey f = M Ramsey f
18 17 eleq1d x = M x Ramsey f 0 M Ramsey f 0
19 18 ralbidv x = M f 0 R x Ramsey f 0 f 0 R M Ramsey f 0
20 19 imbi2d x = M R Fin f 0 R x Ramsey f 0 R Fin f 0 R M Ramsey f 0
21 elmapi f 0 R f : R 0
22 0ramcl R Fin f : R 0 0 Ramsey f 0
23 21 22 sylan2 R Fin f 0 R 0 Ramsey f 0
24 23 ralrimiva R Fin f 0 R 0 Ramsey f 0
25 oveq2 f = g m Ramsey f = m Ramsey g
26 25 eleq1d f = g m Ramsey f 0 m Ramsey g 0
27 26 cbvralvw f 0 R m Ramsey f 0 g 0 R m Ramsey g 0
28 simpll R Fin m 0 f 0 R g 0 R m Ramsey g 0 R Fin
29 21 ad2antrl R Fin m 0 f 0 R g 0 R m Ramsey g 0 f : R 0
30 29 ffvelrnda R Fin m 0 f 0 R g 0 R m Ramsey g 0 k R f k 0
31 28 30 fsumnn0cl R Fin m 0 f 0 R g 0 R m Ramsey g 0 k R f k 0
32 eqeq2 x = 0 k R h k = x k R h k = 0
33 32 anbi2d x = 0 h : R 0 k R h k = x h : R 0 k R h k = 0
34 33 imbi1d x = 0 h : R 0 k R h k = x m + 1 Ramsey h 0 h : R 0 k R h k = 0 m + 1 Ramsey h 0
35 34 albidv x = 0 h h : R 0 k R h k = x m + 1 Ramsey h 0 h h : R 0 k R h k = 0 m + 1 Ramsey h 0
36 35 imbi2d x = 0 R Fin m 0 g 0 R m Ramsey g 0 h h : R 0 k R h k = x m + 1 Ramsey h 0 R Fin m 0 g 0 R m Ramsey g 0 h h : R 0 k R h k = 0 m + 1 Ramsey h 0
37 eqeq2 x = n k R h k = x k R h k = n
38 37 anbi2d x = n h : R 0 k R h k = x h : R 0 k R h k = n
39 38 imbi1d x = n h : R 0 k R h k = x m + 1 Ramsey h 0 h : R 0 k R h k = n m + 1 Ramsey h 0
40 39 albidv x = n h h : R 0 k R h k = x m + 1 Ramsey h 0 h h : R 0 k R h k = n m + 1 Ramsey h 0
41 40 imbi2d x = n R Fin m 0 g 0 R m Ramsey g 0 h h : R 0 k R h k = x m + 1 Ramsey h 0 R Fin m 0 g 0 R m Ramsey g 0 h h : R 0 k R h k = n m + 1 Ramsey h 0
42 eqeq2 x = n + 1 k R h k = x k R h k = n + 1
43 42 anbi2d x = n + 1 h : R 0 k R h k = x h : R 0 k R h k = n + 1
44 43 imbi1d x = n + 1 h : R 0 k R h k = x m + 1 Ramsey h 0 h : R 0 k R h k = n + 1 m + 1 Ramsey h 0
45 44 albidv x = n + 1 h h : R 0 k R h k = x m + 1 Ramsey h 0 h h : R 0 k R h k = n + 1 m + 1 Ramsey h 0
46 45 imbi2d x = n + 1 R Fin m 0 g 0 R m Ramsey g 0 h h : R 0 k R h k = x m + 1 Ramsey h 0 R Fin m 0 g 0 R m Ramsey g 0 h h : R 0 k R h k = n + 1 m + 1 Ramsey h 0
47 eqeq2 x = k R f k k R h k = x k R h k = k R f k
48 47 anbi2d x = k R f k h : R 0 k R h k = x h : R 0 k R h k = k R f k
49 48 imbi1d x = k R f k h : R 0 k R h k = x m + 1 Ramsey h 0 h : R 0 k R h k = k R f k m + 1 Ramsey h 0
50 49 albidv x = k R f k h h : R 0 k R h k = x m + 1 Ramsey h 0 h h : R 0 k R h k = k R f k m + 1 Ramsey h 0
51 50 imbi2d x = k R f k R Fin m 0 g 0 R m Ramsey g 0 h h : R 0 k R h k = x m + 1 Ramsey h 0 R Fin m 0 g 0 R m Ramsey g 0 h h : R 0 k R h k = k R f k m + 1 Ramsey h 0
52 simplll R Fin m 0 g 0 R m Ramsey g 0 h : R 0 R Fin
53 ffvelrn h : R 0 k R h k 0
54 53 adantll R Fin m 0 g 0 R m Ramsey g 0 h : R 0 k R h k 0
55 54 nn0red R Fin m 0 g 0 R m Ramsey g 0 h : R 0 k R h k
56 54 nn0ge0d R Fin m 0 g 0 R m Ramsey g 0 h : R 0 k R 0 h k
57 52 55 56 fsum00 R Fin m 0 g 0 R m Ramsey g 0 h : R 0 k R h k = 0 k R h k = 0
58 fvex h k V
59 58 rgenw k R h k V
60 mpteqb k R h k V k R h k = k R 0 k R h k = 0
61 59 60 ax-mp k R h k = k R 0 k R h k = 0
62 57 61 bitr4di R Fin m 0 g 0 R m Ramsey g 0 h : R 0 k R h k = 0 k R h k = k R 0
63 simpr R Fin m 0 g 0 R m Ramsey g 0 h : R 0 h : R 0
64 63 feqmptd R Fin m 0 g 0 R m Ramsey g 0 h : R 0 h = k R h k
65 fconstmpt R × 0 = k R 0
66 65 a1i R Fin m 0 g 0 R m Ramsey g 0 h : R 0 R × 0 = k R 0
67 64 66 eqeq12d R Fin m 0 g 0 R m Ramsey g 0 h : R 0 h = R × 0 k R h k = k R 0
68 62 67 bitr4d R Fin m 0 g 0 R m Ramsey g 0 h : R 0 k R h k = 0 h = R × 0
69 xpeq1 R = R × 0 = × 0
70 0xp × 0 =
71 69 70 eqtrdi R = R × 0 =
72 71 oveq2d R = m + 1 Ramsey R × 0 = m + 1 Ramsey
73 simpllr R Fin m 0 g 0 R m Ramsey g 0 h : R 0 m 0
74 peano2nn0 m 0 m + 1 0
75 73 74 syl R Fin m 0 g 0 R m Ramsey g 0 h : R 0 m + 1 0
76 ram0 m + 1 0 m + 1 Ramsey = m + 1
77 75 76 syl R Fin m 0 g 0 R m Ramsey g 0 h : R 0 m + 1 Ramsey = m + 1
78 72 77 sylan9eqr R Fin m 0 g 0 R m Ramsey g 0 h : R 0 R = m + 1 Ramsey R × 0 = m + 1
79 75 adantr R Fin m 0 g 0 R m Ramsey g 0 h : R 0 R = m + 1 0
80 78 79 eqeltrd R Fin m 0 g 0 R m Ramsey g 0 h : R 0 R = m + 1 Ramsey R × 0 0
81 75 adantr R Fin m 0 g 0 R m Ramsey g 0 h : R 0 R m + 1 0
82 simp-4l R Fin m 0 g 0 R m Ramsey g 0 h : R 0 R R Fin
83 simpr R Fin m 0 g 0 R m Ramsey g 0 h : R 0 R R
84 ramz m + 1 0 R Fin R m + 1 Ramsey R × 0 = 0
85 81 82 83 84 syl3anc R Fin m 0 g 0 R m Ramsey g 0 h : R 0 R m + 1 Ramsey R × 0 = 0
86 0nn0 0 0
87 85 86 eqeltrdi R Fin m 0 g 0 R m Ramsey g 0 h : R 0 R m + 1 Ramsey R × 0 0
88 80 87 pm2.61dane R Fin m 0 g 0 R m Ramsey g 0 h : R 0 m + 1 Ramsey R × 0 0
89 oveq2 h = R × 0 m + 1 Ramsey h = m + 1 Ramsey R × 0
90 89 eleq1d h = R × 0 m + 1 Ramsey h 0 m + 1 Ramsey R × 0 0
91 88 90 syl5ibrcom R Fin m 0 g 0 R m Ramsey g 0 h : R 0 h = R × 0 m + 1 Ramsey h 0
92 68 91 sylbid R Fin m 0 g 0 R m Ramsey g 0 h : R 0 k R h k = 0 m + 1 Ramsey h 0
93 92 expimpd R Fin m 0 g 0 R m Ramsey g 0 h : R 0 k R h k = 0 m + 1 Ramsey h 0
94 93 alrimiv R Fin m 0 g 0 R m Ramsey g 0 h h : R 0 k R h k = 0 m + 1 Ramsey h 0
95 ffn f : R 0 f Fn R
96 95 ad2antrl R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 f Fn R
97 ffnfv f : R f Fn R x R f x
98 97 baib f Fn R f : R x R f x
99 96 98 syl R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 f : R x R f x
100 simplr R Fin m 0 g 0 R m Ramsey g 0 n 0 m 0
101 100 ad2antrr R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R m 0
102 101 74 syl R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R m + 1 0
103 simp-4l R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R R Fin
104 simprr R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R f : R
105 nnssnn0 0
106 fss f : R 0 f : R 0
107 104 105 106 sylancl R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R f : R 0
108 101 nn0cnd R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R m
109 ax-1cn 1
110 pncan m 1 m + 1 - 1 = m
111 108 109 110 sylancl R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R m + 1 - 1 = m
112 111 oveq1d R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R m + 1 - 1 Ramsey x R m + 1 Ramsey y R if y = x f x 1 f y = m Ramsey x R m + 1 Ramsey y R if y = x f x 1 f y
113 oveq2 g = x R m + 1 Ramsey y R if y = x f x 1 f y m Ramsey g = m Ramsey x R m + 1 Ramsey y R if y = x f x 1 f y
114 113 eleq1d g = x R m + 1 Ramsey y R if y = x f x 1 f y m Ramsey g 0 m Ramsey x R m + 1 Ramsey y R if y = x f x 1 f y 0
115 simprl R Fin m 0 g 0 R m Ramsey g 0 n 0 g 0 R m Ramsey g 0
116 115 ad2antrr R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R g 0 R m Ramsey g 0
117 103 adantr R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R R Fin
118 117 mptexd R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R y R if y = x f x 1 f y V
119 simpllr R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R h h : R 0 k R h k = n m + 1 Ramsey h 0
120 104 ffvelrnda R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R f x
121 nnm1nn0 f x f x 1 0
122 120 121 syl R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R f x 1 0
123 122 adantr R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R y R f x 1 0
124 107 adantr R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R f : R 0
125 124 ffvelrnda R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R y R f y 0
126 123 125 ifcld R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R y R if y = x f x 1 f y 0
127 126 fmpttd R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R y R if y = x f x 1 f y : R 0
128 simplrr R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R f : R
129 simpr R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R x R
130 ffvelrn f : R k R f k
131 130 3ad2antl2 R Fin f : R x R k R f k
132 131 nncnd R Fin f : R x R k R f k
133 132 subid1d R Fin f : R x R k R f k 0 = f k
134 133 ifeq2d R Fin f : R x R k R if k = x f k 1 f k 0 = if k = x f k 1 f k
135 fveq2 k = x f k = f x
136 135 adantl R Fin f : R x R k R k = x f k = f x
137 136 oveq1d R Fin f : R x R k R k = x f k 1 = f x 1
138 137 ifeq1da R Fin f : R x R k R if k = x f k 1 f k = if k = x f x 1 f k
139 134 138 eqtr2d R Fin f : R x R k R if k = x f x 1 f k = if k = x f k 1 f k 0
140 ovif2 f k if k = x 1 0 = if k = x f k 1 f k 0
141 139 140 eqtr4di R Fin f : R x R k R if k = x f x 1 f k = f k if k = x 1 0
142 141 sumeq2dv R Fin f : R x R k R if k = x f x 1 f k = k R f k if k = x 1 0
143 simp1 R Fin f : R x R R Fin
144 0cn 0
145 109 144 ifcli if k = x 1 0
146 145 a1i R Fin f : R x R k R if k = x 1 0
147 143 132 146 fsumsub R Fin f : R x R k R f k if k = x 1 0 = k R f k k R if k = x 1 0
148 elsng k R k x k = x
149 148 ifbid k R if k x 1 0 = if k = x 1 0
150 149 sumeq2i k R if k x 1 0 = k R if k = x 1 0
151 simp3 R Fin f : R x R x R
152 151 snssd R Fin f : R x R x R
153 sumhash R Fin x R k R if k x 1 0 = x
154 143 152 153 syl2anc R Fin f : R x R k R if k x 1 0 = x
155 hashsng x R x = 1
156 151 155 syl R Fin f : R x R x = 1
157 154 156 eqtrd R Fin f : R x R k R if k x 1 0 = 1
158 150 157 eqtr3id R Fin f : R x R k R if k = x 1 0 = 1
159 158 oveq2d R Fin f : R x R k R f k k R if k = x 1 0 = k R f k 1
160 142 147 159 3eqtrd R Fin f : R x R k R if k = x f x 1 f k = k R f k 1
161 117 128 129 160 syl3anc R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R k R if k = x f x 1 f k = k R f k 1
162 simplrl R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R k R f k = n + 1
163 162 oveq1d R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R k R f k 1 = n + 1 - 1
164 simplrr R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 n 0
165 164 ad2antrr R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R n 0
166 165 nn0cnd R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R n
167 pncan n 1 n + 1 - 1 = n
168 166 109 167 sylancl R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R n + 1 - 1 = n
169 161 163 168 3eqtrd R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R k R if k = x f x 1 f k = n
170 127 169 jca R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R y R if y = x f x 1 f y : R 0 k R if k = x f x 1 f k = n
171 feq1 h = y R if y = x f x 1 f y h : R 0 y R if y = x f x 1 f y : R 0
172 fveq1 h = y R if y = x f x 1 f y h k = y R if y = x f x 1 f y k
173 equequ1 y = k y = x k = x
174 fveq2 y = k f y = f k
175 173 174 ifbieq2d y = k if y = x f x 1 f y = if k = x f x 1 f k
176 eqid y R if y = x f x 1 f y = y R if y = x f x 1 f y
177 ovex f x 1 V
178 fvex f k V
179 177 178 ifex if k = x f x 1 f k V
180 175 176 179 fvmpt k R y R if y = x f x 1 f y k = if k = x f x 1 f k
181 172 180 sylan9eq h = y R if y = x f x 1 f y k R h k = if k = x f x 1 f k
182 181 sumeq2dv h = y R if y = x f x 1 f y k R h k = k R if k = x f x 1 f k
183 182 eqeq1d h = y R if y = x f x 1 f y k R h k = n k R if k = x f x 1 f k = n
184 171 183 anbi12d h = y R if y = x f x 1 f y h : R 0 k R h k = n y R if y = x f x 1 f y : R 0 k R if k = x f x 1 f k = n
185 oveq2 h = y R if y = x f x 1 f y m + 1 Ramsey h = m + 1 Ramsey y R if y = x f x 1 f y
186 185 eleq1d h = y R if y = x f x 1 f y m + 1 Ramsey h 0 m + 1 Ramsey y R if y = x f x 1 f y 0
187 184 186 imbi12d h = y R if y = x f x 1 f y h : R 0 k R h k = n m + 1 Ramsey h 0 y R if y = x f x 1 f y : R 0 k R if k = x f x 1 f k = n m + 1 Ramsey y R if y = x f x 1 f y 0
188 187 spcgv y R if y = x f x 1 f y V h h : R 0 k R h k = n m + 1 Ramsey h 0 y R if y = x f x 1 f y : R 0 k R if k = x f x 1 f k = n m + 1 Ramsey y R if y = x f x 1 f y 0
189 118 119 170 188 syl3c R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R m + 1 Ramsey y R if y = x f x 1 f y 0
190 189 fmpttd R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R m + 1 Ramsey y R if y = x f x 1 f y : R 0
191 elmapg 0 V R Fin x R m + 1 Ramsey y R if y = x f x 1 f y 0 R x R m + 1 Ramsey y R if y = x f x 1 f y : R 0
192 1 103 191 sylancr R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R m + 1 Ramsey y R if y = x f x 1 f y 0 R x R m + 1 Ramsey y R if y = x f x 1 f y : R 0
193 190 192 mpbird R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R x R m + 1 Ramsey y R if y = x f x 1 f y 0 R
194 114 116 193 rspcdva R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R m Ramsey x R m + 1 Ramsey y R if y = x f x 1 f y 0
195 112 194 eqeltrd R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R m + 1 - 1 Ramsey x R m + 1 Ramsey y R if y = x f x 1 f y 0
196 peano2nn0 m + 1 - 1 Ramsey x R m + 1 Ramsey y R if y = x f x 1 f y 0 m + 1 - 1 Ramsey x R m + 1 Ramsey y R if y = x f x 1 f y + 1 0
197 195 196 syl R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R m + 1 - 1 Ramsey x R m + 1 Ramsey y R if y = x f x 1 f y + 1 0
198 nn0p1nn m 0 m + 1
199 100 198 syl R Fin m 0 g 0 R m Ramsey g 0 n 0 m + 1
200 199 ad2antrr R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R m + 1
201 equequ1 y = w y = x w = x
202 fveq2 y = w f y = f w
203 201 202 ifbieq2d y = w if y = x f x 1 f y = if w = x f x 1 f w
204 203 cbvmptv y R if y = x f x 1 f y = w R if w = x f x 1 f w
205 eqeq2 x = z w = x w = z
206 fveq2 x = z f x = f z
207 206 oveq1d x = z f x 1 = f z 1
208 205 207 ifbieq1d x = z if w = x f x 1 f w = if w = z f z 1 f w
209 208 mpteq2dv x = z w R if w = x f x 1 f w = w R if w = z f z 1 f w
210 204 209 eqtrid x = z y R if y = x f x 1 f y = w R if w = z f z 1 f w
211 210 oveq2d x = z m + 1 Ramsey y R if y = x f x 1 f y = m + 1 Ramsey w R if w = z f z 1 f w
212 211 cbvmptv x R m + 1 Ramsey y R if y = x f x 1 f y = z R m + 1 Ramsey w R if w = z f z 1 f w
213 200 103 104 212 190 195 ramub1 R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R m + 1 Ramsey f m + 1 - 1 Ramsey x R m + 1 Ramsey y R if y = x f x 1 f y + 1
214 ramubcl m + 1 0 R Fin f : R 0 m + 1 - 1 Ramsey x R m + 1 Ramsey y R if y = x f x 1 f y + 1 0 m + 1 Ramsey f m + 1 - 1 Ramsey x R m + 1 Ramsey y R if y = x f x 1 f y + 1 m + 1 Ramsey f 0
215 102 103 107 197 213 214 syl32anc R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R m + 1 Ramsey f 0
216 215 expr R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 k R f k = n + 1 f : R m + 1 Ramsey f 0
217 216 adantrl R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 f : R m + 1 Ramsey f 0
218 99 217 sylbird R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 x R f x m + 1 Ramsey f 0
219 rexnal x R ¬ f x ¬ x R f x
220 simprl R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 f : R 0
221 220 ffvelrnda R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 x R f x 0
222 elnn0 f x 0 f x f x = 0
223 221 222 sylib R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 x R f x f x = 0
224 223 ord R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 x R ¬ f x f x = 0
225 199 ad2antrr R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 m + 1
226 simp-4l R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 R Fin
227 225 226 220 3jca R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 m + 1 R Fin f : R 0
228 ramz2 m + 1 R Fin f : R 0 x R f x = 0 m + 1 Ramsey f = 0
229 227 228 sylan R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 x R f x = 0 m + 1 Ramsey f = 0
230 229 86 eqeltrdi R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 x R f x = 0 m + 1 Ramsey f 0
231 230 expr R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 x R f x = 0 m + 1 Ramsey f 0
232 224 231 syld R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 x R ¬ f x m + 1 Ramsey f 0
233 232 rexlimdva R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 x R ¬ f x m + 1 Ramsey f 0
234 219 233 syl5bir R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 ¬ x R f x m + 1 Ramsey f 0
235 218 234 pm2.61d R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 m + 1 Ramsey f 0
236 235 exp31 R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 m + 1 Ramsey f 0
237 236 alrimdv R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 f f : R 0 k R f k = n + 1 m + 1 Ramsey f 0
238 feq1 h = f h : R 0 f : R 0
239 fveq1 h = f h k = f k
240 239 sumeq2sdv h = f k R h k = k R f k
241 240 eqeq1d h = f k R h k = n + 1 k R f k = n + 1
242 238 241 anbi12d h = f h : R 0 k R h k = n + 1 f : R 0 k R f k = n + 1
243 oveq2 h = f m + 1 Ramsey h = m + 1 Ramsey f
244 243 eleq1d h = f m + 1 Ramsey h 0 m + 1 Ramsey f 0
245 242 244 imbi12d h = f h : R 0 k R h k = n + 1 m + 1 Ramsey h 0 f : R 0 k R f k = n + 1 m + 1 Ramsey f 0
246 245 cbvalvw h h : R 0 k R h k = n + 1 m + 1 Ramsey h 0 f f : R 0 k R f k = n + 1 m + 1 Ramsey f 0
247 237 246 syl6ibr R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 h h : R 0 k R h k = n + 1 m + 1 Ramsey h 0
248 247 anassrs R Fin m 0 g 0 R m Ramsey g 0 n 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 h h : R 0 k R h k = n + 1 m + 1 Ramsey h 0
249 248 expcom n 0 R Fin m 0 g 0 R m Ramsey g 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 h h : R 0 k R h k = n + 1 m + 1 Ramsey h 0
250 249 a2d n 0 R Fin m 0 g 0 R m Ramsey g 0 h h : R 0 k R h k = n m + 1 Ramsey h 0 R Fin m 0 g 0 R m Ramsey g 0 h h : R 0 k R h k = n + 1 m + 1 Ramsey h 0
251 36 41 46 51 94 250 nn0ind k R f k 0 R Fin m 0 g 0 R m Ramsey g 0 h h : R 0 k R h k = k R f k m + 1 Ramsey h 0
252 251 com12 R Fin m 0 g 0 R m Ramsey g 0 k R f k 0 h h : R 0 k R h k = k R f k m + 1 Ramsey h 0
253 252 adantrl R Fin m 0 f 0 R g 0 R m Ramsey g 0 k R f k 0 h h : R 0 k R h k = k R f k m + 1 Ramsey h 0
254 31 253 mpd R Fin m 0 f 0 R g 0 R m Ramsey g 0 h h : R 0 k R h k = k R f k m + 1 Ramsey h 0
255 240 biantrud h = f h : R 0 h : R 0 k R h k = k R f k
256 255 238 bitr3d h = f h : R 0 k R h k = k R f k f : R 0
257 256 244 imbi12d h = f h : R 0 k R h k = k R f k m + 1 Ramsey h 0 f : R 0 m + 1 Ramsey f 0
258 257 spvv h h : R 0 k R h k = k R f k m + 1 Ramsey h 0 f : R 0 m + 1 Ramsey f 0
259 254 29 258 sylc R Fin m 0 f 0 R g 0 R m Ramsey g 0 m + 1 Ramsey f 0
260 259 expr R Fin m 0 f 0 R g 0 R m Ramsey g 0 m + 1 Ramsey f 0
261 260 ralrimdva R Fin m 0 g 0 R m Ramsey g 0 f 0 R m + 1 Ramsey f 0
262 27 261 syl5bi R Fin m 0 f 0 R m Ramsey f 0 f 0 R m + 1 Ramsey f 0
263 262 expcom m 0 R Fin f 0 R m Ramsey f 0 f 0 R m + 1 Ramsey f 0
264 263 a2d m 0 R Fin f 0 R m Ramsey f 0 R Fin f 0 R m + 1 Ramsey f 0
265 8 12 16 20 24 264 nn0ind M 0 R Fin f 0 R M Ramsey f 0
266 265 imp M 0 R Fin f 0 R M Ramsey f 0
267 oveq2 f = F M Ramsey f = M Ramsey F
268 267 eleq1d f = F M Ramsey f 0 M Ramsey F 0
269 268 rspccv f 0 R M Ramsey f 0 F 0 R M Ramsey F 0
270 266 269 syl M 0 R Fin F 0 R M Ramsey F 0
271 4 270 sylbird M 0 R Fin F : R 0 M Ramsey F 0
272 271 3impia M 0 R Fin F : R 0 M Ramsey F 0