Metamath Proof Explorer


Theorem upbdrech

Description: Choice of an upper bound for a nonempty bunded set (image set version). (Contributed by Glauco Siliprandi, 11-Dec-2019)

Ref Expression
Hypotheses upbdrech.a ( 𝜑𝐴 ≠ ∅ )
upbdrech.b ( ( 𝜑𝑥𝐴 ) → 𝐵 ∈ ℝ )
upbdrech.bd ( 𝜑 → ∃ 𝑦 ∈ ℝ ∀ 𝑥𝐴 𝐵𝑦 )
upbdrech.c 𝐶 = sup ( { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } , ℝ , < )
Assertion upbdrech ( 𝜑 → ( 𝐶 ∈ ℝ ∧ ∀ 𝑥𝐴 𝐵𝐶 ) )

Proof

Step Hyp Ref Expression
1 upbdrech.a ( 𝜑𝐴 ≠ ∅ )
2 upbdrech.b ( ( 𝜑𝑥𝐴 ) → 𝐵 ∈ ℝ )
3 upbdrech.bd ( 𝜑 → ∃ 𝑦 ∈ ℝ ∀ 𝑥𝐴 𝐵𝑦 )
4 upbdrech.c 𝐶 = sup ( { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } , ℝ , < )
5 2 ralrimiva ( 𝜑 → ∀ 𝑥𝐴 𝐵 ∈ ℝ )
6 nfra1 𝑥𝑥𝐴 𝐵 ∈ ℝ
7 nfv 𝑥 𝑧 ∈ ℝ
8 simp3 ( ( ∀ 𝑥𝐴 𝐵 ∈ ℝ ∧ 𝑥𝐴𝑧 = 𝐵 ) → 𝑧 = 𝐵 )
9 rspa ( ( ∀ 𝑥𝐴 𝐵 ∈ ℝ ∧ 𝑥𝐴 ) → 𝐵 ∈ ℝ )
10 9 3adant3 ( ( ∀ 𝑥𝐴 𝐵 ∈ ℝ ∧ 𝑥𝐴𝑧 = 𝐵 ) → 𝐵 ∈ ℝ )
11 8 10 eqeltrd ( ( ∀ 𝑥𝐴 𝐵 ∈ ℝ ∧ 𝑥𝐴𝑧 = 𝐵 ) → 𝑧 ∈ ℝ )
12 11 3exp ( ∀ 𝑥𝐴 𝐵 ∈ ℝ → ( 𝑥𝐴 → ( 𝑧 = 𝐵𝑧 ∈ ℝ ) ) )
13 6 7 12 rexlimd ( ∀ 𝑥𝐴 𝐵 ∈ ℝ → ( ∃ 𝑥𝐴 𝑧 = 𝐵𝑧 ∈ ℝ ) )
14 13 abssdv ( ∀ 𝑥𝐴 𝐵 ∈ ℝ → { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } ⊆ ℝ )
15 5 14 syl ( 𝜑 → { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } ⊆ ℝ )
16 eqidd ( 𝑥𝐴𝐵 = 𝐵 )
17 16 rgen 𝑥𝐴 𝐵 = 𝐵
18 r19.2z ( ( 𝐴 ≠ ∅ ∧ ∀ 𝑥𝐴 𝐵 = 𝐵 ) → ∃ 𝑥𝐴 𝐵 = 𝐵 )
19 1 17 18 sylancl ( 𝜑 → ∃ 𝑥𝐴 𝐵 = 𝐵 )
20 nfv 𝑥 𝜑
21 nfre1 𝑥𝑥𝐴 𝑧 = 𝐵
22 21 nfex 𝑥𝑧𝑥𝐴 𝑧 = 𝐵
23 simpr ( ( 𝜑𝑥𝐴 ) → 𝑥𝐴 )
24 elex ( 𝐵 ∈ ℝ → 𝐵 ∈ V )
25 2 24 syl ( ( 𝜑𝑥𝐴 ) → 𝐵 ∈ V )
26 isset ( 𝐵 ∈ V ↔ ∃ 𝑧 𝑧 = 𝐵 )
27 25 26 sylib ( ( 𝜑𝑥𝐴 ) → ∃ 𝑧 𝑧 = 𝐵 )
28 rspe ( ( 𝑥𝐴 ∧ ∃ 𝑧 𝑧 = 𝐵 ) → ∃ 𝑥𝐴𝑧 𝑧 = 𝐵 )
29 23 27 28 syl2anc ( ( 𝜑𝑥𝐴 ) → ∃ 𝑥𝐴𝑧 𝑧 = 𝐵 )
30 rexcom4 ( ∃ 𝑥𝐴𝑧 𝑧 = 𝐵 ↔ ∃ 𝑧𝑥𝐴 𝑧 = 𝐵 )
31 29 30 sylib ( ( 𝜑𝑥𝐴 ) → ∃ 𝑧𝑥𝐴 𝑧 = 𝐵 )
32 31 3adant3 ( ( 𝜑𝑥𝐴𝐵 = 𝐵 ) → ∃ 𝑧𝑥𝐴 𝑧 = 𝐵 )
33 32 3exp ( 𝜑 → ( 𝑥𝐴 → ( 𝐵 = 𝐵 → ∃ 𝑧𝑥𝐴 𝑧 = 𝐵 ) ) )
34 20 22 33 rexlimd ( 𝜑 → ( ∃ 𝑥𝐴 𝐵 = 𝐵 → ∃ 𝑧𝑥𝐴 𝑧 = 𝐵 ) )
35 19 34 mpd ( 𝜑 → ∃ 𝑧𝑥𝐴 𝑧 = 𝐵 )
36 abn0 ( { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } ≠ ∅ ↔ ∃ 𝑧𝑥𝐴 𝑧 = 𝐵 )
37 35 36 sylibr ( 𝜑 → { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } ≠ ∅ )
38 vex 𝑤 ∈ V
39 eqeq1 ( 𝑧 = 𝑤 → ( 𝑧 = 𝐵𝑤 = 𝐵 ) )
40 39 rexbidv ( 𝑧 = 𝑤 → ( ∃ 𝑥𝐴 𝑧 = 𝐵 ↔ ∃ 𝑥𝐴 𝑤 = 𝐵 ) )
41 38 40 elab ( 𝑤 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } ↔ ∃ 𝑥𝐴 𝑤 = 𝐵 )
42 41 biimpi ( 𝑤 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } → ∃ 𝑥𝐴 𝑤 = 𝐵 )
43 42 adantl ( ( ( 𝜑 ∧ ∀ 𝑥𝐴 𝐵𝑦 ) ∧ 𝑤 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } ) → ∃ 𝑥𝐴 𝑤 = 𝐵 )
44 nfra1 𝑥𝑥𝐴 𝐵𝑦
45 20 44 nfan 𝑥 ( 𝜑 ∧ ∀ 𝑥𝐴 𝐵𝑦 )
46 21 nfsab 𝑥 𝑤 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 }
47 45 46 nfan 𝑥 ( ( 𝜑 ∧ ∀ 𝑥𝐴 𝐵𝑦 ) ∧ 𝑤 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } )
48 nfv 𝑥 𝑤𝑦
49 simp3 ( ( ( 𝜑 ∧ ∀ 𝑥𝐴 𝐵𝑦 ) ∧ 𝑥𝐴𝑤 = 𝐵 ) → 𝑤 = 𝐵 )
50 simp1r ( ( ( 𝜑 ∧ ∀ 𝑥𝐴 𝐵𝑦 ) ∧ 𝑥𝐴𝑤 = 𝐵 ) → ∀ 𝑥𝐴 𝐵𝑦 )
51 simp2 ( ( ( 𝜑 ∧ ∀ 𝑥𝐴 𝐵𝑦 ) ∧ 𝑥𝐴𝑤 = 𝐵 ) → 𝑥𝐴 )
52 rspa ( ( ∀ 𝑥𝐴 𝐵𝑦𝑥𝐴 ) → 𝐵𝑦 )
53 50 51 52 syl2anc ( ( ( 𝜑 ∧ ∀ 𝑥𝐴 𝐵𝑦 ) ∧ 𝑥𝐴𝑤 = 𝐵 ) → 𝐵𝑦 )
54 49 53 eqbrtrd ( ( ( 𝜑 ∧ ∀ 𝑥𝐴 𝐵𝑦 ) ∧ 𝑥𝐴𝑤 = 𝐵 ) → 𝑤𝑦 )
55 54 3exp ( ( 𝜑 ∧ ∀ 𝑥𝐴 𝐵𝑦 ) → ( 𝑥𝐴 → ( 𝑤 = 𝐵𝑤𝑦 ) ) )
56 55 adantr ( ( ( 𝜑 ∧ ∀ 𝑥𝐴 𝐵𝑦 ) ∧ 𝑤 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } ) → ( 𝑥𝐴 → ( 𝑤 = 𝐵𝑤𝑦 ) ) )
57 47 48 56 rexlimd ( ( ( 𝜑 ∧ ∀ 𝑥𝐴 𝐵𝑦 ) ∧ 𝑤 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } ) → ( ∃ 𝑥𝐴 𝑤 = 𝐵𝑤𝑦 ) )
58 43 57 mpd ( ( ( 𝜑 ∧ ∀ 𝑥𝐴 𝐵𝑦 ) ∧ 𝑤 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } ) → 𝑤𝑦 )
59 58 ralrimiva ( ( 𝜑 ∧ ∀ 𝑥𝐴 𝐵𝑦 ) → ∀ 𝑤 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } 𝑤𝑦 )
60 59 3adant2 ( ( 𝜑𝑦 ∈ ℝ ∧ ∀ 𝑥𝐴 𝐵𝑦 ) → ∀ 𝑤 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } 𝑤𝑦 )
61 60 3exp ( 𝜑 → ( 𝑦 ∈ ℝ → ( ∀ 𝑥𝐴 𝐵𝑦 → ∀ 𝑤 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } 𝑤𝑦 ) ) )
62 61 reximdvai ( 𝜑 → ( ∃ 𝑦 ∈ ℝ ∀ 𝑥𝐴 𝐵𝑦 → ∃ 𝑦 ∈ ℝ ∀ 𝑤 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } 𝑤𝑦 ) )
63 3 62 mpd ( 𝜑 → ∃ 𝑦 ∈ ℝ ∀ 𝑤 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } 𝑤𝑦 )
64 suprcl ( ( { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } ⊆ ℝ ∧ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } ≠ ∅ ∧ ∃ 𝑦 ∈ ℝ ∀ 𝑤 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } 𝑤𝑦 ) → sup ( { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } , ℝ , < ) ∈ ℝ )
65 15 37 63 64 syl3anc ( 𝜑 → sup ( { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } , ℝ , < ) ∈ ℝ )
66 4 65 eqeltrid ( 𝜑𝐶 ∈ ℝ )
67 15 adantr ( ( 𝜑𝑥𝐴 ) → { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } ⊆ ℝ )
68 31 36 sylibr ( ( 𝜑𝑥𝐴 ) → { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } ≠ ∅ )
69 63 adantr ( ( 𝜑𝑥𝐴 ) → ∃ 𝑦 ∈ ℝ ∀ 𝑤 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } 𝑤𝑦 )
70 elabrexg ( ( 𝑥𝐴𝐵 ∈ ℝ ) → 𝐵 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } )
71 23 2 70 syl2anc ( ( 𝜑𝑥𝐴 ) → 𝐵 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } )
72 suprub ( ( ( { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } ⊆ ℝ ∧ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } ≠ ∅ ∧ ∃ 𝑦 ∈ ℝ ∀ 𝑤 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } 𝑤𝑦 ) ∧ 𝐵 ∈ { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } ) → 𝐵 ≤ sup ( { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } , ℝ , < ) )
73 67 68 69 71 72 syl31anc ( ( 𝜑𝑥𝐴 ) → 𝐵 ≤ sup ( { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = 𝐵 } , ℝ , < ) )
74 73 4 breqtrrdi ( ( 𝜑𝑥𝐴 ) → 𝐵𝐶 )
75 74 ralrimiva ( 𝜑 → ∀ 𝑥𝐴 𝐵𝐶 )
76 66 75 jca ( 𝜑 → ( 𝐶 ∈ ℝ ∧ ∀ 𝑥𝐴 𝐵𝐶 ) )