Metamath Proof Explorer


Theorem binom2

Description: The square of a binomial. (Contributed by FL, 10-Dec-2006)

Ref Expression
Assertion binom2 A B A + B 2 = A 2 + 2 A B + B 2

Proof

Step Hyp Ref Expression
1 oveq1 A = if A A 0 A + B = if A A 0 + B
2 1 oveq1d A = if A A 0 A + B 2 = if A A 0 + B 2
3 oveq1 A = if A A 0 A 2 = if A A 0 2
4 oveq1 A = if A A 0 A B = if A A 0 B
5 4 oveq2d A = if A A 0 2 A B = 2 if A A 0 B
6 3 5 oveq12d A = if A A 0 A 2 + 2 A B = if A A 0 2 + 2 if A A 0 B
7 6 oveq1d A = if A A 0 A 2 + 2 A B + B 2 = if A A 0 2 + 2 if A A 0 B + B 2
8 2 7 eqeq12d A = if A A 0 A + B 2 = A 2 + 2 A B + B 2 if A A 0 + B 2 = if A A 0 2 + 2 if A A 0 B + B 2
9 oveq2 B = if B B 0 if A A 0 + B = if A A 0 + if B B 0
10 9 oveq1d B = if B B 0 if A A 0 + B 2 = if A A 0 + if B B 0 2
11 oveq2 B = if B B 0 if A A 0 B = if A A 0 if B B 0
12 11 oveq2d B = if B B 0 2 if A A 0 B = 2 if A A 0 if B B 0
13 12 oveq2d B = if B B 0 if A A 0 2 + 2 if A A 0 B = if A A 0 2 + 2 if A A 0 if B B 0
14 oveq1 B = if B B 0 B 2 = if B B 0 2
15 13 14 oveq12d B = if B B 0 if A A 0 2 + 2 if A A 0 B + B 2 = if A A 0 2 + 2 if A A 0 if B B 0 + if B B 0 2
16 10 15 eqeq12d B = if B B 0 if A A 0 + B 2 = if A A 0 2 + 2 if A A 0 B + B 2 if A A 0 + if B B 0 2 = if A A 0 2 + 2 if A A 0 if B B 0 + if B B 0 2
17 0cn 0
18 17 elimel if A A 0
19 17 elimel if B B 0
20 18 19 binom2i if A A 0 + if B B 0 2 = if A A 0 2 + 2 if A A 0 if B B 0 + if B B 0 2
21 8 16 20 dedth2h A B A + B 2 = A 2 + 2 A B + B 2