Proof of Theorem difelfznle
Step | Hyp | Ref
| Expression |
1 | | elfz2nn0 10068 |
. . . . . 6
⊢ (𝑀 ∈ (0...𝑁) ↔ (𝑀 ∈ ℕ0 ∧ 𝑁 ∈ ℕ0
∧ 𝑀 ≤ 𝑁)) |
2 | | nn0addcl 9170 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝑀 + 𝑁) ∈
ℕ0) |
3 | 2 | nn0zd 9332 |
. . . . . . 7
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝑀 + 𝑁) ∈ ℤ) |
4 | 3 | 3adant3 1012 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0 ∧ 𝑀
≤ 𝑁) → (𝑀 + 𝑁) ∈ ℤ) |
5 | 1, 4 | sylbi 120 |
. . . . 5
⊢ (𝑀 ∈ (0...𝑁) → (𝑀 + 𝑁) ∈ ℤ) |
6 | | elfzelz 9981 |
. . . . 5
⊢ (𝐾 ∈ (0...𝑁) → 𝐾 ∈ ℤ) |
7 | | zsubcl 9253 |
. . . . 5
⊢ (((𝑀 + 𝑁) ∈ ℤ ∧ 𝐾 ∈ ℤ) → ((𝑀 + 𝑁) − 𝐾) ∈ ℤ) |
8 | 5, 6, 7 | syl2anr 288 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → ((𝑀 + 𝑁) − 𝐾) ∈ ℤ) |
9 | 8 | 3adant3 1012 |
. . 3
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → ((𝑀 + 𝑁) − 𝐾) ∈ ℤ) |
10 | 6 | zred 9334 |
. . . . . . 7
⊢ (𝐾 ∈ (0...𝑁) → 𝐾 ∈ ℝ) |
11 | 10 | adantr 274 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → 𝐾 ∈ ℝ) |
12 | | elfzel2 9979 |
. . . . . . . 8
⊢ (𝐾 ∈ (0...𝑁) → 𝑁 ∈ ℤ) |
13 | 12 | zred 9334 |
. . . . . . 7
⊢ (𝐾 ∈ (0...𝑁) → 𝑁 ∈ ℝ) |
14 | 13 | adantr 274 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → 𝑁 ∈ ℝ) |
15 | | nn0readdcl 9194 |
. . . . . . . . 9
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝑀 + 𝑁) ∈ ℝ) |
16 | 15 | 3adant3 1012 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0 ∧ 𝑀
≤ 𝑁) → (𝑀 + 𝑁) ∈ ℝ) |
17 | 1, 16 | sylbi 120 |
. . . . . . 7
⊢ (𝑀 ∈ (0...𝑁) → (𝑀 + 𝑁) ∈ ℝ) |
18 | 17 | adantl 275 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → (𝑀 + 𝑁) ∈ ℝ) |
19 | | elfzle2 9984 |
. . . . . . 7
⊢ (𝐾 ∈ (0...𝑁) → 𝐾 ≤ 𝑁) |
20 | | elfzle1 9983 |
. . . . . . . 8
⊢ (𝑀 ∈ (0...𝑁) → 0 ≤ 𝑀) |
21 | | nn0re 9144 |
. . . . . . . . . . . 12
⊢ (𝑀 ∈ ℕ0
→ 𝑀 ∈
ℝ) |
22 | | nn0re 9144 |
. . . . . . . . . . . 12
⊢ (𝑁 ∈ ℕ0
→ 𝑁 ∈
ℝ) |
23 | 21, 22 | anim12ci 337 |
. . . . . . . . . . 11
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝑁 ∈ ℝ ∧ 𝑀 ∈ ℝ)) |
24 | 23 | 3adant3 1012 |
. . . . . . . . . 10
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0 ∧ 𝑀
≤ 𝑁) → (𝑁 ∈ ℝ ∧ 𝑀 ∈
ℝ)) |
25 | 1, 24 | sylbi 120 |
. . . . . . . . 9
⊢ (𝑀 ∈ (0...𝑁) → (𝑁 ∈ ℝ ∧ 𝑀 ∈ ℝ)) |
26 | | addge02 8392 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℝ ∧ 𝑀 ∈ ℝ) → (0 ≤
𝑀 ↔ 𝑁 ≤ (𝑀 + 𝑁))) |
27 | 25, 26 | syl 14 |
. . . . . . . 8
⊢ (𝑀 ∈ (0...𝑁) → (0 ≤ 𝑀 ↔ 𝑁 ≤ (𝑀 + 𝑁))) |
28 | 20, 27 | mpbid 146 |
. . . . . . 7
⊢ (𝑀 ∈ (0...𝑁) → 𝑁 ≤ (𝑀 + 𝑁)) |
29 | 19, 28 | anim12i 336 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → (𝐾 ≤ 𝑁 ∧ 𝑁 ≤ (𝑀 + 𝑁))) |
30 | | letr 8002 |
. . . . . . 7
⊢ ((𝐾 ∈ ℝ ∧ 𝑁 ∈ ℝ ∧ (𝑀 + 𝑁) ∈ ℝ) → ((𝐾 ≤ 𝑁 ∧ 𝑁 ≤ (𝑀 + 𝑁)) → 𝐾 ≤ (𝑀 + 𝑁))) |
31 | 30 | imp 123 |
. . . . . 6
⊢ (((𝐾 ∈ ℝ ∧ 𝑁 ∈ ℝ ∧ (𝑀 + 𝑁) ∈ ℝ) ∧ (𝐾 ≤ 𝑁 ∧ 𝑁 ≤ (𝑀 + 𝑁))) → 𝐾 ≤ (𝑀 + 𝑁)) |
32 | 11, 14, 18, 29, 31 | syl31anc 1236 |
. . . . 5
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → 𝐾 ≤ (𝑀 + 𝑁)) |
33 | 32 | 3adant3 1012 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → 𝐾 ≤ (𝑀 + 𝑁)) |
34 | | zre 9216 |
. . . . . . . 8
⊢ (𝐾 ∈ ℤ → 𝐾 ∈
ℝ) |
35 | 21, 22 | anim12i 336 |
. . . . . . . . . . 11
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝑀 ∈ ℝ ∧ 𝑁 ∈ ℝ)) |
36 | 35 | 3adant3 1012 |
. . . . . . . . . 10
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0 ∧ 𝑀
≤ 𝑁) → (𝑀 ∈ ℝ ∧ 𝑁 ∈
ℝ)) |
37 | 1, 36 | sylbi 120 |
. . . . . . . . 9
⊢ (𝑀 ∈ (0...𝑁) → (𝑀 ∈ ℝ ∧ 𝑁 ∈ ℝ)) |
38 | | readdcl 7900 |
. . . . . . . . 9
⊢ ((𝑀 ∈ ℝ ∧ 𝑁 ∈ ℝ) → (𝑀 + 𝑁) ∈ ℝ) |
39 | 37, 38 | syl 14 |
. . . . . . . 8
⊢ (𝑀 ∈ (0...𝑁) → (𝑀 + 𝑁) ∈ ℝ) |
40 | 34, 39 | anim12ci 337 |
. . . . . . 7
⊢ ((𝐾 ∈ ℤ ∧ 𝑀 ∈ (0...𝑁)) → ((𝑀 + 𝑁) ∈ ℝ ∧ 𝐾 ∈ ℝ)) |
41 | 6, 40 | sylan 281 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → ((𝑀 + 𝑁) ∈ ℝ ∧ 𝐾 ∈ ℝ)) |
42 | 41 | 3adant3 1012 |
. . . . 5
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → ((𝑀 + 𝑁) ∈ ℝ ∧ 𝐾 ∈ ℝ)) |
43 | | subge0 8394 |
. . . . 5
⊢ (((𝑀 + 𝑁) ∈ ℝ ∧ 𝐾 ∈ ℝ) → (0 ≤ ((𝑀 + 𝑁) − 𝐾) ↔ 𝐾 ≤ (𝑀 + 𝑁))) |
44 | 42, 43 | syl 14 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → (0 ≤ ((𝑀 + 𝑁) − 𝐾) ↔ 𝐾 ≤ (𝑀 + 𝑁))) |
45 | 33, 44 | mpbird 166 |
. . 3
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → 0 ≤ ((𝑀 + 𝑁) − 𝐾)) |
46 | | elnn0z 9225 |
. . 3
⊢ (((𝑀 + 𝑁) − 𝐾) ∈ ℕ0 ↔ (((𝑀 + 𝑁) − 𝐾) ∈ ℤ ∧ 0 ≤ ((𝑀 + 𝑁) − 𝐾))) |
47 | 9, 45, 46 | sylanbrc 415 |
. 2
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → ((𝑀 + 𝑁) − 𝐾) ∈
ℕ0) |
48 | | elfz3nn0 10071 |
. . 3
⊢ (𝐾 ∈ (0...𝑁) → 𝑁 ∈
ℕ0) |
49 | 48 | 3ad2ant1 1013 |
. 2
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → 𝑁 ∈
ℕ0) |
50 | | elfzelz 9981 |
. . . . . 6
⊢ (𝑀 ∈ (0...𝑁) → 𝑀 ∈ ℤ) |
51 | | zltnle 9258 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℤ ∧ 𝐾 ∈ ℤ) → (𝑀 < 𝐾 ↔ ¬ 𝐾 ≤ 𝑀)) |
52 | 51 | ancoms 266 |
. . . . . . 7
⊢ ((𝐾 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑀 < 𝐾 ↔ ¬ 𝐾 ≤ 𝑀)) |
53 | | zre 9216 |
. . . . . . . 8
⊢ (𝑀 ∈ ℤ → 𝑀 ∈
ℝ) |
54 | | ltle 8007 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℝ ∧ 𝐾 ∈ ℝ) → (𝑀 < 𝐾 → 𝑀 ≤ 𝐾)) |
55 | 53, 34, 54 | syl2anr 288 |
. . . . . . 7
⊢ ((𝐾 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑀 < 𝐾 → 𝑀 ≤ 𝐾)) |
56 | 52, 55 | sylbird 169 |
. . . . . 6
⊢ ((𝐾 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (¬
𝐾 ≤ 𝑀 → 𝑀 ≤ 𝐾)) |
57 | 6, 50, 56 | syl2an 287 |
. . . . 5
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → (¬ 𝐾 ≤ 𝑀 → 𝑀 ≤ 𝐾)) |
58 | 57 | 3impia 1195 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → 𝑀 ≤ 𝐾) |
59 | 50 | zred 9334 |
. . . . . . 7
⊢ (𝑀 ∈ (0...𝑁) → 𝑀 ∈ ℝ) |
60 | 59 | adantl 275 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → 𝑀 ∈ ℝ) |
61 | 60, 11, 14 | leadd1d 8458 |
. . . . 5
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → (𝑀 ≤ 𝐾 ↔ (𝑀 + 𝑁) ≤ (𝐾 + 𝑁))) |
62 | 61 | 3adant3 1012 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → (𝑀 ≤ 𝐾 ↔ (𝑀 + 𝑁) ≤ (𝐾 + 𝑁))) |
63 | 58, 62 | mpbid 146 |
. . 3
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → (𝑀 + 𝑁) ≤ (𝐾 + 𝑁)) |
64 | 18, 11, 14 | lesubadd2d 8463 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → (((𝑀 + 𝑁) − 𝐾) ≤ 𝑁 ↔ (𝑀 + 𝑁) ≤ (𝐾 + 𝑁))) |
65 | 64 | 3adant3 1012 |
. . 3
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → (((𝑀 + 𝑁) − 𝐾) ≤ 𝑁 ↔ (𝑀 + 𝑁) ≤ (𝐾 + 𝑁))) |
66 | 63, 65 | mpbird 166 |
. 2
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → ((𝑀 + 𝑁) − 𝐾) ≤ 𝑁) |
67 | | elfz2nn0 10068 |
. 2
⊢ (((𝑀 + 𝑁) − 𝐾) ∈ (0...𝑁) ↔ (((𝑀 + 𝑁) − 𝐾) ∈ ℕ0 ∧ 𝑁 ∈ ℕ0
∧ ((𝑀 + 𝑁) − 𝐾) ≤ 𝑁)) |
68 | 47, 49, 66, 67 | syl3anbrc 1176 |
1
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → ((𝑀 + 𝑁) − 𝐾) ∈ (0...𝑁)) |