Proof of Theorem metakunt8
Step | Hyp | Ref
| Expression |
1 | | metakunt8.5 |
. . 3
⊢ 𝐶 = (𝑦 ∈ (1...𝑀) ↦ if(𝑦 = 𝑀, 𝐼, if(𝑦 < 𝐼, 𝑦, (𝑦 + 1)))) |
2 | 1 | a1i 11 |
. 2
⊢ ((𝜑 ∧ 𝐼 < 𝑋) → 𝐶 = (𝑦 ∈ (1...𝑀) ↦ if(𝑦 = 𝑀, 𝐼, if(𝑦 < 𝐼, 𝑦, (𝑦 + 1))))) |
3 | | eqeq1 2742 |
. . . . 5
⊢ (𝑦 = (𝐴‘𝑋) → (𝑦 = 𝑀 ↔ (𝐴‘𝑋) = 𝑀)) |
4 | | breq1 5077 |
. . . . . 6
⊢ (𝑦 = (𝐴‘𝑋) → (𝑦 < 𝐼 ↔ (𝐴‘𝑋) < 𝐼)) |
5 | | id 22 |
. . . . . 6
⊢ (𝑦 = (𝐴‘𝑋) → 𝑦 = (𝐴‘𝑋)) |
6 | | oveq1 7282 |
. . . . . 6
⊢ (𝑦 = (𝐴‘𝑋) → (𝑦 + 1) = ((𝐴‘𝑋) + 1)) |
7 | 4, 5, 6 | ifbieq12d 4487 |
. . . . 5
⊢ (𝑦 = (𝐴‘𝑋) → if(𝑦 < 𝐼, 𝑦, (𝑦 + 1)) = if((𝐴‘𝑋) < 𝐼, (𝐴‘𝑋), ((𝐴‘𝑋) + 1))) |
8 | 3, 7 | ifbieq2d 4485 |
. . . 4
⊢ (𝑦 = (𝐴‘𝑋) → if(𝑦 = 𝑀, 𝐼, if(𝑦 < 𝐼, 𝑦, (𝑦 + 1))) = if((𝐴‘𝑋) = 𝑀, 𝐼, if((𝐴‘𝑋) < 𝐼, (𝐴‘𝑋), ((𝐴‘𝑋) + 1)))) |
9 | 8 | adantl 482 |
. . 3
⊢ (((𝜑 ∧ 𝐼 < 𝑋) ∧ 𝑦 = (𝐴‘𝑋)) → if(𝑦 = 𝑀, 𝐼, if(𝑦 < 𝐼, 𝑦, (𝑦 + 1))) = if((𝐴‘𝑋) = 𝑀, 𝐼, if((𝐴‘𝑋) < 𝐼, (𝐴‘𝑋), ((𝐴‘𝑋) + 1)))) |
10 | | metakunt8.1 |
. . . . . . . . 9
⊢ (𝜑 → 𝑀 ∈ ℕ) |
11 | | metakunt8.2 |
. . . . . . . . 9
⊢ (𝜑 → 𝐼 ∈ ℕ) |
12 | | metakunt8.3 |
. . . . . . . . 9
⊢ (𝜑 → 𝐼 ≤ 𝑀) |
13 | | metakunt8.4 |
. . . . . . . . 9
⊢ 𝐴 = (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1)))) |
14 | | metakunt8.6 |
. . . . . . . . 9
⊢ (𝜑 → 𝑋 ∈ (1...𝑀)) |
15 | 10, 11, 12, 13, 1, 14 | metakunt7 40131 |
. . . . . . . 8
⊢ ((𝜑 ∧ 𝐼 < 𝑋) → ((𝐴‘𝑋) = (𝑋 − 1) ∧ ¬ (𝐴‘𝑋) = 𝑀 ∧ ¬ (𝐴‘𝑋) < 𝐼)) |
16 | 15 | simp2d 1142 |
. . . . . . 7
⊢ ((𝜑 ∧ 𝐼 < 𝑋) → ¬ (𝐴‘𝑋) = 𝑀) |
17 | | iffalse 4468 |
. . . . . . 7
⊢ (¬
(𝐴‘𝑋) = 𝑀 → if((𝐴‘𝑋) = 𝑀, 𝐼, if((𝐴‘𝑋) < 𝐼, (𝐴‘𝑋), ((𝐴‘𝑋) + 1))) = if((𝐴‘𝑋) < 𝐼, (𝐴‘𝑋), ((𝐴‘𝑋) + 1))) |
18 | 16, 17 | syl 17 |
. . . . . 6
⊢ ((𝜑 ∧ 𝐼 < 𝑋) → if((𝐴‘𝑋) = 𝑀, 𝐼, if((𝐴‘𝑋) < 𝐼, (𝐴‘𝑋), ((𝐴‘𝑋) + 1))) = if((𝐴‘𝑋) < 𝐼, (𝐴‘𝑋), ((𝐴‘𝑋) + 1))) |
19 | 15 | simp3d 1143 |
. . . . . . 7
⊢ ((𝜑 ∧ 𝐼 < 𝑋) → ¬ (𝐴‘𝑋) < 𝐼) |
20 | | iffalse 4468 |
. . . . . . 7
⊢ (¬
(𝐴‘𝑋) < 𝐼 → if((𝐴‘𝑋) < 𝐼, (𝐴‘𝑋), ((𝐴‘𝑋) + 1)) = ((𝐴‘𝑋) + 1)) |
21 | 19, 20 | syl 17 |
. . . . . 6
⊢ ((𝜑 ∧ 𝐼 < 𝑋) → if((𝐴‘𝑋) < 𝐼, (𝐴‘𝑋), ((𝐴‘𝑋) + 1)) = ((𝐴‘𝑋) + 1)) |
22 | 18, 21 | eqtrd 2778 |
. . . . 5
⊢ ((𝜑 ∧ 𝐼 < 𝑋) → if((𝐴‘𝑋) = 𝑀, 𝐼, if((𝐴‘𝑋) < 𝐼, (𝐴‘𝑋), ((𝐴‘𝑋) + 1))) = ((𝐴‘𝑋) + 1)) |
23 | 15 | simp1d 1141 |
. . . . . . 7
⊢ ((𝜑 ∧ 𝐼 < 𝑋) → (𝐴‘𝑋) = (𝑋 − 1)) |
24 | 23 | oveq1d 7290 |
. . . . . 6
⊢ ((𝜑 ∧ 𝐼 < 𝑋) → ((𝐴‘𝑋) + 1) = ((𝑋 − 1) + 1)) |
25 | | elfznn 13285 |
. . . . . . . . . 10
⊢ (𝑋 ∈ (1...𝑀) → 𝑋 ∈ ℕ) |
26 | 14, 25 | syl 17 |
. . . . . . . . 9
⊢ (𝜑 → 𝑋 ∈ ℕ) |
27 | 26 | nncnd 11989 |
. . . . . . . 8
⊢ (𝜑 → 𝑋 ∈ ℂ) |
28 | | 1cnd 10970 |
. . . . . . . 8
⊢ (𝜑 → 1 ∈
ℂ) |
29 | 27, 28 | npcand 11336 |
. . . . . . 7
⊢ (𝜑 → ((𝑋 − 1) + 1) = 𝑋) |
30 | 29 | adantr 481 |
. . . . . 6
⊢ ((𝜑 ∧ 𝐼 < 𝑋) → ((𝑋 − 1) + 1) = 𝑋) |
31 | 24, 30 | eqtrd 2778 |
. . . . 5
⊢ ((𝜑 ∧ 𝐼 < 𝑋) → ((𝐴‘𝑋) + 1) = 𝑋) |
32 | 22, 31 | eqtrd 2778 |
. . . 4
⊢ ((𝜑 ∧ 𝐼 < 𝑋) → if((𝐴‘𝑋) = 𝑀, 𝐼, if((𝐴‘𝑋) < 𝐼, (𝐴‘𝑋), ((𝐴‘𝑋) + 1))) = 𝑋) |
33 | 32 | adantr 481 |
. . 3
⊢ (((𝜑 ∧ 𝐼 < 𝑋) ∧ 𝑦 = (𝐴‘𝑋)) → if((𝐴‘𝑋) = 𝑀, 𝐼, if((𝐴‘𝑋) < 𝐼, (𝐴‘𝑋), ((𝐴‘𝑋) + 1))) = 𝑋) |
34 | 9, 33 | eqtrd 2778 |
. 2
⊢ (((𝜑 ∧ 𝐼 < 𝑋) ∧ 𝑦 = (𝐴‘𝑋)) → if(𝑦 = 𝑀, 𝐼, if(𝑦 < 𝐼, 𝑦, (𝑦 + 1))) = 𝑋) |
35 | 10, 11, 12, 13 | metakunt1 40125 |
. . . 4
⊢ (𝜑 → 𝐴:(1...𝑀)⟶(1...𝑀)) |
36 | 35 | adantr 481 |
. . 3
⊢ ((𝜑 ∧ 𝐼 < 𝑋) → 𝐴:(1...𝑀)⟶(1...𝑀)) |
37 | 14 | adantr 481 |
. . 3
⊢ ((𝜑 ∧ 𝐼 < 𝑋) → 𝑋 ∈ (1...𝑀)) |
38 | 36, 37 | ffvelrnd 6962 |
. 2
⊢ ((𝜑 ∧ 𝐼 < 𝑋) → (𝐴‘𝑋) ∈ (1...𝑀)) |
39 | 2, 34, 38, 37 | fvmptd 6882 |
1
⊢ ((𝜑 ∧ 𝐼 < 𝑋) → (𝐶‘(𝐴‘𝑋)) = 𝑋) |