Proof of Theorem difelfznle
Step | Hyp | Ref
| Expression |
1 | | elfz2nn0 13276 |
. . . . . 6
⊢ (𝑀 ∈ (0...𝑁) ↔ (𝑀 ∈ ℕ0 ∧ 𝑁 ∈ ℕ0
∧ 𝑀 ≤ 𝑁)) |
2 | | nn0addcl 12198 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝑀 + 𝑁) ∈
ℕ0) |
3 | 2 | nn0zd 12353 |
. . . . . . 7
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝑀 + 𝑁) ∈ ℤ) |
4 | 3 | 3adant3 1130 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0 ∧ 𝑀
≤ 𝑁) → (𝑀 + 𝑁) ∈ ℤ) |
5 | 1, 4 | sylbi 216 |
. . . . 5
⊢ (𝑀 ∈ (0...𝑁) → (𝑀 + 𝑁) ∈ ℤ) |
6 | | elfzelz 13185 |
. . . . 5
⊢ (𝐾 ∈ (0...𝑁) → 𝐾 ∈ ℤ) |
7 | | zsubcl 12292 |
. . . . 5
⊢ (((𝑀 + 𝑁) ∈ ℤ ∧ 𝐾 ∈ ℤ) → ((𝑀 + 𝑁) − 𝐾) ∈ ℤ) |
8 | 5, 6, 7 | syl2anr 596 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → ((𝑀 + 𝑁) − 𝐾) ∈ ℤ) |
9 | 8 | 3adant3 1130 |
. . 3
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → ((𝑀 + 𝑁) − 𝐾) ∈ ℤ) |
10 | 6 | zred 12355 |
. . . . . . 7
⊢ (𝐾 ∈ (0...𝑁) → 𝐾 ∈ ℝ) |
11 | 10 | adantr 480 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → 𝐾 ∈ ℝ) |
12 | | elfzel2 13183 |
. . . . . . . 8
⊢ (𝐾 ∈ (0...𝑁) → 𝑁 ∈ ℤ) |
13 | 12 | zred 12355 |
. . . . . . 7
⊢ (𝐾 ∈ (0...𝑁) → 𝑁 ∈ ℝ) |
14 | 13 | adantr 480 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → 𝑁 ∈ ℝ) |
15 | | nn0readdcl 12229 |
. . . . . . . . 9
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝑀 + 𝑁) ∈ ℝ) |
16 | 15 | 3adant3 1130 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0 ∧ 𝑀
≤ 𝑁) → (𝑀 + 𝑁) ∈ ℝ) |
17 | 1, 16 | sylbi 216 |
. . . . . . 7
⊢ (𝑀 ∈ (0...𝑁) → (𝑀 + 𝑁) ∈ ℝ) |
18 | 17 | adantl 481 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → (𝑀 + 𝑁) ∈ ℝ) |
19 | | elfzle2 13189 |
. . . . . . 7
⊢ (𝐾 ∈ (0...𝑁) → 𝐾 ≤ 𝑁) |
20 | | elfzle1 13188 |
. . . . . . . 8
⊢ (𝑀 ∈ (0...𝑁) → 0 ≤ 𝑀) |
21 | | nn0re 12172 |
. . . . . . . . . . . 12
⊢ (𝑀 ∈ ℕ0
→ 𝑀 ∈
ℝ) |
22 | | nn0re 12172 |
. . . . . . . . . . . 12
⊢ (𝑁 ∈ ℕ0
→ 𝑁 ∈
ℝ) |
23 | 21, 22 | anim12ci 613 |
. . . . . . . . . . 11
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝑁 ∈ ℝ ∧ 𝑀 ∈ ℝ)) |
24 | 23 | 3adant3 1130 |
. . . . . . . . . 10
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0 ∧ 𝑀
≤ 𝑁) → (𝑁 ∈ ℝ ∧ 𝑀 ∈
ℝ)) |
25 | 1, 24 | sylbi 216 |
. . . . . . . . 9
⊢ (𝑀 ∈ (0...𝑁) → (𝑁 ∈ ℝ ∧ 𝑀 ∈ ℝ)) |
26 | | addge02 11416 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℝ ∧ 𝑀 ∈ ℝ) → (0 ≤
𝑀 ↔ 𝑁 ≤ (𝑀 + 𝑁))) |
27 | 25, 26 | syl 17 |
. . . . . . . 8
⊢ (𝑀 ∈ (0...𝑁) → (0 ≤ 𝑀 ↔ 𝑁 ≤ (𝑀 + 𝑁))) |
28 | 20, 27 | mpbid 231 |
. . . . . . 7
⊢ (𝑀 ∈ (0...𝑁) → 𝑁 ≤ (𝑀 + 𝑁)) |
29 | 19, 28 | anim12i 612 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → (𝐾 ≤ 𝑁 ∧ 𝑁 ≤ (𝑀 + 𝑁))) |
30 | | letr 10999 |
. . . . . . 7
⊢ ((𝐾 ∈ ℝ ∧ 𝑁 ∈ ℝ ∧ (𝑀 + 𝑁) ∈ ℝ) → ((𝐾 ≤ 𝑁 ∧ 𝑁 ≤ (𝑀 + 𝑁)) → 𝐾 ≤ (𝑀 + 𝑁))) |
31 | 30 | imp 406 |
. . . . . 6
⊢ (((𝐾 ∈ ℝ ∧ 𝑁 ∈ ℝ ∧ (𝑀 + 𝑁) ∈ ℝ) ∧ (𝐾 ≤ 𝑁 ∧ 𝑁 ≤ (𝑀 + 𝑁))) → 𝐾 ≤ (𝑀 + 𝑁)) |
32 | 11, 14, 18, 29, 31 | syl31anc 1371 |
. . . . 5
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → 𝐾 ≤ (𝑀 + 𝑁)) |
33 | 32 | 3adant3 1130 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → 𝐾 ≤ (𝑀 + 𝑁)) |
34 | | zre 12253 |
. . . . . . . 8
⊢ (𝐾 ∈ ℤ → 𝐾 ∈
ℝ) |
35 | 21, 22 | anim12i 612 |
. . . . . . . . . . 11
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝑀 ∈ ℝ ∧ 𝑁 ∈ ℝ)) |
36 | 35 | 3adant3 1130 |
. . . . . . . . . 10
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0 ∧ 𝑀
≤ 𝑁) → (𝑀 ∈ ℝ ∧ 𝑁 ∈
ℝ)) |
37 | 1, 36 | sylbi 216 |
. . . . . . . . 9
⊢ (𝑀 ∈ (0...𝑁) → (𝑀 ∈ ℝ ∧ 𝑁 ∈ ℝ)) |
38 | | readdcl 10885 |
. . . . . . . . 9
⊢ ((𝑀 ∈ ℝ ∧ 𝑁 ∈ ℝ) → (𝑀 + 𝑁) ∈ ℝ) |
39 | 37, 38 | syl 17 |
. . . . . . . 8
⊢ (𝑀 ∈ (0...𝑁) → (𝑀 + 𝑁) ∈ ℝ) |
40 | 34, 39 | anim12ci 613 |
. . . . . . 7
⊢ ((𝐾 ∈ ℤ ∧ 𝑀 ∈ (0...𝑁)) → ((𝑀 + 𝑁) ∈ ℝ ∧ 𝐾 ∈ ℝ)) |
41 | 6, 40 | sylan 579 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → ((𝑀 + 𝑁) ∈ ℝ ∧ 𝐾 ∈ ℝ)) |
42 | 41 | 3adant3 1130 |
. . . . 5
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → ((𝑀 + 𝑁) ∈ ℝ ∧ 𝐾 ∈ ℝ)) |
43 | | subge0 11418 |
. . . . 5
⊢ (((𝑀 + 𝑁) ∈ ℝ ∧ 𝐾 ∈ ℝ) → (0 ≤ ((𝑀 + 𝑁) − 𝐾) ↔ 𝐾 ≤ (𝑀 + 𝑁))) |
44 | 42, 43 | syl 17 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → (0 ≤ ((𝑀 + 𝑁) − 𝐾) ↔ 𝐾 ≤ (𝑀 + 𝑁))) |
45 | 33, 44 | mpbird 256 |
. . 3
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → 0 ≤ ((𝑀 + 𝑁) − 𝐾)) |
46 | | elnn0z 12262 |
. . 3
⊢ (((𝑀 + 𝑁) − 𝐾) ∈ ℕ0 ↔ (((𝑀 + 𝑁) − 𝐾) ∈ ℤ ∧ 0 ≤ ((𝑀 + 𝑁) − 𝐾))) |
47 | 9, 45, 46 | sylanbrc 582 |
. 2
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → ((𝑀 + 𝑁) − 𝐾) ∈
ℕ0) |
48 | | elfz3nn0 13279 |
. . 3
⊢ (𝐾 ∈ (0...𝑁) → 𝑁 ∈
ℕ0) |
49 | 48 | 3ad2ant1 1131 |
. 2
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → 𝑁 ∈
ℕ0) |
50 | | elfzelz 13185 |
. . . . . 6
⊢ (𝑀 ∈ (0...𝑁) → 𝑀 ∈ ℤ) |
51 | | zre 12253 |
. . . . . . 7
⊢ (𝑀 ∈ ℤ → 𝑀 ∈
ℝ) |
52 | | ltnle 10985 |
. . . . . . . . 9
⊢ ((𝑀 ∈ ℝ ∧ 𝐾 ∈ ℝ) → (𝑀 < 𝐾 ↔ ¬ 𝐾 ≤ 𝑀)) |
53 | 52 | ancoms 458 |
. . . . . . . 8
⊢ ((𝐾 ∈ ℝ ∧ 𝑀 ∈ ℝ) → (𝑀 < 𝐾 ↔ ¬ 𝐾 ≤ 𝑀)) |
54 | | ltle 10994 |
. . . . . . . . 9
⊢ ((𝑀 ∈ ℝ ∧ 𝐾 ∈ ℝ) → (𝑀 < 𝐾 → 𝑀 ≤ 𝐾)) |
55 | 54 | ancoms 458 |
. . . . . . . 8
⊢ ((𝐾 ∈ ℝ ∧ 𝑀 ∈ ℝ) → (𝑀 < 𝐾 → 𝑀 ≤ 𝐾)) |
56 | 53, 55 | sylbird 259 |
. . . . . . 7
⊢ ((𝐾 ∈ ℝ ∧ 𝑀 ∈ ℝ) → (¬
𝐾 ≤ 𝑀 → 𝑀 ≤ 𝐾)) |
57 | 34, 51, 56 | syl2an 595 |
. . . . . 6
⊢ ((𝐾 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (¬
𝐾 ≤ 𝑀 → 𝑀 ≤ 𝐾)) |
58 | 6, 50, 57 | syl2an 595 |
. . . . 5
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → (¬ 𝐾 ≤ 𝑀 → 𝑀 ≤ 𝐾)) |
59 | 58 | 3impia 1115 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → 𝑀 ≤ 𝐾) |
60 | 50 | zred 12355 |
. . . . . . 7
⊢ (𝑀 ∈ (0...𝑁) → 𝑀 ∈ ℝ) |
61 | 60 | adantl 481 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → 𝑀 ∈ ℝ) |
62 | 61, 11, 14 | leadd1d 11499 |
. . . . 5
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → (𝑀 ≤ 𝐾 ↔ (𝑀 + 𝑁) ≤ (𝐾 + 𝑁))) |
63 | 62 | 3adant3 1130 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → (𝑀 ≤ 𝐾 ↔ (𝑀 + 𝑁) ≤ (𝐾 + 𝑁))) |
64 | 59, 63 | mpbid 231 |
. . 3
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → (𝑀 + 𝑁) ≤ (𝐾 + 𝑁)) |
65 | 18, 11, 14 | lesubadd2d 11504 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → (((𝑀 + 𝑁) − 𝐾) ≤ 𝑁 ↔ (𝑀 + 𝑁) ≤ (𝐾 + 𝑁))) |
66 | 65 | 3adant3 1130 |
. . 3
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → (((𝑀 + 𝑁) − 𝐾) ≤ 𝑁 ↔ (𝑀 + 𝑁) ≤ (𝐾 + 𝑁))) |
67 | 64, 66 | mpbird 256 |
. 2
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → ((𝑀 + 𝑁) − 𝐾) ≤ 𝑁) |
68 | | elfz2nn0 13276 |
. 2
⊢ (((𝑀 + 𝑁) − 𝐾) ∈ (0...𝑁) ↔ (((𝑀 + 𝑁) − 𝐾) ∈ ℕ0 ∧ 𝑁 ∈ ℕ0
∧ ((𝑀 + 𝑁) − 𝐾) ≤ 𝑁)) |
69 | 47, 49, 67, 68 | syl3anbrc 1341 |
1
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → ((𝑀 + 𝑁) − 𝐾) ∈ (0...𝑁)) |