Metamath Proof Explorer


Theorem psrbagaddcl

Description: The sum of two finite bags is a finite bag. (Contributed by Mario Carneiro, 9-Jan-2015) Shorten proof and remove a sethood antecedent. (Revised by SN, 7-Aug-2024)

Ref Expression
Hypothesis psrbag.d D = f 0 I | f -1 Fin
Assertion psrbagaddcl F D G D F + f G D

Proof

Step Hyp Ref Expression
1 psrbag.d D = f 0 I | f -1 Fin
2 nn0addcl x 0 y 0 x + y 0
3 2 adantl F D G D x 0 y 0 x + y 0
4 1 psrbagf F D F : I 0
5 4 adantr F D G D F : I 0
6 1 psrbagf G D G : I 0
7 6 adantl F D G D G : I 0
8 simpl F D G D F D
9 5 ffnd F D G D F Fn I
10 8 9 fndmexd F D G D I V
11 inidm I I = I
12 3 5 7 10 10 11 off F D G D F + f G : I 0
13 ovex F + f G V
14 frnnn0suppg F + f G V F + f G : I 0 F + f G supp 0 = F + f G -1
15 13 12 14 sylancr F D G D F + f G supp 0 = F + f G -1
16 1 psrbagfsupp F D finSupp 0 F
17 16 adantr F D G D finSupp 0 F
18 1 psrbagfsupp G D finSupp 0 G
19 18 adantl F D G D finSupp 0 G
20 17 19 fsuppunfi F D G D supp 0 F supp 0 G Fin
21 0nn0 0 0
22 21 a1i F D G D 0 0
23 00id 0 + 0 = 0
24 23 a1i F D G D 0 + 0 = 0
25 10 22 5 7 24 suppofssd F D G D F + f G supp 0 supp 0 F supp 0 G
26 20 25 ssfid F D G D F + f G supp 0 Fin
27 15 26 eqeltrrd F D G D F + f G -1 Fin
28 1 psrbag I V F + f G D F + f G : I 0 F + f G -1 Fin
29 10 28 syl F D G D F + f G D F + f G : I 0 F + f G -1 Fin
30 12 27 29 mpbir2and F D G D F + f G D