Metamath Proof Explorer


Theorem quartlem1

Description: Lemma for quart . (Contributed by Mario Carneiro, 6-May-2015)

Ref Expression
Hypotheses quartlem1.p φ P
quartlem1.q φ Q
quartlem1.r φ R
quartlem1.u φ U = P 2 + 12 R
quartlem1.v φ V = 2 P 3 - 27 Q 2 + 72 P R
Assertion quartlem1 φ U = 2 P 2 3 P 2 4 R V = 2 2 P 3 - 9 2 P P 2 4 R + 27 Q 2

Proof

Step Hyp Ref Expression
1 quartlem1.p φ P
2 quartlem1.q φ Q
3 quartlem1.r φ R
4 quartlem1.u φ U = P 2 + 12 R
5 quartlem1.v φ V = 2 P 3 - 27 Q 2 + 72 P R
6 2cn 2
7 sqmul 2 P 2 P 2 = 2 2 P 2
8 6 1 7 sylancr φ 2 P 2 = 2 2 P 2
9 sq2 2 2 = 4
10 9 oveq1i 2 2 P 2 = 4 P 2
11 8 10 eqtrdi φ 2 P 2 = 4 P 2
12 11 oveq1d φ 2 P 2 3 P 2 = 4 P 2 3 P 2
13 4cn 4
14 13 a1i φ 4
15 3cn 3
16 15 a1i φ 3
17 1 sqcld φ P 2
18 14 16 17 subdird φ 4 3 P 2 = 4 P 2 3 P 2
19 12 18 eqtr4d φ 2 P 2 3 P 2 = 4 3 P 2
20 ax-1cn 1
21 3p1e4 3 + 1 = 4
22 13 15 20 21 subaddrii 4 3 = 1
23 22 oveq1i 4 3 P 2 = 1 P 2
24 mullid P 2 1 P 2 = P 2
25 23 24 eqtrid P 2 4 3 P 2 = P 2
26 17 25 syl φ 4 3 P 2 = P 2
27 19 26 eqtr2d φ P 2 = 2 P 2 3 P 2
28 27 oveq1d φ P 2 + 12 R = 2 P 2 - 3 P 2 + 12 R
29 mulcl 2 P 2 P
30 6 1 29 sylancr φ 2 P
31 30 sqcld φ 2 P 2
32 mulcl 3 P 2 3 P 2
33 15 17 32 sylancr φ 3 P 2
34 1nn0 1 0
35 2nn 2
36 34 35 decnncl 12
37 36 nncni 12
38 mulcl 12 R 12 R
39 37 3 38 sylancr φ 12 R
40 31 33 39 subsubd φ 2 P 2 3 P 2 12 R = 2 P 2 - 3 P 2 + 12 R
41 28 40 eqtr4d φ P 2 + 12 R = 2 P 2 3 P 2 12 R
42 mulcl 4 R 4 R
43 13 3 42 sylancr φ 4 R
44 16 17 43 subdid φ 3 P 2 4 R = 3 P 2 3 4 R
45 4t3e12 4 3 = 12
46 13 15 45 mulcomli 3 4 = 12
47 46 oveq1i 3 4 R = 12 R
48 16 14 3 mulassd φ 3 4 R = 3 4 R
49 47 48 eqtr3id φ 12 R = 3 4 R
50 49 oveq2d φ 3 P 2 12 R = 3 P 2 3 4 R
51 44 50 eqtr4d φ 3 P 2 4 R = 3 P 2 12 R
52 51 oveq2d φ 2 P 2 3 P 2 4 R = 2 P 2 3 P 2 12 R
53 41 4 52 3eqtr4d φ U = 2 P 2 3 P 2 4 R
54 6 a1i φ 2
55 3nn0 3 0
56 55 a1i φ 3 0
57 54 1 56 mulexpd φ 2 P 3 = 2 3 P 3
58 cu2 2 3 = 8
59 58 oveq1i 2 3 P 3 = 8 P 3
60 57 59 eqtrdi φ 2 P 3 = 8 P 3
61 60 oveq2d φ 2 2 P 3 = 2 8 P 3
62 8cn 8
63 62 a1i φ 8
64 expcl P 3 0 P 3
65 1 55 64 sylancl φ P 3
66 54 63 65 mul12d φ 2 8 P 3 = 8 2 P 3
67 61 66 eqtrd φ 2 2 P 3 = 8 2 P 3
68 9cn 9
69 68 a1i φ 9
70 mulcl 2 P 3 2 P 3
71 6 65 70 sylancr φ 2 P 3
72 1 3 mulcld φ P R
73 mulcl 8 P R 8 P R
74 62 72 73 sylancr φ 8 P R
75 69 71 74 subdid φ 9 2 P 3 8 P R = 9 2 P 3 9 8 P R
76 30 17 43 subdid φ 2 P P 2 4 R = 2 P P 2 2 P 4 R
77 54 1 17 mulassd φ 2 P P 2 = 2 P P 2
78 1 17 mulcomd φ P P 2 = P 2 P
79 df-3 3 = 2 + 1
80 79 oveq2i P 3 = P 2 + 1
81 2nn0 2 0
82 expp1 P 2 0 P 2 + 1 = P 2 P
83 1 81 82 sylancl φ P 2 + 1 = P 2 P
84 80 83 eqtrid φ P 3 = P 2 P
85 78 84 eqtr4d φ P P 2 = P 3
86 85 oveq2d φ 2 P P 2 = 2 P 3
87 77 86 eqtrd φ 2 P P 2 = 2 P 3
88 54 1 14 3 mul4d φ 2 P 4 R = 2 4 P R
89 2t4e8 2 4 = 8
90 89 oveq1i 2 4 P R = 8 P R
91 88 90 eqtrdi φ 2 P 4 R = 8 P R
92 87 91 oveq12d φ 2 P P 2 2 P 4 R = 2 P 3 8 P R
93 76 92 eqtrd φ 2 P P 2 4 R = 2 P 3 8 P R
94 93 oveq2d φ 9 2 P P 2 4 R = 9 2 P 3 8 P R
95 9t8e72 9 8 = 72
96 95 oveq1i 9 8 P R = 72 P R
97 69 63 72 mulassd φ 9 8 P R = 9 8 P R
98 96 97 eqtr3id φ 72 P R = 9 8 P R
99 98 oveq2d φ 9 2 P 3 72 P R = 9 2 P 3 9 8 P R
100 75 94 99 3eqtr4d φ 9 2 P P 2 4 R = 9 2 P 3 72 P R
101 67 100 oveq12d φ 2 2 P 3 9 2 P P 2 4 R = 8 2 P 3 9 2 P 3 72 P R
102 mulcl 8 2 P 3 8 2 P 3
103 62 71 102 sylancr φ 8 2 P 3
104 mulcl 9 2 P 3 9 2 P 3
105 68 71 104 sylancr φ 9 2 P 3
106 7nn0 7 0
107 106 35 decnncl 72
108 107 nncni 72
109 mulcl 72 P R 72 P R
110 108 72 109 sylancr φ 72 P R
111 103 105 110 subsubd φ 8 2 P 3 9 2 P 3 72 P R = 8 2 P 3 - 9 2 P 3 + 72 P R
112 105 103 negsubdi2d φ 9 2 P 3 8 2 P 3 = 8 2 P 3 9 2 P 3
113 69 63 71 subdird φ 9 8 2 P 3 = 9 2 P 3 8 2 P 3
114 8p1e9 8 + 1 = 9
115 68 62 20 114 subaddrii 9 8 = 1
116 115 oveq1i 9 8 2 P 3 = 1 2 P 3
117 71 mullidd φ 1 2 P 3 = 2 P 3
118 116 117 eqtrid φ 9 8 2 P 3 = 2 P 3
119 113 118 eqtr3d φ 9 2 P 3 8 2 P 3 = 2 P 3
120 119 negeqd φ 9 2 P 3 8 2 P 3 = 2 P 3
121 112 120 eqtr3d φ 8 2 P 3 9 2 P 3 = 2 P 3
122 121 oveq1d φ 8 2 P 3 - 9 2 P 3 + 72 P R = - 2 P 3 + 72 P R
123 101 111 122 3eqtrd φ 2 2 P 3 9 2 P P 2 4 R = - 2 P 3 + 72 P R
124 7nn 7
125 81 124 decnncl 27
126 125 nncni 27
127 2 sqcld φ Q 2
128 mulneg2 27 Q 2 27 Q 2 = 27 Q 2
129 126 127 128 sylancr φ 27 Q 2 = 27 Q 2
130 123 129 oveq12d φ 2 2 P 3 - 9 2 P P 2 4 R + 27 Q 2 = 2 P 3 + 72 P R + 27 Q 2
131 71 negcld φ 2 P 3
132 mulcl 27 Q 2 27 Q 2
133 126 127 132 sylancr φ 27 Q 2
134 131 110 133 addsubd φ 2 P 3 + 72 P R - 27 Q 2 = 2 P 3 - 27 Q 2 + 72 P R
135 131 110 addcld φ - 2 P 3 + 72 P R
136 135 133 negsubd φ 2 P 3 + 72 P R + 27 Q 2 = 2 P 3 + 72 P R - 27 Q 2
137 134 136 5 3eqtr4d φ 2 P 3 + 72 P R + 27 Q 2 = V
138 130 137 eqtr2d φ V = 2 2 P 3 - 9 2 P P 2 4 R + 27 Q 2
139 53 138 jca φ U = 2 P 2 3 P 2 4 R V = 2 2 P 3 - 9 2 P P 2 4 R + 27 Q 2