Step |
Hyp |
Ref |
Expression |
1 |
|
derang.d |
⊢ 𝐷 = ( 𝑥 ∈ Fin ↦ ( ♯ ‘ { 𝑓 ∣ ( 𝑓 : 𝑥 –1-1-onto→ 𝑥 ∧ ∀ 𝑦 ∈ 𝑥 ( 𝑓 ‘ 𝑦 ) ≠ 𝑦 ) } ) ) |
2 |
|
subfac.n |
⊢ 𝑆 = ( 𝑛 ∈ ℕ0 ↦ ( 𝐷 ‘ ( 1 ... 𝑛 ) ) ) |
3 |
|
subfacp1lem.a |
⊢ 𝐴 = { 𝑓 ∣ ( 𝑓 : ( 1 ... ( 𝑁 + 1 ) ) –1-1-onto→ ( 1 ... ( 𝑁 + 1 ) ) ∧ ∀ 𝑦 ∈ ( 1 ... ( 𝑁 + 1 ) ) ( 𝑓 ‘ 𝑦 ) ≠ 𝑦 ) } |
4 |
|
subfacp1lem1.n |
⊢ ( 𝜑 → 𝑁 ∈ ℕ ) |
5 |
|
subfacp1lem1.m |
⊢ ( 𝜑 → 𝑀 ∈ ( 2 ... ( 𝑁 + 1 ) ) ) |
6 |
|
subfacp1lem1.x |
⊢ 𝑀 ∈ V |
7 |
|
subfacp1lem1.k |
⊢ 𝐾 = ( ( 2 ... ( 𝑁 + 1 ) ) ∖ { 𝑀 } ) |
8 |
|
disj |
⊢ ( ( 𝐾 ∩ { 1 , 𝑀 } ) = ∅ ↔ ∀ 𝑥 ∈ 𝐾 ¬ 𝑥 ∈ { 1 , 𝑀 } ) |
9 |
|
eldifi |
⊢ ( 𝑥 ∈ ( ( 2 ... ( 𝑁 + 1 ) ) ∖ { 𝑀 } ) → 𝑥 ∈ ( 2 ... ( 𝑁 + 1 ) ) ) |
10 |
|
elfzle1 |
⊢ ( 𝑥 ∈ ( 2 ... ( 𝑁 + 1 ) ) → 2 ≤ 𝑥 ) |
11 |
|
1lt2 |
⊢ 1 < 2 |
12 |
|
1re |
⊢ 1 ∈ ℝ |
13 |
|
2re |
⊢ 2 ∈ ℝ |
14 |
12 13
|
ltnlei |
⊢ ( 1 < 2 ↔ ¬ 2 ≤ 1 ) |
15 |
11 14
|
mpbi |
⊢ ¬ 2 ≤ 1 |
16 |
|
breq2 |
⊢ ( 𝑥 = 1 → ( 2 ≤ 𝑥 ↔ 2 ≤ 1 ) ) |
17 |
15 16
|
mtbiri |
⊢ ( 𝑥 = 1 → ¬ 2 ≤ 𝑥 ) |
18 |
17
|
necon2ai |
⊢ ( 2 ≤ 𝑥 → 𝑥 ≠ 1 ) |
19 |
9 10 18
|
3syl |
⊢ ( 𝑥 ∈ ( ( 2 ... ( 𝑁 + 1 ) ) ∖ { 𝑀 } ) → 𝑥 ≠ 1 ) |
20 |
|
eldifsni |
⊢ ( 𝑥 ∈ ( ( 2 ... ( 𝑁 + 1 ) ) ∖ { 𝑀 } ) → 𝑥 ≠ 𝑀 ) |
21 |
19 20
|
jca |
⊢ ( 𝑥 ∈ ( ( 2 ... ( 𝑁 + 1 ) ) ∖ { 𝑀 } ) → ( 𝑥 ≠ 1 ∧ 𝑥 ≠ 𝑀 ) ) |
22 |
21 7
|
eleq2s |
⊢ ( 𝑥 ∈ 𝐾 → ( 𝑥 ≠ 1 ∧ 𝑥 ≠ 𝑀 ) ) |
23 |
|
neanior |
⊢ ( ( 𝑥 ≠ 1 ∧ 𝑥 ≠ 𝑀 ) ↔ ¬ ( 𝑥 = 1 ∨ 𝑥 = 𝑀 ) ) |
24 |
22 23
|
sylib |
⊢ ( 𝑥 ∈ 𝐾 → ¬ ( 𝑥 = 1 ∨ 𝑥 = 𝑀 ) ) |
25 |
|
vex |
⊢ 𝑥 ∈ V |
26 |
25
|
elpr |
⊢ ( 𝑥 ∈ { 1 , 𝑀 } ↔ ( 𝑥 = 1 ∨ 𝑥 = 𝑀 ) ) |
27 |
24 26
|
sylnibr |
⊢ ( 𝑥 ∈ 𝐾 → ¬ 𝑥 ∈ { 1 , 𝑀 } ) |
28 |
8 27
|
mprgbir |
⊢ ( 𝐾 ∩ { 1 , 𝑀 } ) = ∅ |
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 ( ♯ ‘ ( 𝐾 ∪ { 1 , 𝑀 } ) ) = ( ( ♯ ‘ 𝐾 ) + ( ♯ ‘ { 1 , 𝑀 } ) ) |
67 |
58
|
fveq2d |
⊢ ( 𝜑 → ( ♯ ‘ ( 𝐾 ∪ { 1 , 𝑀 } ) ) = ( ♯ ‘ ( 1 ... ( 𝑁 + 1 ) ) ) ) |
68 |
|
neeq1 |
⊢ ( 𝑥 = 𝑀 → ( 𝑥 ≠ 1 ↔ 𝑀 ≠ 1 ) ) |
69 |
10 18
|
syl |
⊢ ( 𝑥 ∈ ( 2 ... ( 𝑁 + 1 ) ) → 𝑥 ≠ 1 ) |
70 |
68 69
|
vtoclga |
⊢ ( 𝑀 ∈ ( 2 ... ( 𝑁 + 1 ) ) → 𝑀 ≠ 1 ) |
71 |
5 70
|
syl |
⊢ ( 𝜑 → 𝑀 ≠ 1 ) |
72 |
71
|
necomd |
⊢ ( 𝜑 → 1 ≠ 𝑀 ) |
73 |
|
1ex |
⊢ 1 ∈ V |
74 |
|
hashprg |
⊢ ( ( 1 ∈ V ∧ 𝑀 ∈ V ) → ( 1 ≠ 𝑀 ↔ ( ♯ ‘ { 1 , 𝑀 } ) = 2 ) ) |
75 |
73 6 74
|
mp2an |
⊢ ( 1 ≠ 𝑀 ↔ ( ♯ ‘ { 1 , 𝑀 } ) = 2 ) |
76 |
72 75
|
sylib |
⊢ ( 𝜑 → ( ♯ ‘ { 1 , 𝑀 } ) = 2 ) |
77 |
76
|
oveq2d |
⊢ ( 𝜑 → ( ( ♯ ‘ 𝐾 ) + ( ♯ ‘ { 1 , 𝑀 } ) ) = ( ( ♯ ‘ 𝐾 ) + 2 ) ) |
78 |
66 67 77
|
3eqtr3a |
⊢ ( 𝜑 → ( ♯ ‘ ( 1 ... ( 𝑁 + 1 ) ) ) = ( ( ♯ ‘ 𝐾 ) + 2 ) ) |
79 |
51
|
nnnn0d |
⊢ ( 𝜑 → ( 𝑁 + 1 ) ∈ ℕ0 ) |
80 |
|
hashfz1 |
⊢ ( ( 𝑁 + 1 ) ∈ ℕ0 → ( ♯ ‘ ( 1 ... ( 𝑁 + 1 ) ) ) = ( 𝑁 + 1 ) ) |
81 |
79 80
|
syl |
⊢ ( 𝜑 → ( ♯ ‘ ( 1 ... ( 𝑁 + 1 ) ) ) = ( 𝑁 + 1 ) ) |
82 |
78 81
|
eqtr3d |
⊢ ( 𝜑 → ( ( ♯ ‘ 𝐾 ) + 2 ) = ( 𝑁 + 1 ) ) |
83 |
51
|
nncnd |
⊢ ( 𝜑 → ( 𝑁 + 1 ) ∈ ℂ ) |
84 |
|
2cnd |
⊢ ( 𝜑 → 2 ∈ ℂ ) |
85 |
|
hashcl |
⊢ ( 𝐾 ∈ Fin → ( ♯ ‘ 𝐾 ) ∈ ℕ0 ) |
86 |
63 85
|
ax-mp |
⊢ ( ♯ ‘ 𝐾 ) ∈ ℕ0 |
87 |
86
|
nn0cni |
⊢ ( ♯ ‘ 𝐾 ) ∈ ℂ |
88 |
87
|
a1i |
⊢ ( 𝜑 → ( ♯ ‘ 𝐾 ) ∈ ℂ ) |
89 |
83 84 88
|
subadd2d |
⊢ ( 𝜑 → ( ( ( 𝑁 + 1 ) − 2 ) = ( ♯ ‘ 𝐾 ) ↔ ( ( ♯ ‘ 𝐾 ) + 2 ) = ( 𝑁 + 1 ) ) ) |
90 |
82 89
|
mpbird |
⊢ ( 𝜑 → ( ( 𝑁 + 1 ) − 2 ) = ( ♯ ‘ 𝐾 ) ) |
91 |
4
|
nncnd |
⊢ ( 𝜑 → 𝑁 ∈ ℂ ) |
92 |
|
1cnd |
⊢ ( 𝜑 → 1 ∈ ℂ ) |
93 |
91 92 92
|
pnpcan2d |
⊢ ( 𝜑 → ( ( 𝑁 + 1 ) − ( 1 + 1 ) ) = ( 𝑁 − 1 ) ) |
94 |
59 90 93
|
3eqtr3a |
⊢ ( 𝜑 → ( ♯ ‘ 𝐾 ) = ( 𝑁 − 1 ) ) |
95 |
29 58 94
|
3jca |
⊢ ( 𝜑 → ( ( 𝐾 ∩ { 1 , 𝑀 } ) = ∅ ∧ ( 𝐾 ∪ { 1 , 𝑀 } ) = ( 1 ... ( 𝑁 + 1 ) ) ∧ ( ♯ ‘ 𝐾 ) = ( 𝑁 − 1 ) ) ) |