Metamath Proof Explorer


Theorem lgsfcl2

Description: The function F is closed in integers with absolute value less than 1 (namely { -u 1 , 0 , 1 } , see zabsle1 ). (Contributed by Mario Carneiro, 4-Feb-2015)

Ref Expression
Hypotheses lgsval.1 F=nifnifn=2if2A0ifAmod81711An12+1modn1npCntN1
lgsfcl2.z Z=x|x1
Assertion lgsfcl2 ANN0F:Z

Proof

Step Hyp Ref Expression
1 lgsval.1 F=nifnifn=2if2A0ifAmod81711An12+1modn1npCntN1
2 lgsfcl2.z Z=x|x1
3 0z 0
4 0le1 01
5 fveq2 x=0x=0
6 abs0 0=0
7 5 6 eqtrdi x=0x=0
8 7 breq1d x=0x101
9 8 2 elrab2 0Z001
10 3 4 9 mpbir2an 0Z
11 1z 1
12 1le1 11
13 fveq2 x=1x=1
14 abs1 1=1
15 13 14 eqtrdi x=1x=1
16 15 breq1d x=1x111
17 16 2 elrab2 1Z111
18 11 12 17 mpbir2an 1Z
19 neg1z 1
20 fveq2 x=1x=1
21 ax-1cn 1
22 21 absnegi 1=1
23 22 14 eqtri 1=1
24 20 23 eqtrdi x=1x=1
25 24 breq1d x=1x111
26 25 2 elrab2 1Z111
27 19 12 26 mpbir2an 1Z
28 18 27 ifcli ifAmod81711Z
29 10 28 ifcli if2A0ifAmod81711Z
30 29 a1i ANN0nnn=2if2A0ifAmod81711Z
31 simpl1 ANN0nA
32 31 ad2antrr ANN0nn¬n=2A
33 simplr ANN0nn¬n=2n
34 simpr ANN0nn¬n=2¬n=2
35 34 neqned ANN0nn¬n=2n2
36 eldifsn n2nn2
37 33 35 36 sylanbrc ANN0nn¬n=2n2
38 2 lgslem4 An2An12+1modn1Z
39 32 37 38 syl2anc ANN0nn¬n=2An12+1modn1Z
40 30 39 ifclda ANN0nnifn=2if2A0ifAmod81711An12+1modn1Z
41 simpr ANN0nnn
42 simpll2 ANN0nnN
43 simpll3 ANN0nnN0
44 pczcl nNN0npCntN0
45 41 42 43 44 syl12anc ANN0nnnpCntN0
46 2 ssrab3 Z
47 zsscn
48 46 47 sstri Z
49 2 lgslem3 aZbZabZ
50 48 49 18 expcllem ifn=2if2A0ifAmod81711An12+1modn1ZnpCntN0ifn=2if2A0ifAmod81711An12+1modn1npCntNZ
51 40 45 50 syl2anc ANN0nnifn=2if2A0ifAmod81711An12+1modn1npCntNZ
52 18 a1i ANN0n¬n1Z
53 51 52 ifclda ANN0nifnifn=2if2A0ifAmod81711An12+1modn1npCntN1Z
54 53 1 fmptd ANN0F:Z