Metamath Proof Explorer


Theorem taylpfval

Description: Define the Taylor polynomial of a function. The constant Tayl is a function of five arguments: S is the base set with respect to evaluate the derivatives (generally RR or CC ), F is the function we are approximating, at point B , to order N . The result is a polynomial function of x . (Contributed by Mario Carneiro, 31-Dec-2016)

Ref Expression
Hypotheses taylpfval.s
|- ( ph -> S e. { RR , CC } )
taylpfval.f
|- ( ph -> F : A --> CC )
taylpfval.a
|- ( ph -> A C_ S )
taylpfval.n
|- ( ph -> N e. NN0 )
taylpfval.b
|- ( ph -> B e. dom ( ( S Dn F ) ` N ) )
taylpfval.t
|- T = ( N ( S Tayl F ) B )
Assertion taylpfval
|- ( ph -> T = ( x e. CC |-> sum_ k e. ( 0 ... N ) ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) ) )

Proof

Step Hyp Ref Expression
1 taylpfval.s
 |-  ( ph -> S e. { RR , CC } )
2 taylpfval.f
 |-  ( ph -> F : A --> CC )
3 taylpfval.a
 |-  ( ph -> A C_ S )
4 taylpfval.n
 |-  ( ph -> N e. NN0 )
5 taylpfval.b
 |-  ( ph -> B e. dom ( ( S Dn F ) ` N ) )
6 taylpfval.t
 |-  T = ( N ( S Tayl F ) B )
7 4 orcd
 |-  ( ph -> ( N e. NN0 \/ N = +oo ) )
