Metamath Proof Explorer


Theorem reprval

Description: Value of the representations of M as the sum of S nonnegative integers in a given set A . (Contributed by Thierry Arnoux, 1-Dec-2021)

Ref Expression
Hypotheses reprval.a φA
reprval.m φM
reprval.s φS0
Assertion reprval φAreprSM=cA0..^S|a0..^Sca=M

Proof

Step Hyp Ref Expression
1 reprval.a φA
2 reprval.m φM
3 reprval.s φS0
4 df-repr repr=s0b𝒫,mcb0..^s|a0..^sca=m
5 oveq2 s=S0..^s=0..^S
6 5 oveq2d s=Sb0..^s=b0..^S
7 5 sumeq1d s=Sa0..^sca=a0..^Sca
8 7 eqeq1d s=Sa0..^sca=ma0..^Sca=m
9 6 8 rabeqbidv s=Scb0..^s|a0..^sca=m=cb0..^S|a0..^Sca=m
10 9 mpoeq3dv s=Sb𝒫,mcb0..^s|a0..^sca=m=b𝒫,mcb0..^S|a0..^Sca=m
11 nnex V
12 11 pwex 𝒫V
13 zex V
14 12 13 mpoex b𝒫,mcb0..^S|a0..^Sca=mV
15 14 a1i φb𝒫,mcb0..^S|a0..^Sca=mV
16 4 10 3 15 fvmptd3 φreprS=b𝒫,mcb0..^S|a0..^Sca=m
17 simprl φb=Am=Mb=A
18 17 oveq1d φb=Am=Mb0..^S=A0..^S
19 simprr φb=Am=Mm=M
20 19 eqeq2d φb=Am=Ma0..^Sca=ma0..^Sca=M
21 18 20 rabeqbidv φb=Am=Mcb0..^S|a0..^Sca=m=cA0..^S|a0..^Sca=M
22 11 a1i φV
23 22 1 ssexd φAV
24 23 1 elpwd φA𝒫
25 ovex A0..^SV
26 25 rabex cA0..^S|a0..^Sca=MV
27 26 a1i φcA0..^S|a0..^Sca=MV
28 16 21 24 2 27 ovmpod φAreprSM=cA0..^S|a0..^Sca=M