Metamath Proof Explorer


Theorem elz2

Description: Membership in the set of integers. Commonly used in constructions of the integers as equivalence classes under subtraction of the positive integers. (Contributed by Mario Carneiro, 16-May-2014)

Ref Expression
Assertion elz2 NxyN=xy

Proof

Step Hyp Ref Expression
1 elznn0 NNN0N0
2 nn0p1nn N0N+1
3 2 adantl NN0N+1
4 1nn 1
5 4 a1i NN01
6 recn NN
7 6 adantr NN0N
8 ax-1cn 1
9 pncan N1N+1-1=N
10 7 8 9 sylancl NN0N+1-1=N
11 10 eqcomd NN0N=N+1-1
12 rspceov N+11N=N+1-1xyN=xy
13 3 5 11 12 syl3anc NN0xyN=xy
14 4 a1i NN01
15 6 adantr NN0N
16 negsub 1N1+- N=1N
17 8 15 16 sylancr NN01+- N=1N
18 simpr NN0N0
19 nnnn0addcl 1N01+- N
20 4 18 19 sylancr NN01+- N
21 17 20 eqeltrrd NN01N
22 nncan 1N11N=N
23 8 15 22 sylancr NN011N=N
24 23 eqcomd NN0N=11N
25 rspceov 11NN=11NxyN=xy
26 14 21 24 25 syl3anc NN0xyN=xy
27 13 26 jaodan NN0N0xyN=xy
28 nnre xx
29 nnre yy
30 resubcl xyxy
31 28 29 30 syl2an xyxy
32 letric yxyxxy
33 29 28 32 syl2anr xyyxxy
34 nnnn0 yy0
35 nnnn0 xx0
36 nn0sub y0x0yxxy0
37 34 35 36 syl2anr xyyxxy0
38 nn0sub x0y0xyyx0
39 35 34 38 syl2an xyxyyx0
40 nncn xx
41 nncn yy
42 negsubdi2 xyxy=yx
43 40 41 42 syl2an xyxy=yx
44 43 eleq1d xyxy0yx0
45 39 44 bitr4d xyxyxy0
46 37 45 orbi12d xyyxxyxy0xy0
47 33 46 mpbid xyxy0xy0
48 31 47 jca xyxyxy0xy0
49 eleq1 N=xyNxy
50 eleq1 N=xyN0xy0
51 negeq N=xyN=xy
52 51 eleq1d N=xyN0xy0
53 50 52 orbi12d N=xyN0N0xy0xy0
54 49 53 anbi12d N=xyNN0N0xyxy0xy0
55 48 54 syl5ibrcom xyN=xyNN0N0
56 55 rexlimivv xyN=xyNN0N0
57 27 56 impbii NN0N0xyN=xy
58 1 57 bitri NxyN=xy