Metamath Proof Explorer


Theorem sticksstones13

Description: Establish bijective mapping between strictly monotone functions and functions that sum to a fixed non-negative integer. (Contributed by metakunt, 6-Oct-2024)

Ref Expression
Hypotheses sticksstones13.1 φ N 0
sticksstones13.2 φ K 0
sticksstones13.3 F = a A j 1 K j + l = 1 j a l
sticksstones13.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
sticksstones13.5 A = g | g : 1 K + 1 0 i = 1 K + 1 g i = N
sticksstones13.6 B = f | f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y
Assertion sticksstones13 φ F : A 1-1 onto B

Proof

Step Hyp Ref Expression
1 sticksstones13.1 φ N 0
2 sticksstones13.2 φ K 0
3 sticksstones13.3 F = a A j 1 K j + l = 1 j a l
4 sticksstones13.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 sticksstones13.5 A = g | g : 1 K + 1 0 i = 1 K + 1 g i = N
6 sticksstones13.6 B = f | f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y
7 1 adantr φ K = 0 N 0
8 simpr φ K = 0 K = 0
9 7 8 3 4 5 6 sticksstones11 φ K = 0 F : A 1-1 onto B
10 1 adantr φ K N 0
11 simpr φ K K
12 10 11 3 4 5 6 sticksstones12 φ K F : A 1-1 onto B
13 elnn0 K 0 K K = 0
14 13 biimpi K 0 K K = 0
15 14 orcomd K 0 K = 0 K
16 2 15 syl φ K = 0 K
17 9 12 16 mpjaodan φ F : A 1-1 onto B