Metamath Proof Explorer


Theorem unfilem1

Description: Lemma for proving that the union of two finite sets is finite. (Contributed by NM, 10-Nov-2002) (Revised by Mario Carneiro, 31-Aug-2015)

Ref Expression
Hypotheses unfilem1.1 A ω
unfilem1.2 B ω
unfilem1.3 F = x B A + 𝑜 x
Assertion unfilem1 ran F = A + 𝑜 B A

Proof

Step Hyp Ref Expression
1 unfilem1.1 A ω
2 unfilem1.2 B ω
3 unfilem1.3 F = x B A + 𝑜 x
4 elnn x B B ω x ω
5 2 4 mpan2 x B x ω
6 nnaord x ω B ω A ω x B A + 𝑜 x A + 𝑜 B
7 2 1 6 mp3an23 x ω x B A + 𝑜 x A + 𝑜 B
8 5 7 syl x B x B A + 𝑜 x A + 𝑜 B
9 8 ibi x B A + 𝑜 x A + 𝑜 B
10 nnaword1 A ω x ω A A + 𝑜 x
11 nnord A ω Ord A
12 nnacl A ω x ω A + 𝑜 x ω
13 nnord A + 𝑜 x ω Ord A + 𝑜 x
14 12 13 syl A ω x ω Ord A + 𝑜 x
15 ordtri1 Ord A Ord A + 𝑜 x A A + 𝑜 x ¬ A + 𝑜 x A
16 11 14 15 syl2an2r A ω x ω A A + 𝑜 x ¬ A + 𝑜 x A
17 10 16 mpbid A ω x ω ¬ A + 𝑜 x A
18 1 5 17 sylancr x B ¬ A + 𝑜 x A
19 9 18 jca x B A + 𝑜 x A + 𝑜 B ¬ A + 𝑜 x A
20 eleq1 y = A + 𝑜 x y A + 𝑜 B A + 𝑜 x A + 𝑜 B
21 eleq1 y = A + 𝑜 x y A A + 𝑜 x A
22 21 notbid y = A + 𝑜 x ¬ y A ¬ A + 𝑜 x A
23 20 22 anbi12d y = A + 𝑜 x y A + 𝑜 B ¬ y A A + 𝑜 x A + 𝑜 B ¬ A + 𝑜 x A
24 23 biimparc A + 𝑜 x A + 𝑜 B ¬ A + 𝑜 x A y = A + 𝑜 x y A + 𝑜 B ¬ y A
25 19 24 sylan x B y = A + 𝑜 x y A + 𝑜 B ¬ y A
26 25 rexlimiva x B y = A + 𝑜 x y A + 𝑜 B ¬ y A
27 1 2 nnacli A + 𝑜 B ω
28 elnn y A + 𝑜 B A + 𝑜 B ω y ω
29 27 28 mpan2 y A + 𝑜 B y ω
30 nnord y ω Ord y
31 ordtri1 Ord A Ord y A y ¬ y A
32 11 30 31 syl2an A ω y ω A y ¬ y A
33 nnawordex A ω y ω A y x ω A + 𝑜 x = y
34 32 33 bitr3d A ω y ω ¬ y A x ω A + 𝑜 x = y
35 1 29 34 sylancr y A + 𝑜 B ¬ y A x ω A + 𝑜 x = y
36 eleq1 A + 𝑜 x = y A + 𝑜 x A + 𝑜 B y A + 𝑜 B
37 7 36 sylan9bb x ω A + 𝑜 x = y x B y A + 𝑜 B
38 37 biimprcd y A + 𝑜 B x ω A + 𝑜 x = y x B
39 eqcom A + 𝑜 x = y y = A + 𝑜 x
40 39 biimpi A + 𝑜 x = y y = A + 𝑜 x
41 40 adantl x ω A + 𝑜 x = y y = A + 𝑜 x
42 38 41 jca2 y A + 𝑜 B x ω A + 𝑜 x = y x B y = A + 𝑜 x
43 42 reximdv2 y A + 𝑜 B x ω A + 𝑜 x = y x B y = A + 𝑜 x
44 35 43 sylbid y A + 𝑜 B ¬ y A x B y = A + 𝑜 x
45 44 imp y A + 𝑜 B ¬ y A x B y = A + 𝑜 x
46 26 45 impbii x B y = A + 𝑜 x y A + 𝑜 B ¬ y A
47 ovex A + 𝑜 x V
48 3 47 elrnmpti y ran F x B y = A + 𝑜 x
49 eldif y A + 𝑜 B A y A + 𝑜 B ¬ y A
50 46 48 49 3bitr4i y ran F y A + 𝑜 B A
51 50 eqriv ran F = A + 𝑜 B A