Metamath Proof Explorer


Theorem ramub

Description: The Ramsey number is a lower bound on the set of all numbers with the Ramsey number property. (Contributed by Mario Carneiro, 22-Apr-2015)

Ref Expression
Hypotheses rami.c 𝐶 = ( 𝑎 ∈ V , 𝑖 ∈ ℕ0 ↦ { 𝑏 ∈ 𝒫 𝑎 ∣ ( ♯ ‘ 𝑏 ) = 𝑖 } )
rami.m ( 𝜑𝑀 ∈ ℕ0 )
rami.r ( 𝜑𝑅𝑉 )
rami.f ( 𝜑𝐹 : 𝑅 ⟶ ℕ0 )
ramub.n ( 𝜑𝑁 ∈ ℕ0 )
ramub.i ( ( 𝜑 ∧ ( 𝑁 ≤ ( ♯ ‘ 𝑠 ) ∧ 𝑓 : ( 𝑠 𝐶 𝑀 ) ⟶ 𝑅 ) ) → ∃ 𝑐𝑅𝑥 ∈ 𝒫 𝑠 ( ( 𝐹𝑐 ) ≤ ( ♯ ‘ 𝑥 ) ∧ ( 𝑥 𝐶 𝑀 ) ⊆ ( 𝑓 “ { 𝑐 } ) ) )
Assertion ramub ( 𝜑 → ( 𝑀 Ramsey 𝐹 ) ≤ 𝑁 )

Proof

