Metamath Proof Explorer


Theorem binom2i

Description: The square of a binomial. (Contributed by NM, 11-Aug-1999)

Ref Expression
Hypotheses binom2.1 A
binom2.2 B
Assertion binom2i A + B 2 = A 2 + 2 A B + B 2

Proof

Step Hyp Ref Expression
1 binom2.1 A
2 binom2.2 B
3 1 2 addcli A + B
4 3 1 2 adddii A + B A + B = A + B A + A + B B
5 1 2 1 adddiri A + B A = A A + B A
6 2 1 mulcomi B A = A B
7 6 oveq2i A A + B A = A A + A B
8 5 7 eqtri A + B A = A A + A B
9 1 2 2 adddiri A + B B = A B + B B
10 8 9 oveq12i A + B A + A + B B = A A + A B + A B + B B
11 1 1 mulcli A A
12 1 2 mulcli A B
13 11 12 addcli A A + A B
14 2 2 mulcli B B
15 13 12 14 addassi A A + A B + A B + B B = A A + A B + A B + B B
16 11 12 12 addassi A A + A B + A B = A A + A B + A B
17 16 oveq1i A A + A B + A B + B B = A A + A B + A B + B B
18 10 15 17 3eqtr2i A + B A + A + B B = A A + A B + A B + B B
19 4 18 eqtri A + B A + B = A A + A B + A B + B B
20 3 sqvali A + B 2 = A + B A + B
21 1 sqvali A 2 = A A
22 12 2timesi 2 A B = A B + A B
23 21 22 oveq12i A 2 + 2 A B = A A + A B + A B
24 2 sqvali B 2 = B B
25 23 24 oveq12i A 2 + 2 A B + B 2 = A A + A B + A B + B B
26 19 20 25 3eqtr4i A + B 2 = A 2 + 2 A B + B 2