Metamath Proof Explorer


Theorem uzwo

Description: Well-ordering principle: any nonempty subset of an upper set of integers has a least element. (Contributed by NM, 8-Oct-2005)

Ref Expression
Assertion uzwo ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ 𝑆 ≠ ∅ ) → ∃ 𝑗𝑆𝑘𝑆 𝑗𝑘 )

Proof

Step Hyp Ref Expression
1 breq1 ( = 𝑀 → ( 𝑡𝑀𝑡 ) )
2 1 ralbidv ( = 𝑀 → ( ∀ 𝑡𝑆 𝑡 ↔ ∀ 𝑡𝑆 𝑀𝑡 ) )
3 2 imbi2d ( = 𝑀 → ( ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ∀ 𝑡𝑆 𝑡 ) ↔ ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ∀ 𝑡𝑆 𝑀𝑡 ) ) )
4 breq1 ( = 𝑚 → ( 𝑡𝑚𝑡 ) )
5 4 ralbidv ( = 𝑚 → ( ∀ 𝑡𝑆 𝑡 ↔ ∀ 𝑡𝑆 𝑚𝑡 ) )
6 5 imbi2d ( = 𝑚 → ( ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ∀ 𝑡𝑆 𝑡 ) ↔ ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ∀ 𝑡𝑆 𝑚𝑡 ) ) )
7 breq1 ( = ( 𝑚 + 1 ) → ( 𝑡 ↔ ( 𝑚 + 1 ) ≤ 𝑡 ) )
8 7 ralbidv ( = ( 𝑚 + 1 ) → ( ∀ 𝑡𝑆 𝑡 ↔ ∀ 𝑡𝑆 ( 𝑚 + 1 ) ≤ 𝑡 ) )
9 8 imbi2d ( = ( 𝑚 + 1 ) → ( ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ∀ 𝑡𝑆 𝑡 ) ↔ ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ∀ 𝑡𝑆 ( 𝑚 + 1 ) ≤ 𝑡 ) ) )
10 breq1 ( = 𝑛 → ( 𝑡𝑛𝑡 ) )
11 10 ralbidv ( = 𝑛 → ( ∀ 𝑡𝑆 𝑡 ↔ ∀ 𝑡𝑆 𝑛𝑡 ) )
12 11 imbi2d ( = 𝑛 → ( ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ∀ 𝑡𝑆 𝑡 ) ↔ ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ∀ 𝑡𝑆 𝑛𝑡 ) ) )
13 ssel ( 𝑆 ⊆ ( ℤ𝑀 ) → ( 𝑡𝑆𝑡 ∈ ( ℤ𝑀 ) ) )
14 eluzle ( 𝑡 ∈ ( ℤ𝑀 ) → 𝑀𝑡 )
15 13 14 syl6 ( 𝑆 ⊆ ( ℤ𝑀 ) → ( 𝑡𝑆𝑀𝑡 ) )
16 15 ralrimiv ( 𝑆 ⊆ ( ℤ𝑀 ) → ∀ 𝑡𝑆 𝑀𝑡 )
17 16 adantr ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ∀ 𝑡𝑆 𝑀𝑡 )
18 uzssz ( ℤ𝑀 ) ⊆ ℤ
19 sstr ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ( ℤ𝑀 ) ⊆ ℤ ) → 𝑆 ⊆ ℤ )
20 18 19 mpan2 ( 𝑆 ⊆ ( ℤ𝑀 ) → 𝑆 ⊆ ℤ )
21 eluzelz ( 𝑚 ∈ ( ℤ𝑀 ) → 𝑚 ∈ ℤ )
22 breq1 ( 𝑗 = 𝑚 → ( 𝑗𝑡𝑚𝑡 ) )
23 22 ralbidv ( 𝑗 = 𝑚 → ( ∀ 𝑡𝑆 𝑗𝑡 ↔ ∀ 𝑡𝑆 𝑚𝑡 ) )
24 23 rspcev ( ( 𝑚𝑆 ∧ ∀ 𝑡𝑆 𝑚𝑡 ) → ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 )
25 24 expcom ( ∀ 𝑡𝑆 𝑚𝑡 → ( 𝑚𝑆 → ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) )
26 25 con3rr3 ( ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 → ( ∀ 𝑡𝑆 𝑚𝑡 → ¬ 𝑚𝑆 ) )
27 ssel2 ( ( 𝑆 ⊆ ℤ ∧ 𝑡𝑆 ) → 𝑡 ∈ ℤ )
28 zre ( 𝑚 ∈ ℤ → 𝑚 ∈ ℝ )
29 zre ( 𝑡 ∈ ℤ → 𝑡 ∈ ℝ )
30 letri3 ( ( 𝑚 ∈ ℝ ∧ 𝑡 ∈ ℝ ) → ( 𝑚 = 𝑡 ↔ ( 𝑚𝑡𝑡𝑚 ) ) )
31 28 29 30 syl2an ( ( 𝑚 ∈ ℤ ∧ 𝑡 ∈ ℤ ) → ( 𝑚 = 𝑡 ↔ ( 𝑚𝑡𝑡𝑚 ) ) )
32 zleltp1 ( ( 𝑡 ∈ ℤ ∧ 𝑚 ∈ ℤ ) → ( 𝑡𝑚𝑡 < ( 𝑚 + 1 ) ) )
33 peano2re ( 𝑚 ∈ ℝ → ( 𝑚 + 1 ) ∈ ℝ )
34 28 33 syl ( 𝑚 ∈ ℤ → ( 𝑚 + 1 ) ∈ ℝ )
35 ltnle ( ( 𝑡 ∈ ℝ ∧ ( 𝑚 + 1 ) ∈ ℝ ) → ( 𝑡 < ( 𝑚 + 1 ) ↔ ¬ ( 𝑚 + 1 ) ≤ 𝑡 ) )
36 29 34 35 syl2an ( ( 𝑡 ∈ ℤ ∧ 𝑚 ∈ ℤ ) → ( 𝑡 < ( 𝑚 + 1 ) ↔ ¬ ( 𝑚 + 1 ) ≤ 𝑡 ) )
37 32 36 bitrd ( ( 𝑡 ∈ ℤ ∧ 𝑚 ∈ ℤ ) → ( 𝑡𝑚 ↔ ¬ ( 𝑚 + 1 ) ≤ 𝑡 ) )
38 37 ancoms ( ( 𝑚 ∈ ℤ ∧ 𝑡 ∈ ℤ ) → ( 𝑡𝑚 ↔ ¬ ( 𝑚 + 1 ) ≤ 𝑡 ) )
39 38 anbi2d ( ( 𝑚 ∈ ℤ ∧ 𝑡 ∈ ℤ ) → ( ( 𝑚𝑡𝑡𝑚 ) ↔ ( 𝑚𝑡 ∧ ¬ ( 𝑚 + 1 ) ≤ 𝑡 ) ) )
40 31 39 bitrd ( ( 𝑚 ∈ ℤ ∧ 𝑡 ∈ ℤ ) → ( 𝑚 = 𝑡 ↔ ( 𝑚𝑡 ∧ ¬ ( 𝑚 + 1 ) ≤ 𝑡 ) ) )
41 27 40 sylan2 ( ( 𝑚 ∈ ℤ ∧ ( 𝑆 ⊆ ℤ ∧ 𝑡𝑆 ) ) → ( 𝑚 = 𝑡 ↔ ( 𝑚𝑡 ∧ ¬ ( 𝑚 + 1 ) ≤ 𝑡 ) ) )
42 eleq1a ( 𝑡𝑆 → ( 𝑚 = 𝑡𝑚𝑆 ) )
43 42 ad2antll ( ( 𝑚 ∈ ℤ ∧ ( 𝑆 ⊆ ℤ ∧ 𝑡𝑆 ) ) → ( 𝑚 = 𝑡𝑚𝑆 ) )
44 41 43 sylbird ( ( 𝑚 ∈ ℤ ∧ ( 𝑆 ⊆ ℤ ∧ 𝑡𝑆 ) ) → ( ( 𝑚𝑡 ∧ ¬ ( 𝑚 + 1 ) ≤ 𝑡 ) → 𝑚𝑆 ) )
45 44 expd ( ( 𝑚 ∈ ℤ ∧ ( 𝑆 ⊆ ℤ ∧ 𝑡𝑆 ) ) → ( 𝑚𝑡 → ( ¬ ( 𝑚 + 1 ) ≤ 𝑡𝑚𝑆 ) ) )
46 con1 ( ( ¬ ( 𝑚 + 1 ) ≤ 𝑡𝑚𝑆 ) → ( ¬ 𝑚𝑆 → ( 𝑚 + 1 ) ≤ 𝑡 ) )
47 45 46 syl6 ( ( 𝑚 ∈ ℤ ∧ ( 𝑆 ⊆ ℤ ∧ 𝑡𝑆 ) ) → ( 𝑚𝑡 → ( ¬ 𝑚𝑆 → ( 𝑚 + 1 ) ≤ 𝑡 ) ) )
48 47 com23 ( ( 𝑚 ∈ ℤ ∧ ( 𝑆 ⊆ ℤ ∧ 𝑡𝑆 ) ) → ( ¬ 𝑚𝑆 → ( 𝑚𝑡 → ( 𝑚 + 1 ) ≤ 𝑡 ) ) )
49 48 exp32 ( 𝑚 ∈ ℤ → ( 𝑆 ⊆ ℤ → ( 𝑡𝑆 → ( ¬ 𝑚𝑆 → ( 𝑚𝑡 → ( 𝑚 + 1 ) ≤ 𝑡 ) ) ) ) )
50 49 com34 ( 𝑚 ∈ ℤ → ( 𝑆 ⊆ ℤ → ( ¬ 𝑚𝑆 → ( 𝑡𝑆 → ( 𝑚𝑡 → ( 𝑚 + 1 ) ≤ 𝑡 ) ) ) ) )
51 50 imp41 ( ( ( ( 𝑚 ∈ ℤ ∧ 𝑆 ⊆ ℤ ) ∧ ¬ 𝑚𝑆 ) ∧ 𝑡𝑆 ) → ( 𝑚𝑡 → ( 𝑚 + 1 ) ≤ 𝑡 ) )
52 51 ralimdva ( ( ( 𝑚 ∈ ℤ ∧ 𝑆 ⊆ ℤ ) ∧ ¬ 𝑚𝑆 ) → ( ∀ 𝑡𝑆 𝑚𝑡 → ∀ 𝑡𝑆 ( 𝑚 + 1 ) ≤ 𝑡 ) )
53 52 ex ( ( 𝑚 ∈ ℤ ∧ 𝑆 ⊆ ℤ ) → ( ¬ 𝑚𝑆 → ( ∀ 𝑡𝑆 𝑚𝑡 → ∀ 𝑡𝑆 ( 𝑚 + 1 ) ≤ 𝑡 ) ) )
54 26 53 sylan9r ( ( ( 𝑚 ∈ ℤ ∧ 𝑆 ⊆ ℤ ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ( ∀ 𝑡𝑆 𝑚𝑡 → ( ∀ 𝑡𝑆 𝑚𝑡 → ∀ 𝑡𝑆 ( 𝑚 + 1 ) ≤ 𝑡 ) ) )
55 54 pm2.43d ( ( ( 𝑚 ∈ ℤ ∧ 𝑆 ⊆ ℤ ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ( ∀ 𝑡𝑆 𝑚𝑡 → ∀ 𝑡𝑆 ( 𝑚 + 1 ) ≤ 𝑡 ) )
56 55 expl ( 𝑚 ∈ ℤ → ( ( 𝑆 ⊆ ℤ ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ( ∀ 𝑡𝑆 𝑚𝑡 → ∀ 𝑡𝑆 ( 𝑚 + 1 ) ≤ 𝑡 ) ) )
57 21 56 syl ( 𝑚 ∈ ( ℤ𝑀 ) → ( ( 𝑆 ⊆ ℤ ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ( ∀ 𝑡𝑆 𝑚𝑡 → ∀ 𝑡𝑆 ( 𝑚 + 1 ) ≤ 𝑡 ) ) )
58 20 57 sylani ( 𝑚 ∈ ( ℤ𝑀 ) → ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ( ∀ 𝑡𝑆 𝑚𝑡 → ∀ 𝑡𝑆 ( 𝑚 + 1 ) ≤ 𝑡 ) ) )
59 58 a2d ( 𝑚 ∈ ( ℤ𝑀 ) → ( ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ∀ 𝑡𝑆 𝑚𝑡 ) → ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ∀ 𝑡𝑆 ( 𝑚 + 1 ) ≤ 𝑡 ) ) )
60 3 6 9 12 17 59 uzind4i ( 𝑛 ∈ ( ℤ𝑀 ) → ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ∀ 𝑡𝑆 𝑛𝑡 ) )
61 breq1 ( 𝑗 = 𝑛 → ( 𝑗𝑡𝑛𝑡 ) )
62 61 ralbidv ( 𝑗 = 𝑛 → ( ∀ 𝑡𝑆 𝑗𝑡 ↔ ∀ 𝑡𝑆 𝑛𝑡 ) )
63 62 rspcev ( ( 𝑛𝑆 ∧ ∀ 𝑡𝑆 𝑛𝑡 ) → ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 )
64 63 expcom ( ∀ 𝑡𝑆 𝑛𝑡 → ( 𝑛𝑆 → ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) )
65 64 con3rr3 ( ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 → ( ∀ 𝑡𝑆 𝑛𝑡 → ¬ 𝑛𝑆 ) )
66 65 adantl ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ( ∀ 𝑡𝑆 𝑛𝑡 → ¬ 𝑛𝑆 ) )
67 60 66 sylcom ( 𝑛 ∈ ( ℤ𝑀 ) → ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ¬ 𝑛𝑆 ) )
68 ssel ( 𝑆 ⊆ ( ℤ𝑀 ) → ( 𝑛𝑆𝑛 ∈ ( ℤ𝑀 ) ) )
69 68 con3rr3 ( ¬ 𝑛 ∈ ( ℤ𝑀 ) → ( 𝑆 ⊆ ( ℤ𝑀 ) → ¬ 𝑛𝑆 ) )
70 69 adantrd ( ¬ 𝑛 ∈ ( ℤ𝑀 ) → ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ¬ 𝑛𝑆 ) )
71 67 70 pm2.61i ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) → ¬ 𝑛𝑆 )
72 71 ex ( 𝑆 ⊆ ( ℤ𝑀 ) → ( ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 → ¬ 𝑛𝑆 ) )
73 72 alrimdv ( 𝑆 ⊆ ( ℤ𝑀 ) → ( ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 → ∀ 𝑛 ¬ 𝑛𝑆 ) )
74 eq0 ( 𝑆 = ∅ ↔ ∀ 𝑛 ¬ 𝑛𝑆 )
75 73 74 syl6ibr ( 𝑆 ⊆ ( ℤ𝑀 ) → ( ¬ ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡𝑆 = ∅ ) )
76 75 necon1ad ( 𝑆 ⊆ ( ℤ𝑀 ) → ( 𝑆 ≠ ∅ → ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ) )
77 76 imp ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ 𝑆 ≠ ∅ ) → ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 )
78 breq2 ( 𝑡 = 𝑘 → ( 𝑗𝑡𝑗𝑘 ) )
79 78 cbvralvw ( ∀ 𝑡𝑆 𝑗𝑡 ↔ ∀ 𝑘𝑆 𝑗𝑘 )
80 79 rexbii ( ∃ 𝑗𝑆𝑡𝑆 𝑗𝑡 ↔ ∃ 𝑗𝑆𝑘𝑆 𝑗𝑘 )
81 77 80 sylib ( ( 𝑆 ⊆ ( ℤ𝑀 ) ∧ 𝑆 ≠ ∅ ) → ∃ 𝑗𝑆𝑘𝑆 𝑗𝑘 )