8 1 2 3 4 5 taylplem1
 |-  ( ( ph /\ k e. ( ( 0 [,] N ) i^i ZZ ) ) -> B e. dom ( ( S Dn F ) ` k ) )
9 1 2 3 7 8 6 taylfval
 |-  ( ph -> T = U_ x e. CC ( { x } X. ( CCfld tsums ( k e. ( ( 0 [,] N ) i^i ZZ ) |-> ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) ) ) ) )
10 cnfldbas
 |-  CC = ( Base ` CCfld )
11 cnfld0
 |-  0 = ( 0g ` CCfld )
12 cnring
 |-  CCfld e. Ring
13 ringcmn
 |-  ( CCfld e. Ring -> CCfld e. CMnd )
14 12 13 mp1i
 |-  ( ( ph /\ x e. CC ) -> CCfld e. CMnd )
15 cnfldtps
 |-  CCfld e. TopSp
16 15 a1i
 |-  ( ( ph /\ x e. CC ) -> CCfld e. TopSp )
17 ovex
 |-  ( 0 [,] N ) e. _V
18 17 inex1
 |-  ( ( 0 [,] N ) i^i ZZ ) e. _V
19 18 a1i
 |-  ( ( ph /\ x e. CC ) -> ( ( 0 [,] N ) i^i ZZ ) e. _V )
20 1 2 3 7 8 taylfvallem1
 |-  ( ( ( ph /\ x e. CC ) /\ k e. ( ( 0 [,] N ) i^i ZZ ) ) -> ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) e. CC )
21 20 fmpttd
 |-  ( ( ph /\ x e. CC ) -> ( k e. ( ( 0 [,] N ) i^i ZZ ) |-> ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) ) : ( ( 0 [,] N ) i^i ZZ ) --> CC )
22 eqid
 |-  ( k e. ( ( 0 [,] N ) i^i ZZ ) |-> ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) ) = ( k e. ( ( 0 [,] N ) i^i ZZ ) |-> ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) )
23 0z
 |-  0 e. ZZ
24 4 nn0zd
 |-  ( ph -> N e. ZZ )
25 fzval2
 |-  ( ( 0 e. ZZ /\ N e. ZZ ) -> ( 0 ... N ) = ( ( 0 [,] N ) i^i ZZ ) )
26 23 24 25 sylancr
 |-  ( ph -> ( 0 ... N ) = ( ( 0 [,] N ) i^i ZZ ) )
27 26 adantr
 |-  ( ( ph /\ x e. CC ) -> ( 0 ... N ) = ( ( 0 [,] N ) i^i ZZ ) )
28 fzfid
 |-  ( ( ph /\ x e. CC ) -> ( 0 ... N ) e. Fin )
29 27 28 eqeltrrd
 |-  ( ( ph /\ x e. CC ) -> ( ( 0 [,] N ) i^i ZZ ) e. Fin )
30 ovexd
 |-  ( ( ( ph /\ x e. CC ) /\ k e. ( ( 0 [,] N ) i^i ZZ ) ) -> ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) e. _V )
31 c0ex
 |-  0 e. _V
32 31 a1i
 |-  ( ( ph /\ x e. CC ) -> 0 e. _V )
33 22 29 30 32 fsuppmptdm
 |-  ( ( ph /\ x e. CC ) -> ( k e. ( ( 0 [,] N ) i^i ZZ ) |-> ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) ) finSupp 0 )
34 eqid
 |-  ( TopOpen ` CCfld ) = ( TopOpen ` CCfld )
35 34 cnfldhaus
 |-  ( TopOpen ` CCfld ) e. Haus
36 35 a1i
 |-  ( ( ph /\ x e. CC ) -> ( TopOpen ` CCfld ) e. Haus )
37 10 11 14 16 19 21 33 34 36 haustsmsid
 |-  ( ( ph /\ x e. CC ) -> ( CCfld tsums ( k e. ( ( 0 [,] N ) i^i ZZ ) |-> ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) ) ) = { ( CCfld gsum ( k e. ( ( 0 [,] N ) i^i ZZ ) |-> ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) ) ) } )
38 29 20 gsumfsum
 |-  ( ( ph /\ x e. CC ) -> ( CCfld gsum ( k e. ( ( 0 [,] N ) i^i ZZ ) |-> ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) ) ) = sum_ k e. ( ( 0 [,] N ) i^i ZZ ) ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) )
39 27 sumeq1d
 |-  ( ( ph /\ x e. CC ) -> sum_ k e. ( 0 ... N ) ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) = sum_ k e. ( ( 0 [,] N ) i^i ZZ ) ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) )
40 38 39 eqtr4d
 |-  ( ( ph /\ x e. CC ) -> ( CCfld gsum ( k e. ( ( 0 [,] N ) i^i ZZ ) |-> ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) ) ) = sum_ k e. ( 0 ... N ) ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) )
41 40 sneqd
 |-  ( ( ph /\ x e. CC ) -> { ( CCfld gsum ( k e. ( ( 0 [,] N ) i^i ZZ ) |-> ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) ) ) } = { sum_ k e. ( 0 ... N ) ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) } )
42 37 41 eqtrd
 |-  ( ( ph /\ x e. CC ) -> ( CCfld tsums ( k e. ( ( 0 [,] N ) i^i ZZ ) |-> ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) ) ) = { sum_ k e. ( 0 ... N ) ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) } )
43 42 xpeq2d
 |-  ( ( ph /\ x e. CC ) -> ( { x } X. ( CCfld tsums ( k e. ( ( 0 [,] N ) i^i ZZ ) |-> ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) ) ) ) = ( { x } X. { sum_ k e. ( 0 ... N ) ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) } ) )
44 43 iuneq2dv
 |-  ( ph -> U_ x e. CC ( { x } X. ( CCfld tsums ( k e. ( ( 0 [,] N ) i^i ZZ ) |-> ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) ) ) ) = U_ x e. CC ( { x } X. { sum_ k e. ( 0 ... N ) ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) } ) )
45 9 44 eqtrd
 |-  ( ph -> T = U_ x e. CC ( { x } X. { sum_ k e. ( 0 ... N ) ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) } ) )
46 dfmpt3
 |-  ( x e. CC |-> sum_ k e. ( 0 ... N ) ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) ) = U_ x e. CC ( { x } X. { sum_ k e. ( 0 ... N ) ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) } )
47 45 46 eqtr4di
 |-  ( ph -> T = ( x e. CC |-> sum_ k e. ( 0 ... N ) ( ( ( ( ( S Dn F ) ` k ) ` B ) / ( ! ` k ) ) x. ( ( x - B ) ^ k ) ) ) )