Metamath Proof Explorer


Theorem psrbagconf1o

Description: Bag complementation is a bijection on the set of bags dominated by a given bag F . (Contributed by Mario Carneiro, 29-Dec-2014) Remove a sethood antecedent. (Revised by SN, 6-Aug-2024)

Ref Expression
Hypotheses psrbag.d D = f 0 I | f -1 Fin
psrbagconf1o.s S = y D | y f F
Assertion psrbagconf1o F D x S F f x : S 1-1 onto S

Proof

Step Hyp Ref Expression
1 psrbag.d D = f 0 I | f -1 Fin
2 psrbagconf1o.s S = y D | y f F
3 eqid x S F f x = x S F f x
4 1 2 psrbagconcl F D x S F f x S
5 1 2 psrbagconcl F D z S F f z S
6 1 psrbagf F D F : I 0
7 6 adantr F D x S z S F : I 0
8 7 ffvelrnda F D x S z S n I F n 0
9 2 ssrab3 S D
10 9 sseli z S z D
11 10 adantl F D z S z D
12 1 psrbagf z D z : I 0
13 11 12 syl F D z S z : I 0
14 13 adantrl F D x S z S z : I 0
15 14 ffvelrnda F D x S z S n I z n 0
16 simprl F D x S z S x S
17 9 16 sselid F D x S z S x D
18 1 psrbagf x D x : I 0
19 17 18 syl F D x S z S x : I 0
20 19 ffvelrnda F D x S z S n I x n 0
21 nn0cn F n 0 F n
22 nn0cn z n 0 z n
23 nn0cn x n 0 x n
24 subsub23 F n z n x n F n z n = x n F n x n = z n
25 21 22 23 24 syl3an F n 0 z n 0 x n 0 F n z n = x n F n x n = z n
26 8 15 20 25 syl3anc F D x S z S n I F n z n = x n F n x n = z n
27 eqcom x n = F n z n F n z n = x n
28 eqcom z n = F n x n F n x n = z n
29 26 27 28 3bitr4g F D x S z S n I x n = F n z n z n = F n x n
30 6 ffnd F D F Fn I
31 30 adantr F D x S z S F Fn I
32 13 ffnd F D z S z Fn I
33 32 adantrl F D x S z S z Fn I
34 19 ffnd F D x S z S x Fn I
35 16 34 fndmexd F D x S z S I V
36 inidm I I = I
37 eqidd F D x S z S n I F n = F n
38 eqidd F D x S z S n I z n = z n
39 31 33 35 35 36 37 38 ofval F D x S z S n I F f z n = F n z n
40 39 eqeq2d F D x S z S n I x n = F f z n x n = F n z n
41 eqidd F D x S z S n I x n = x n
42 31 34 35 35 36 37 41 ofval F D x S z S n I F f x n = F n x n
43 42 eqeq2d F D x S z S n I z n = F f x n z n = F n x n
44 29 40 43 3bitr4d F D x S z S n I x n = F f z n z n = F f x n
45 44 ralbidva F D x S z S n I x n = F f z n n I z n = F f x n
46 5 adantrl F D x S z S F f z S
47 9 46 sselid F D x S z S F f z D
48 1 psrbagf F f z D F f z : I 0
49 47 48 syl F D x S z S F f z : I 0
50 49 ffnd F D x S z S F f z Fn I
51 eqfnfv x Fn I F f z Fn I x = F f z n I x n = F f z n
52 34 50 51 syl2anc F D x S z S x = F f z n I x n = F f z n
53 9 4 sselid F D x S F f x D
54 1 psrbagf F f x D F f x : I 0
55 53 54 syl F D x S F f x : I 0
56 55 ffnd F D x S F f x Fn I
57 56 adantrr F D x S z S F f x Fn I
58 eqfnfv z Fn I F f x Fn I z = F f x n I z n = F f x n
59 33 57 58 syl2anc F D x S z S z = F f x n I z n = F f x n
60 45 52 59 3bitr4d F D x S z S x = F f z z = F f x
61 3 4 5 60 f1o2d F D x S F f x : S 1-1 onto S