Metamath Proof Explorer


Theorem sticksstones20

Description: Lift sticks and stones to arbitrary finite non-empty sets. (Contributed by metakung, 24-Oct-2024)

Ref Expression
Hypotheses sticksstones20.1 φ N 0
sticksstones20.2 φ S Fin
sticksstones20.3 φ K
sticksstones20.4 A = g | g : 1 K 0 i = 1 K g i = N
sticksstones20.5 B = h | h : S 0 i S h i = N
sticksstones20.6 φ S = K
Assertion sticksstones20 φ B = ( N + K - 1 K 1 )

Proof

Step Hyp Ref Expression
1 sticksstones20.1 φ N 0
2 sticksstones20.2 φ S Fin
3 sticksstones20.3 φ K
4 sticksstones20.4 A = g | g : 1 K 0 i = 1 K g i = N
5 sticksstones20.5 B = h | h : S 0 i S h i = N
6 sticksstones20.6 φ S = K
7 isfinite4 S Fin 1 S S
8 bren 1 S S p p : 1 S 1-1 onto S
9 7 8 sylbb S Fin p p : 1 S 1-1 onto S
10 2 9 syl φ p p : 1 S 1-1 onto S
11 6 oveq2d φ 1 S = 1 K
12 11 f1oeq2d φ p : 1 S 1-1 onto S p : 1 K 1-1 onto S
13 12 biimpd φ p : 1 S 1-1 onto S p : 1 K 1-1 onto S
14 13 eximdv φ p p : 1 S 1-1 onto S p p : 1 K 1-1 onto S
15 10 14 mpd φ p p : 1 K 1-1 onto S
16 4 a1i φ A = g | g : 1 K 0 i = 1 K g i = N
17 fzfid φ 1 K Fin
18 nn0ex 0 V
19 18 a1i φ 0 V
20 mapex 1 K Fin 0 V g | g : 1 K 0 V
21 17 19 20 syl2anc φ g | g : 1 K 0 V
22 simprl φ g : 1 K 0 i = 1 K g i = N g : 1 K 0
23 22 ex φ g : 1 K 0 i = 1 K g i = N g : 1 K 0
24 23 ss2abdv φ g | g : 1 K 0 i = 1 K g i = N g | g : 1 K 0
25 21 24 ssexd φ g | g : 1 K 0 i = 1 K g i = N V
26 16 25 eqeltrd φ A V
27 26 adantr φ p : 1 K 1-1 onto S A V
28 27 mptexd φ p : 1 K 1-1 onto S a A x S a p -1 x V
29 1 adantr φ p : 1 K 1-1 onto S N 0
30 3 nnnn0d φ K 0
31 30 adantr φ p : 1 K 1-1 onto S K 0
32 simpr φ p : 1 K 1-1 onto S p : 1 K 1-1 onto S
33 eqid a A x S a p -1 x = a A x S a p -1 x
34 eqid b B y 1 K b p y = b B y 1 K b p y
35 29 31 4 5 32 33 34 sticksstones19 φ p : 1 K 1-1 onto S a A x S a p -1 x : A 1-1 onto B
36 f1oeq1 q = a A x S a p -1 x q : A 1-1 onto B a A x S a p -1 x : A 1-1 onto B
37 28 35 36 spcedv φ p : 1 K 1-1 onto S q q : A 1-1 onto B
38 bren A B q q : A 1-1 onto B
39 37 38 sylibr φ p : 1 K 1-1 onto S A B
40 15 39 exlimddv φ A B
41 hasheni A B A = B
42 40 41 syl φ A = B
43 42 eqcomd φ B = A
44 1 3 4 sticksstones16 φ A = ( N + K - 1 K 1 )
45 43 44 eqtrd φ B = ( N + K - 1 K 1 )