Metamath Proof Explorer


Theorem binom2

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

Ref Expression
Assertion binom2 ABA+B2=A2+2AB+B2

Proof

Step Hyp Ref Expression
1 oveq1 A=ifAA0A+B=ifAA0+B
2 1 oveq1d A=ifAA0A+B2=ifAA0+B2
3 oveq1 A=ifAA0A2=ifAA02
4 oveq1 A=ifAA0AB=ifAA0B
5 4 oveq2d A=ifAA02AB=2ifAA0B
6 3 5 oveq12d A=ifAA0A2+2AB=ifAA02+2ifAA0B
7 6 oveq1d A=ifAA0A2+2AB+B2=ifAA02+2ifAA0B+B2
8 2 7 eqeq12d A=ifAA0A+B2=A2+2AB+B2ifAA0+B2=ifAA02+2ifAA0B+B2
9 oveq2 B=ifBB0ifAA0+B=ifAA0+ifBB0
10 9 oveq1d B=ifBB0ifAA0+B2=ifAA0+ifBB02
11 oveq2 B=ifBB0ifAA0B=ifAA0ifBB0
12 11 oveq2d B=ifBB02ifAA0B=2ifAA0ifBB0
13 12 oveq2d B=ifBB0ifAA02+2ifAA0B=ifAA02+2ifAA0ifBB0
14 oveq1 B=ifBB0B2=ifBB02
15 13 14 oveq12d B=ifBB0ifAA02+2ifAA0B+B2=ifAA02+2ifAA0ifBB0+ifBB02
16 10 15 eqeq12d B=ifBB0ifAA0+B2=ifAA02+2ifAA0B+B2ifAA0+ifBB02=ifAA02+2ifAA0ifBB0+ifBB02
17 0cn 0
18 17 elimel ifAA0
19 17 elimel ifBB0
20 18 19 binom2i ifAA0+ifBB02=ifAA02+2ifAA0ifBB0+ifBB02
21 8 16 20 dedth2h ABA+B2=A2+2AB+B2