Step | Hyp | Ref
| Expression |
1 | | metakunt33.1 |
. . . . 5
⊢ (𝜑 → 𝑀 ∈ ℕ) |
2 | | metakunt33.2 |
. . . . 5
⊢ (𝜑 → 𝐼 ∈ ℕ) |
3 | | metakunt33.3 |
. . . . 5
⊢ (𝜑 → 𝐼 ≤ 𝑀) |
4 | | metakunt33.6 |
. . . . 5
⊢ 𝐶 = (𝑦 ∈ (1...𝑀) ↦ if(𝑦 = 𝑀, 𝐼, if(𝑦 < 𝐼, 𝑦, (𝑦 + 1)))) |
5 | 1, 2, 3, 4 | metakunt2 39633 |
. . . 4
⊢ (𝜑 → 𝐶:(1...𝑀)⟶(1...𝑀)) |
6 | | metakunt33.5 |
. . . . . . 7
⊢ 𝐵 = (𝑧 ∈ (1...𝑀) ↦ if(𝑧 = 𝑀, 𝑀, if(𝑧 < 𝐼, (𝑧 + (𝑀 − 𝐼)), (𝑧 + (1 − 𝐼))))) |
7 | 1, 2, 3, 6 | metakunt25 39656 |
. . . . . 6
⊢ (𝜑 → 𝐵:(1...𝑀)–1-1-onto→(1...𝑀)) |
8 | | f1of 6595 |
. . . . . 6
⊢ (𝐵:(1...𝑀)–1-1-onto→(1...𝑀) → 𝐵:(1...𝑀)⟶(1...𝑀)) |
9 | 7, 8 | syl 17 |
. . . . 5
⊢ (𝜑 → 𝐵:(1...𝑀)⟶(1...𝑀)) |
10 | | metakunt33.4 |
. . . . . 6
⊢ 𝐴 = (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1)))) |
11 | 1, 2, 3, 10 | metakunt1 39632 |
. . . . 5
⊢ (𝜑 → 𝐴:(1...𝑀)⟶(1...𝑀)) |
12 | 9, 11 | fcod 6510 |
. . . 4
⊢ (𝜑 → (𝐵 ∘ 𝐴):(1...𝑀)⟶(1...𝑀)) |
13 | 5, 12 | fcod 6510 |
. . 3
⊢ (𝜑 → (𝐶 ∘ (𝐵 ∘ 𝐴)):(1...𝑀)⟶(1...𝑀)) |
14 | 13 | ffnd 6492 |
. 2
⊢ (𝜑 → (𝐶 ∘ (𝐵 ∘ 𝐴)) Fn (1...𝑀)) |
15 | | nfv 1916 |
. . 3
⊢
Ⅎ𝑤𝜑 |
16 | | elfzelz 12941 |
. . . . 5
⊢ (𝑤 ∈ (1...𝑀) → 𝑤 ∈ ℤ) |
17 | 16 | adantl 486 |
. . . 4
⊢ ((𝜑 ∧ 𝑤 ∈ (1...𝑀)) → 𝑤 ∈ ℤ) |
18 | 1 | nnzd 12110 |
. . . . . . . . 9
⊢ (𝜑 → 𝑀 ∈ ℤ) |
19 | 18 | adantr 485 |
. . . . . . . 8
⊢ ((𝜑 ∧ 𝑤 ∈ (1...𝑀)) → 𝑀 ∈ ℤ) |
20 | 2 | nnzd 12110 |
. . . . . . . . 9
⊢ (𝜑 → 𝐼 ∈ ℤ) |
21 | 20 | adantr 485 |
. . . . . . . 8
⊢ ((𝜑 ∧ 𝑤 ∈ (1...𝑀)) → 𝐼 ∈ ℤ) |
22 | 19, 21 | zsubcld 12116 |
. . . . . . 7
⊢ ((𝜑 ∧ 𝑤 ∈ (1...𝑀)) → (𝑀 − 𝐼) ∈ ℤ) |
23 | 17, 22 | zaddcld 12115 |
. . . . . 6
⊢ ((𝜑 ∧ 𝑤 ∈ (1...𝑀)) → (𝑤 + (𝑀 − 𝐼)) ∈ ℤ) |
24 | | 1zzd 12037 |
. . . . . . 7
⊢ ((𝜑 ∧ 𝑤 ∈ (1...𝑀)) → 1 ∈ ℤ) |
25 | | 0zd 12017 |
. . . . . . 7
⊢ ((𝜑 ∧ 𝑤 ∈ (1...𝑀)) → 0 ∈ ℤ) |
26 | 24, 25 | ifcld 4459 |
. . . . . 6
⊢ ((𝜑 ∧ 𝑤 ∈ (1...𝑀)) → if(𝐼 ≤ (𝑤 + (𝑀 − 𝐼)), 1, 0) ∈ ℤ) |
27 | 23, 26 | zaddcld 12115 |
. . . . 5
⊢ ((𝜑 ∧ 𝑤 ∈ (1...𝑀)) → ((𝑤 + (𝑀 − 𝐼)) + if(𝐼 ≤ (𝑤 + (𝑀 − 𝐼)), 1, 0)) ∈ ℤ) |
28 | 17, 21 | zsubcld 12116 |
. . . . . 6
⊢ ((𝜑 ∧ 𝑤 ∈ (1...𝑀)) → (𝑤 − 𝐼) ∈ ℤ) |
29 | 24, 25 | ifcld 4459 |
. . . . . 6
⊢ ((𝜑 ∧ 𝑤 ∈ (1...𝑀)) → if(𝐼 ≤ (𝑤 − 𝐼), 1, 0) ∈ ℤ) |
30 | 28, 29 | zaddcld 12115 |
. . . . 5
⊢ ((𝜑 ∧ 𝑤 ∈ (1...𝑀)) → ((𝑤 − 𝐼) + if(𝐼 ≤ (𝑤 − 𝐼), 1, 0)) ∈ ℤ) |
31 | 27, 30 | ifcld 4459 |
. . . 4
⊢ ((𝜑 ∧ 𝑤 ∈ (1...𝑀)) → if(𝑤 < 𝐼, ((𝑤 + (𝑀 − 𝐼)) + if(𝐼 ≤ (𝑤 + (𝑀 − 𝐼)), 1, 0)), ((𝑤 − 𝐼) + if(𝐼 ≤ (𝑤 − 𝐼), 1, 0))) ∈ ℤ) |
32 | 17, 31 | ifcld 4459 |
. . 3
⊢ ((𝜑 ∧ 𝑤 ∈ (1...𝑀)) → if(𝑤 = 𝐼, 𝑤, if(𝑤 < 𝐼, ((𝑤 + (𝑀 − 𝐼)) + if(𝐼 ≤ (𝑤 + (𝑀 − 𝐼)), 1, 0)), ((𝑤 − 𝐼) + if(𝐼 ≤ (𝑤 − 𝐼), 1, 0)))) ∈ ℤ) |
33 | | metakunt33.7 |
. . 3
⊢ 𝐷 = (𝑤 ∈ (1...𝑀) ↦ if(𝑤 = 𝐼, 𝑤, if(𝑤 < 𝐼, ((𝑤 + (𝑀 − 𝐼)) + if(𝐼 ≤ (𝑤 + (𝑀 − 𝐼)), 1, 0)), ((𝑤 − 𝐼) + if(𝐼 ≤ (𝑤 − 𝐼), 1, 0))))) |
34 | 15, 32, 33 | fnmptd 6465 |
. 2
⊢ (𝜑 → 𝐷 Fn (1...𝑀)) |
35 | 12 | adantr 485 |
. . . . 5
⊢ ((𝜑 ∧ 𝑎 ∈ (1...𝑀)) → (𝐵 ∘ 𝐴):(1...𝑀)⟶(1...𝑀)) |
36 | | simpr 489 |
. . . . 5
⊢ ((𝜑 ∧ 𝑎 ∈ (1...𝑀)) → 𝑎 ∈ (1...𝑀)) |
37 | 35, 36 | fvco3d 6745 |
. . . 4
⊢ ((𝜑 ∧ 𝑎 ∈ (1...𝑀)) → ((𝐶 ∘ (𝐵 ∘ 𝐴))‘𝑎) = (𝐶‘((𝐵 ∘ 𝐴)‘𝑎))) |
38 | 11 | adantr 485 |
. . . . . 6
⊢ ((𝜑 ∧ 𝑎 ∈ (1...𝑀)) → 𝐴:(1...𝑀)⟶(1...𝑀)) |
39 | 38, 36 | fvco3d 6745 |
. . . . 5
⊢ ((𝜑 ∧ 𝑎 ∈ (1...𝑀)) → ((𝐵 ∘ 𝐴)‘𝑎) = (𝐵‘(𝐴‘𝑎))) |
40 | 39 | fveq2d 6655 |
. . . 4
⊢ ((𝜑 ∧ 𝑎 ∈ (1...𝑀)) → (𝐶‘((𝐵 ∘ 𝐴)‘𝑎)) = (𝐶‘(𝐵‘(𝐴‘𝑎)))) |
41 | 37, 40 | eqtrd 2794 |
. . 3
⊢ ((𝜑 ∧ 𝑎 ∈ (1...𝑀)) → ((𝐶 ∘ (𝐵 ∘ 𝐴))‘𝑎) = (𝐶‘(𝐵‘(𝐴‘𝑎)))) |
42 | 1 | adantr 485 |
. . . . 5
⊢ ((𝜑 ∧ 𝑎 ∈ (1...𝑀)) → 𝑀 ∈ ℕ) |
43 | 2 | adantr 485 |
. . . . 5
⊢ ((𝜑 ∧ 𝑎 ∈ (1...𝑀)) → 𝐼 ∈ ℕ) |
44 | 3 | adantr 485 |
. . . . 5
⊢ ((𝜑 ∧ 𝑎 ∈ (1...𝑀)) → 𝐼 ≤ 𝑀) |
45 | | eqid 2759 |
. . . . 5
⊢ if(𝐼 ≤ (𝑎 + (𝑀 − 𝐼)), 1, 0) = if(𝐼 ≤ (𝑎 + (𝑀 − 𝐼)), 1, 0) |
46 | | eqid 2759 |
. . . . 5
⊢ if(𝐼 ≤ (𝑎 − 𝐼), 1, 0) = if(𝐼 ≤ (𝑎 − 𝐼), 1, 0) |
47 | | eqid 2759 |
. . . . 5
⊢ if(𝑎 = 𝐼, 𝑎, if(𝑎 < 𝐼, ((𝑎 + (𝑀 − 𝐼)) + if(𝐼 ≤ (𝑎 + (𝑀 − 𝐼)), 1, 0)), ((𝑎 − 𝐼) + if(𝐼 ≤ (𝑎 − 𝐼), 1, 0)))) = if(𝑎 = 𝐼, 𝑎, if(𝑎 < 𝐼, ((𝑎 + (𝑀 − 𝐼)) + if(𝐼 ≤ (𝑎 + (𝑀 − 𝐼)), 1, 0)), ((𝑎 − 𝐼) + if(𝐼 ≤ (𝑎 − 𝐼), 1, 0)))) |
48 | 42, 43, 44, 36, 10, 6, 4, 45, 46, 47 | metakunt31 39662 |
. . . 4
⊢ ((𝜑 ∧ 𝑎 ∈ (1...𝑀)) → (𝐶‘(𝐵‘(𝐴‘𝑎))) = if(𝑎 = 𝐼, 𝑎, if(𝑎 < 𝐼, ((𝑎 + (𝑀 − 𝐼)) + if(𝐼 ≤ (𝑎 + (𝑀 − 𝐼)), 1, 0)), ((𝑎 − 𝐼) + if(𝐼 ≤ (𝑎 − 𝐼), 1, 0))))) |
49 | 42, 43, 44, 36, 33, 45, 46, 47 | metakunt32 39663 |
. . . . 5
⊢ ((𝜑 ∧ 𝑎 ∈ (1...𝑀)) → (𝐷‘𝑎) = if(𝑎 = 𝐼, 𝑎, if(𝑎 < 𝐼, ((𝑎 + (𝑀 − 𝐼)) + if(𝐼 ≤ (𝑎 + (𝑀 − 𝐼)), 1, 0)), ((𝑎 − 𝐼) + if(𝐼 ≤ (𝑎 − 𝐼), 1, 0))))) |
50 | 49 | eqcomd 2765 |
. . . 4
⊢ ((𝜑 ∧ 𝑎 ∈ (1...𝑀)) → if(𝑎 = 𝐼, 𝑎, if(𝑎 < 𝐼, ((𝑎 + (𝑀 − 𝐼)) + if(𝐼 ≤ (𝑎 + (𝑀 − 𝐼)), 1, 0)), ((𝑎 − 𝐼) + if(𝐼 ≤ (𝑎 − 𝐼), 1, 0)))) = (𝐷‘𝑎)) |
51 | 48, 50 | eqtrd 2794 |
. . 3
⊢ ((𝜑 ∧ 𝑎 ∈ (1...𝑀)) → (𝐶‘(𝐵‘(𝐴‘𝑎))) = (𝐷‘𝑎)) |
52 | 41, 51 | eqtrd 2794 |
. 2
⊢ ((𝜑 ∧ 𝑎 ∈ (1...𝑀)) → ((𝐶 ∘ (𝐵 ∘ 𝐴))‘𝑎) = (𝐷‘𝑎)) |
53 | 14, 34, 52 | eqfnfvd 6789 |
1
⊢ (𝜑 → (𝐶 ∘ (𝐵 ∘ 𝐴)) = 𝐷) |