Introduction Power Series Conclusion A New Formalization of Power Series in Coq Catherine Lelay Toccata, Inria Saclay – Île-de-France LRI, Université Paris-Sud 5th Coq Workshop Rennes, July 22nd 1 / 21
Introduction Power Series Conclusion The Coquelicot project Goal : build a user-friendly library of real analysis in Coq. 2 / 21
Introduction Power Series Conclusion The Coquelicot project Goal : build a user-friendly library of real analysis in Coq. Previous work [CPP’ 2012] : total functions to easily write limits, derivatives and integrals, tactic to automatize proofs of differentiability. 2 / 21
Introduction Power Series Conclusion A few words about limits of sequences Definition of limit in the style of the standard library: Lim_seq ( u n ) n ∈ N Definition (pr : {l : R | Un_cv ( u n ) n ∈ N l}) := projT1 pr. lim ( u n ) + lim ( u n ) ∈ R 2 total function with dependent type 3 / 21
Introduction Power Series Conclusion A few words about limits of sequences Definition of limit in the style of the standard library: Lim_seq ( u n ) n ∈ N Definition := lim ( u n ) + lim ( u n ) ∈ R 2 total function without dependent type 3 / 21
Introduction Power Series Conclusion A few words about limits of sequences Definition of limit in the style of the standard library: Lim_seq ( u n ) n ∈ N Definition := lim ( u n ) + lim ( u n ) ∈ R 2 total function without dependent type Some other user-friendly definitions: t → x f ( t ) := Lim_seq ( f ( x n )) n ∈ N ∈ R when lim ( x n ) n ∈ N = x Lim � f ( x + h ) − f ( x ) � Derive f (x : R) := Lim ∈ R h h → 0 � n � b − a � RInt f (a b : R) := Lim_seq f ( x k ) ∈ R n k = 0 n ∈ N 3 / 21
Introduction Power Series Conclusion Some applications D’Alembert Formula [CPP’ 2012] � x + ct u ( x , t ) = 1 2 [ u 0 ( x + ct ) + u 0 ( x − ct )] + 1 x − ct u 1 ( ξ ) d ξ 2 c � t � x + c ( t − τ ) + 1 x − c ( t − τ ) f ( ξ, τ ) d ξ d τ 2 c 0 ∂ 2 u ∂ t 2 ( x , t ) − c ∂ 2 u ∂ x 2 ( x , t ) = f ( x , t ) Convergence of a sequence based on algebraic-geometric means [Bertot 2013] , b n + 1 = √ a n b n and a 0 = 1 , b 0 = 1 x , a n + 1 = a n + b n 2 √ � �� f ′ � � 1 1 f ( x ) = lim a n = lim b n ⇒ π = 2 2 f √ √ 2 2 Baccalaureate of Mathematics 2013 [BAC 2013] � 1 2 + 2 ln x dx = 1 x 1 e 4 / 21
Introduction Power Series Conclusion Motivations to build power series Some of the many uses of power series: basic functions ( e x , sin, cos, . . . ), solutions for differential equations, equivalent functions, generating functions, . . . ⇒ must be formalized in a library of real analysis. 5 / 21
Introduction Power Series Conclusion Coq standard library about sequences two different definitions for limits toward finite limit and + ∞ limits of sums, opposites, products, and multiplicative inverses of sequences in the finite case about power series series of real numbers provide convergence criteria sequences of functions provide continuity and differentiability 6 / 21
Introduction Power Series Conclusion Coq standard library about sequences two different definitions for limits toward finite limit and + ∞ limits of sums, opposites, products, and multiplicative inverses of sequences in the finite case about power series series of real numbers provide convergence criteria sequences of functions provide continuity and differentiability not in the standard library: single definition for both finite and infinite limits ( ±∞ ) limits of sums, opposites, products, and multiplicative inverses of sequences in the infinite case arithmetic operations on power series integrability of power series 6 / 21
Introduction Power Series Conclusion Coq standard library about sequences two different definitions for limits toward finite limit and + ∞ limits of sums, opposites, products, and multiplicative inverses of sequences in the finite case about power series series of real numbers provide convergence criteria sequences of functions provide continuity and differentiability in the Coquelicot library: single definition for both finite and infinite limits ( ±∞ ) limits of sums, opposites, products, and multiplicative inverses of sequences in the infinite case arithmetic operations on power series integrability of power series 6 / 21
Introduction Power Series Conclusion Coquelicot library – CPP version standard library - Reals ∈ R = R ∪ {±∞} sup ( u n ) n ∈ N ∈ R = R ∪ {±∞} lim ( u n ) n ∈ N � b t → x f ( t ) lim � a n f ( t ) dt n ∈ N a ∈ R f ′ ( x ) � a n x n n ∈ N 7 / 21
Introduction Power Series Conclusion Coquelicot library – present version standard library - Reals ∈ R = R ∪ {±∞} sup ( u n ) n ∈ N ∈ R = R ∪ {±∞} lim ( u n ) n ∈ N � b t → x f ( t ) lim � � a n a n f ( t ) dt n ∈ N n ∈ N a ∈ R f ′ ( x ) � � a n x n a n x n n ∈ N n ∈ N 7 / 21
Introduction Power Series Conclusion Definition Series: � n � � Series ( a n ) n ∈ N = Lim_seq a k k = 0 n ∈ N Power series: � a k x k � PSeries ( a n ) n ∈ N = Series n ∈ N 8 / 21
Introduction Power Series Conclusion Definition Series: � n � � Series ( a n ) n ∈ N = Lim_seq a k k = 0 n ∈ N Power series: � a k x k � PSeries ( a n ) n ∈ N = Series n ∈ N inherit all the good properties of Lim_seq easy to write some rewritings without hypothesis 8 / 21
Introduction Power Series Conclusion Use-case: Bessel Functions � n + ∞ � 2 � p ( − 1 ) p � x �� x � J n = 2 p !( n + p )! 2 p = 0 9 / 21
Introduction Power Series Conclusion Use-case: Bessel Functions � n + ∞ � 2 � p ( − 1 ) p � x �� x � J n = 2 p !( n + p )! 2 p = 0 n ( x ) + ( x 2 − n 2 ) · J n ( x ) = 0 J ′′ n ( x ) + x · J ′ J n + 1 ( x ) = n · J n ( x ) − J ′ n ( x ) x J n + 1 ( x ) − J n − 1 ( x ) = 2 n x J n ( x ) J n + 1 ( x ) − J n − 1 ( x ) = − 2 · J ′ n ( x ) 9 / 21
Introduction Power Series Conclusion Use-case: Bessel Functions � n + ∞ � 2 � p ( − 1 ) p � x �� x � J n = 2 p !( n + p )! 2 p = 0 n ( x ) + ( x 2 − n 2 ) · J n ( x ) = 0 J ′′ n ( x ) + x · J ′ J n + 1 ( x ) = n · J n ( x ) − J ′ n ( x ) x J n + 1 ( x ) − J n − 1 ( x ) = 2 n x J n ( x ) J n + 1 ( x ) − J n − 1 ( x ) = − 2 · J ′ n ( x ) 9 / 21
Introduction Power Series Conclusion Example: differential equation ( − 1 ) p � 2 � x with a ( n ) = p !( n + p )! and X = : p 2 n ( x ) + ( x 2 − n 2 ) J n ( x ) = 0 J ′′ n ( x ) + x · J ′ Needed operations on power series: 10 / 21
Introduction Power Series Conclusion Example: differential equation ( − 1 ) p � 2 � x with a ( n ) = p !( n + p )! and X = : p 2 � ′′ � ′ �� x � n + ∞ �� x � n + ∞ � n + ∞ x 2 − n 2 � � x p X p = 0 � a ( n ) � a ( n ) � a ( n ) p X p p X p � + x · + 2 2 2 p = 0 p = 0 p = 0 Needed operations on power series: function to write power series 10 / 21
Introduction Power Series Conclusion Example: differential equation ( − 1 ) p � 2 � x with a ( n ) = p !( n + p )! and X = : p 2 ′′ ′ + ∞ + ∞ + ∞ p X p = 0 a ( n ) a ( n ) a ( n ) � p X p � p X p � X + ( n + 1 ) + p = 0 p = 0 p = 0 Needed operations on power series: function to write power series 10 / 21
Introduction Power Series Conclusion Example: differential equation ( − 1 ) p � 2 � x with a ( n ) = p !( n + p )! and X = : p 2 + ∞ + ∞ + ∞ p X p = 0 � p + 2 X p � � p + 1 X p � ( p + 1 )( p + 2 ) a ( n ) ( p + 1 ) a ( n ) � � � a ( n ) X + ( n + 1 ) + p = 0 p = 0 p = 0 Needed operations on power series: function to write power series differentiability 10 / 21
Introduction Power Series Conclusion Example: differential equation ( − 1 ) p � 2 � x with a ( n ) = p !( n + p )! and X = : p 2 + ∞ + ∞ + ∞ p X p = 0 � p + 1 X p � � p + 1 X p � p ( p + 1 ) a ( n ) ( p + 1 ) a ( n ) � � � a ( n ) + ( n + 1 ) + p = 0 p = 0 p = 0 Needed operations on power series: function to write power series differentiability variable multiplication 10 / 21
Introduction Power Series Conclusion Example: differential equation ( − 1 ) p � 2 � x with a ( n ) = p !( n + p )! and X = : p 2 + ∞ X p = 0 � � p ( p + 1 ) a ( n ) p + 1 + ( n + 1 )( p + 1 ) a ( n ) � p + 1 + a ( n ) p p = 0 Needed operations on power series: function to write power series differentiability variable multiplication arithmetic operations 10 / 21
Introduction Power Series Conclusion Example: differential equation ( − 1 ) p � 2 � x with a ( n ) = p !( n + p )! and X = : p 2 p ( p + 1 ) a ( n ) p + 1 + ( n + 1 )( p + 1 ) a ( n ) p + 1 + a ( n ) ∀ p ∈ N , = 0 p Needed operations on power series: function to write power series differentiability variable multiplication arithmetic operations extensionality 10 / 21
Introduction Power Series Conclusion Example: differential equation ( − 1 ) p � 2 � x with a ( n ) = p !( n + p )! and X = : p 2 − a ( n ) a ( n ) p ∀ p ∈ N , p + 1 = ( p + 1 )( n + p + 1 ) Needed operations on power series: function to write power series differentiability variable multiplication arithmetic operations extensionality 10 / 21
Recommend
More recommend