Metamath Proof Explorer


Theorem sticksstones8

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

Ref Expression
Hypotheses sticksstones8.1 φ N 0
sticksstones8.2 φ K 0
sticksstones8.3 F = a A j 1 K j + l = 1 j a l
sticksstones8.4 A = g | g : 1 K + 1 0 i = 1 K + 1 g i = N
sticksstones8.5 B = f | f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y
Assertion sticksstones8 φ F : A B

Proof

Step Hyp Ref Expression
1 sticksstones8.1 φ N 0
2 sticksstones8.2 φ K 0
3 sticksstones8.3 F = a A j 1 K j + l = 1 j a l
4 sticksstones8.4 A = g | g : 1 K + 1 0 i = 1 K + 1 g i = N
5 sticksstones8.5 B = f | f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y
6 eqidd φ a A j 1 K e 1 K e + l = 1 e a l = e 1 K e + l = 1 e a l
7 simpr φ a A j 1 K e = j e = j
8 7 oveq2d φ a A j 1 K e = j 1 e = 1 j
9 8 sumeq1d φ a A j 1 K e = j l = 1 e a l = l = 1 j a l
10 7 9 oveq12d φ a A j 1 K e = j e + l = 1 e a l = j + l = 1 j a l
11 simp3 φ a A j 1 K j 1 K
12 ovexd φ a A j 1 K j + l = 1 j a l V
13 6 10 11 12 fvmptd φ a A j 1 K e 1 K e + l = 1 e a l j = j + l = 1 j a l
14 1 3ad2ant1 φ a A j 1 K N 0
15 2 3ad2ant1 φ a A j 1 K K 0
16 simpr φ a A a A
17 4 a1i φ a A A = g | g : 1 K + 1 0 i = 1 K + 1 g i = N
18 17 eqcomd φ a A g | g : 1 K + 1 0 i = 1 K + 1 g i = N = A
19 16 18 eleqtrrd φ a A a g | g : 1 K + 1 0 i = 1 K + 1 g i = N
20 feq1 g = a g : 1 K + 1 0 a : 1 K + 1 0
21 simpl g = a i 1 K + 1 g = a
22 21 fveq1d g = a i 1 K + 1 g i = a i
23 22 sumeq2dv g = a i = 1 K + 1 g i = i = 1 K + 1 a i
24 23 eqeq1d g = a i = 1 K + 1 g i = N i = 1 K + 1 a i = N
25 20 24 anbi12d g = a g : 1 K + 1 0 i = 1 K + 1 g i = N a : 1 K + 1 0 i = 1 K + 1 a i = N
26 25 elabg a A a g | g : 1 K + 1 0 i = 1 K + 1 g i = N a : 1 K + 1 0 i = 1 K + 1 a i = N
27 16 26 syl φ a A a g | g : 1 K + 1 0 i = 1 K + 1 g i = N a : 1 K + 1 0 i = 1 K + 1 a i = N
28 27 biimpd φ a A a g | g : 1 K + 1 0 i = 1 K + 1 g i = N a : 1 K + 1 0 i = 1 K + 1 a i = N
29 19 28 mpd φ a A a : 1 K + 1 0 i = 1 K + 1 a i = N
30 29 simpld φ a A a : 1 K + 1 0
31 30 3adant3 φ a A j 1 K a : 1 K + 1 0
32 eqid e 1 K e + l = 1 e a l = e 1 K e + l = 1 e a l
33 fveq2 i = l a i = a l
34 nfcv _ l 1 K + 1
35 nfcv _ i 1 K + 1
36 nfcv _ l a i
37 nfcv _ i a l
38 33 34 35 36 37 cbvsum i = 1 K + 1 a i = l = 1 K + 1 a l
39 29 simprd φ a A i = 1 K + 1 a i = N
40 38 39 eqtr3id φ a A l = 1 K + 1 a l = N
41 40 3adant3 φ a A j 1 K l = 1 K + 1 a l = N
42 14 15 31 11 32 41 sticksstones7 φ a A j 1 K e 1 K e + l = 1 e a l j 1 N + K
43 13 42 eqeltrrd φ a A j 1 K j + l = 1 j a l 1 N + K
44 43 3expa φ a A j 1 K j + l = 1 j a l 1 N + K
45 eqid j 1 K j + l = 1 j a l = j 1 K j + l = 1 j a l
46 44 45 fmptd φ a A j 1 K j + l = 1 j a l : 1 K 1 N + K
47 1 ad3antrrr φ a A x 1 K y 1 K N 0
48 47 adantr φ a A x 1 K y 1 K x < y N 0
49 2 ad3antrrr φ a A x 1 K y 1 K K 0
50 49 adantr φ a A x 1 K y 1 K x < y K 0
51 26 adantl φ a A a g | g : 1 K + 1 0 i = 1 K + 1 g i = N a : 1 K + 1 0 i = 1 K + 1 a i = N
52 51 biimpd φ a A a g | g : 1 K + 1 0 i = 1 K + 1 g i = N a : 1 K + 1 0 i = 1 K + 1 a i = N
53 19 52 mpd φ a A a : 1 K + 1 0 i = 1 K + 1 a i = N
54 53 simpld φ a A a : 1 K + 1 0
55 54 adantr φ a A x 1 K a : 1 K + 1 0
56 55 adantr φ a A x 1 K y 1 K a : 1 K + 1 0
57 56 adantr φ a A x 1 K y 1 K x < y a : 1 K + 1 0
58 simpllr φ a A x 1 K y 1 K x < y x 1 K
59 simplr φ a A x 1 K y 1 K x < y y 1 K
60 simpr φ a A x 1 K y 1 K x < y x < y
61 48 50 57 58 59 60 45 sticksstones6 φ a A x 1 K y 1 K x < y j 1 K j + l = 1 j a l x < j 1 K j + l = 1 j a l y
62 61 ex φ a A x 1 K y 1 K x < y j 1 K j + l = 1 j a l x < j 1 K j + l = 1 j a l y
63 62 ralrimiva φ a A x 1 K y 1 K x < y j 1 K j + l = 1 j a l x < j 1 K j + l = 1 j a l y
64 63 ralrimiva φ a A x 1 K y 1 K x < y j 1 K j + l = 1 j a l x < j 1 K j + l = 1 j a l y
65 46 64 jca φ a A j 1 K j + l = 1 j a l : 1 K 1 N + K x 1 K y 1 K x < y j 1 K j + l = 1 j a l x < j 1 K j + l = 1 j a l y
66 fzfid φ a A 1 K Fin
67 46 66 fexd φ a A j 1 K j + l = 1 j a l V
68 feq1 f = j 1 K j + l = 1 j a l f : 1 K 1 N + K j 1 K j + l = 1 j a l : 1 K 1 N + K
69 fveq1 f = j 1 K j + l = 1 j a l f x = j 1 K j + l = 1 j a l x
70 fveq1 f = j 1 K j + l = 1 j a l f y = j 1 K j + l = 1 j a l y
71 69 70 breq12d f = j 1 K j + l = 1 j a l f x < f y j 1 K j + l = 1 j a l x < j 1 K j + l = 1 j a l y
72 71 imbi2d f = j 1 K j + l = 1 j a l x < y f x < f y x < y j 1 K j + l = 1 j a l x < j 1 K j + l = 1 j a l y
73 72 2ralbidv f = j 1 K j + l = 1 j a l x 1 K y 1 K x < y f x < f y x 1 K y 1 K x < y j 1 K j + l = 1 j a l x < j 1 K j + l = 1 j a l y
74 68 73 anbi12d f = j 1 K j + l = 1 j a l f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y j 1 K j + l = 1 j a l : 1 K 1 N + K x 1 K y 1 K x < y j 1 K j + l = 1 j a l x < j 1 K j + l = 1 j a l y
75 74 elabg j 1 K j + l = 1 j a l V j 1 K j + l = 1 j a l f | f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y j 1 K j + l = 1 j a l : 1 K 1 N + K x 1 K y 1 K x < y j 1 K j + l = 1 j a l x < j 1 K j + l = 1 j a l y
76 67 75 syl φ a A j 1 K j + l = 1 j a l f | f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y j 1 K j + l = 1 j a l : 1 K 1 N + K x 1 K y 1 K x < y j 1 K j + l = 1 j a l x < j 1 K j + l = 1 j a l y
77 65 76 mpbird φ a A j 1 K j + l = 1 j a l f | f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y
78 5 a1i φ a A B = f | f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y
79 77 78 eleqtrrd φ a A j 1 K j + l = 1 j a l B
80 79 3 fmptd φ F : A B