Metamath Proof Explorer


Theorem lgsdir2lem5

Description: Lemma for lgsdir2 . (Contributed by Mario Carneiro, 4-Feb-2015)

Ref Expression
Assertion lgsdir2lem5 A B A mod 8 3 5 B mod 8 3 5 A B mod 8 1 7

Proof

Step Hyp Ref Expression
1 ovex A mod 8 V
2 1 elpr A mod 8 3 5 A mod 8 = 3 A mod 8 = 5
3 ovex B mod 8 V
4 3 elpr B mod 8 3 5 B mod 8 = 3 B mod 8 = 5
5 2 4 anbi12i A mod 8 3 5 B mod 8 3 5 A mod 8 = 3 A mod 8 = 5 B mod 8 = 3 B mod 8 = 5
6 simpll A B A mod 8 = 3 B mod 8 = 3 A
7 3z 3
8 7 a1i A B A mod 8 = 3 B mod 8 = 3 3
9 simplr A B A mod 8 = 3 B mod 8 = 3 B
10 8re 8
11 8pos 0 < 8
12 10 11 elrpii 8 +
13 12 a1i A B A mod 8 = 3 B mod 8 = 3 8 +
14 simprl A B A mod 8 = 3 B mod 8 = 3 A mod 8 = 3
15 lgsdir2lem1 1 mod 8 = 1 -1 mod 8 = 7 3 mod 8 = 3 -3 mod 8 = 5
16 15 simpri 3 mod 8 = 3 -3 mod 8 = 5
17 16 simpli 3 mod 8 = 3
18 14 17 eqtr4di A B A mod 8 = 3 B mod 8 = 3 A mod 8 = 3 mod 8
19 simprr A B A mod 8 = 3 B mod 8 = 3 B mod 8 = 3
20 19 17 eqtr4di A B A mod 8 = 3 B mod 8 = 3 B mod 8 = 3 mod 8
21 6 8 9 8 13 18 20 modmul12d A B A mod 8 = 3 B mod 8 = 3 A B mod 8 = 3 3 mod 8
22 21 orcd A B A mod 8 = 3 B mod 8 = 3 A B mod 8 = 3 3 mod 8 A B mod 8 = 3 3 mod 8
23 22 ex A B A mod 8 = 3 B mod 8 = 3 A B mod 8 = 3 3 mod 8 A B mod 8 = 3 3 mod 8
24 simpll A B A mod 8 = 5 B mod 8 = 3 A
25 znegcl 3 3
26 7 25 mp1i A B A mod 8 = 5 B mod 8 = 3 3
27 simplr A B A mod 8 = 5 B mod 8 = 3 B
28 7 a1i A B A mod 8 = 5 B mod 8 = 3 3
29 12 a1i A B A mod 8 = 5 B mod 8 = 3 8 +
30 simprl A B A mod 8 = 5 B mod 8 = 3 A mod 8 = 5
31 16 simpri -3 mod 8 = 5
32 30 31 eqtr4di A B A mod 8 = 5 B mod 8 = 3 A mod 8 = -3 mod 8
33 simprr A B A mod 8 = 5 B mod 8 = 3 B mod 8 = 3
34 33 17 eqtr4di A B A mod 8 = 5 B mod 8 = 3 B mod 8 = 3 mod 8
35 24 26 27 28 29 32 34 modmul12d A B A mod 8 = 5 B mod 8 = 3 A B mod 8 = -3 3 mod 8
36 3cn 3
37 36 36 mulneg1i -3 3 = 3 3
38 37 oveq1i -3 3 mod 8 = 3 3 mod 8
39 35 38 eqtrdi A B A mod 8 = 5 B mod 8 = 3 A B mod 8 = 3 3 mod 8
40 39 olcd A B A mod 8 = 5 B mod 8 = 3 A B mod 8 = 3 3 mod 8 A B mod 8 = 3 3 mod 8
41 40 ex A B A mod 8 = 5 B mod 8 = 3 A B mod 8 = 3 3 mod 8 A B mod 8 = 3 3 mod 8
42 simpll A B A mod 8 = 3 B mod 8 = 5 A
43 7 a1i A B A mod 8 = 3 B mod 8 = 5 3
44 simplr A B A mod 8 = 3 B mod 8 = 5 B
45 7 25 mp1i A B A mod 8 = 3 B mod 8 = 5 3
46 12 a1i A B A mod 8 = 3 B mod 8 = 5 8 +
47 simprl A B A mod 8 = 3 B mod 8 = 5 A mod 8 = 3
48 47 17 eqtr4di A B A mod 8 = 3 B mod 8 = 5 A mod 8 = 3 mod 8
49 simprr A B A mod 8 = 3 B mod 8 = 5 B mod 8 = 5
50 49 31 eqtr4di A B A mod 8 = 3 B mod 8 = 5 B mod 8 = -3 mod 8
51 42 43 44 45 46 48 50 modmul12d A B A mod 8 = 3 B mod 8 = 5 A B mod 8 = 3 -3 mod 8
52 36 36 mulneg2i 3 -3 = 3 3
53 52 oveq1i 3 -3 mod 8 = 3 3 mod 8
54 51 53 eqtrdi A B A mod 8 = 3 B mod 8 = 5 A B mod 8 = 3 3 mod 8
55 54 olcd A B A mod 8 = 3 B mod 8 = 5 A B mod 8 = 3 3 mod 8 A B mod 8 = 3 3 mod 8
56 55 ex A B A mod 8 = 3 B mod 8 = 5 A B mod 8 = 3 3 mod 8 A B mod 8 = 3 3 mod 8
57 simpll A B A mod 8 = 5 B mod 8 = 5 A
58 7 25 mp1i A B A mod 8 = 5 B mod 8 = 5 3
59 simplr A B A mod 8 = 5 B mod 8 = 5 B
60 12 a1i A B A mod 8 = 5 B mod 8 = 5 8 +
61 simprl A B A mod 8 = 5 B mod 8 = 5 A mod 8 = 5
62 61 31 eqtr4di A B A mod 8 = 5 B mod 8 = 5 A mod 8 = -3 mod 8
63 simprr A B A mod 8 = 5 B mod 8 = 5 B mod 8 = 5
64 63 31 eqtr4di A B A mod 8 = 5 B mod 8 = 5 B mod 8 = -3 mod 8
65 57 58 59 58 60 62 64 modmul12d A B A mod 8 = 5 B mod 8 = 5 A B mod 8 = -3 -3 mod 8
66 36 36 mul2negi -3 -3 = 3 3
67 66 oveq1i -3 -3 mod 8 = 3 3 mod 8
68 65 67 eqtrdi A B A mod 8 = 5 B mod 8 = 5 A B mod 8 = 3 3 mod 8
69 68 orcd A B A mod 8 = 5 B mod 8 = 5 A B mod 8 = 3 3 mod 8 A B mod 8 = 3 3 mod 8
70 69 ex A B A mod 8 = 5 B mod 8 = 5 A B mod 8 = 3 3 mod 8 A B mod 8 = 3 3 mod 8
71 23 41 56 70 ccased A B A mod 8 = 3 A mod 8 = 5 B mod 8 = 3 B mod 8 = 5 A B mod 8 = 3 3 mod 8 A B mod 8 = 3 3 mod 8
72 5 71 syl5bi A B A mod 8 3 5 B mod 8 3 5 A B mod 8 = 3 3 mod 8 A B mod 8 = 3 3 mod 8
73 72 imp A B A mod 8 3 5 B mod 8 3 5 A B mod 8 = 3 3 mod 8 A B mod 8 = 3 3 mod 8
74 ovex A B mod 8 V
75 74 elpr A B mod 8 3 3 mod 8 3 3 mod 8 A B mod 8 = 3 3 mod 8 A B mod 8 = 3 3 mod 8
76 73 75 sylibr A B A mod 8 3 5 B mod 8 3 5 A B mod 8 3 3 mod 8 3 3 mod 8
77 df-9 9 = 8 + 1
78 8cn 8
79 ax-1cn 1
80 78 79 addcomi 8 + 1 = 1 + 8
81 77 80 eqtri 9 = 1 + 8
82 3t3e9 3 3 = 9
83 78 mulid2i 1 8 = 8
84 83 oveq2i 1 + 1 8 = 1 + 8
85 81 82 84 3eqtr4i 3 3 = 1 + 1 8
86 85 oveq1i 3 3 mod 8 = 1 + 1 8 mod 8
87 1re 1
88 1z 1
89 modcyc 1 8 + 1 1 + 1 8 mod 8 = 1 mod 8
90 87 12 88 89 mp3an 1 + 1 8 mod 8 = 1 mod 8
91 86 90 eqtri 3 3 mod 8 = 1 mod 8
92 15 simpli 1 mod 8 = 1 -1 mod 8 = 7
93 92 simpli 1 mod 8 = 1
94 91 93 eqtri 3 3 mod 8 = 1
95 znegcl 1 1
96 88 95 mp1i 1
97 3nn 3
98 97 97 nnmulcli 3 3
99 98 nnzi 3 3
100 99 a1i 3 3
101 88 a1i 1
102 12 a1i 8 +
103 eqidd -1 mod 8 = -1 mod 8
104 91 a1i 3 3 mod 8 = 1 mod 8
105 96 96 100 101 102 103 104 modmul12d -1 3 3 mod 8 = -1 1 mod 8
106 105 mptru -1 3 3 mod 8 = -1 1 mod 8
107 36 36 mulcli 3 3
108 107 mulm1i -1 3 3 = 3 3
109 108 oveq1i -1 3 3 mod 8 = 3 3 mod 8
110 79 mulm1i -1 1 = 1
111 110 oveq1i -1 1 mod 8 = -1 mod 8
112 106 109 111 3eqtr3i 3 3 mod 8 = -1 mod 8
113 92 simpri -1 mod 8 = 7
114 112 113 eqtri 3 3 mod 8 = 7
115 94 114 preq12i 3 3 mod 8 3 3 mod 8 = 1 7
116 76 115 eleqtrdi A B A mod 8 3 5 B mod 8 3 5 A B mod 8 1 7