Proof of Theorem metakunt22
Step | Hyp | Ref
| Expression |
1 | | metakunt22.4 |
. . . 4
⊢ 𝐵 = (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝑀, 𝑀, if(𝑥 < 𝐼, (𝑥 + (𝑀 − 𝐼)), (𝑥 + (1 − 𝐼))))) |
2 | 1 | a1i 11 |
. . 3
⊢ (𝜑 → 𝐵 = (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝑀, 𝑀, if(𝑥 < 𝐼, (𝑥 + (𝑀 − 𝐼)), (𝑥 + (1 − 𝐼)))))) |
3 | | eqeq1 2742 |
. . . . . 6
⊢ (𝑥 = 𝑋 → (𝑥 = 𝑀 ↔ 𝑋 = 𝑀)) |
4 | | breq1 5073 |
. . . . . . 7
⊢ (𝑥 = 𝑋 → (𝑥 < 𝐼 ↔ 𝑋 < 𝐼)) |
5 | | oveq1 7262 |
. . . . . . 7
⊢ (𝑥 = 𝑋 → (𝑥 + (𝑀 − 𝐼)) = (𝑋 + (𝑀 − 𝐼))) |
6 | | oveq1 7262 |
. . . . . . 7
⊢ (𝑥 = 𝑋 → (𝑥 + (1 − 𝐼)) = (𝑋 + (1 − 𝐼))) |
7 | 4, 5, 6 | ifbieq12d 4484 |
. . . . . 6
⊢ (𝑥 = 𝑋 → if(𝑥 < 𝐼, (𝑥 + (𝑀 − 𝐼)), (𝑥 + (1 − 𝐼))) = if(𝑋 < 𝐼, (𝑋 + (𝑀 − 𝐼)), (𝑋 + (1 − 𝐼)))) |
8 | 3, 7 | ifbieq2d 4482 |
. . . . 5
⊢ (𝑥 = 𝑋 → if(𝑥 = 𝑀, 𝑀, if(𝑥 < 𝐼, (𝑥 + (𝑀 − 𝐼)), (𝑥 + (1 − 𝐼)))) = if(𝑋 = 𝑀, 𝑀, if(𝑋 < 𝐼, (𝑋 + (𝑀 − 𝐼)), (𝑋 + (1 − 𝐼))))) |
9 | 8 | adantl 481 |
. . . 4
⊢ ((𝜑 ∧ 𝑥 = 𝑋) → if(𝑥 = 𝑀, 𝑀, if(𝑥 < 𝐼, (𝑥 + (𝑀 − 𝐼)), (𝑥 + (1 − 𝐼)))) = if(𝑋 = 𝑀, 𝑀, if(𝑋 < 𝐼, (𝑋 + (𝑀 − 𝐼)), (𝑋 + (1 − 𝐼))))) |
10 | | metakunt22.8 |
. . . . . . 7
⊢ (𝜑 → ¬ 𝑋 = 𝑀) |
11 | | iffalse 4465 |
. . . . . . 7
⊢ (¬
𝑋 = 𝑀 → if(𝑋 = 𝑀, 𝑀, if(𝑋 < 𝐼, (𝑋 + (𝑀 − 𝐼)), (𝑋 + (1 − 𝐼)))) = if(𝑋 < 𝐼, (𝑋 + (𝑀 − 𝐼)), (𝑋 + (1 − 𝐼)))) |
12 | 10, 11 | syl 17 |
. . . . . 6
⊢ (𝜑 → if(𝑋 = 𝑀, 𝑀, if(𝑋 < 𝐼, (𝑋 + (𝑀 − 𝐼)), (𝑋 + (1 − 𝐼)))) = if(𝑋 < 𝐼, (𝑋 + (𝑀 − 𝐼)), (𝑋 + (1 − 𝐼)))) |
13 | | metakunt22.9 |
. . . . . . 7
⊢ (𝜑 → ¬ 𝑋 < 𝐼) |
14 | | iffalse 4465 |
. . . . . . 7
⊢ (¬
𝑋 < 𝐼 → if(𝑋 < 𝐼, (𝑋 + (𝑀 − 𝐼)), (𝑋 + (1 − 𝐼))) = (𝑋 + (1 − 𝐼))) |
15 | 13, 14 | syl 17 |
. . . . . 6
⊢ (𝜑 → if(𝑋 < 𝐼, (𝑋 + (𝑀 − 𝐼)), (𝑋 + (1 − 𝐼))) = (𝑋 + (1 − 𝐼))) |
16 | 12, 15 | eqtrd 2778 |
. . . . 5
⊢ (𝜑 → if(𝑋 = 𝑀, 𝑀, if(𝑋 < 𝐼, (𝑋 + (𝑀 − 𝐼)), (𝑋 + (1 − 𝐼)))) = (𝑋 + (1 − 𝐼))) |
17 | 16 | adantr 480 |
. . . 4
⊢ ((𝜑 ∧ 𝑥 = 𝑋) → if(𝑋 = 𝑀, 𝑀, if(𝑋 < 𝐼, (𝑋 + (𝑀 − 𝐼)), (𝑋 + (1 − 𝐼)))) = (𝑋 + (1 − 𝐼))) |
18 | 9, 17 | eqtrd 2778 |
. . 3
⊢ ((𝜑 ∧ 𝑥 = 𝑋) → if(𝑥 = 𝑀, 𝑀, if(𝑥 < 𝐼, (𝑥 + (𝑀 − 𝐼)), (𝑥 + (1 − 𝐼)))) = (𝑋 + (1 − 𝐼))) |
19 | | metakunt22.7 |
. . 3
⊢ (𝜑 → 𝑋 ∈ (1...𝑀)) |
20 | 19 | elfzelzd 13186 |
. . . 4
⊢ (𝜑 → 𝑋 ∈ ℤ) |
21 | | 1zzd 12281 |
. . . . 5
⊢ (𝜑 → 1 ∈
ℤ) |
22 | | metakunt22.2 |
. . . . . 6
⊢ (𝜑 → 𝐼 ∈ ℕ) |
23 | 22 | nnzd 12354 |
. . . . 5
⊢ (𝜑 → 𝐼 ∈ ℤ) |
24 | 21, 23 | zsubcld 12360 |
. . . 4
⊢ (𝜑 → (1 − 𝐼) ∈
ℤ) |
25 | 20, 24 | zaddcld 12359 |
. . 3
⊢ (𝜑 → (𝑋 + (1 − 𝐼)) ∈ ℤ) |
26 | 2, 18, 19, 25 | fvmptd 6864 |
. 2
⊢ (𝜑 → (𝐵‘𝑋) = (𝑋 + (1 − 𝐼))) |
27 | | metakunt22.1 |
. . . . . . . 8
⊢ (𝜑 → 𝑀 ∈ ℕ) |
28 | | metakunt22.3 |
. . . . . . . 8
⊢ (𝜑 → 𝐼 ≤ 𝑀) |
29 | | metakunt22.5 |
. . . . . . . 8
⊢ 𝐶 = (𝑥 ∈ (1...(𝐼 − 1)) ↦ (𝑥 + (𝑀 − 𝐼))) |
30 | | metakunt22.6 |
. . . . . . . 8
⊢ 𝐷 = (𝑥 ∈ (𝐼...(𝑀 − 1)) ↦ (𝑥 + (1 − 𝐼))) |
31 | 27, 22, 28, 1, 29, 30 | metakunt19 40071 |
. . . . . . 7
⊢ (𝜑 → ((𝐶 Fn (1...(𝐼 − 1)) ∧ 𝐷 Fn (𝐼...(𝑀 − 1)) ∧ (𝐶 ∪ 𝐷) Fn ((1...(𝐼 − 1)) ∪ (𝐼...(𝑀 − 1)))) ∧ {〈𝑀, 𝑀〉} Fn {𝑀})) |
32 | 31 | simpld 494 |
. . . . . 6
⊢ (𝜑 → (𝐶 Fn (1...(𝐼 − 1)) ∧ 𝐷 Fn (𝐼...(𝑀 − 1)) ∧ (𝐶 ∪ 𝐷) Fn ((1...(𝐼 − 1)) ∪ (𝐼...(𝑀 − 1))))) |
33 | 32 | simp3d 1142 |
. . . . 5
⊢ (𝜑 → (𝐶 ∪ 𝐷) Fn ((1...(𝐼 − 1)) ∪ (𝐼...(𝑀 − 1)))) |
34 | 31 | simprd 495 |
. . . . 5
⊢ (𝜑 → {〈𝑀, 𝑀〉} Fn {𝑀}) |
35 | | indir 4206 |
. . . . . . 7
⊢
(((1...(𝐼 −
1)) ∪ (𝐼...(𝑀 − 1))) ∩ {𝑀}) = (((1...(𝐼 − 1)) ∩ {𝑀}) ∪ ((𝐼...(𝑀 − 1)) ∩ {𝑀})) |
36 | 35 | a1i 11 |
. . . . . 6
⊢ (𝜑 → (((1...(𝐼 − 1)) ∪ (𝐼...(𝑀 − 1))) ∩ {𝑀}) = (((1...(𝐼 − 1)) ∩ {𝑀}) ∪ ((𝐼...(𝑀 − 1)) ∩ {𝑀}))) |
37 | 27, 22, 28 | metakunt18 40070 |
. . . . . . . . . 10
⊢ (𝜑 → ((((1...(𝐼 − 1)) ∩ (𝐼...(𝑀 − 1))) = ∅ ∧ ((1...(𝐼 − 1)) ∩ {𝑀}) = ∅ ∧ ((𝐼...(𝑀 − 1)) ∩ {𝑀}) = ∅) ∧ (((((𝑀 − 𝐼) + 1)...(𝑀 − 1)) ∩ (1...(𝑀 − 𝐼))) = ∅ ∧ ((((𝑀 − 𝐼) + 1)...(𝑀 − 1)) ∩ {𝑀}) = ∅ ∧ ((1...(𝑀 − 𝐼)) ∩ {𝑀}) = ∅))) |
38 | 37 | simpld 494 |
. . . . . . . . 9
⊢ (𝜑 → (((1...(𝐼 − 1)) ∩ (𝐼...(𝑀 − 1))) = ∅ ∧ ((1...(𝐼 − 1)) ∩ {𝑀}) = ∅ ∧ ((𝐼...(𝑀 − 1)) ∩ {𝑀}) = ∅)) |
39 | 38 | simp2d 1141 |
. . . . . . . 8
⊢ (𝜑 → ((1...(𝐼 − 1)) ∩ {𝑀}) = ∅) |
40 | 38 | simp3d 1142 |
. . . . . . . 8
⊢ (𝜑 → ((𝐼...(𝑀 − 1)) ∩ {𝑀}) = ∅) |
41 | 39, 40 | uneq12d 4094 |
. . . . . . 7
⊢ (𝜑 → (((1...(𝐼 − 1)) ∩ {𝑀}) ∪ ((𝐼...(𝑀 − 1)) ∩ {𝑀})) = (∅ ∪
∅)) |
42 | | unidm 4082 |
. . . . . . . 8
⊢ (∅
∪ ∅) = ∅ |
43 | 42 | a1i 11 |
. . . . . . 7
⊢ (𝜑 → (∅ ∪ ∅) =
∅) |
44 | 41, 43 | eqtrd 2778 |
. . . . . 6
⊢ (𝜑 → (((1...(𝐼 − 1)) ∩ {𝑀}) ∪ ((𝐼...(𝑀 − 1)) ∩ {𝑀})) = ∅) |
45 | 36, 44 | eqtrd 2778 |
. . . . 5
⊢ (𝜑 → (((1...(𝐼 − 1)) ∪ (𝐼...(𝑀 − 1))) ∩ {𝑀}) = ∅) |
46 | 27 | nnzd 12354 |
. . . . . . . 8
⊢ (𝜑 → 𝑀 ∈ ℤ) |
47 | 46, 21 | zsubcld 12360 |
. . . . . . 7
⊢ (𝜑 → (𝑀 − 1) ∈ ℤ) |
48 | 22 | nnred 11918 |
. . . . . . . . 9
⊢ (𝜑 → 𝐼 ∈ ℝ) |
49 | | elfznn 13214 |
. . . . . . . . . . 11
⊢ (𝑋 ∈ (1...𝑀) → 𝑋 ∈ ℕ) |
50 | 19, 49 | syl 17 |
. . . . . . . . . 10
⊢ (𝜑 → 𝑋 ∈ ℕ) |
51 | 50 | nnred 11918 |
. . . . . . . . 9
⊢ (𝜑 → 𝑋 ∈ ℝ) |
52 | 48, 51 | lenltd 11051 |
. . . . . . . 8
⊢ (𝜑 → (𝐼 ≤ 𝑋 ↔ ¬ 𝑋 < 𝐼)) |
53 | 13, 52 | mpbird 256 |
. . . . . . 7
⊢ (𝜑 → 𝐼 ≤ 𝑋) |
54 | | elfzle2 13189 |
. . . . . . . . . . 11
⊢ (𝑋 ∈ (1...𝑀) → 𝑋 ≤ 𝑀) |
55 | 19, 54 | syl 17 |
. . . . . . . . . 10
⊢ (𝜑 → 𝑋 ≤ 𝑀) |
56 | | df-ne 2943 |
. . . . . . . . . . . 12
⊢ (𝑋 ≠ 𝑀 ↔ ¬ 𝑋 = 𝑀) |
57 | 10, 56 | sylibr 233 |
. . . . . . . . . . 11
⊢ (𝜑 → 𝑋 ≠ 𝑀) |
58 | 57 | necomd 2998 |
. . . . . . . . . 10
⊢ (𝜑 → 𝑀 ≠ 𝑋) |
59 | 55, 58 | jca 511 |
. . . . . . . . 9
⊢ (𝜑 → (𝑋 ≤ 𝑀 ∧ 𝑀 ≠ 𝑋)) |
60 | 27 | nnred 11918 |
. . . . . . . . . 10
⊢ (𝜑 → 𝑀 ∈ ℝ) |
61 | 51, 60 | ltlend 11050 |
. . . . . . . . 9
⊢ (𝜑 → (𝑋 < 𝑀 ↔ (𝑋 ≤ 𝑀 ∧ 𝑀 ≠ 𝑋))) |
62 | 59, 61 | mpbird 256 |
. . . . . . . 8
⊢ (𝜑 → 𝑋 < 𝑀) |
63 | | zltlem1 12303 |
. . . . . . . . 9
⊢ ((𝑋 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑋 < 𝑀 ↔ 𝑋 ≤ (𝑀 − 1))) |
64 | 20, 46, 63 | syl2anc 583 |
. . . . . . . 8
⊢ (𝜑 → (𝑋 < 𝑀 ↔ 𝑋 ≤ (𝑀 − 1))) |
65 | 62, 64 | mpbid 231 |
. . . . . . 7
⊢ (𝜑 → 𝑋 ≤ (𝑀 − 1)) |
66 | 23, 47, 20, 53, 65 | elfzd 13176 |
. . . . . 6
⊢ (𝜑 → 𝑋 ∈ (𝐼...(𝑀 − 1))) |
67 | | elun2 4107 |
. . . . . 6
⊢ (𝑋 ∈ (𝐼...(𝑀 − 1)) → 𝑋 ∈ ((1...(𝐼 − 1)) ∪ (𝐼...(𝑀 − 1)))) |
68 | 66, 67 | syl 17 |
. . . . 5
⊢ (𝜑 → 𝑋 ∈ ((1...(𝐼 − 1)) ∪ (𝐼...(𝑀 − 1)))) |
69 | 33, 34, 45, 68 | fvun1d 6843 |
. . . 4
⊢ (𝜑 → (((𝐶 ∪ 𝐷) ∪ {〈𝑀, 𝑀〉})‘𝑋) = ((𝐶 ∪ 𝐷)‘𝑋)) |
70 | 32 | simp1d 1140 |
. . . . . 6
⊢ (𝜑 → 𝐶 Fn (1...(𝐼 − 1))) |
71 | 32 | simp2d 1141 |
. . . . . 6
⊢ (𝜑 → 𝐷 Fn (𝐼...(𝑀 − 1))) |
72 | 38 | simp1d 1140 |
. . . . . 6
⊢ (𝜑 → ((1...(𝐼 − 1)) ∩ (𝐼...(𝑀 − 1))) = ∅) |
73 | 70, 71, 72, 66 | fvun2d 6844 |
. . . . 5
⊢ (𝜑 → ((𝐶 ∪ 𝐷)‘𝑋) = (𝐷‘𝑋)) |
74 | 30 | a1i 11 |
. . . . . 6
⊢ (𝜑 → 𝐷 = (𝑥 ∈ (𝐼...(𝑀 − 1)) ↦ (𝑥 + (1 − 𝐼)))) |
75 | | simpr 484 |
. . . . . . 7
⊢ ((𝜑 ∧ 𝑥 = 𝑋) → 𝑥 = 𝑋) |
76 | 75 | oveq1d 7270 |
. . . . . 6
⊢ ((𝜑 ∧ 𝑥 = 𝑋) → (𝑥 + (1 − 𝐼)) = (𝑋 + (1 − 𝐼))) |
77 | 20 | zred 12355 |
. . . . . . . . 9
⊢ (𝜑 → 𝑋 ∈ ℝ) |
78 | | lenlt 10984 |
. . . . . . . . 9
⊢ ((𝐼 ∈ ℝ ∧ 𝑋 ∈ ℝ) → (𝐼 ≤ 𝑋 ↔ ¬ 𝑋 < 𝐼)) |
79 | 48, 77, 78 | syl2anc 583 |
. . . . . . . 8
⊢ (𝜑 → (𝐼 ≤ 𝑋 ↔ ¬ 𝑋 < 𝐼)) |
80 | 13, 79 | mpbird 256 |
. . . . . . 7
⊢ (𝜑 → 𝐼 ≤ 𝑋) |
81 | 77, 60 | ltlend 11050 |
. . . . . . . . 9
⊢ (𝜑 → (𝑋 < 𝑀 ↔ (𝑋 ≤ 𝑀 ∧ 𝑀 ≠ 𝑋))) |
82 | 59, 81 | mpbird 256 |
. . . . . . . 8
⊢ (𝜑 → 𝑋 < 𝑀) |
83 | 82, 64 | mpbid 231 |
. . . . . . 7
⊢ (𝜑 → 𝑋 ≤ (𝑀 − 1)) |
84 | 23, 47, 20, 80, 83 | elfzd 13176 |
. . . . . 6
⊢ (𝜑 → 𝑋 ∈ (𝐼...(𝑀 − 1))) |
85 | 74, 76, 84, 25 | fvmptd 6864 |
. . . . 5
⊢ (𝜑 → (𝐷‘𝑋) = (𝑋 + (1 − 𝐼))) |
86 | 73, 85 | eqtrd 2778 |
. . . 4
⊢ (𝜑 → ((𝐶 ∪ 𝐷)‘𝑋) = (𝑋 + (1 − 𝐼))) |
87 | 69, 86 | eqtrd 2778 |
. . 3
⊢ (𝜑 → (((𝐶 ∪ 𝐷) ∪ {〈𝑀, 𝑀〉})‘𝑋) = (𝑋 + (1 − 𝐼))) |
88 | 87 | eqcomd 2744 |
. 2
⊢ (𝜑 → (𝑋 + (1 − 𝐼)) = (((𝐶 ∪ 𝐷) ∪ {〈𝑀, 𝑀〉})‘𝑋)) |
89 | 26, 88 | eqtrd 2778 |
1
⊢ (𝜑 → (𝐵‘𝑋) = (((𝐶 ∪ 𝐷) ∪ {〈𝑀, 𝑀〉})‘𝑋)) |