Metamath Proof Explorer


Theorem lgslem4

Description: Lemma for lgsfcl2 . (Contributed by Mario Carneiro, 4-Feb-2015) (Proof shortened by AV, 19-Mar-2022)

Ref Expression
Hypothesis lgslem2.z Z=x|x1
Assertion lgslem4 AP2AP12+1modP1Z

Proof

Step Hyp Ref Expression
1 lgslem2.z Z=x|x1
2 eldifi P2P
3 2 adantl AP2P
4 simpl AP2A
5 oddprm P2P12
6 5 adantl AP2P12
7 prmdvdsexp PAP12PAP12PA
8 3 4 6 7 syl3anc AP2PAP12PA
9 8 biimpar AP2PAPAP12
10 prmgt1 P1<P
11 2 10 syl P21<P
12 11 ad2antlr AP2PA1<P
13 p1modz1 PAP121<PAP12+1modP=1
14 9 12 13 syl2anc AP2PAAP12+1modP=1
15 14 oveq1d AP2PAAP12+1modP1=11
16 1m1e0 11=0
17 1 lgslem2 1Z0Z1Z
18 17 simp2i 0Z
19 16 18 eqeltri 11Z
20 15 19 eqeltrdi AP2PAAP12+1modP1Z
21 lgslem1 AP2¬PAAP12+1modP02
22 elpri AP12+1modP02AP12+1modP=0AP12+1modP=2
23 oveq1 AP12+1modP=0AP12+1modP1=01
24 df-neg 1=01
25 17 simp1i 1Z
26 24 25 eqeltrri 01Z
27 23 26 eqeltrdi AP12+1modP=0AP12+1modP1Z
28 oveq1 AP12+1modP=2AP12+1modP1=21
29 2m1e1 21=1
30 17 simp3i 1Z
31 29 30 eqeltri 21Z
32 28 31 eqeltrdi AP12+1modP=2AP12+1modP1Z
33 27 32 jaoi AP12+1modP=0AP12+1modP=2AP12+1modP1Z
34 21 22 33 3syl AP2¬PAAP12+1modP1Z
35 34 3expa AP2¬PAAP12+1modP1Z
36 20 35 pm2.61dan AP2AP12+1modP1Z