Metamath Proof Explorer


Theorem dquartlem1

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

Ref Expression
Hypotheses dquart.b φ B
dquart.c φ C
dquart.x φ X
dquart.s φ S
dquart.m φ M = 2 S 2
dquart.m0 φ M 0
dquart.i φ I
dquart.i2 φ I 2 = S 2 - B 2 + C 4 S
Assertion dquartlem1 φ X 2 + M + B 2 + M 2 X C 4 S = 0 X = - S + I X = - S - I

Proof

Step Hyp Ref Expression
1 dquart.b φ B
2 dquart.c φ C
3 dquart.x φ X
4 dquart.s φ S
5 dquart.m φ M = 2 S 2
6 dquart.m0 φ M 0
7 dquart.i φ I
8 dquart.i2 φ I 2 = S 2 - B 2 + C 4 S
9 3 sqcld φ X 2
10 2cn 2
11 mulcl 2 S 2 S
12 10 4 11 sylancr φ 2 S
13 12 sqcld φ 2 S 2
14 5 13 eqeltrd φ M
15 14 1 addcld φ M + B
16 15 halfcld φ M + B 2
17 9 16 addcld φ X 2 + M + B 2
18 14 halfcld φ M 2
19 18 3 mulcld φ M 2 X
20 4cn 4
21 20 a1i φ 4
22 4ne0 4 0
23 22 a1i φ 4 0
24 2 21 23 divcld φ C 4
25 19 24 subcld φ M 2 X C 4
26 5 6 eqnetrrd φ 2 S 2 0
27 sqne0 2 S 2 S 2 0 2 S 0
28 12 27 syl φ 2 S 2 0 2 S 0
29 26 28 mpbid φ 2 S 0
30 mulne0b 2 S 2 0 S 0 2 S 0
31 10 4 30 sylancr φ 2 0 S 0 2 S 0
32 29 31 mpbird φ 2 0 S 0
33 32 simprd φ S 0
34 25 4 33 divcld φ M 2 X C 4 S
35 17 34 addcld φ X 2 + M + B 2 + M 2 X C 4 S
36 10 a1i φ 2
37 2ne0 2 0
38 37 a1i φ 2 0
39 35 36 38 diveq0ad φ X 2 + M + B 2 + M 2 X C 4 S 2 = 0 X 2 + M + B 2 + M 2 X C 4 S = 0
40 9 16 34 addassd φ X 2 + M + B 2 + M 2 X C 4 S = X 2 + M + B 2 + M 2 X C 4 S
41 40 oveq1d φ X 2 + M + B 2 + M 2 X C 4 S 2 = X 2 + M + B 2 + M 2 X C 4 S 2
42 16 34 addcld φ M + B 2 + M 2 X C 4 S
43 9 42 36 38 divdird φ X 2 + M + B 2 + M 2 X C 4 S 2 = X 2 2 + M + B 2 + M 2 X C 4 S 2
44 9 36 38 divrec2d φ X 2 2 = 1 2 X 2
45 19 24 4 33 divsubdird φ M 2 X C 4 S = M 2 X S C 4 S
46 18 3 4 33 div23d φ M 2 X S = M 2 S X
47 4 sqvald φ S 2 = S S
48 47 oveq2d φ 2 S 2 = 2 S S
49 sqmul 2 S 2 S 2 = 2 2 S 2
50 10 4 49 sylancr φ 2 S 2 = 2 2 S 2
51 10 sqvali 2 2 = 2 2
52 51 oveq1i 2 2 S 2 = 2 2 S 2
53 50 52 eqtrdi φ 2 S 2 = 2 2 S 2
54 4 sqcld φ S 2
55 36 36 54 mulassd φ 2 2 S 2 = 2 2 S 2
56 5 53 55 3eqtrd φ M = 2 2 S 2
57 56 oveq1d φ M 2 = 2 2 S 2 2
58 mulcl 2 S 2 2 S 2
59 10 54 58 sylancr φ 2 S 2
60 59 36 38 divcan3d φ 2 2 S 2 2 = 2 S 2
61 57 60 eqtrd φ M 2 = 2 S 2
62 36 4 4 mulassd φ 2 S S = 2 S S
63 48 61 62 3eqtr4d φ M 2 = 2 S S
64 63 oveq1d φ M 2 S = 2 S S S
65 12 4 33 divcan4d φ 2 S S S = 2 S
66 64 65 eqtrd φ M 2 S = 2 S
67 66 oveq1d φ M 2 S X = 2 S X
68 46 67 eqtrd φ M 2 X S = 2 S X
69 68 oveq1d φ M 2 X S C 4 S = 2 S X C 4 S
70 45 69 eqtrd φ M 2 X C 4 S = 2 S X C 4 S
71 70 oveq2d φ M + B 2 + M 2 X C 4 S = M + B 2 + 2 S X - C 4 S
72 12 3 mulcld φ 2 S X
73 24 4 33 divcld φ C 4 S
74 16 72 73 addsub12d φ M + B 2 + 2 S X - C 4 S = 2 S X + M + B 2 - C 4 S
75 71 74 eqtrd φ M + B 2 + M 2 X C 4 S = 2 S X + M + B 2 - C 4 S
76 75 oveq1d φ M + B 2 + M 2 X C 4 S 2 = 2 S X + M + B 2 - C 4 S 2
77 16 73 subcld φ M + B 2 C 4 S
78 72 77 36 38 divdird φ 2 S X + M + B 2 - C 4 S 2 = 2 S X 2 + M + B 2 C 4 S 2
79 36 4 3 mulassd φ 2 S X = 2 S X
80 79 oveq1d φ 2 S X 2 = 2 S X 2
81 4 3 mulcld φ S X
82 81 36 38 divcan3d φ 2 S X 2 = S X
83 80 82 eqtrd φ 2 S X 2 = S X
84 54 negcld φ S 2
85 1 halfcld φ B 2
86 84 85 subcld φ - S 2 - B 2
87 54 86 73 subsub4d φ S 2 - - S 2 - B 2 - C 4 S = S 2 S 2 - B 2 + C 4 S
88 14 1 36 38 divdird φ M + B 2 = M 2 + B 2
89 54 2timesd φ 2 S 2 = S 2 + S 2
90 61 89 eqtrd φ M 2 = S 2 + S 2
91 90 oveq1d φ M 2 + B 2 = S 2 + S 2 + B 2
92 88 91 eqtrd φ M + B 2 = S 2 + S 2 + B 2
93 54 54 85 addassd φ S 2 + S 2 + B 2 = S 2 + S 2 + B 2
94 54 85 addcld φ S 2 + B 2
95 54 94 subnegd φ S 2 S 2 + B 2 = S 2 + S 2 + B 2
96 54 85 negdi2d φ S 2 + B 2 = - S 2 - B 2
97 96 oveq2d φ S 2 S 2 + B 2 = S 2 - S 2 - B 2
98 95 97 eqtr3d φ S 2 + S 2 + B 2 = S 2 - S 2 - B 2
99 92 93 98 3eqtrd φ M + B 2 = S 2 - S 2 - B 2
100 99 oveq1d φ M + B 2 C 4 S = S 2 - - S 2 - B 2 - C 4 S
101 8 oveq2d φ S 2 I 2 = S 2 S 2 - B 2 + C 4 S
102 87 100 101 3eqtr4d φ M + B 2 C 4 S = S 2 I 2
103 102 oveq1d φ M + B 2 C 4 S 2 = S 2 I 2 2
104 83 103 oveq12d φ 2 S X 2 + M + B 2 C 4 S 2 = S X + S 2 I 2 2
105 76 78 104 3eqtrd φ M + B 2 + M 2 X C 4 S 2 = S X + S 2 I 2 2
106 44 105 oveq12d φ X 2 2 + M + B 2 + M 2 X C 4 S 2 = 1 2 X 2 + S X + S 2 I 2 2
107 41 43 106 3eqtrd φ X 2 + M + B 2 + M 2 X C 4 S 2 = 1 2 X 2 + S X + S 2 I 2 2
108 107 eqeq1d φ X 2 + M + B 2 + M 2 X C 4 S 2 = 0 1 2 X 2 + S X + S 2 I 2 2 = 0
109 39 108 bitr3d φ X 2 + M + B 2 + M 2 X C 4 S = 0 1 2 X 2 + S X + S 2 I 2 2 = 0
110 ax-1cn 1
111 halfcl 1 1 2
112 110 111 mp1i φ 1 2
113 ax-1ne0 1 0
114 110 10 113 37 divne0i 1 2 0
115 114 a1i φ 1 2 0
116 7 sqcld φ I 2
117 54 116 subcld φ S 2 I 2
118 117 halfcld φ S 2 I 2 2
119 110 a1i φ 1
120 2cnne0 2 2 0
121 120 a1i φ 2 2 0
122 divmuldiv 1 S 2 I 2 2 2 0 2 2 0 1 2 S 2 I 2 2 = 1 S 2 I 2 2 2
123 119 117 121 121 122 syl22anc φ 1 2 S 2 I 2 2 = 1 S 2 I 2 2 2
124 117 mulid2d φ 1 S 2 I 2 = S 2 I 2
125 2t2e4 2 2 = 4
126 125 a1i φ 2 2 = 4
127 124 126 oveq12d φ 1 S 2 I 2 2 2 = S 2 I 2 4
128 123 127 eqtrd φ 1 2 S 2 I 2 2 = S 2 I 2 4
129 128 oveq2d φ 4 1 2 S 2 I 2 2 = 4 S 2 I 2 4
130 117 21 23 divcan2d φ 4 S 2 I 2 4 = S 2 I 2
131 129 130 eqtrd φ 4 1 2 S 2 I 2 2 = S 2 I 2
132 131 oveq2d φ S 2 4 1 2 S 2 I 2 2 = S 2 S 2 I 2
133 54 116 nncand φ S 2 S 2 I 2 = I 2
134 132 133 eqtr2d φ I 2 = S 2 4 1 2 S 2 I 2 2
135 112 115 4 118 3 7 134 quad2 φ 1 2 X 2 + S X + S 2 I 2 2 = 0 X = - S + I 2 1 2 X = - S - I 2 1 2
136 10 37 recidi 2 1 2 = 1
137 136 oveq2i - S + I 2 1 2 = - S + I 1
138 4 negcld φ S
139 138 7 addcld φ - S + I
140 139 div1d φ - S + I 1 = - S + I
141 137 140 eqtrid φ - S + I 2 1 2 = - S + I
142 141 eqeq2d φ X = - S + I 2 1 2 X = - S + I
143 136 oveq2i - S - I 2 1 2 = - S - I 1
144 138 7 subcld φ - S - I
145 144 div1d φ - S - I 1 = - S - I
146 143 145 eqtrid φ - S - I 2 1 2 = - S - I
147 146 eqeq2d φ X = - S - I 2 1 2 X = - S - I
148 142 147 orbi12d φ X = - S + I 2 1 2 X = - S - I 2 1 2 X = - S + I X = - S - I
149 109 135 148 3bitrd φ X 2 + M + B 2 + M 2 X C 4 S = 0 X = - S + I X = - S - I