Metamath Proof Explorer


Theorem allbutfiinf

Description: Given a "for all but finitely many" condition, the condition holds from N on. (Contributed by Glauco Siliprandi, 23-Oct-2021)

Ref Expression
Hypotheses allbutfiinf.z 𝑍 = ( ℤ𝑀 )
allbutfiinf.a 𝐴 = 𝑛𝑍 𝑚 ∈ ( ℤ𝑛 ) 𝐵
allbutfiinf.x ( 𝜑𝑋𝐴 )
allbutfiinf.n 𝑁 = inf ( { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } , ℝ , < )
Assertion allbutfiinf ( 𝜑 → ( 𝑁𝑍 ∧ ∀ 𝑚 ∈ ( ℤ𝑁 ) 𝑋𝐵 ) )

Proof

Step Hyp Ref Expression
1 allbutfiinf.z 𝑍 = ( ℤ𝑀 )
2 allbutfiinf.a 𝐴 = 𝑛𝑍 𝑚 ∈ ( ℤ𝑛 ) 𝐵
3 allbutfiinf.x ( 𝜑𝑋𝐴 )
4 allbutfiinf.n 𝑁 = inf ( { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } , ℝ , < )
5 ssrab2 { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } ⊆ 𝑍
6 4 a1i ( 𝜑𝑁 = inf ( { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } , ℝ , < ) )
7 5 1 sseqtri { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } ⊆ ( ℤ𝑀 )
8 7 a1i ( 𝜑 → { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } ⊆ ( ℤ𝑀 ) )
9 1 2 allbutfi ( 𝑋𝐴 ↔ ∃ 𝑛𝑍𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 )
10 3 9 sylib ( 𝜑 → ∃ 𝑛𝑍𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 )
11 nfrab1 𝑛 { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 }
12 nfcv 𝑛
13 11 12 nfne 𝑛 { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } ≠ ∅
14 rabid ( 𝑛 ∈ { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } ↔ ( 𝑛𝑍 ∧ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 ) )
15 14 bicomi ( ( 𝑛𝑍 ∧ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 ) ↔ 𝑛 ∈ { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } )
16 15 biimpi ( ( 𝑛𝑍 ∧ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 ) → 𝑛 ∈ { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } )
17 16 ne0d ( ( 𝑛𝑍 ∧ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 ) → { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } ≠ ∅ )
18 17 ex ( 𝑛𝑍 → ( ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 → { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } ≠ ∅ ) )
19 13 18 rexlimi ( ∃ 𝑛𝑍𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 → { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } ≠ ∅ )
20 19 a1i ( 𝜑 → ( ∃ 𝑛𝑍𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 → { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } ≠ ∅ ) )
21 10 20 mpd ( 𝜑 → { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } ≠ ∅ )
22 infssuzcl ( ( { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } ⊆ ( ℤ𝑀 ) ∧ { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } ≠ ∅ ) → inf ( { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } , ℝ , < ) ∈ { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } )
23 8 21 22 syl2anc ( 𝜑 → inf ( { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } , ℝ , < ) ∈ { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } )
24 6 23 eqeltrd ( 𝜑𝑁 ∈ { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } )
25 5 24 sselid ( 𝜑𝑁𝑍 )
26 nfcv 𝑛
27 nfcv 𝑛 <
28 11 26 27 nfinf 𝑛 inf ( { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } , ℝ , < )
29 4 28 nfcxfr 𝑛 𝑁
30 nfcv 𝑛 𝑍
31 nfcv 𝑛
32 31 29 nffv 𝑛 ( ℤ𝑁 )
33 nfv 𝑛 𝑋𝐵
34 32 33 nfralw 𝑛𝑚 ∈ ( ℤ𝑁 ) 𝑋𝐵
35 nfcv 𝑚 ( ℤ𝑛 )
36 nfcv 𝑚
37 nfra1 𝑚𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵
38 nfcv 𝑚 𝑍
39 37 38 nfrabw 𝑚 { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 }
40 nfcv 𝑚
41 nfcv 𝑚 <
42 39 40 41 nfinf 𝑚 inf ( { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } , ℝ , < )
43 4 42 nfcxfr 𝑚 𝑁
44 36 43 nffv 𝑚 ( ℤ𝑁 )
45 fveq2 ( 𝑛 = 𝑁 → ( ℤ𝑛 ) = ( ℤ𝑁 ) )
46 35 44 45 raleqd ( 𝑛 = 𝑁 → ( ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 ↔ ∀ 𝑚 ∈ ( ℤ𝑁 ) 𝑋𝐵 ) )
47 29 30 34 46 elrabf ( 𝑁 ∈ { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } ↔ ( 𝑁𝑍 ∧ ∀ 𝑚 ∈ ( ℤ𝑁 ) 𝑋𝐵 ) )
48 47 biimpi ( 𝑁 ∈ { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } → ( 𝑁𝑍 ∧ ∀ 𝑚 ∈ ( ℤ𝑁 ) 𝑋𝐵 ) )
49 48 simprd ( 𝑁 ∈ { 𝑛𝑍 ∣ ∀ 𝑚 ∈ ( ℤ𝑛 ) 𝑋𝐵 } → ∀ 𝑚 ∈ ( ℤ𝑁 ) 𝑋𝐵 )
50 24 49 syl ( 𝜑 → ∀ 𝑚 ∈ ( ℤ𝑁 ) 𝑋𝐵 )
51 25 50 jca ( 𝜑 → ( 𝑁𝑍 ∧ ∀ 𝑚 ∈ ( ℤ𝑁 ) 𝑋𝐵 ) )