Metamath Proof Explorer


Theorem allbutfi

Description: For all but finitely many. Some authors say "cofinitely many". Some authors say "ultimately". Compare with eliuniin and eliuniin2 (here, the precondition can be dropped; see eliuniincex ). (Contributed by Glauco Siliprandi, 26-Jun-2021)

Ref Expression
Hypotheses allbutfi.z Z = M
allbutfi.a A = n Z m n B
Assertion allbutfi X A n Z m n X B

Proof

Step Hyp Ref Expression
1 allbutfi.z Z = M
2 allbutfi.a A = n Z m n B
3 2 eleq2i X A X n Z m n B
4 3 biimpi X A X n Z m n B
5 eliun X n Z m n B n Z X m n B
6 4 5 sylib X A n Z X m n B
7 nfcv _ n X
8 nfiu1 _ n n Z m n B
9 2 8 nfcxfr _ n A
10 7 9 nfel n X A
11 eliin X A X m n B m n X B
12 11 biimpd X A X m n B m n X B
13 12 a1d X A n Z X m n B m n X B
14 10 13 reximdai X A n Z X m n B n Z m n X B
15 6 14 mpd X A n Z m n X B
16 simpr n Z m n X B m n X B
17 1 eleq2i n Z n M
18 17 biimpi n Z n M
19 eluzelz n M n
20 uzid n n n
21 18 19 20 3syl n Z n n
22 21 ne0d n Z n
23 eliin2 n X m n B m n X B
24 22 23 syl n Z X m n B m n X B
25 24 adantr n Z m n X B X m n B m n X B
26 16 25 mpbird n Z m n X B X m n B
27 26 ex n Z m n X B X m n B
28 27 reximia n Z m n X B n Z X m n B
29 28 5 sylibr n Z m n X B X n Z m n B
30 29 2 eleqtrrdi n Z m n X B X A
31 15 30 impbii X A n Z m n X B