Metamath Proof Explorer


Theorem sticksstones21

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

Ref Expression
Hypotheses sticksstones21.1 φ N 0
sticksstones21.2 φ S Fin
sticksstones21.3 φ S
sticksstones21.4 A = f | f : S 0 i S f i = N
Assertion sticksstones21 φ A = ( N + S - 1 S 1 )

Proof

Step Hyp Ref Expression
1 sticksstones21.1 φ N 0
2 sticksstones21.2 φ S Fin
3 sticksstones21.3 φ S
4 sticksstones21.4 A = f | f : S 0 i S f i = N
5 hashnncl S Fin S S
6 2 5 syl φ S S
7 3 6 mpbird φ S
8 fveq2 j = k g j = g k
9 8 cbvsumv j = 1 S g j = k = 1 S g k
10 9 eqeq1i j = 1 S g j = N k = 1 S g k = N
11 10 anbi2i g : 1 S 0 j = 1 S g j = N g : 1 S 0 k = 1 S g k = N
12 11 abbii g | g : 1 S 0 j = 1 S g j = N = g | g : 1 S 0 k = 1 S g k = N
13 fveq2 i = k f i = f k
14 13 cbvsumv i S f i = k S f k
15 14 eqeq1i i S f i = N k S f k = N
16 15 anbi2i f : S 0 i S f i = N f : S 0 k S f k = N
17 16 abbii f | f : S 0 i S f i = N = f | f : S 0 k S f k = N
18 4 17 eqtri A = f | f : S 0 k S f k = N
19 eqidd φ S = S
20 1 2 7 12 18 19 sticksstones20 φ A = ( N + S - 1 S 1 )