Metamath Proof Explorer


Theorem 4sqlem10

Description: Lemma for 4sq . (Contributed by Mario Carneiro, 16-Jul-2014)

Ref Expression
Hypotheses 4sqlem5.2 φA
4sqlem5.3 φM
4sqlem5.4 B=A+M2modMM2
4sqlem10.5 φψM222B2=0
Assertion 4sqlem10 φψM2A2M222

Proof

Step Hyp Ref Expression
1 4sqlem5.2 φA
2 4sqlem5.3 φM
3 4sqlem5.4 B=A+M2modMM2
4 4sqlem10.5 φψM222B2=0
5 2 adantr φψM
6 5 nnzd φψM
7 zsqcl MM2
8 6 7 syl φψM2
9 1 adantr φψA
10 5 nnred φψM
11 10 rehalfcld φψM2
12 11 recnd φψM2
13 12 negnegd φψM2=M2
14 1 2 3 4sqlem5 φBABM
15 14 adantr φψBABM
16 15 simpld φψB
17 16 zred φψB
18 1 2 3 4sqlem6 φM2BB<M2
19 18 adantr φψM2BB<M2
20 19 simprd φψB<M2
21 17 20 ltned φψBM2
22 21 neneqd φψ¬B=M2
23 2cnd φψ2
24 23 sqvald φψ22=22
25 24 oveq2d φψM222=M222
26 5 nncnd φψM
27 2ne0 20
28 27 a1i φψ20
29 26 23 28 sqdivd φψM22=M222
30 26 sqcld φψM2
31 30 23 23 28 28 divdiv1d φψM222=M222
32 25 29 31 3eqtr4d φψM22=M222
33 30 halfcld φψM22
34 33 halfcld φψM222
35 16 zcnd φψB
36 35 sqcld φψB2
37 34 36 4 subeq0d φψM222=B2
38 32 37 eqtr2d φψB2=M22
39 sqeqor BM2B2=M22B=M2B=M2
40 35 12 39 syl2anc φψB2=M22B=M2B=M2
41 38 40 mpbid φψB=M2B=M2
42 41 ord φψ¬B=M2B=M2
43 22 42 mpd φψB=M2
44 43 16 eqeltrrd φψM2
45 44 znegcld φψM2
46 13 45 eqeltrrd φψM2
47 9 46 zaddcld φψA+M2
48 zsqcl A+M2A+M22
49 47 48 syl φψA+M22
50 47 6 zmulcld φψA+M2 M
51 47 zred φψA+M2
52 5 nnrpd φψM+
53 51 52 modcld φψA+M2modM
54 53 recnd φψA+M2modM
55 0cnd φψ0
56 df-neg M2=0M2
57 43 3 56 3eqtr3g φψA+M2modMM2=0M2
58 54 55 12 57 subcan2d φψA+M2modM=0
59 dvdsval3 MA+M2MA+M2A+M2modM=0
60 5 47 59 syl2anc φψMA+M2A+M2modM=0
61 58 60 mpbird φψMA+M2
62 dvdssq MA+M2MA+M2M2A+M22
63 6 47 62 syl2anc φψMA+M2M2A+M22
64 61 63 mpbid φψM2A+M22
65 26 sqvald φψM2= M M
66 5 nnne0d φψM0
67 dvdsmulcr MA+M2MM0 M MA+M2 MMA+M2
68 6 47 6 66 67 syl112anc φψ M MA+M2 MMA+M2
69 61 68 mpbird φψ M MA+M2 M
70 65 69 eqbrtrd φψM2A+M2 M
71 8 49 50 64 70 dvds2subd φψM2A+M22A+M2 M
72 47 zcnd φψA+M2
73 72 sqvald φψA+M22=A+M2A+M2
74 73 oveq1d φψA+M22A+M2 M=A+M2A+M2A+M2 M
75 72 72 26 subdid φψA+M2A+M2-M=A+M2A+M2A+M2 M
76 26 2halvesd φψM2+M2=M
77 76 oveq2d φψA+M2-M2+M2=A+M2-M
78 9 zcnd φψA
79 78 12 12 pnpcan2d φψA+M2-M2+M2=AM2
80 77 79 eqtr3d φψA+M2-M=AM2
81 80 oveq2d φψA+M2A+M2-M=A+M2AM2
82 subsq AM2A2M22=A+M2AM2
83 78 12 82 syl2anc φψA2M22=A+M2AM2
84 32 oveq2d φψA2M22=A2M222
85 81 83 84 3eqtr2d φψA+M2A+M2-M=A2M222
86 74 75 85 3eqtr2d φψA+M22A+M2 M=A2M222
87 71 86 breqtrd φψM2A2M222