Metamath Proof Explorer


Theorem coe1term

Description: The coefficient function of a monomial. (Contributed by Mario Carneiro, 26-Jul-2014)

Ref Expression
Hypothesis coe1term.1
|- F = ( z e. CC |-> ( A x. ( z ^ N ) ) )
Assertion coe1term
|- ( ( A e. CC /\ N e. NN0 /\ M e. NN0 ) -> ( ( coeff ` F ) ` M ) = if ( M = N , A , 0 ) )

Proof

Step Hyp Ref Expression
1 coe1term.1
 |-  F = ( z e. CC |-> ( A x. ( z ^ N ) ) )
2 1 coe1termlem
 |-  ( ( A e. CC /\ N e. NN0 ) -> ( ( coeff ` F ) = ( n e. NN0 |-> if ( n = N , A , 0 ) ) /\ ( A =/= 0 -> ( deg ` F ) = N ) ) )
3 2 simpld
 |-  ( ( A e. CC /\ N e. NN0 ) -> ( coeff ` F ) = ( n e. NN0 |-> if ( n = N , A , 0 ) ) )
4 3 fveq1d
 |-  ( ( A e. CC /\ N e. NN0 ) -> ( ( coeff ` F ) ` M ) = ( ( n e. NN0 |-> if ( n = N , A , 0 ) ) ` M ) )
5 4 3adant3
 |-  ( ( A e. CC /\ N e. NN0 /\ M e. NN0 ) -> ( ( coeff ` F ) ` M ) = ( ( n e. NN0 |-> if ( n = N , A , 0 ) ) ` M ) )
6 eqid
 |-  ( n e. NN0 |-> if ( n = N , A , 0 ) ) = ( n e. NN0 |-> if ( n = N , A , 0 ) )
7 eqeq1
 |-  ( n = M -> ( n = N <-> M = N ) )
8 7 ifbid
 |-  ( n = M -> if ( n = N , A , 0 ) = if ( M = N , A , 0 ) )
9 simp3
 |-  ( ( A e. CC /\ N e. NN0 /\ M e. NN0 ) -> M e. NN0 )
10 simp1
 |-  ( ( A e. CC /\ N e. NN0 /\ M e. NN0 ) -> A e. CC )
11 0cn
 |-  0 e. CC
12 ifcl
 |-  ( ( A e. CC /\ 0 e. CC ) -> if ( M = N , A , 0 ) e. CC )
13 10 11 12 sylancl
 |-  ( ( A e. CC /\ N e. NN0 /\ M e. NN0 ) -> if ( M = N , A , 0 ) e. CC )
14 6 8 9 13 fvmptd3
 |-  ( ( A e. CC /\ N e. NN0 /\ M e. NN0 ) -> ( ( n e. NN0 |-> if ( n = N , A , 0 ) ) ` M ) = if ( M = N , A , 0 ) )
15 5 14 eqtrd
 |-  ( ( A e. CC /\ N e. NN0 /\ M e. NN0 ) -> ( ( coeff ` F ) ` M ) = if ( M = N , A , 0 ) )