Metamath Proof Explorer


Theorem ax5seglem7

Description: Lemma for ax5seg . An algebraic calculation needed further down the line. (Contributed by Scott Fenton, 12-Jun-2013)

Ref Expression
Hypotheses ax5seglem7.1 A
ax5seglem7.2 T
ax5seglem7.3 C
ax5seglem7.4 D
Assertion ax5seglem7 T C D 2 = 1 T A + T C - D 2 + 1 T T A C 2 A D 2

Proof

Step Hyp Ref Expression
1 ax5seglem7.1 A
2 ax5seglem7.2 T
3 ax5seglem7.3 C
4 ax5seglem7.4 D
5 3 4 binom2subi C D 2 = C 2 - 2 C D + D 2
6 5 oveq2i T C D 2 = T C 2 - 2 C D + D 2
7 3 sqcli C 2
8 2cn 2
9 3 4 mulcli C D
10 8 9 mulcli 2 C D
11 7 10 subcli C 2 2 C D
12 4 sqcli D 2
13 2 11 12 adddii T C 2 - 2 C D + D 2 = T C 2 2 C D + T D 2
14 2 7 10 subdii T C 2 2 C D = T C 2 T 2 C D
15 14 oveq1i T C 2 2 C D + T D 2 = T C 2 - T 2 C D + T D 2
16 6 13 15 3eqtri T C D 2 = T C 2 - T 2 C D + T D 2
17 ax-1cn 1
18 17 2 subcli 1 T
19 18 1 mulcli 1 T A
20 19 sqcli 1 T A 2
21 2 3 mulcli T C
22 21 4 subcli T C D
23 19 22 mulcli 1 T A T C D
24 8 23 mulcli 2 1 T A T C D
25 20 24 addcli 1 T A 2 + 2 1 T A T C D
26 21 sqcli T C 2
27 26 12 addcli T C 2 + D 2
28 25 27 addcli 1 T A 2 + 2 1 T A T C D + T C 2 + D 2
29 21 4 mulcli T C D
30 8 29 mulcli 2 T C D
31 2 7 mulcli T C 2
32 2 12 mulcli T D 2
33 31 32 addcli T C 2 + T D 2
34 subadd23 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 2 T C D T C 2 + T D 2 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 - 2 T C D + T C 2 + T D 2 = 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 + T C 2 + T D 2 - 2 T C D
35 28 30 33 34 mp3an 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 - 2 T C D + T C 2 + T D 2 = 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 + T C 2 + T D 2 - 2 T C D
36 35 oveq1i 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 - 2 T C D + T C 2 + T D 2 + 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2 = 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 + T C 2 + T D 2 - 2 T C D + 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2
37 19 22 binom2i 1 T A + T C - D 2 = 1 T A 2 + 2 1 T A T C D + T C D 2
38 19 21 4 addsubassi 1 T A + T C - D = 1 T A + T C - D
39 38 oveq1i 1 T A + T C - D 2 = 1 T A + T C - D 2
40 25 27 30 addsubassi 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 - 2 T C D = 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 - 2 T C D
41 21 4 binom2subi T C D 2 = T C 2 - 2 T C D + D 2
42 26 12 30 addsubi T C 2 + D 2 - 2 T C D = T C 2 - 2 T C D + D 2
43 41 42 eqtr4i T C D 2 = T C 2 + D 2 - 2 T C D
44 43 oveq2i 1 T A 2 + 2 1 T A T C D + T C D 2 = 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 - 2 T C D
45 40 44 eqtr4i 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 - 2 T C D = 1 T A 2 + 2 1 T A T C D + T C D 2
46 37 39 45 3eqtr4i 1 T A + T C - D 2 = 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 - 2 T C D
47 1 3 binom2subi A C 2 = A 2 - 2 A C + C 2
48 47 oveq2i T A C 2 = T A 2 - 2 A C + C 2
49 1 sqcli A 2
50 1 3 mulcli A C
51 8 50 mulcli 2 A C
52 49 51 subcli A 2 2 A C
53 2 52 7 adddii T A 2 - 2 A C + C 2 = T A 2 2 A C + T C 2
54 48 53 eqtri T A C 2 = T A 2 2 A C + T C 2
55 1 4 binom2subi A D 2 = A 2 - 2 A D + D 2
56 54 55 oveq12i T A C 2 A D 2 = T A 2 2 A C + T C 2 - A 2 - 2 A D + D 2
57 2 52 mulcli T A 2 2 A C
58 1 4 mulcli A D
59 8 58 mulcli 2 A D
60 49 59 subcli A 2 2 A D
61 57 31 60 12 addsub4i T A 2 2 A C + T C 2 - A 2 - 2 A D + D 2 = T A 2 2 A C A 2 2 A D + T C 2 - D 2
62 56 61 eqtri T A C 2 A D 2 = T A 2 2 A C A 2 2 A D + T C 2 - D 2
63 62 oveq2i 1 T T A C 2 A D 2 = 1 T T A 2 2 A C A 2 2 A D + T C 2 - D 2
64 57 60 subcli T A 2 2 A C A 2 2 A D
65 31 12 subcli T C 2 D 2
66 18 64 65 adddii 1 T T A 2 2 A C A 2 2 A D + T C 2 - D 2 = 1 T T A 2 2 A C A 2 2 A D + 1 T T C 2 D 2
67 17 2 65 subdiri 1 T T C 2 D 2 = 1 T C 2 D 2 T T C 2 D 2
68 65 mulid2i 1 T C 2 D 2 = T C 2 D 2
69 2 31 12 subdii T T C 2 D 2 = T T C 2 T D 2
70 68 69 oveq12i 1 T C 2 D 2 T T C 2 D 2 = T C 2 - D 2 - T T C 2 T D 2
71 2 31 mulcli T T C 2
72 subsub3 T C 2 D 2 T T C 2 T D 2 T C 2 - D 2 - T T C 2 T D 2 = T C 2 D 2 + T D 2 - T T C 2
73 65 71 32 72 mp3an T C 2 - D 2 - T T C 2 T D 2 = T C 2 D 2 + T D 2 - T T C 2
74 31 32 12 addsubi T C 2 + T D 2 - D 2 = T C 2 - D 2 + T D 2
75 74 oveq1i T C 2 + T D 2 - D 2 - T T C 2 = T C 2 D 2 + T D 2 - T T C 2
76 subsub4 T C 2 + T D 2 D 2 T T C 2 T C 2 + T D 2 - D 2 - T T C 2 = T C 2 + T D 2 - D 2 + T T C 2
77 33 12 71 76 mp3an T C 2 + T D 2 - D 2 - T T C 2 = T C 2 + T D 2 - D 2 + T T C 2
78 73 75 77 3eqtr2i T C 2 - D 2 - T T C 2 T D 2 = T C 2 + T D 2 - D 2 + T T C 2
79 67 70 78 3eqtri 1 T T C 2 D 2 = T C 2 + T D 2 - D 2 + T T C 2
80 79 oveq2i 1 T T A 2 2 A C A 2 2 A D + 1 T T C 2 D 2 = 1 T T A 2 2 A C A 2 2 A D + T C 2 + T D 2 - D 2 + T T C 2
81 18 64 mulcli 1 T T A 2 2 A C A 2 2 A D
82 12 71 addcli D 2 + T T C 2
83 addsub12 1 T T A 2 2 A C A 2 2 A D T C 2 + T D 2 D 2 + T T C 2 1 T T A 2 2 A C A 2 2 A D + T C 2 + T D 2 - D 2 + T T C 2 = T C 2 + T D 2 + 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2
84 81 33 82 83 mp3an 1 T T A 2 2 A C A 2 2 A D + T C 2 + T D 2 - D 2 + T T C 2 = T C 2 + T D 2 + 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2
85 80 84 eqtri 1 T T A 2 2 A C A 2 2 A D + 1 T T C 2 D 2 = T C 2 + T D 2 + 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2
86 63 66 85 3eqtri 1 T T A C 2 A D 2 = T C 2 + T D 2 + 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2
87 46 86 oveq12i 1 T A + T C - D 2 + 1 T T A C 2 A D 2 = 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 - 2 T C D + T C 2 + T D 2 + 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2
88 28 30 subcli 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 - 2 T C D
89 81 82 subcli 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2
90 88 33 89 addassi 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 - 2 T C D + T C 2 + T D 2 + 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2 = 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 - 2 T C D + T C 2 + T D 2 + 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2
91 87 90 eqtr4i 1 T A + T C - D 2 + 1 T T A C 2 A D 2 = 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 - 2 T C D + T C 2 + T D 2 + 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2
92 33 30 subcli T C 2 + T D 2 - 2 T C D
93 28 89 92 add32i 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 + 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2 + T C 2 + T D 2 - 2 T C D = 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 + T C 2 + T D 2 - 2 T C D + 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2
94 36 91 93 3eqtr4i 1 T A + T C - D 2 + 1 T T A C 2 A D 2 = 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 + 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2 + T C 2 + T D 2 - 2 T C D
95 subsub2 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 D 2 + T T C 2 1 T T A 2 2 A C A 2 2 A D 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 - D 2 + T T C 2 - 1 T T A 2 2 A C A 2 2 A D = 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 + 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2
96 28 82 81 95 mp3an 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 - D 2 + T T C 2 - 1 T T A 2 2 A C A 2 2 A D = 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 + 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2
97 25 26 12 addassi 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 = 1 T A 2 + 2 1 T A T C D + T C 2 + D 2
98 25 26 addcomi 1 T A 2 + 2 1 T A T C D + T C 2 = T C 2 + 1 T A 2 + 2 1 T A T C D
99 2 3 sqmuli T C 2 = T 2 C 2
100 2 sqvali T 2 = T T
101 100 oveq1i T 2 C 2 = T T C 2
102 2 2 7 mulassi T T C 2 = T T C 2
103 99 101 102 3eqtri T C 2 = T T C 2
104 18 1 sqmuli 1 T A 2 = 1 T 2 A 2
105 18 sqvali 1 T 2 = 1 T 1 T
106 105 oveq1i 1 T 2 A 2 = 1 T 1 T A 2
107 18 18 49 mulassi 1 T 1 T A 2 = 1 T 1 T A 2
108 17 2 49 subdiri 1 T A 2 = 1 A 2 T A 2
109 49 mulid2i 1 A 2 = A 2
110 109 oveq1i 1 A 2 T A 2 = A 2 T A 2
111 108 110 eqtri 1 T A 2 = A 2 T A 2
112 111 oveq2i 1 T 1 T A 2 = 1 T A 2 T A 2
113 107 112 eqtri 1 T 1 T A 2 = 1 T A 2 T A 2
114 104 106 113 3eqtri 1 T A 2 = 1 T A 2 T A 2
115 8 19 22 mul12i 2 1 T A T C D = 1 T A 2 T C D
116 8 22 mulcli 2 T C D
117 18 1 116 mulassi 1 T A 2 T C D = 1 T A 2 T C D
118 1 8 mulcomi A 2 = 2 A
119 118 oveq1i A 2 T C D = 2 A T C D
120 1 8 22 mulassi A 2 T C D = A 2 T C D
121 119 120 eqtr3i 2 A T C D = A 2 T C D
122 8 1 mulcli 2 A
123 122 21 4 subdii 2 A T C D = 2 A T C 2 A D
124 122 2 3 mul12i 2 A T C = T 2 A C
125 8 1 3 mulassi 2 A C = 2 A C
126 125 oveq2i T 2 A C = T 2 A C
127 124 126 eqtri 2 A T C = T 2 A C
128 8 1 4 mulassi 2 A D = 2 A D
129 127 128 oveq12i 2 A T C 2 A D = T 2 A C 2 A D
130 123 129 eqtri 2 A T C D = T 2 A C 2 A D
131 121 130 eqtr3i A 2 T C D = T 2 A C 2 A D
132 131 oveq2i 1 T A 2 T C D = 1 T T 2 A C 2 A D
133 115 117 132 3eqtri 2 1 T A T C D = 1 T T 2 A C 2 A D
134 114 133 oveq12i 1 T A 2 + 2 1 T A T C D = 1 T A 2 T A 2 + 1 T T 2 A C 2 A D
135 2 49 mulcli T A 2
136 49 135 subcli A 2 T A 2
137 2 51 mulcli T 2 A C
138 137 59 subcli T 2 A C 2 A D
139 18 136 138 adddii 1 T A 2 T A 2 + T 2 A C - 2 A D = 1 T A 2 T A 2 + 1 T T 2 A C 2 A D
140 2 49 51 subdii T A 2 2 A C = T A 2 T 2 A C
141 140 oveq2i A 2 - 2 A D - T A 2 2 A C = A 2 - 2 A D - T A 2 T 2 A C
142 140 57 eqeltrri T A 2 T 2 A C
143 sub32 A 2 T A 2 T 2 A C 2 A D A 2 - T A 2 T 2 A C - 2 A D = A 2 - 2 A D - T A 2 T 2 A C
144 49 142 59 143 mp3an A 2 - T A 2 T 2 A C - 2 A D = A 2 - 2 A D - T A 2 T 2 A C
145 141 144 eqtr4i A 2 - 2 A D - T A 2 2 A C = A 2 - T A 2 T 2 A C - 2 A D
146 subsub A 2 T A 2 T 2 A C A 2 T A 2 T 2 A C = A 2 - T A 2 + T 2 A C
147 49 135 137 146 mp3an A 2 T A 2 T 2 A C = A 2 - T A 2 + T 2 A C
148 147 oveq1i A 2 - T A 2 T 2 A C - 2 A D = A 2 T A 2 + T 2 A C - 2 A D
149 136 137 59 addsubassi A 2 T A 2 + T 2 A C - 2 A D = A 2 T A 2 + T 2 A C - 2 A D
150 145 148 149 3eqtrri A 2 T A 2 + T 2 A C - 2 A D = A 2 - 2 A D - T A 2 2 A C
151 150 oveq2i 1 T A 2 T A 2 + T 2 A C - 2 A D = 1 T A 2 - 2 A D - T A 2 2 A C
152 134 139 151 3eqtr2i 1 T A 2 + 2 1 T A T C D = 1 T A 2 - 2 A D - T A 2 2 A C
153 57 60 negsubdi2i T A 2 2 A C A 2 2 A D = A 2 - 2 A D - T A 2 2 A C
154 153 oveq2i 1 T T A 2 2 A C A 2 2 A D = 1 T A 2 - 2 A D - T A 2 2 A C
155 18 64 mulneg2i 1 T T A 2 2 A C A 2 2 A D = 1 T T A 2 2 A C A 2 2 A D
156 152 154 155 3eqtr2i 1 T A 2 + 2 1 T A T C D = 1 T T A 2 2 A C A 2 2 A D
157 103 156 oveq12i T C 2 + 1 T A 2 + 2 1 T A T C D = T T C 2 + 1 T T A 2 2 A C A 2 2 A D
158 71 81 negsubi T T C 2 + 1 T T A 2 2 A C A 2 2 A D = T T C 2 1 T T A 2 2 A C A 2 2 A D
159 98 157 158 3eqtri 1 T A 2 + 2 1 T A T C D + T C 2 = T T C 2 1 T T A 2 2 A C A 2 2 A D
160 159 oveq2i D 2 + 1 T A 2 + 2 1 T A T C D + T C 2 = D 2 + T T C 2 - 1 T T A 2 2 A C A 2 2 A D
161 25 26 addcli 1 T A 2 + 2 1 T A T C D + T C 2
162 161 12 addcomi 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 = D 2 + 1 T A 2 + 2 1 T A T C D + T C 2
163 12 71 81 addsubassi D 2 + T T C 2 - 1 T T A 2 2 A C A 2 2 A D = D 2 + T T C 2 - 1 T T A 2 2 A C A 2 2 A D
164 160 162 163 3eqtr4i 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 = D 2 + T T C 2 - 1 T T A 2 2 A C A 2 2 A D
165 97 164 eqtr3i 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 = D 2 + T T C 2 - 1 T T A 2 2 A C A 2 2 A D
166 82 81 subcli D 2 + T T C 2 - 1 T T A 2 2 A C A 2 2 A D
167 28 166 subeq0i 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 - D 2 + T T C 2 - 1 T T A 2 2 A C A 2 2 A D = 0 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 = D 2 + T T C 2 - 1 T T A 2 2 A C A 2 2 A D
168 165 167 mpbir 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 - D 2 + T T C 2 - 1 T T A 2 2 A C A 2 2 A D = 0
169 96 168 eqtr3i 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 + 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2 = 0
170 2 3 4 mulassi T C D = T C D
171 170 oveq2i 2 T C D = 2 T C D
172 8 2 9 mul12i 2 T C D = T 2 C D
173 171 172 eqtri 2 T C D = T 2 C D
174 173 oveq2i T C 2 + T D 2 - 2 T C D = T C 2 + T D 2 - T 2 C D
175 2 10 mulcli T 2 C D
176 31 32 175 addsubi T C 2 + T D 2 - T 2 C D = T C 2 - T 2 C D + T D 2
177 174 176 eqtri T C 2 + T D 2 - 2 T C D = T C 2 - T 2 C D + T D 2
178 169 177 oveq12i 1 T A 2 + 2 1 T A T C D + T C 2 + D 2 + 1 T T A 2 2 A C A 2 2 A D D 2 + T T C 2 + T C 2 + T D 2 - 2 T C D = 0 + T C 2 T 2 C D + T D 2
179 31 175 subcli T C 2 T 2 C D
180 179 32 addcli T C 2 - T 2 C D + T D 2
181 180 addid2i 0 + T C 2 T 2 C D + T D 2 = T C 2 - T 2 C D + T D 2
182 94 178 181 3eqtri 1 T A + T C - D 2 + 1 T T A C 2 A D 2 = T C 2 - T 2 C D + T D 2
183 16 182 eqtr4i T C D 2 = 1 T A + T C - D 2 + 1 T T A C 2 A D 2