Metamath Proof Explorer


Theorem sticksstones9

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

Ref Expression
Hypotheses sticksstones9.1 φN0
sticksstones9.2 φK=0
sticksstones9.3 G=bBifK=01Nk1K+1ifk=K+1N+K-bKifk=1b11bk-bk1-1
sticksstones9.4 A=g|g:1K+10i=1K+1gi=N
sticksstones9.5 B=f|f:1K1N+Kx1Ky1Kx<yfx<fy
Assertion sticksstones9 φG:BA

Proof

Step Hyp Ref Expression
1 sticksstones9.1 φN0
2 sticksstones9.2 φK=0
3 sticksstones9.3 G=bBifK=01Nk1K+1ifk=K+1N+K-bKifk=1b11bk-bk1-1
4 sticksstones9.4 A=g|g:1K+10i=1K+1gi=N
5 sticksstones9.5 B=f|f:1K1N+Kx1Ky1Kx<yfx<fy
6 2 iftrued φifK=01Nk1K+1ifk=K+1N+K-bKifk=1b11bk-bk1-1=1N
7 6 adantr φbBifK=01Nk1K+1ifk=K+1N+K-bKifk=1b11bk-bk1-1=1N
8 eqid 1N=1N
9 1nn 1
10 9 a1i φ1
11 fsng 1N01N:1N1N=1N
12 10 1 11 syl2anc φ1N:1N1N=1N
13 8 12 mpbiri φ1N:1N
14 1 snssd φN0
15 13 14 jca φ1N:1NN0
16 fss 1N:1NN01N:10
17 15 16 syl φ1N:10
18 2 oveq1d φK+1=0+1
19 0p1e1 0+1=1
20 18 19 eqtrdi φK+1=1
21 20 oveq2d φ1K+1=11
22 1zzd φ1
23 fzsn 111=1
24 22 23 syl φ11=1
25 21 24 eqtrd φ1K+1=1
26 25 eqcomd φ1=1K+1
27 26 feq2d φ1N:101N:1K+10
28 17 27 mpbid φ1N:1K+10
29 25 sumeq1d φi=1K+11Ni=i11Ni
30 fvsng 1N01N1=N
31 10 1 30 syl2anc φ1N1=N
32 1 nn0cnd φN
33 31 32 eqeltrd φ1N1
34 10 33 jca φ11N1
35 fveq2 i=11Ni=1N1
36 35 sumsn 11N1i11Ni=1N1
37 34 36 syl φi11Ni=1N1
38 10 1 jca φ1N0
39 38 30 syl φ1N1=N
40 37 39 eqtrd φi11Ni=N
41 29 40 eqtrd φi=1K+11Ni=N
42 28 41 jca φ1N:1K+10i=1K+11Ni=N
43 42 adantr φbB1N:1K+10i=1K+11Ni=N
44 snex 1NV
45 feq1 g=1Ng:1K+101N:1K+10
46 simpl g=1Ni1K+1g=1N
47 46 fveq1d g=1Ni1K+1gi=1Ni
48 47 sumeq2dv g=1Ni=1K+1gi=i=1K+11Ni
49 48 eqeq1d g=1Ni=1K+1gi=Ni=1K+11Ni=N
50 45 49 anbi12d g=1Ng:1K+10i=1K+1gi=N1N:1K+10i=1K+11Ni=N
51 50 elabg 1NV1Ng|g:1K+10i=1K+1gi=N1N:1K+10i=1K+11Ni=N
52 44 51 ax-mp 1Ng|g:1K+10i=1K+1gi=N1N:1K+10i=1K+11Ni=N
53 43 52 sylibr φbB1Ng|g:1K+10i=1K+1gi=N
54 4 a1i φbBA=g|g:1K+10i=1K+1gi=N
55 53 54 eleqtrrd φbB1NA
56 7 55 eqeltrd φbBifK=01Nk1K+1ifk=K+1N+K-bKifk=1b11bk-bk1-1A
57 56 3 fmptd φG:BA