Step |
Hyp |
Ref |
Expression |
1 |
|
metakunt26.1 |
⊢ ( 𝜑 → 𝑀 ∈ ℕ ) |
2 |
|
metakunt26.2 |
⊢ ( 𝜑 → 𝐼 ∈ ℕ ) |
3 |
|
metakunt26.3 |
⊢ ( 𝜑 → 𝐼 ≤ 𝑀 ) |
4 |
|
metakunt26.4 |
⊢ 𝐴 = ( 𝑥 ∈ ( 1 ... 𝑀 ) ↦ if ( 𝑥 = 𝐼 , 𝑀 , if ( 𝑥 < 𝐼 , 𝑥 , ( 𝑥 − 1 ) ) ) ) |
5 |
|
metakunt26.5 |
⊢ 𝐶 = ( 𝑦 ∈ ( 1 ... 𝑀 ) ↦ if ( 𝑦 = 𝑀 , 𝐼 , if ( 𝑦 < 𝐼 , 𝑦 , ( 𝑦 + 1 ) ) ) ) |
6 |
|
metakunt26.6 |
⊢ 𝐵 = ( 𝑧 ∈ ( 1 ... 𝑀 ) ↦ if ( 𝑧 = 𝑀 , 𝑀 , if ( 𝑧 < 𝐼 , ( 𝑧 + ( 𝑀 − 𝐼 ) ) , ( 𝑧 + ( 1 − 𝐼 ) ) ) ) ) |
7 |
|
metakunt26.7 |
⊢ ( 𝜑 → 𝑋 = 𝐼 ) |
8 |
4
|
a1i |
⊢ ( 𝜑 → 𝐴 = ( 𝑥 ∈ ( 1 ... 𝑀 ) ↦ if ( 𝑥 = 𝐼 , 𝑀 , if ( 𝑥 < 𝐼 , 𝑥 , ( 𝑥 − 1 ) ) ) ) ) |
9 |
7
|
eqeq2d |
⊢ ( 𝜑 → ( 𝑥 = 𝑋 ↔ 𝑥 = 𝐼 ) ) |
10 |
|
simpr |
⊢ ( ( 𝜑 ∧ 𝑥 = 𝐼 ) → 𝑥 = 𝐼 ) |
11 |
10
|
iftrued |
⊢ ( ( 𝜑 ∧ 𝑥 = 𝐼 ) → if ( 𝑥 = 𝐼 , 𝑀 , if ( 𝑥 < 𝐼 , 𝑥 , ( 𝑥 − 1 ) ) ) = 𝑀 ) |
12 |
11
|
ex |
⊢ ( 𝜑 → ( 𝑥 = 𝐼 → if ( 𝑥 = 𝐼 , 𝑀 , if ( 𝑥 < 𝐼 , 𝑥 , ( 𝑥 − 1 ) ) ) = 𝑀 ) ) |
13 |
9 12
|
sylbid |
⊢ ( 𝜑 → ( 𝑥 = 𝑋 → if ( 𝑥 = 𝐼 , 𝑀 , if ( 𝑥 < 𝐼 , 𝑥 , ( 𝑥 − 1 ) ) ) = 𝑀 ) ) |
14 |
13
|
imp |
⊢ ( ( 𝜑 ∧ 𝑥 = 𝑋 ) → if ( 𝑥 = 𝐼 , 𝑀 , if ( 𝑥 < 𝐼 , 𝑥 , ( 𝑥 − 1 ) ) ) = 𝑀 ) |
15 |
|
1zzd |
⊢ ( 𝜑 → 1 ∈ ℤ ) |
16 |
|
nnz |
⊢ ( 𝑀 ∈ ℕ → 𝑀 ∈ ℤ ) |
17 |
1 16
|
syl |
⊢ ( 𝜑 → 𝑀 ∈ ℤ ) |
18 |
2
|
nnzd |
⊢ ( 𝜑 → 𝐼 ∈ ℤ ) |
19 |
2
|
nnge1d |
⊢ ( 𝜑 → 1 ≤ 𝐼 ) |
20 |
15 17 18 19 3
|
elfzd |
⊢ ( 𝜑 → 𝐼 ∈ ( 1 ... 𝑀 ) ) |
21 |
7
|
eleq1d |
⊢ ( 𝜑 → ( 𝑋 ∈ ( 1 ... 𝑀 ) ↔ 𝐼 ∈ ( 1 ... 𝑀 ) ) ) |
22 |
20 21
|
mpbird |
⊢ ( 𝜑 → 𝑋 ∈ ( 1 ... 𝑀 ) ) |
23 |
8 14 22 1
|
fvmptd |
⊢ ( 𝜑 → ( 𝐴 ‘ 𝑋 ) = 𝑀 ) |
24 |
23
|
fveq2d |
⊢ ( 𝜑 → ( 𝐵 ‘ ( 𝐴 ‘ 𝑋 ) ) = ( 𝐵 ‘ 𝑀 ) ) |
25 |
6
|
a1i |
⊢ ( 𝜑 → 𝐵 = ( 𝑧 ∈ ( 1 ... 𝑀 ) ↦ if ( 𝑧 = 𝑀 , 𝑀 , if ( 𝑧 < 𝐼 , ( 𝑧 + ( 𝑀 − 𝐼 ) ) , ( 𝑧 + ( 1 − 𝐼 ) ) ) ) ) ) |
26 |
|
simpr |
⊢ ( ( 𝜑 ∧ 𝑧 = 𝑀 ) → 𝑧 = 𝑀 ) |
27 |
26
|
iftrued |
⊢ ( ( 𝜑 ∧ 𝑧 = 𝑀 ) → if ( 𝑧 = 𝑀 , 𝑀 , if ( 𝑧 < 𝐼 , ( 𝑧 + ( 𝑀 − 𝐼 ) ) , ( 𝑧 + ( 1 − 𝐼 ) ) ) ) = 𝑀 ) |
28 |
|
1zzd |
⊢ ( 𝑀 ∈ ℕ → 1 ∈ ℤ ) |
29 |
|
nnge1 |
⊢ ( 𝑀 ∈ ℕ → 1 ≤ 𝑀 ) |
30 |
|
nnre |
⊢ ( 𝑀 ∈ ℕ → 𝑀 ∈ ℝ ) |
31 |
30
|
leidd |
⊢ ( 𝑀 ∈ ℕ → 𝑀 ≤ 𝑀 ) |
32 |
28 16 16 29 31
|
elfzd |
⊢ ( 𝑀 ∈ ℕ → 𝑀 ∈ ( 1 ... 𝑀 ) ) |
33 |
1 32
|
syl |
⊢ ( 𝜑 → 𝑀 ∈ ( 1 ... 𝑀 ) ) |
34 |
25 27 33 1
|
fvmptd |
⊢ ( 𝜑 → ( 𝐵 ‘ 𝑀 ) = 𝑀 ) |
35 |
24 34
|
eqtrd |
⊢ ( 𝜑 → ( 𝐵 ‘ ( 𝐴 ‘ 𝑋 ) ) = 𝑀 ) |
36 |
35
|
fveq2d |
⊢ ( 𝜑 → ( 𝐶 ‘ ( 𝐵 ‘ ( 𝐴 ‘ 𝑋 ) ) ) = ( 𝐶 ‘ 𝑀 ) ) |
37 |
5
|
a1i |
⊢ ( 𝜑 → 𝐶 = ( 𝑦 ∈ ( 1 ... 𝑀 ) ↦ if ( 𝑦 = 𝑀 , 𝐼 , if ( 𝑦 < 𝐼 , 𝑦 , ( 𝑦 + 1 ) ) ) ) ) |
38 |
|
simpr |
⊢ ( ( 𝜑 ∧ 𝑦 = 𝑀 ) → 𝑦 = 𝑀 ) |
39 |
38
|
iftrued |
⊢ ( ( 𝜑 ∧ 𝑦 = 𝑀 ) → if ( 𝑦 = 𝑀 , 𝐼 , if ( 𝑦 < 𝐼 , 𝑦 , ( 𝑦 + 1 ) ) ) = 𝐼 ) |
40 |
37 39 33 2
|
fvmptd |
⊢ ( 𝜑 → ( 𝐶 ‘ 𝑀 ) = 𝐼 ) |
41 |
36 40
|
eqtrd |
⊢ ( 𝜑 → ( 𝐶 ‘ ( 𝐵 ‘ ( 𝐴 ‘ 𝑋 ) ) ) = 𝐼 ) |
42 |
7
|
eqcomd |
⊢ ( 𝜑 → 𝐼 = 𝑋 ) |
43 |
41 42
|
eqtrd |
⊢ ( 𝜑 → ( 𝐶 ‘ ( 𝐵 ‘ ( 𝐴 ‘ 𝑋 ) ) ) = 𝑋 ) |