Proof of Theorem metakunt2
Step | Hyp | Ref
| Expression |
1 | | eleq1 2826 |
. . 3
⊢ (𝐼 = if(𝑥 = 𝑀, 𝐼, if(𝑥 < 𝐼, 𝑥, (𝑥 + 1))) → (𝐼 ∈ (1...𝑀) ↔ if(𝑥 = 𝑀, 𝐼, if(𝑥 < 𝐼, 𝑥, (𝑥 + 1))) ∈ (1...𝑀))) |
2 | | eleq1 2826 |
. . 3
⊢ (if(𝑥 < 𝐼, 𝑥, (𝑥 + 1)) = if(𝑥 = 𝑀, 𝐼, if(𝑥 < 𝐼, 𝑥, (𝑥 + 1))) → (if(𝑥 < 𝐼, 𝑥, (𝑥 + 1)) ∈ (1...𝑀) ↔ if(𝑥 = 𝑀, 𝐼, if(𝑥 < 𝐼, 𝑥, (𝑥 + 1))) ∈ (1...𝑀))) |
3 | | 1zzd 12281 |
. . . 4
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ 𝑥 = 𝑀) → 1 ∈ ℤ) |
4 | | metakunt2.1 |
. . . . . 6
⊢ (𝜑 → 𝑀 ∈ ℕ) |
5 | 4 | nnzd 12354 |
. . . . 5
⊢ (𝜑 → 𝑀 ∈ ℤ) |
6 | 5 | ad2antrr 722 |
. . . 4
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ 𝑥 = 𝑀) → 𝑀 ∈ ℤ) |
7 | | metakunt2.2 |
. . . . . 6
⊢ (𝜑 → 𝐼 ∈ ℕ) |
8 | 7 | nnzd 12354 |
. . . . 5
⊢ (𝜑 → 𝐼 ∈ ℤ) |
9 | 8 | ad2antrr 722 |
. . . 4
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ 𝑥 = 𝑀) → 𝐼 ∈ ℤ) |
10 | 7 | nnge1d 11951 |
. . . . 5
⊢ (𝜑 → 1 ≤ 𝐼) |
11 | 10 | ad2antrr 722 |
. . . 4
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ 𝑥 = 𝑀) → 1 ≤ 𝐼) |
12 | | metakunt2.3 |
. . . . 5
⊢ (𝜑 → 𝐼 ≤ 𝑀) |
13 | 12 | ad2antrr 722 |
. . . 4
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ 𝑥 = 𝑀) → 𝐼 ≤ 𝑀) |
14 | 3, 6, 9, 11, 13 | elfzd 13176 |
. . 3
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ 𝑥 = 𝑀) → 𝐼 ∈ (1...𝑀)) |
15 | | eleq1 2826 |
. . . 4
⊢ (𝑥 = if(𝑥 < 𝐼, 𝑥, (𝑥 + 1)) → (𝑥 ∈ (1...𝑀) ↔ if(𝑥 < 𝐼, 𝑥, (𝑥 + 1)) ∈ (1...𝑀))) |
16 | | eleq1 2826 |
. . . 4
⊢ ((𝑥 + 1) = if(𝑥 < 𝐼, 𝑥, (𝑥 + 1)) → ((𝑥 + 1) ∈ (1...𝑀) ↔ if(𝑥 < 𝐼, 𝑥, (𝑥 + 1)) ∈ (1...𝑀))) |
17 | | simpllr 772 |
. . . 4
⊢ ((((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ ¬ 𝑥 = 𝑀) ∧ 𝑥 < 𝐼) → 𝑥 ∈ (1...𝑀)) |
18 | | 1zzd 12281 |
. . . . . 6
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ (¬ 𝑥 = 𝑀 ∧ ¬ 𝑥 < 𝐼)) → 1 ∈ ℤ) |
19 | 5 | ad2antrr 722 |
. . . . . 6
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ (¬ 𝑥 = 𝑀 ∧ ¬ 𝑥 < 𝐼)) → 𝑀 ∈ ℤ) |
20 | | elfznn 13214 |
. . . . . . . . 9
⊢ (𝑥 ∈ (1...𝑀) → 𝑥 ∈ ℕ) |
21 | 20 | nnzd 12354 |
. . . . . . . 8
⊢ (𝑥 ∈ (1...𝑀) → 𝑥 ∈ ℤ) |
22 | 21 | ad2antlr 723 |
. . . . . . 7
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ (¬ 𝑥 = 𝑀 ∧ ¬ 𝑥 < 𝐼)) → 𝑥 ∈ ℤ) |
23 | 22 | peano2zd 12358 |
. . . . . 6
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ (¬ 𝑥 = 𝑀 ∧ ¬ 𝑥 < 𝐼)) → (𝑥 + 1) ∈ ℤ) |
24 | | 0p1e1 12025 |
. . . . . . . 8
⊢ (0 + 1) =
1 |
25 | | 0red 10909 |
. . . . . . . . 9
⊢ (𝑥 ∈ (1...𝑀) → 0 ∈ ℝ) |
26 | 20 | nnred 11918 |
. . . . . . . . 9
⊢ (𝑥 ∈ (1...𝑀) → 𝑥 ∈ ℝ) |
27 | | 1red 10907 |
. . . . . . . . 9
⊢ (𝑥 ∈ (1...𝑀) → 1 ∈ ℝ) |
28 | 20 | nnnn0d 12223 |
. . . . . . . . . 10
⊢ (𝑥 ∈ (1...𝑀) → 𝑥 ∈ ℕ0) |
29 | 28 | nn0ge0d 12226 |
. . . . . . . . 9
⊢ (𝑥 ∈ (1...𝑀) → 0 ≤ 𝑥) |
30 | 25, 26, 27, 29 | leadd1dd 11519 |
. . . . . . . 8
⊢ (𝑥 ∈ (1...𝑀) → (0 + 1) ≤ (𝑥 + 1)) |
31 | 24, 30 | eqbrtrrid 5106 |
. . . . . . 7
⊢ (𝑥 ∈ (1...𝑀) → 1 ≤ (𝑥 + 1)) |
32 | 31 | ad2antlr 723 |
. . . . . 6
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ (¬ 𝑥 = 𝑀 ∧ ¬ 𝑥 < 𝐼)) → 1 ≤ (𝑥 + 1)) |
33 | | simplr 765 |
. . . . . . . . 9
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ ¬ 𝑥 = 𝑀) → 𝑥 ∈ (1...𝑀)) |
34 | | neqne 2950 |
. . . . . . . . . 10
⊢ (¬
𝑥 = 𝑀 → 𝑥 ≠ 𝑀) |
35 | 34 | adantl 481 |
. . . . . . . . 9
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ ¬ 𝑥 = 𝑀) → 𝑥 ≠ 𝑀) |
36 | 33, 35 | fzne2d 39917 |
. . . . . . . 8
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ ¬ 𝑥 = 𝑀) → 𝑥 < 𝑀) |
37 | 36 | adantrr 713 |
. . . . . . 7
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ (¬ 𝑥 = 𝑀 ∧ ¬ 𝑥 < 𝐼)) → 𝑥 < 𝑀) |
38 | 21 | adantl 481 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑥 ∈ (1...𝑀)) → 𝑥 ∈ ℤ) |
39 | 5 | adantr 480 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑥 ∈ (1...𝑀)) → 𝑀 ∈ ℤ) |
40 | 38, 39 | zltp1led 39916 |
. . . . . . . 8
⊢ ((𝜑 ∧ 𝑥 ∈ (1...𝑀)) → (𝑥 < 𝑀 ↔ (𝑥 + 1) ≤ 𝑀)) |
41 | 40 | adantr 480 |
. . . . . . 7
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ (¬ 𝑥 = 𝑀 ∧ ¬ 𝑥 < 𝐼)) → (𝑥 < 𝑀 ↔ (𝑥 + 1) ≤ 𝑀)) |
42 | 37, 41 | mpbid 231 |
. . . . . 6
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ (¬ 𝑥 = 𝑀 ∧ ¬ 𝑥 < 𝐼)) → (𝑥 + 1) ≤ 𝑀) |
43 | 18, 19, 23, 32, 42 | elfzd 13176 |
. . . . 5
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ (¬ 𝑥 = 𝑀 ∧ ¬ 𝑥 < 𝐼)) → (𝑥 + 1) ∈ (1...𝑀)) |
44 | 43 | anassrs 467 |
. . . 4
⊢ ((((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ ¬ 𝑥 = 𝑀) ∧ ¬ 𝑥 < 𝐼) → (𝑥 + 1) ∈ (1...𝑀)) |
45 | 15, 16, 17, 44 | ifbothda 4494 |
. . 3
⊢ (((𝜑 ∧ 𝑥 ∈ (1...𝑀)) ∧ ¬ 𝑥 = 𝑀) → if(𝑥 < 𝐼, 𝑥, (𝑥 + 1)) ∈ (1...𝑀)) |
46 | 1, 2, 14, 45 | ifbothda 4494 |
. 2
⊢ ((𝜑 ∧ 𝑥 ∈ (1...𝑀)) → if(𝑥 = 𝑀, 𝐼, if(𝑥 < 𝐼, 𝑥, (𝑥 + 1))) ∈ (1...𝑀)) |
47 | | metakunt2.4 |
. 2
⊢ 𝐴 = (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝑀, 𝐼, if(𝑥 < 𝐼, 𝑥, (𝑥 + 1)))) |
48 | 46, 47 | fmptd 6970 |
1
⊢ (𝜑 → 𝐴:(1...𝑀)⟶(1...𝑀)) |