Step Hyp Ref Expression
1 rami.c 𝐶 = ( 𝑎 ∈ V , 𝑖 ∈ ℕ0 ↦ { 𝑏 ∈ 𝒫 𝑎 ∣ ( ♯ ‘ 𝑏 ) = 𝑖 } )
2 rami.m ( 𝜑𝑀 ∈ ℕ0 )
3 rami.r ( 𝜑𝑅𝑉 )
4 rami.f ( 𝜑𝐹 : 𝑅 ⟶ ℕ0 )
5 ramub.n ( 𝜑𝑁 ∈ ℕ0 )
6 ramub.i ( ( 𝜑 ∧ ( 𝑁 ≤ ( ♯ ‘ 𝑠 ) ∧ 𝑓 : ( 𝑠 𝐶 𝑀 ) ⟶ 𝑅 ) ) → ∃ 𝑐𝑅𝑥 ∈ 𝒫 𝑠 ( ( 𝐹𝑐 ) ≤ ( ♯ ‘ 𝑥 ) ∧ ( 𝑥 𝐶 𝑀 ) ⊆ ( 𝑓 “ { 𝑐 } ) ) )
7 breq1 ( 𝑛 = 𝑁 → ( 𝑛 ≤ ( ♯ ‘ 𝑠 ) ↔ 𝑁 ≤ ( ♯ ‘ 𝑠 ) ) )
8 7 imbi1d ( 𝑛 = 𝑁 → ( ( 𝑛 ≤ ( ♯ ‘ 𝑠 ) → ∀ 𝑓 ∈ ( 𝑅m ( 𝑠 𝐶 𝑀 ) ) ∃ 𝑐𝑅𝑥 ∈ 𝒫 𝑠 ( ( 𝐹𝑐 ) ≤ ( ♯ ‘ 𝑥 ) ∧ ( 𝑥 𝐶 𝑀 ) ⊆ ( 𝑓 “ { 𝑐 } ) ) ) ↔ ( 𝑁 ≤ ( ♯ ‘ 𝑠 ) → ∀ 𝑓 ∈ ( 𝑅m ( 𝑠 𝐶 𝑀 ) ) ∃ 𝑐𝑅𝑥 ∈ 𝒫 𝑠 ( ( 𝐹𝑐 ) ≤ ( ♯ ‘ 𝑥 ) ∧ ( 𝑥 𝐶 𝑀 ) ⊆ ( 𝑓 “ { 𝑐 } ) ) ) ) )
9 8 albidv ( 𝑛 = 𝑁 → ( ∀ 𝑠 ( 𝑛 ≤ ( ♯ ‘ 𝑠 ) → ∀ 𝑓 ∈ ( 𝑅m ( 𝑠 𝐶 𝑀 ) ) ∃ 𝑐𝑅𝑥 ∈ 𝒫 𝑠 ( ( 𝐹𝑐 ) ≤ ( ♯ ‘ 𝑥 ) ∧ ( 𝑥 𝐶 𝑀 ) ⊆ ( 𝑓 “ { 𝑐 } ) ) ) ↔ ∀ 𝑠 ( 𝑁 ≤ ( ♯ ‘ 𝑠 ) → ∀ 𝑓 ∈ ( 𝑅m ( 𝑠 𝐶 𝑀 ) ) ∃ 𝑐𝑅𝑥 ∈ 𝒫 𝑠 ( ( 𝐹𝑐 ) ≤ ( ♯ ‘ 𝑥 ) ∧ ( 𝑥 𝐶 𝑀 ) ⊆ ( 𝑓 “ { 𝑐 } ) ) ) ) )
10 elmapi ( 𝑓 ∈ ( 𝑅m ( 𝑠 𝐶 𝑀 ) ) → 𝑓 : ( 𝑠 𝐶 𝑀 ) ⟶ 𝑅 )
11 6 ancom2s ( ( 𝜑 ∧ ( 𝑓 : ( 𝑠 𝐶 𝑀 ) ⟶ 𝑅𝑁 ≤ ( ♯ ‘ 𝑠 ) ) ) → ∃ 𝑐𝑅𝑥 ∈ 𝒫 𝑠 ( ( 𝐹𝑐 ) ≤ ( ♯ ‘ 𝑥 ) ∧ ( 𝑥 𝐶 𝑀 ) ⊆ ( 𝑓 “ { 𝑐 } ) ) )
12 11 expr ( ( 𝜑𝑓 : ( 𝑠 𝐶 𝑀 ) ⟶ 𝑅 ) → ( 𝑁 ≤ ( ♯ ‘ 𝑠 ) → ∃ 𝑐𝑅𝑥 ∈ 𝒫 𝑠 ( ( 𝐹𝑐 ) ≤ ( ♯ ‘ 𝑥 ) ∧ ( 𝑥 𝐶 𝑀 ) ⊆ ( 𝑓 “ { 𝑐 } ) ) ) )
13 10 12 sylan2 ( ( 𝜑𝑓 ∈ ( 𝑅m ( 𝑠 𝐶 𝑀 ) ) ) → ( 𝑁 ≤ ( ♯ ‘ 𝑠 ) → ∃ 𝑐𝑅𝑥 ∈ 𝒫 𝑠 ( ( 𝐹𝑐 ) ≤ ( ♯ ‘ 𝑥 ) ∧ ( 𝑥 𝐶 𝑀 ) ⊆ ( 𝑓 “ { 𝑐 } ) ) ) )
14 13 ralrimdva ( 𝜑 → ( 𝑁 ≤ ( ♯ ‘ 𝑠 ) → ∀ 𝑓 ∈ ( 𝑅m ( 𝑠 𝐶 𝑀 ) ) ∃ 𝑐𝑅𝑥 ∈ 𝒫 𝑠 ( ( 𝐹𝑐 ) ≤ ( ♯ ‘ 𝑥 ) ∧ ( 𝑥 𝐶 𝑀 ) ⊆ ( 𝑓 “ { 𝑐 } ) ) ) )
15 14 alrimiv ( 𝜑 → ∀ 𝑠 ( 𝑁 ≤ ( ♯ ‘ 𝑠 ) → ∀ 𝑓 ∈ ( 𝑅m ( 𝑠 𝐶 𝑀 ) ) ∃ 𝑐𝑅𝑥 ∈ 𝒫 𝑠 ( ( 𝐹𝑐 ) ≤ ( ♯ ‘ 𝑥 ) ∧ ( 𝑥 𝐶 𝑀 ) ⊆ ( 𝑓 “ { 𝑐 } ) ) ) )
16 9 5 15 elrabd ( 𝜑𝑁 ∈ { 𝑛 ∈ ℕ0 ∣ ∀ 𝑠 ( 𝑛 ≤ ( ♯ ‘ 𝑠 ) → ∀ 𝑓 ∈ ( 𝑅m ( 𝑠 𝐶 𝑀 ) ) ∃ 𝑐𝑅𝑥 ∈ 𝒫 𝑠 ( ( 𝐹𝑐 ) ≤ ( ♯ ‘ 𝑥 ) ∧ ( 𝑥 𝐶 𝑀 ) ⊆ ( 𝑓 “ { 𝑐 } ) ) ) } )
17 eqid { 𝑛 ∈ ℕ0 ∣ ∀ 𝑠 ( 𝑛 ≤ ( ♯ ‘ 𝑠 ) → ∀ 𝑓 ∈ ( 𝑅m ( 𝑠 𝐶 𝑀 ) ) ∃ 𝑐𝑅𝑥 ∈ 𝒫 𝑠 ( ( 𝐹𝑐 ) ≤ ( ♯ ‘ 𝑥 ) ∧ ( 𝑥 𝐶 𝑀 ) ⊆ ( 𝑓 “ { 𝑐 } ) ) ) } = { 𝑛 ∈ ℕ0 ∣ ∀ 𝑠 ( 𝑛 ≤ ( ♯ ‘ 𝑠 ) → ∀ 𝑓 ∈ ( 𝑅m ( 𝑠 𝐶 𝑀 ) ) ∃ 𝑐𝑅𝑥 ∈ 𝒫 𝑠 ( ( 𝐹𝑐 ) ≤ ( ♯ ‘ 𝑥 ) ∧ ( 𝑥 𝐶 𝑀 ) ⊆ ( 𝑓 “ { 𝑐 } ) ) ) }
18 1 17 ramtub ( ( ( 𝑀 ∈ ℕ0𝑅𝑉𝐹 : 𝑅 ⟶ ℕ0 ) ∧ 𝑁 ∈ { 𝑛 ∈ ℕ0 ∣ ∀ 𝑠 ( 𝑛 ≤ ( ♯ ‘ 𝑠 ) → ∀ 𝑓 ∈ ( 𝑅m ( 𝑠 𝐶 𝑀 ) ) ∃ 𝑐𝑅𝑥 ∈ 𝒫 𝑠 ( ( 𝐹𝑐 ) ≤ ( ♯ ‘ 𝑥 ) ∧ ( 𝑥 𝐶 𝑀 ) ⊆ ( 𝑓 “ { 𝑐 } ) ) ) } ) → ( 𝑀 Ramsey 𝐹 ) ≤ 𝑁 )
19 2 3 4 16 18 syl31anc ( 𝜑 → ( 𝑀 Ramsey 𝐹 ) ≤ 𝑁 )