Step |
Hyp |
Ref |
Expression |
1 |
|
metakunt22.1 |
⊢ ( 𝜑 → 𝑀 ∈ ℕ ) |
2 |
|
metakunt22.2 |
⊢ ( 𝜑 → 𝐼 ∈ ℕ ) |
3 |
|
metakunt22.3 |
⊢ ( 𝜑 → 𝐼 ≤ 𝑀 ) |
4 |
|
metakunt22.4 |
⊢ 𝐵 = ( 𝑥 ∈ ( 1 ... 𝑀 ) ↦ if ( 𝑥 = 𝑀 , 𝑀 , if ( 𝑥 < 𝐼 , ( 𝑥 + ( 𝑀 − 𝐼 ) ) , ( 𝑥 + ( 1 − 𝐼 ) ) ) ) ) |
5 |
|
metakunt22.5 |
⊢ 𝐶 = ( 𝑥 ∈ ( 1 ... ( 𝐼 − 1 ) ) ↦ ( 𝑥 + ( 𝑀 − 𝐼 ) ) ) |
6 |
|
metakunt22.6 |
⊢ 𝐷 = ( 𝑥 ∈ ( 𝐼 ... ( 𝑀 − 1 ) ) ↦ ( 𝑥 + ( 1 − 𝐼 ) ) ) |
7 |
|
metakunt22.7 |
⊢ ( 𝜑 → 𝑋 ∈ ( 1 ... 𝑀 ) ) |
8 |
|
metakunt22.8 |
⊢ ( 𝜑 → ¬ 𝑋 = 𝑀 ) |
9 |
|
metakunt22.9 |
⊢ ( 𝜑 → ¬ 𝑋 < 𝐼 ) |
10 |
4
|
a1i |
⊢ ( 𝜑 → 𝐵 = ( 𝑥 ∈ ( 1 ... 𝑀 ) ↦ if ( 𝑥 = 𝑀 , 𝑀 , if ( 𝑥 < 𝐼 , ( 𝑥 + ( 𝑀 − 𝐼 ) ) , ( 𝑥 + ( 1 − 𝐼 ) ) ) ) ) ) |
11 |
|
eqeq1 |
⊢ ( 𝑥 = 𝑋 → ( 𝑥 = 𝑀 ↔ 𝑋 = 𝑀 ) ) |
12 |
|
breq1 |
⊢ ( 𝑥 = 𝑋 → ( 𝑥 < 𝐼 ↔ 𝑋 < 𝐼 ) ) |
13 |
|
oveq1 |
⊢ ( 𝑥 = 𝑋 → ( 𝑥 + ( 𝑀 − 𝐼 ) ) = ( 𝑋 + ( 𝑀 − 𝐼 ) ) ) |
14 |
|
oveq1 |
⊢ ( 𝑥 = 𝑋 → ( 𝑥 + ( 1 − 𝐼 ) ) = ( 𝑋 + ( 1 − 𝐼 ) ) ) |
15 |
12 13 14
|
ifbieq12d |
⊢ ( 𝑥 = 𝑋 → if ( 𝑥 < 𝐼 , ( 𝑥 + ( 𝑀 − 𝐼 ) ) , ( 𝑥 + ( 1 − 𝐼 ) ) ) = if ( 𝑋 < 𝐼 , ( 𝑋 + ( 𝑀 − 𝐼 ) ) , ( 𝑋 + ( 1 − 𝐼 ) ) ) ) |
16 |
11 15
|
ifbieq2d |
⊢ ( 𝑥 = 𝑋 → if ( 𝑥 = 𝑀 , 𝑀 , if ( 𝑥 < 𝐼 , ( 𝑥 + ( 𝑀 − 𝐼 ) ) , ( 𝑥 + ( 1 − 𝐼 ) ) ) ) = if ( 𝑋 = 𝑀 , 𝑀 , if ( 𝑋 < 𝐼 , ( 𝑋 + ( 𝑀 − 𝐼 ) ) , ( 𝑋 + ( 1 − 𝐼 ) ) ) ) ) |
17 |
16
|
adantl |
⊢ ( ( 𝜑 ∧ 𝑥 = 𝑋 ) → if ( 𝑥 = 𝑀 , 𝑀 , if ( 𝑥 < 𝐼 , ( 𝑥 + ( 𝑀 − 𝐼 ) ) , ( 𝑥 + ( 1 − 𝐼 ) ) ) ) = if ( 𝑋 = 𝑀 , 𝑀 , if ( 𝑋 < 𝐼 , ( 𝑋 + ( 𝑀 − 𝐼 ) ) , ( 𝑋 + ( 1 − 𝐼 ) ) ) ) ) |
18 |
|
iffalse |
⊢ ( ¬ 𝑋 = 𝑀 → if ( 𝑋 = 𝑀 , 𝑀 , if ( 𝑋 < 𝐼 , ( 𝑋 + ( 𝑀 − 𝐼 ) ) , ( 𝑋 + ( 1 − 𝐼 ) ) ) ) = if ( 𝑋 < 𝐼 , ( 𝑋 + ( 𝑀 − 𝐼 ) ) , ( 𝑋 + ( 1 − 𝐼 ) ) ) ) |
19 |
8 18
|
syl |
⊢ ( 𝜑 → if ( 𝑋 = 𝑀 , 𝑀 , if ( 𝑋 < 𝐼 , ( 𝑋 + ( 𝑀 − 𝐼 ) ) , ( 𝑋 + ( 1 − 𝐼 ) ) ) ) = if ( 𝑋 < 𝐼 , ( 𝑋 + ( 𝑀 − 𝐼 ) ) , ( 𝑋 + ( 1 − 𝐼 ) ) ) ) |
20 |
|
iffalse |
⊢ ( ¬ 𝑋 < 𝐼 → if ( 𝑋 < 𝐼 , ( 𝑋 + ( 𝑀 − 𝐼 ) ) , ( 𝑋 + ( 1 − 𝐼 ) ) ) = ( 𝑋 + ( 1 − 𝐼 ) ) ) |
21 |
9 20
|
syl |
⊢ ( 𝜑 → if ( 𝑋 < 𝐼 , ( 𝑋 + ( 𝑀 − 𝐼 ) ) , ( 𝑋 + ( 1 − 𝐼 ) ) ) = ( 𝑋 + ( 1 − 𝐼 ) ) ) |
22 |
19 21
|
eqtrd |
⊢ ( 𝜑 → if ( 𝑋 = 𝑀 , 𝑀 , if ( 𝑋 < 𝐼 , ( 𝑋 + ( 𝑀 − 𝐼 ) ) , ( 𝑋 + ( 1 − 𝐼 ) ) ) ) = ( 𝑋 + ( 1 − 𝐼 ) ) ) |
23 |
22
|
adantr |
⊢ ( ( 𝜑 ∧ 𝑥 = 𝑋 ) → if ( 𝑋 = 𝑀 , 𝑀 , if ( 𝑋 < 𝐼 , ( 𝑋 + ( 𝑀 − 𝐼 ) ) , ( 𝑋 + ( 1 − 𝐼 ) ) ) ) = ( 𝑋 + ( 1 − 𝐼 ) ) ) |
24 |
17 23
|
eqtrd |
⊢ ( ( 𝜑 ∧ 𝑥 = 𝑋 ) → if ( 𝑥 = 𝑀 , 𝑀 , if ( 𝑥 < 𝐼 , ( 𝑥 + ( 𝑀 − 𝐼 ) ) , ( 𝑥 + ( 1 − 𝐼 ) ) ) ) = ( 𝑋 + ( 1 − 𝐼 ) ) ) |
25 |
7
|
elfzelzd |
⊢ ( 𝜑 → 𝑋 ∈ ℤ ) |
26 |
|
1zzd |
⊢ ( 𝜑 → 1 ∈ ℤ ) |
27 |
2
|
nnzd |
⊢ ( 𝜑 → 𝐼 ∈ ℤ ) |
28 |
26 27
|
zsubcld |
⊢ ( 𝜑 → ( 1 − 𝐼 ) ∈ ℤ ) |
29 |
25 28
|
zaddcld |
⊢ ( 𝜑 → ( 𝑋 + ( 1 − 𝐼 ) ) ∈ ℤ ) |
30 |
10 24 7 29
|
fvmptd |
⊢ ( 𝜑 → ( 𝐵 ‘ 𝑋 ) = ( 𝑋 + ( 1 − 𝐼 ) ) ) |
31 |
1 2 3 4 5 6
|
metakunt19 |
⊢ ( 𝜑 → ( ( 𝐶 Fn ( 1 ... ( 𝐼 − 1 ) ) ∧ 𝐷 Fn ( 𝐼 ... ( 𝑀 − 1 ) ) ∧ ( 𝐶 ∪ 𝐷 ) Fn ( ( 1 ... ( 𝐼 − 1 ) ) ∪ ( 𝐼 ... ( 𝑀 − 1 ) ) ) ) ∧ { 〈 𝑀 , 𝑀 〉 } Fn { 𝑀 } ) ) |
32 |
31
|
simpld |
⊢ ( 𝜑 → ( 𝐶 Fn ( 1 ... ( 𝐼 − 1 ) ) ∧ 𝐷 Fn ( 𝐼 ... ( 𝑀 − 1 ) ) ∧ ( 𝐶 ∪ 𝐷 ) Fn ( ( 1 ... ( 𝐼 − 1 ) ) ∪ ( 𝐼 ... ( 𝑀 − 1 ) ) ) ) ) |
33 |
32
|
simp3d |
⊢ ( 𝜑 → ( 𝐶 ∪ 𝐷 ) Fn ( ( 1 ... ( 𝐼 − 1 ) ) ∪ ( 𝐼 ... ( 𝑀 − 1 ) ) ) ) |
34 |
31
|
simprd |
⊢ ( 𝜑 → { 〈 𝑀 , 𝑀 〉 } Fn { 𝑀 } ) |
35 |
|
indir |
⊢ ( ( ( 1 ... ( 𝐼 − 1 ) ) ∪ ( 𝐼 ... ( 𝑀 − 1 ) ) ) ∩ { 𝑀 } ) = ( ( ( 1 ... ( 𝐼 − 1 ) ) ∩ { 𝑀 } ) ∪ ( ( 𝐼 ... ( 𝑀 − 1 ) ) ∩ { 𝑀 } ) ) |
36 |
35
|
a1i |
⊢ ( 𝜑 → ( ( ( 1 ... ( 𝐼 − 1 ) ) ∪ ( 𝐼 ... ( 𝑀 − 1 ) ) ) ∩ { 𝑀 } ) = ( ( ( 1 ... ( 𝐼 − 1 ) ) ∩ { 𝑀 } ) ∪ ( ( 𝐼 ... ( 𝑀 − 1 ) ) ∩ { 𝑀 } ) ) ) |
37 |
1 2 3
|
metakunt18 |
⊢ ( 𝜑 → ( ( ( ( 1 ... ( 𝐼 − 1 ) ) ∩ ( 𝐼 ... ( 𝑀 − 1 ) ) ) = ∅ ∧ ( ( 1 ... ( 𝐼 − 1 ) ) ∩ { 𝑀 } ) = ∅ ∧ ( ( 𝐼 ... ( 𝑀 − 1 ) ) ∩ { 𝑀 } ) = ∅ ) ∧ ( ( ( ( ( 𝑀 − 𝐼 ) + 1 ) ... ( 𝑀 − 1 ) ) ∩ ( 1 ... ( 𝑀 − 𝐼 ) ) ) = ∅ ∧ ( ( ( ( 𝑀 − 𝐼 ) + 1 ) ... ( 𝑀 − 1 ) ) ∩ { 𝑀 } ) = ∅ ∧ ( ( 1 ... ( 𝑀 − 𝐼 ) ) ∩ { 𝑀 } ) = ∅ ) ) ) |
38 |
37
|
simpld |
⊢ ( 𝜑 → ( ( ( 1 ... ( 𝐼 − 1 ) ) ∩ ( 𝐼 ... ( 𝑀 − 1 ) ) ) = ∅ ∧ ( ( 1 ... ( 𝐼 − 1 ) ) ∩ { 𝑀 } ) = ∅ ∧ ( ( 𝐼 ... ( 𝑀 − 1 ) ) ∩ { 𝑀 } ) = ∅ ) ) |
39 |
38
|
simp2d |
⊢ ( 𝜑 → ( ( 1 ... ( 𝐼 − 1 ) ) ∩ { 𝑀 } ) = ∅ ) |
40 |
38
|
simp3d |
⊢ ( 𝜑 → ( ( 𝐼 ... ( 𝑀 − 1 ) ) ∩ { 𝑀 } ) = ∅ ) |
41 |
39 40
|
uneq12d |
⊢ ( 𝜑 → ( ( ( 1 ... ( 𝐼 − 1 ) ) ∩ { 𝑀 } ) ∪ ( ( 𝐼 ... ( 𝑀 − 1 ) ) ∩ { 𝑀 } ) ) = ( ∅ ∪ ∅ ) ) |
42 |
|
unidm |
⊢ ( ∅ ∪ ∅ ) = ∅ |
43 |
42
|
a1i |
⊢ ( 𝜑 → ( ∅ ∪ ∅ ) = ∅ ) |
44 |
41 43
|
eqtrd |
⊢ ( 𝜑 → ( ( ( 1 ... ( 𝐼 − 1 ) ) ∩ { 𝑀 } ) ∪ ( ( 𝐼 ... ( 𝑀 − 1 ) ) ∩ { 𝑀 } ) ) = ∅ ) |
45 |
36 44
|
eqtrd |
⊢ ( 𝜑 → ( ( ( 1 ... ( 𝐼 − 1 ) ) ∪ ( 𝐼 ... ( 𝑀 − 1 ) ) ) ∩ { 𝑀 } ) = ∅ ) |
46 |
1
|
nnzd |
⊢ ( 𝜑 → 𝑀 ∈ ℤ ) |
47 |
46 26
|
zsubcld |
⊢ ( 𝜑 → ( 𝑀 − 1 ) ∈ ℤ ) |
48 |
2
|
nnred |
⊢ ( 𝜑 → 𝐼 ∈ ℝ ) |
49 |
|
elfznn |
⊢ ( 𝑋 ∈ ( 1 ... 𝑀 ) → 𝑋 ∈ ℕ ) |
50 |
7 49
|
syl |
⊢ ( 𝜑 → 𝑋 ∈ ℕ ) |
51 |
50
|
nnred |
⊢ ( 𝜑 → 𝑋 ∈ ℝ ) |
52 |
48 51
|
lenltd |
⊢ ( 𝜑 → ( 𝐼 ≤ 𝑋 ↔ ¬ 𝑋 < 𝐼 ) ) |
53 |
9 52
|
mpbird |
⊢ ( 𝜑 → 𝐼 ≤ 𝑋 ) |
54 |
|
elfzle2 |
⊢ ( 𝑋 ∈ ( 1 ... 𝑀 ) → 𝑋 ≤ 𝑀 ) |
55 |
7 54
|
syl |
⊢ ( 𝜑 → 𝑋 ≤ 𝑀 ) |
56 |
|
df-ne |
⊢ ( 𝑋 ≠ 𝑀 ↔ ¬ 𝑋 = 𝑀 ) |
57 |
8 56
|
sylibr |
⊢ ( 𝜑 → 𝑋 ≠ 𝑀 ) |
58 |
57
|
necomd |
⊢ ( 𝜑 → 𝑀 ≠ 𝑋 ) |
59 |
55 58
|
jca |
⊢ ( 𝜑 → ( 𝑋 ≤ 𝑀 ∧ 𝑀 ≠ 𝑋 ) ) |
60 |
1
|
nnred |
⊢ ( 𝜑 → 𝑀 ∈ ℝ ) |
61 |
51 60
|
ltlend |
⊢ ( 𝜑 → ( 𝑋 < 𝑀 ↔ ( 𝑋 ≤ 𝑀 ∧ 𝑀 ≠ 𝑋 ) ) ) |
62 |
59 61
|
mpbird |
⊢ ( 𝜑 → 𝑋 < 𝑀 ) |
63 |
|
zltlem1 |
⊢ ( ( 𝑋 ∈ ℤ ∧ 𝑀 ∈ ℤ ) → ( 𝑋 < 𝑀 ↔ 𝑋 ≤ ( 𝑀 − 1 ) ) ) |
64 |
25 46 63
|
syl2anc |
⊢ ( 𝜑 → ( 𝑋 < 𝑀 ↔ 𝑋 ≤ ( 𝑀 − 1 ) ) ) |
65 |
62 64
|
mpbid |
⊢ ( 𝜑 → 𝑋 ≤ ( 𝑀 − 1 ) ) |
66 |
27 47 25 53 65
|
elfzd |
⊢ ( 𝜑 → 𝑋 ∈ ( 𝐼 ... ( 𝑀 − 1 ) ) ) |
67 |
|
elun2 |
⊢ ( 𝑋 ∈ ( 𝐼 ... ( 𝑀 − 1 ) ) → 𝑋 ∈ ( ( 1 ... ( 𝐼 − 1 ) ) ∪ ( 𝐼 ... ( 𝑀 − 1 ) ) ) ) |
68 |
66 67
|
syl |
⊢ ( 𝜑 → 𝑋 ∈ ( ( 1 ... ( 𝐼 − 1 ) ) ∪ ( 𝐼 ... ( 𝑀 − 1 ) ) ) ) |
69 |
33 34 45 68
|
fvun1d |
⊢ ( 𝜑 → ( ( ( 𝐶 ∪ 𝐷 ) ∪ { 〈 𝑀 , 𝑀 〉 } ) ‘ 𝑋 ) = ( ( 𝐶 ∪ 𝐷 ) ‘ 𝑋 ) ) |
70 |
32
|
simp1d |
⊢ ( 𝜑 → 𝐶 Fn ( 1 ... ( 𝐼 − 1 ) ) ) |
71 |
32
|
simp2d |
⊢ ( 𝜑 → 𝐷 Fn ( 𝐼 ... ( 𝑀 − 1 ) ) ) |
72 |
38
|
simp1d |
⊢ ( 𝜑 → ( ( 1 ... ( 𝐼 − 1 ) ) ∩ ( 𝐼 ... ( 𝑀 − 1 ) ) ) = ∅ ) |
73 |
70 71 72 66
|
fvun2d |
⊢ ( 𝜑 → ( ( 𝐶 ∪ 𝐷 ) ‘ 𝑋 ) = ( 𝐷 ‘ 𝑋 ) ) |
74 |
6
|
a1i |
⊢ ( 𝜑 → 𝐷 = ( 𝑥 ∈ ( 𝐼 ... ( 𝑀 − 1 ) ) ↦ ( 𝑥 + ( 1 − 𝐼 ) ) ) ) |
75 |
|
simpr |
⊢ ( ( 𝜑 ∧ 𝑥 = 𝑋 ) → 𝑥 = 𝑋 ) |
76 |
75
|
oveq1d |
⊢ ( ( 𝜑 ∧ 𝑥 = 𝑋 ) → ( 𝑥 + ( 1 − 𝐼 ) ) = ( 𝑋 + ( 1 − 𝐼 ) ) ) |
77 |
25
|
zred |
⊢ ( 𝜑 → 𝑋 ∈ ℝ ) |
78 |
|
lenlt |
⊢ ( ( 𝐼 ∈ ℝ ∧ 𝑋 ∈ ℝ ) → ( 𝐼 ≤ 𝑋 ↔ ¬ 𝑋 < 𝐼 ) ) |
79 |
48 77 78
|
syl2anc |
⊢ ( 𝜑 → ( 𝐼 ≤ 𝑋 ↔ ¬ 𝑋 < 𝐼 ) ) |
80 |
9 79
|
mpbird |
⊢ ( 𝜑 → 𝐼 ≤ 𝑋 ) |
81 |
77 60
|
ltlend |
⊢ ( 𝜑 → ( 𝑋 < 𝑀 ↔ ( 𝑋 ≤ 𝑀 ∧ 𝑀 ≠ 𝑋 ) ) ) |
82 |
59 81
|
mpbird |
⊢ ( 𝜑 → 𝑋 < 𝑀 ) |
83 |
82 64
|
mpbid |
⊢ ( 𝜑 → 𝑋 ≤ ( 𝑀 − 1 ) ) |
84 |
27 47 25 80 83
|
elfzd |
⊢ ( 𝜑 → 𝑋 ∈ ( 𝐼 ... ( 𝑀 − 1 ) ) ) |
85 |
74 76 84 29
|
fvmptd |
⊢ ( 𝜑 → ( 𝐷 ‘ 𝑋 ) = ( 𝑋 + ( 1 − 𝐼 ) ) ) |
86 |
73 85
|
eqtrd |
⊢ ( 𝜑 → ( ( 𝐶 ∪ 𝐷 ) ‘ 𝑋 ) = ( 𝑋 + ( 1 − 𝐼 ) ) ) |
87 |
69 86
|
eqtrd |
⊢ ( 𝜑 → ( ( ( 𝐶 ∪ 𝐷 ) ∪ { 〈 𝑀 , 𝑀 〉 } ) ‘ 𝑋 ) = ( 𝑋 + ( 1 − 𝐼 ) ) ) |
88 |
87
|
eqcomd |
⊢ ( 𝜑 → ( 𝑋 + ( 1 − 𝐼 ) ) = ( ( ( 𝐶 ∪ 𝐷 ) ∪ { 〈 𝑀 , 𝑀 〉 } ) ‘ 𝑋 ) ) |
89 |
30 88
|
eqtrd |
⊢ ( 𝜑 → ( 𝐵 ‘ 𝑋 ) = ( ( ( 𝐶 ∪ 𝐷 ) ∪ { 〈 𝑀 , 𝑀 〉 } ) ‘ 𝑋 ) ) |