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 TCD2=1TA+TC-D2+1TTAC2AD2

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 CD2=C2-2CD+D2
6 5 oveq2i TCD2=TC2-2CD+D2
7 3 sqcli C2
8 2cn 2
9 3 4 mulcli CD
10 8 9 mulcli 2CD
11 7 10 subcli C22CD
12 4 sqcli D2
13 2 11 12 adddii TC2-2CD+D2=TC22CD+TD2
14 2 7 10 subdii TC22CD=TC2T2CD
15 14 oveq1i TC22CD+TD2=TC2-T2CD+TD2
16 6 13 15 3eqtri TCD2=TC2-T2CD+TD2
17 ax-1cn 1
18 17 2 subcli 1T
19 18 1 mulcli 1TA
20 19 sqcli 1TA2
21 2 3 mulcli TC
22 21 4 subcli TCD
23 19 22 mulcli 1TATCD
24 8 23 mulcli 21TATCD
25 20 24 addcli 1TA2+21TATCD
26 21 sqcli TC2
27 26 12 addcli TC2+D2
28 25 27 addcli 1TA2+21TATCD+TC2+D2
29 21 4 mulcli TCD
30 8 29 mulcli 2TCD
31 2 7 mulcli TC2
32 2 12 mulcli TD2
33 31 32 addcli TC2+TD2
34 subadd23 1TA2+21TATCD+TC2+D22TCDTC2+TD21TA2+21TATCD+TC2+D2-2TCD+TC2+TD2=1TA2+21TATCD+TC2+D2+TC2+TD2-2TCD
35 28 30 33 34 mp3an 1TA2+21TATCD+TC2+D2-2TCD+TC2+TD2=1TA2+21TATCD+TC2+D2+TC2+TD2-2TCD
36 35 oveq1i 1TA2+21TATCD+TC2+D2-2TCD+TC2+TD2+1TTA22ACA22ADD2+TTC2=1TA2+21TATCD+TC2+D2+TC2+TD2-2TCD+1TTA22ACA22ADD2+TTC2
37 19 22 binom2i 1TA+TC-D2=1TA2+21TATCD+TCD2
38 19 21 4 addsubassi 1TA+TC-D=1TA+TC-D
39 38 oveq1i 1TA+TC-D2=1TA+TC-D2
40 25 27 30 addsubassi 1TA2+21TATCD+TC2+D2-2TCD=1TA2+21TATCD+TC2+D2-2TCD
41 21 4 binom2subi TCD2=TC2-2TCD+D2
42 26 12 30 addsubi TC2+D2-2TCD=TC2-2TCD+D2
43 41 42 eqtr4i TCD2=TC2+D2-2TCD
44 43 oveq2i 1TA2+21TATCD+TCD2=1TA2+21TATCD+TC2+D2-2TCD
45 40 44 eqtr4i 1TA2+21TATCD+TC2+D2-2TCD=1TA2+21TATCD+TCD2
46 37 39 45 3eqtr4i 1TA+TC-D2=1TA2+21TATCD+TC2+D2-2TCD
47 1 3 binom2subi AC2=A2-2AC+C2
48 47 oveq2i TAC2=TA2-2AC+C2
49 1 sqcli A2
50 1 3 mulcli AC
51 8 50 mulcli 2AC
52 49 51 subcli A22AC
53 2 52 7 adddii TA2-2AC+C2=TA22AC+TC2
54 48 53 eqtri TAC2=TA22AC+TC2
55 1 4 binom2subi AD2=A2-2AD+D2
56 54 55 oveq12i TAC2AD2=TA22AC+TC2-A2-2AD+D2
57 2 52 mulcli TA22AC
58 1 4 mulcli AD
59 8 58 mulcli 2AD
60 49 59 subcli A22AD
61 57 31 60 12 addsub4i TA22AC+TC2-A2-2AD+D2=TA22ACA22AD+TC2-D2
62 56 61 eqtri TAC2AD2=TA22ACA22AD+TC2-D2
63 62 oveq2i 1TTAC2AD2=1TTA22ACA22AD+TC2-D2
64 57 60 subcli TA22ACA22AD
65 31 12 subcli TC2D2
66 18 64 65 adddii 1TTA22ACA22AD+TC2-D2=1TTA22ACA22AD+1TTC2D2
67 17 2 65 subdiri 1TTC2D2=1TC2D2TTC2D2
68 65 mullidi 1TC2D2=TC2D2
69 2 31 12 subdii TTC2D2=TTC2TD2
70 68 69 oveq12i 1TC2D2TTC2D2=TC2-D2-TTC2TD2
71 2 31 mulcli TTC2
72 subsub3 TC2D2TTC2TD2TC2-D2-TTC2TD2=TC2D2+TD2-TTC2
73 65 71 32 72 mp3an TC2-D2-TTC2TD2=TC2D2+TD2-TTC2
74 31 32 12 addsubi TC2+TD2-D2=TC2-D2+TD2
75 74 oveq1i TC2+TD2-D2-TTC2=TC2D2+TD2-TTC2
76 subsub4 TC2+TD2D2TTC2TC2+TD2-D2-TTC2=TC2+TD2-D2+TTC2
77 33 12 71 76 mp3an TC2+TD2-D2-TTC2=TC2+TD2-D2+TTC2
78 73 75 77 3eqtr2i TC2-D2-TTC2TD2=TC2+TD2-D2+TTC2
79 67 70 78 3eqtri 1TTC2D2=TC2+TD2-D2+TTC2
80 79 oveq2i 1TTA22ACA22AD+1TTC2D2=1TTA22ACA22AD+TC2+TD2-D2+TTC2
81 18 64 mulcli 1TTA22ACA22AD
82 12 71 addcli D2+TTC2
83 addsub12 1TTA22ACA22ADTC2+TD2D2+TTC21TTA22ACA22AD+TC2+TD2-D2+TTC2=TC2+TD2+1TTA22ACA22ADD2+TTC2
84 81 33 82 83 mp3an 1TTA22ACA22AD+TC2+TD2-D2+TTC2=TC2+TD2+1TTA22ACA22ADD2+TTC2
85 80 84 eqtri 1TTA22ACA22AD+1TTC2D2=TC2+TD2+1TTA22ACA22ADD2+TTC2
86 63 66 85 3eqtri 1TTAC2AD2=TC2+TD2+1TTA22ACA22ADD2+TTC2
87 46 86 oveq12i 1TA+TC-D2+1TTAC2AD2=1TA2+21TATCD+TC2+D2-2TCD+TC2+TD2+1TTA22ACA22ADD2+TTC2
88 28 30 subcli 1TA2+21TATCD+TC2+D2-2TCD
89 81 82 subcli 1TTA22ACA22ADD2+TTC2
90 88 33 89 addassi 1TA2+21TATCD+TC2+D2-2TCD+TC2+TD2+1TTA22ACA22ADD2+TTC2=1TA2+21TATCD+TC2+D2-2TCD+TC2+TD2+1TTA22ACA22ADD2+TTC2
91 87 90 eqtr4i 1TA+TC-D2+1TTAC2AD2=1TA2+21TATCD+TC2+D2-2TCD+TC2+TD2+1TTA22ACA22ADD2+TTC2
92 33 30 subcli TC2+TD2-2TCD
93 28 89 92 add32i 1TA2+21TATCD+TC2+D2+1TTA22ACA22ADD2+TTC2+TC2+TD2-2TCD=1TA2+21TATCD+TC2+D2+TC2+TD2-2TCD+1TTA22ACA22ADD2+TTC2
94 36 91 93 3eqtr4i 1TA+TC-D2+1TTAC2AD2=1TA2+21TATCD+TC2+D2+1TTA22ACA22ADD2+TTC2+TC2+TD2-2TCD
95 subsub2 1TA2+21TATCD+TC2+D2D2+TTC21TTA22ACA22AD1TA2+21TATCD+TC2+D2-D2+TTC2-1TTA22ACA22AD=1TA2+21TATCD+TC2+D2+1TTA22ACA22ADD2+TTC2
96 28 82 81 95 mp3an 1TA2+21TATCD+TC2+D2-D2+TTC2-1TTA22ACA22AD=1TA2+21TATCD+TC2+D2+1TTA22ACA22ADD2+TTC2
97 25 26 12 addassi 1TA2+21TATCD+TC2+D2=1TA2+21TATCD+TC2+D2
98 25 26 addcomi 1TA2+21TATCD+TC2=TC2+1TA2+21TATCD
99 2 3 sqmuli TC2=T2C2
100 2 sqvali T2=TT
101 100 oveq1i T2C2=TTC2
102 2 2 7 mulassi TTC2=TTC2
103 99 101 102 3eqtri TC2=TTC2
104 18 1 sqmuli 1TA2=1T2A2
105 18 sqvali 1T2=1T1T
106 105 oveq1i 1T2A2=1T1TA2
107 18 18 49 mulassi 1T1TA2=1T1TA2
108 17 2 49 subdiri 1TA2=1A2TA2
109 49 mullidi 1A2=A2
110 109 oveq1i 1A2TA2=A2TA2
111 108 110 eqtri 1TA2=A2TA2
112 111 oveq2i 1T1TA2=1TA2TA2
113 107 112 eqtri 1T1TA2=1TA2TA2
114 104 106 113 3eqtri 1TA2=1TA2TA2
115 8 19 22 mul12i 21TATCD=1TA2TCD
116 8 22 mulcli 2TCD
117 18 1 116 mulassi 1TA2TCD=1TA2TCD
118 1 8 mulcomi A2=2A
119 118 oveq1i A2TCD=2ATCD
120 1 8 22 mulassi A2TCD=A2TCD
121 119 120 eqtr3i 2ATCD=A2TCD
122 8 1 mulcli 2A
123 122 21 4 subdii 2ATCD=2ATC2AD
124 122 2 3 mul12i 2ATC=T2AC
125 8 1 3 mulassi 2AC=2AC
126 125 oveq2i T2AC=T2AC
127 124 126 eqtri 2ATC=T2AC
128 8 1 4 mulassi 2AD=2AD
129 127 128 oveq12i 2ATC2AD=T2AC2AD
130 123 129 eqtri 2ATCD=T2AC2AD
131 121 130 eqtr3i A2TCD=T2AC2AD
132 131 oveq2i 1TA2TCD=1TT2AC2AD
133 115 117 132 3eqtri 21TATCD=1TT2AC2AD
134 114 133 oveq12i 1TA2+21TATCD=1TA2TA2+1TT2AC2AD
135 2 49 mulcli TA2
136 49 135 subcli A2TA2
137 2 51 mulcli T2AC
138 137 59 subcli T2AC2AD
139 18 136 138 adddii 1TA2TA2+T2AC-2AD=1TA2TA2+1TT2AC2AD
140 2 49 51 subdii TA22AC=TA2T2AC
141 140 oveq2i A2-2AD-TA22AC=A2-2AD-TA2T2AC
142 140 57 eqeltrri TA2T2AC
143 sub32 A2TA2T2AC2ADA2-TA2T2AC-2AD=A2-2AD-TA2T2AC
144 49 142 59 143 mp3an A2-TA2T2AC-2AD=A2-2AD-TA2T2AC
145 141 144 eqtr4i A2-2AD-TA22AC=A2-TA2T2AC-2AD
146 subsub A2TA2T2ACA2TA2T2AC=A2-TA2+T2AC
147 49 135 137 146 mp3an A2TA2T2AC=A2-TA2+T2AC
148 147 oveq1i A2-TA2T2AC-2AD=A2TA2+T2AC-2AD
149 136 137 59 addsubassi A2TA2+T2AC-2AD=A2TA2+T2AC-2AD
150 145 148 149 3eqtrri A2TA2+T2AC-2AD=A2-2AD-TA22AC
151 150 oveq2i 1TA2TA2+T2AC-2AD=1TA2-2AD-TA22AC
152 134 139 151 3eqtr2i 1TA2+21TATCD=1TA2-2AD-TA22AC
153 57 60 negsubdi2i TA22ACA22AD=A2-2AD-TA22AC
154 153 oveq2i 1TTA22ACA22AD=1TA2-2AD-TA22AC
155 18 64 mulneg2i 1TTA22ACA22AD=1TTA22ACA22AD
156 152 154 155 3eqtr2i 1TA2+21TATCD=1TTA22ACA22AD
157 103 156 oveq12i TC2+1TA2+21TATCD=TTC2+1TTA22ACA22AD
158 71 81 negsubi TTC2+1TTA22ACA22AD=TTC21TTA22ACA22AD
159 98 157 158 3eqtri 1TA2+21TATCD+TC2=TTC21TTA22ACA22AD
160 159 oveq2i D2+1TA2+21TATCD+TC2=D2+TTC2-1TTA22ACA22AD
161 25 26 addcli 1TA2+21TATCD+TC2
162 161 12 addcomi 1TA2+21TATCD+TC2+D2=D2+1TA2+21TATCD+TC2
163 12 71 81 addsubassi D2+TTC2-1TTA22ACA22AD=D2+TTC2-1TTA22ACA22AD
164 160 162 163 3eqtr4i 1TA2+21TATCD+TC2+D2=D2+TTC2-1TTA22ACA22AD
165 97 164 eqtr3i 1TA2+21TATCD+TC2+D2=D2+TTC2-1TTA22ACA22AD
166 82 81 subcli D2+TTC2-1TTA22ACA22AD
167 28 166 subeq0i 1TA2+21TATCD+TC2+D2-D2+TTC2-1TTA22ACA22AD=01TA2+21TATCD+TC2+D2=D2+TTC2-1TTA22ACA22AD
168 165 167 mpbir 1TA2+21TATCD+TC2+D2-D2+TTC2-1TTA22ACA22AD=0
169 96 168 eqtr3i 1TA2+21TATCD+TC2+D2+1TTA22ACA22ADD2+TTC2=0
170 2 3 4 mulassi TCD=TCD
171 170 oveq2i 2TCD=2TCD
172 8 2 9 mul12i 2TCD=T2CD
173 171 172 eqtri 2TCD=T2CD
174 173 oveq2i TC2+TD2-2TCD=TC2+TD2-T2CD
175 2 10 mulcli T2CD
176 31 32 175 addsubi TC2+TD2-T2CD=TC2-T2CD+TD2
177 174 176 eqtri TC2+TD2-2TCD=TC2-T2CD+TD2
178 169 177 oveq12i 1TA2+21TATCD+TC2+D2+1TTA22ACA22ADD2+TTC2+TC2+TD2-2TCD=0+TC2T2CD+TD2
179 31 175 subcli TC2T2CD
180 179 32 addcli TC2-T2CD+TD2
181 180 addlidi 0+TC2T2CD+TD2=TC2-T2CD+TD2
182 94 178 181 3eqtri 1TA+TC-D2+1TTAC2AD2=TC2-T2CD+TD2
183 16 182 eqtr4i TCD2=1TA+TC-D2+1TTAC2AD2