Metamath Proof Explorer


Theorem sticksstones14

Description: Sticks and stones with definitions as hypotheses. (Contributed by metakunt, 7-Oct-2024)

Ref Expression
Hypotheses sticksstones14.1 φ N 0
sticksstones14.2 φ K 0
sticksstones14.3 F = a A j 1 K j + l = 1 j a l
sticksstones14.4 G = b B if K = 0 1 N k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1
sticksstones14.5 A = g | g : 1 K + 1 0 i = 1 K + 1 g i = N
sticksstones14.6 B = f | f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y
Assertion sticksstones14 φ A = ( N + K K)

Proof

Step Hyp Ref Expression
1 sticksstones14.1 φ N 0
2 sticksstones14.2 φ K 0
3 sticksstones14.3 F = a A j 1 K j + l = 1 j a l
4 sticksstones14.4 G = b B if K = 0 1 N k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1
5 sticksstones14.5 A = g | g : 1 K + 1 0 i = 1 K + 1 g i = N
6 sticksstones14.6 B = f | f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y
7 5 a1i φ A = g | g : 1 K + 1 0 i = 1 K + 1 g i = N
8 simpl g : 1 K + 1 0 i = 1 K + 1 g i = N g : 1 K + 1 0
9 8 a1i φ g : 1 K + 1 0 i = 1 K + 1 g i = N g : 1 K + 1 0
10 9 ss2abdv φ g | g : 1 K + 1 0 i = 1 K + 1 g i = N g | g : 1 K + 1 0
11 fzfid φ 1 K + 1 Fin
12 nn0ex 0 V
13 12 a1i φ 0 V
14 mapex 1 K + 1 Fin 0 V g | g : 1 K + 1 0 V
15 11 13 14 syl2anc φ g | g : 1 K + 1 0 V
16 ssexg g | g : 1 K + 1 0 i = 1 K + 1 g i = N g | g : 1 K + 1 0 g | g : 1 K + 1 0 V g | g : 1 K + 1 0 i = 1 K + 1 g i = N V
17 10 15 16 syl2anc φ g | g : 1 K + 1 0 i = 1 K + 1 g i = N V
18 7 17 eqeltrd φ A V
19 1 2 3 4 5 6 sticksstones13 φ F : A 1-1 onto B
20 18 19 hasheqf1od φ A = B
21 1 2 nn0addcld φ N + K 0
22 21 2 6 sticksstones5 φ B = ( N + K K)
23 20 22 eqtrd φ A = ( N + K K)