Metamath Proof Explorer


Theorem mulbinom2

Description: The square of a binomial with factor. (Contributed by AV, 19-Jul-2021)

Ref Expression
Assertion mulbinom2
|- ( ( A e. CC /\ B e. CC /\ C e. CC ) -> ( ( ( C x. A ) + B ) ^ 2 ) = ( ( ( ( C x. A ) ^ 2 ) + ( ( 2 x. C ) x. ( A x. B ) ) ) + ( B ^ 2 ) ) )

Proof

Step Hyp Ref Expression
1 mulcl
 |-  ( ( C e. CC /\ A e. CC ) -> ( C x. A ) e. CC )
2 1 ancoms
 |-  ( ( A e. CC /\ C e. CC ) -> ( C x. A ) e. CC )
3 2 3adant2
 |-  ( ( A e. CC /\ B e. CC /\ C e. CC ) -> ( C x. A ) e. CC )
4 simp2
 |-  ( ( A e. CC /\ B e. CC /\ C e. CC ) -> B e. CC )
5 binom2
 |-  ( ( ( C x. A ) e. CC /\ B e. CC ) -> ( ( ( C x. A ) + B ) ^ 2 ) = ( ( ( ( C x. A ) ^ 2 ) + ( 2 x. ( ( C x. A ) x. B ) ) ) + ( B ^ 2 ) ) )
6 3 4 5 syl2anc
 |-  ( ( A e. CC /\ B e. CC /\ C e. CC ) -> ( ( ( C x. A ) + B ) ^ 2 ) = ( ( ( ( C x. A ) ^ 2 ) + ( 2 x. ( ( C x. A ) x. B ) ) ) + ( B ^ 2 ) ) )
7 mulass
 |-  ( ( C e. CC /\ A e. CC /\ B e. CC ) -> ( ( C x. A ) x. B ) = ( C x. ( A x. B ) ) )
8 7 3coml
 |-  ( ( A e. CC /\ B e. CC /\ C e. CC ) -> ( ( C x. A ) x. B ) = ( C x. ( A x. B ) ) )
9 8 oveq2d
 |-  ( ( A e. CC /\ B e. CC /\ C e. CC ) -> ( 2 x. ( ( C x. A ) x. B ) ) = ( 2 x. ( C x. ( A x. B ) ) ) )
10 2cnd
 |-  ( ( A e. CC /\ B e. CC /\ C e. CC ) -> 2 e. CC )
11 simp3
 |-  ( ( A e. CC /\ B e. CC /\ C e. CC ) -> C e. CC )
12 mulcl
 |-  ( ( A e. CC /\ B e. CC ) -> ( A x. B ) e. CC )
13 12 3adant3
 |-  ( ( A e. CC /\ B e. CC /\ C e. CC ) -> ( A x. B ) e. CC )
14 10 11 13 mulassd
 |-  ( ( A e. CC /\ B e. CC /\ C e. CC ) -> ( ( 2 x. C ) x. ( A x. B ) ) = ( 2 x. ( C x. ( A x. B ) ) ) )
15 9 14 eqtr4d
 |-  ( ( A e. CC /\ B e. CC /\ C e. CC ) -> ( 2 x. ( ( C x. A ) x. B ) ) = ( ( 2 x. C ) x. ( A x. B ) ) )
16 15 oveq2d
 |-  ( ( A e. CC /\ B e. CC /\ C e. CC ) -> ( ( ( C x. A ) ^ 2 ) + ( 2 x. ( ( C x. A ) x. B ) ) ) = ( ( ( C x. A ) ^ 2 ) + ( ( 2 x. C ) x. ( A x. B ) ) ) )
17 16 oveq1d
 |-  ( ( A e. CC /\ B e. CC /\ C e. CC ) -> ( ( ( ( C x. A ) ^ 2 ) + ( 2 x. ( ( C x. A ) x. B ) ) ) + ( B ^ 2 ) ) = ( ( ( ( C x. A ) ^ 2 ) + ( ( 2 x. C ) x. ( A x. B ) ) ) + ( B ^ 2 ) ) )
18 6 17 eqtrd
 |-  ( ( A e. CC /\ B e. CC /\ C e. CC ) -> ( ( ( C x. A ) + B ) ^ 2 ) = ( ( ( ( C x. A ) ^ 2 ) + ( ( 2 x. C ) x. ( A x. B ) ) ) + ( B ^ 2 ) ) )