Proof of Theorem difelfznle
Step | Hyp | Ref
| Expression |
1 | | elfz2nn0 13347 |
. . . . . 6
⊢ (𝑀 ∈ (0...𝑁) ↔ (𝑀 ∈ ℕ0 ∧ 𝑁 ∈ ℕ0
∧ 𝑀 ≤ 𝑁)) |
2 | | nn0addcl 12268 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝑀 + 𝑁) ∈
ℕ0) |
3 | 2 | nn0zd 12424 |
. . . . . . 7
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝑀 + 𝑁) ∈ ℤ) |
4 | 3 | 3adant3 1131 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0 ∧ 𝑀
≤ 𝑁) → (𝑀 + 𝑁) ∈ ℤ) |
5 | 1, 4 | sylbi 216 |
. . . . 5
⊢ (𝑀 ∈ (0...𝑁) → (𝑀 + 𝑁) ∈ ℤ) |
6 | | elfzelz 13256 |
. . . . 5
⊢ (𝐾 ∈ (0...𝑁) → 𝐾 ∈ ℤ) |
7 | | zsubcl 12362 |
. . . . 5
⊢ (((𝑀 + 𝑁) ∈ ℤ ∧ 𝐾 ∈ ℤ) → ((𝑀 + 𝑁) − 𝐾) ∈ ℤ) |
8 | 5, 6, 7 | syl2anr 597 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → ((𝑀 + 𝑁) − 𝐾) ∈ ℤ) |
9 | 8 | 3adant3 1131 |
. . 3
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → ((𝑀 + 𝑁) − 𝐾) ∈ ℤ) |
10 | 6 | zred 12426 |
. . . . . . 7
⊢ (𝐾 ∈ (0...𝑁) → 𝐾 ∈ ℝ) |
11 | 10 | adantr 481 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → 𝐾 ∈ ℝ) |
12 | | elfzel2 13254 |
. . . . . . . 8
⊢ (𝐾 ∈ (0...𝑁) → 𝑁 ∈ ℤ) |
13 | 12 | zred 12426 |
. . . . . . 7
⊢ (𝐾 ∈ (0...𝑁) → 𝑁 ∈ ℝ) |
14 | 13 | adantr 481 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → 𝑁 ∈ ℝ) |
15 | | nn0readdcl 12299 |
. . . . . . . . 9
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝑀 + 𝑁) ∈ ℝ) |
16 | 15 | 3adant3 1131 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0 ∧ 𝑀
≤ 𝑁) → (𝑀 + 𝑁) ∈ ℝ) |
17 | 1, 16 | sylbi 216 |
. . . . . . 7
⊢ (𝑀 ∈ (0...𝑁) → (𝑀 + 𝑁) ∈ ℝ) |
18 | 17 | adantl 482 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → (𝑀 + 𝑁) ∈ ℝ) |
19 | | elfzle2 13260 |
. . . . . . 7
⊢ (𝐾 ∈ (0...𝑁) → 𝐾 ≤ 𝑁) |
20 | | elfzle1 13259 |
. . . . . . . 8
⊢ (𝑀 ∈ (0...𝑁) → 0 ≤ 𝑀) |
21 | | nn0re 12242 |
. . . . . . . . . . . 12
⊢ (𝑀 ∈ ℕ0
→ 𝑀 ∈
ℝ) |
22 | | nn0re 12242 |
. . . . . . . . . . . 12
⊢ (𝑁 ∈ ℕ0
→ 𝑁 ∈
ℝ) |
23 | 21, 22 | anim12ci 614 |
. . . . . . . . . . 11
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝑁 ∈ ℝ ∧ 𝑀 ∈ ℝ)) |
24 | 23 | 3adant3 1131 |
. . . . . . . . . 10
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0 ∧ 𝑀
≤ 𝑁) → (𝑁 ∈ ℝ ∧ 𝑀 ∈
ℝ)) |
25 | 1, 24 | sylbi 216 |
. . . . . . . . 9
⊢ (𝑀 ∈ (0...𝑁) → (𝑁 ∈ ℝ ∧ 𝑀 ∈ ℝ)) |
26 | | addge02 11486 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℝ ∧ 𝑀 ∈ ℝ) → (0 ≤
𝑀 ↔ 𝑁 ≤ (𝑀 + 𝑁))) |
27 | 25, 26 | syl 17 |
. . . . . . . 8
⊢ (𝑀 ∈ (0...𝑁) → (0 ≤ 𝑀 ↔ 𝑁 ≤ (𝑀 + 𝑁))) |
28 | 20, 27 | mpbid 231 |
. . . . . . 7
⊢ (𝑀 ∈ (0...𝑁) → 𝑁 ≤ (𝑀 + 𝑁)) |
29 | 19, 28 | anim12i 613 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → (𝐾 ≤ 𝑁 ∧ 𝑁 ≤ (𝑀 + 𝑁))) |
30 | | letr 11069 |
. . . . . . 7
⊢ ((𝐾 ∈ ℝ ∧ 𝑁 ∈ ℝ ∧ (𝑀 + 𝑁) ∈ ℝ) → ((𝐾 ≤ 𝑁 ∧ 𝑁 ≤ (𝑀 + 𝑁)) → 𝐾 ≤ (𝑀 + 𝑁))) |
31 | 30 | imp 407 |
. . . . . 6
⊢ (((𝐾 ∈ ℝ ∧ 𝑁 ∈ ℝ ∧ (𝑀 + 𝑁) ∈ ℝ) ∧ (𝐾 ≤ 𝑁 ∧ 𝑁 ≤ (𝑀 + 𝑁))) → 𝐾 ≤ (𝑀 + 𝑁)) |
32 | 11, 14, 18, 29, 31 | syl31anc 1372 |
. . . . 5
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → 𝐾 ≤ (𝑀 + 𝑁)) |
33 | 32 | 3adant3 1131 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → 𝐾 ≤ (𝑀 + 𝑁)) |
34 | | zre 12323 |
. . . . . . . 8
⊢ (𝐾 ∈ ℤ → 𝐾 ∈
ℝ) |
35 | 21, 22 | anim12i 613 |
. . . . . . . . . . 11
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝑀 ∈ ℝ ∧ 𝑁 ∈ ℝ)) |
36 | 35 | 3adant3 1131 |
. . . . . . . . . 10
⊢ ((𝑀 ∈ ℕ0
∧ 𝑁 ∈
ℕ0 ∧ 𝑀
≤ 𝑁) → (𝑀 ∈ ℝ ∧ 𝑁 ∈
ℝ)) |
37 | 1, 36 | sylbi 216 |
. . . . . . . . 9
⊢ (𝑀 ∈ (0...𝑁) → (𝑀 ∈ ℝ ∧ 𝑁 ∈ ℝ)) |
38 | | readdcl 10954 |
. . . . . . . . 9
⊢ ((𝑀 ∈ ℝ ∧ 𝑁 ∈ ℝ) → (𝑀 + 𝑁) ∈ ℝ) |
39 | 37, 38 | syl 17 |
. . . . . . . 8
⊢ (𝑀 ∈ (0...𝑁) → (𝑀 + 𝑁) ∈ ℝ) |
40 | 34, 39 | anim12ci 614 |
. . . . . . 7
⊢ ((𝐾 ∈ ℤ ∧ 𝑀 ∈ (0...𝑁)) → ((𝑀 + 𝑁) ∈ ℝ ∧ 𝐾 ∈ ℝ)) |
41 | 6, 40 | sylan 580 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → ((𝑀 + 𝑁) ∈ ℝ ∧ 𝐾 ∈ ℝ)) |
42 | 41 | 3adant3 1131 |
. . . . 5
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → ((𝑀 + 𝑁) ∈ ℝ ∧ 𝐾 ∈ ℝ)) |
43 | | subge0 11488 |
. . . . 5
⊢ (((𝑀 + 𝑁) ∈ ℝ ∧ 𝐾 ∈ ℝ) → (0 ≤ ((𝑀 + 𝑁) − 𝐾) ↔ 𝐾 ≤ (𝑀 + 𝑁))) |
44 | 42, 43 | syl 17 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → (0 ≤ ((𝑀 + 𝑁) − 𝐾) ↔ 𝐾 ≤ (𝑀 + 𝑁))) |
45 | 33, 44 | mpbird 256 |
. . 3
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → 0 ≤ ((𝑀 + 𝑁) − 𝐾)) |
46 | | elnn0z 12332 |
. . 3
⊢ (((𝑀 + 𝑁) − 𝐾) ∈ ℕ0 ↔ (((𝑀 + 𝑁) − 𝐾) ∈ ℤ ∧ 0 ≤ ((𝑀 + 𝑁) − 𝐾))) |
47 | 9, 45, 46 | sylanbrc 583 |
. 2
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → ((𝑀 + 𝑁) − 𝐾) ∈
ℕ0) |
48 | | elfz3nn0 13350 |
. . 3
⊢ (𝐾 ∈ (0...𝑁) → 𝑁 ∈
ℕ0) |
49 | 48 | 3ad2ant1 1132 |
. 2
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → 𝑁 ∈
ℕ0) |
50 | | elfzelz 13256 |
. . . . . 6
⊢ (𝑀 ∈ (0...𝑁) → 𝑀 ∈ ℤ) |
51 | | zre 12323 |
. . . . . . 7
⊢ (𝑀 ∈ ℤ → 𝑀 ∈
ℝ) |
52 | | ltnle 11054 |
. . . . . . . . 9
⊢ ((𝑀 ∈ ℝ ∧ 𝐾 ∈ ℝ) → (𝑀 < 𝐾 ↔ ¬ 𝐾 ≤ 𝑀)) |
53 | 52 | ancoms 459 |
. . . . . . . 8
⊢ ((𝐾 ∈ ℝ ∧ 𝑀 ∈ ℝ) → (𝑀 < 𝐾 ↔ ¬ 𝐾 ≤ 𝑀)) |
54 | | ltle 11063 |
. . . . . . . . 9
⊢ ((𝑀 ∈ ℝ ∧ 𝐾 ∈ ℝ) → (𝑀 < 𝐾 → 𝑀 ≤ 𝐾)) |
55 | 54 | ancoms 459 |
. . . . . . . 8
⊢ ((𝐾 ∈ ℝ ∧ 𝑀 ∈ ℝ) → (𝑀 < 𝐾 → 𝑀 ≤ 𝐾)) |
56 | 53, 55 | sylbird 259 |
. . . . . . 7
⊢ ((𝐾 ∈ ℝ ∧ 𝑀 ∈ ℝ) → (¬
𝐾 ≤ 𝑀 → 𝑀 ≤ 𝐾)) |
57 | 34, 51, 56 | syl2an 596 |
. . . . . 6
⊢ ((𝐾 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (¬
𝐾 ≤ 𝑀 → 𝑀 ≤ 𝐾)) |
58 | 6, 50, 57 | syl2an 596 |
. . . . 5
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → (¬ 𝐾 ≤ 𝑀 → 𝑀 ≤ 𝐾)) |
59 | 58 | 3impia 1116 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → 𝑀 ≤ 𝐾) |
60 | 50 | zred 12426 |
. . . . . . 7
⊢ (𝑀 ∈ (0...𝑁) → 𝑀 ∈ ℝ) |
61 | 60 | adantl 482 |
. . . . . 6
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → 𝑀 ∈ ℝ) |
62 | 61, 11, 14 | leadd1d 11569 |
. . . . 5
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → (𝑀 ≤ 𝐾 ↔ (𝑀 + 𝑁) ≤ (𝐾 + 𝑁))) |
63 | 62 | 3adant3 1131 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → (𝑀 ≤ 𝐾 ↔ (𝑀 + 𝑁) ≤ (𝐾 + 𝑁))) |
64 | 59, 63 | mpbid 231 |
. . 3
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → (𝑀 + 𝑁) ≤ (𝐾 + 𝑁)) |
65 | 18, 11, 14 | lesubadd2d 11574 |
. . . 4
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁)) → (((𝑀 + 𝑁) − 𝐾) ≤ 𝑁 ↔ (𝑀 + 𝑁) ≤ (𝐾 + 𝑁))) |
66 | 65 | 3adant3 1131 |
. . 3
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → (((𝑀 + 𝑁) − 𝐾) ≤ 𝑁 ↔ (𝑀 + 𝑁) ≤ (𝐾 + 𝑁))) |
67 | 64, 66 | mpbird 256 |
. 2
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → ((𝑀 + 𝑁) − 𝐾) ≤ 𝑁) |
68 | | elfz2nn0 13347 |
. 2
⊢ (((𝑀 + 𝑁) − 𝐾) ∈ (0...𝑁) ↔ (((𝑀 + 𝑁) − 𝐾) ∈ ℕ0 ∧ 𝑁 ∈ ℕ0
∧ ((𝑀 + 𝑁) − 𝐾) ≤ 𝑁)) |
69 | 47, 49, 67, 68 | syl3anbrc 1342 |
1
⊢ ((𝐾 ∈ (0...𝑁) ∧ 𝑀 ∈ (0...𝑁) ∧ ¬ 𝐾 ≤ 𝑀) → ((𝑀 + 𝑁) − 𝐾) ∈ (0...𝑁)) |