Bounds for Substituting Algebraic Functions into D-finite Functions
aa r X i v : . [ c s . S C ] M a y Bounds for Substituting Algebraic Functionsinto D-finite Functions
Manuel Kauers ∗ Institute for Algebra / Johannes Kepler University4040 Linz, [email protected]
Gleb Pogudin † Institute for Algebra / Johannes Kepler University4040 Linz, [email protected]
ABSTRACT
It is well known that the composition of a D-finite functionwith an algebraic function is again D-finite. We give thefirst estimates for the orders and the degrees of annihilatingoperators for the compositions. We find that the analysis ofremovable singularities leads to an order-degree curve whichis much more accurate than the order-degree curve obtainedfrom the usual linear algebra reasoning.
1. INTRODUCTION
A function f is called D-finite if it satisfies an ordinarylinear differential equation with polynomial coefficients, p ( x ) f ( x ) + p ( x ) f ′ ( x ) + · · · + p r ( x ) f ( r ) ( x ) = 0 . A function g is called algebraic if it satisfies a polynomialequation with polynomial coefficients, p ( x ) + p ( x ) g ( x ) + · · · + p r ( x ) g ( x ) r = 0 . It is well known [9] that when f is D-finite and g is alge-braic, the composition f ◦ g is again D-finite. For the specialcase f = id this reduces to Abel’s theorem, which says thatevery algebraic function is D-finite. This particular case wasinvestigated closely in [2], where a collection of bounds wasgiven for the orders and degrees of the differential equationssatisfied by a given algebraic function. It was also pointedout in [2] that differential equations of higher order may havesignificantly lower degrees, an observation that gave rise to amore efficient algorithm for transforming an algebraic equa-tion into a differential equation. Their observation has alsomotivated the study of order-degree curves: for a fixed D-finite function f , these curves describe the boundary of theregion of all pairs ( r, d ) ∈ N such that f satisfies a differen-tial equation of order r and degree d . ∗ Supported by the Austrian Science Fund (FWF): Y464,F5004. † Supported by the Austrian Science Fund (FWF): Y464.
Permission to make digital or hard copies of all or part of this work for personal orclassroom use is granted without fee provided that copies are not made or distributedfor profit or commercial advantage and that copies bear this notice and the full citationon the first page. Copyrights for components of this work owned by others than theauthor(s) must be honored. Abstracting with credit is permitted. To copy otherwise, orrepublish, to post on servers or to redistribute to lists, requires prior specific permissionand/or a fee. Request permissions from [email protected].
ISSAC ’17, July 25-28, 2017, Kaiserslautern, Germany c (cid:13) http://dx.doi.org/10.1145/3087604.3087616 Example 1.
We have fixed some randomly chosen operator L ∈ C [ x ][ ∂ ] of order r L = 3 and degree d L = 4 and a randompolynomial P ∈ C [ x ][ y ] of y -degree r P = 3 and x -degree d P = 4 . Forsome prescribed orders r , we com-puted the smallest degrees d suchthat there is an operator M of or-der r and degree d that annihilates f ◦ g for all solutions f of L and allsolutions g of P . The points ( r, d ) are shown in the figure on the right. d r ···································· · · · Experiments suggested that order-degree curves are oftenjust simple hyperbolas.
A priori knowledge of these hyper-bolas can be used to design efficient algorithms. For the caseof creative telescoping of hyperexponential functions and hy-pergeometric terms, as well as for simple D-finite closureproperties (addition, multiplication, Ore-action), bounds fororder-degree curves have been derived [4, 3, 8]. However, itturned out that these bounds are often not tight.A new approach to order-degree curves has been suggestedin [7], where a connection was established between order-degree curves and apparent singularities. Using the mainresult of this paper, very accurate order-degree curves for afunction f can be written down in terms of the number andthe cost of the apparent singularities of the minimal orderannihilating operator for f . However, when the task is tocompute an annihilating operator from some other represen-tation, e.g., a definite integral, then the information aboutthe apparent singularities of the minimal order operator isonly a posteriori knowledge. Therefore, in order to designefficient algorithms using the result of [7], we need to predictthe singularity structure of the output operator in terms ofthe input data. This is the program for the present paper.First (Section 2), we derive an order-degree bound for D-finite substitution using the classical approach of consideringa suitable ansatz over the constant field, comparing coeffi-cients, and balancing variables and equations in the resultinglinear system. This leads to an order-degree curve which isnot tight. Then (Section 3) we estimate the order and degreeof the minimal order annihilating operator for the compo-sition by generalizing the corresponding result of [2] from f = id to arbitrary D-finite f . The derivation of the boundis a bit more tricky in this more general situation, but onceit is available, most of the subsequent algorithmic considera-tions of [2] generalize straightforwardly. Finally (Section 4)we turn to the analysis of the singularity structure, whichindeed leads to much more accurate results. The derivationis also much more straightforward, except for the requiredustification of the desingularization cost. In practice, it isalmost always equal to one, and although this is the value tobe expected for generic input, it is surprisingly cumbersometo give a rigorous proof for this expectation.Throughout the paper, we use the following conventions: • C is a field of characteristic zero, C [ x ] is the usual com-mutative ring of univariate polynomials over C . Wewrite C [ x ][ y ] or C [ x, y ] for the commutative ring ofbivariate polynomials and C [ x ][ ∂ ] for the non-commu-tative ring of linear differential operators with polyno-mial coefficients. In this latter ring, the multiplicationis governed by the commutation rule ∂x = x∂ + 1. • L ∈ C [ x ][ ∂ ] is an operator of order r L := deg ∂ ( L )with polynomial coefficients of degree at most d L :=deg x ( L ). • P ∈ C [ x, y ] is a polynomial of degrees r P := deg y ( P )and d P := deg x ( P ). It is assumed that P is square-freeas an element of C ( x )[ y ] and that it has no divisors in¯ C [ y ], where ¯ C is the algebraic closure of C . • M ∈ C [ x ][ ∂ ] is an operator such that for every solution f of L and every solution g of P , the composition f ◦ g isa solution of M . The expression f ◦ g can be understoodeither as a composition of analytic functions in the case C = C , or in the following sense. We define M suchthat for every α ∈ C , for every solution g ∈ C [[ x − α ]]of P and every solution f ∈ C [[ x − g ( α )]] of L , M annihilates f ◦ g , which is a well-defined element of C [[ x − α ]]. In the case C = C these two definitionscoincide.
2. ORDER-DEGREE-CURVEBY LINEAR ALGEBRA
Let g be a solution of P , i.e., suppose that P ( x, g ( x )) = 0,and let f be a solution of L , i.e., suppose that L ( f ) = 0.Expressions involving g and f can be manipulated accordingto the following three well-known observation:1. (Reduction by P ) For each polynomial Q ∈ C [ x, y ]with deg y ( Q ) ≥ r P there exists a polynomial ˜ Q ∈ C [ x, y ] with deg y ( ˜ Q ) ≤ deg y ( Q ) − x ( ˜ Q ) ≤ deg x ( Q ) + d P such that Q ( x, g ) = 1lc y ( P ) ˜ Q ( x, g ) . The polynomial ˜ Q is the result of the first step of com-puting the pseudoremainder of Q by P w.r.t. y .2. (Reduction by L ) There exist polynomials v, q j,k ∈ C [ x ] of degree at most d L d P such that f ( r L ) ◦ g = 1 v r P − X j =0 r L − X k =0 q j,k g j · ( f ( k ) ◦ g ) . To see this, write L = P r L k =0 l k ∂ k for some polynomials l k ∈ C [ x ] of degree at most d L . Then we have f ( r L ) ◦ g = − l r L ◦ g r L − X k =0 ( l k ◦ g ) · ( f ( k ) ◦ g ) . By the assumptions on P , the denominator l r L ◦ g can-not be zero. In other words, gcd( P ( x, y ) , l r L ( y )) = 1 in C ( x )[ y ]. For each k = 0 , . . . , r L −
1, consider an ansatz AP + Bl r L = l k for polynomials A, B ∈ C ( x )[ y ] of de-grees at most d L − r P −
1, respectively, and com-pare coefficients with respect to y . This gives k inho-mogeneous linear systems over C ( x ) with r P + d L vari-ables and equations, which only differ in the inhomoge-neous part but have the same matrix M = Syl y ( P, l r L )for every k . The claim follows using Cramer’s rule,taking into account that the coefficient matrix of thesystem has d L many columns with polynomials of de-gree d P and r P many columns with polynomials ofdegree deg x l k ( y ) = 0 (which is also the degree of theinhomogeneous part). Note that v = det( M ) does notdepend on k .3. (Multiplication by g ′ ) For each polynomial Q ∈ C [ x, y ]with deg y ( Q ) ≤ r P − q j ∈ C [ x ] of degree at most deg x ( Q ) + 2 r P d P such that g ′ Q ( x, g ) = 1 w lc y ( P ) r P − X j =0 q j g j , where w ∈ C [ x ] is the discriminant of P . To seethis, first apply Observation 1 (Reduction by P ) torewrite − QP x as T = y ( P ) P r P − j =0 t j y j for some t j ∈ C [ x ] of degree deg x ( Q ) + d P . Then consider anansatz AP + BP y = lc y ( P ) T with unknown polyno-mials A, B ∈ C ( x )[ y ] of degrees at most r P − r P −
1, respectively, and compare coefficients with re-spect to y . This gives an inhomogeneous linear systemover C ( x ) with 2 r P − Lemma 2.
Let u = vw lc y ( P ) r P , where v and w are as inthe Observations 2 and 3 above. Let f be a solution of L and g be a solution of P . Then for every ℓ ∈ N there arepolynomials e i,j ∈ C [ x ] of degree at most ℓ deg( u ) such that ∂ ℓ ( f ◦ g ) = 1 u ℓ r P − X i =0 r L − X j =0 e i,j g i · ( f ( j ) ◦ g ) . Proof.
This is evidently true for ℓ = 0. Suppose it is truefor some ℓ . Then ∂ ℓ +1 ( f ◦ g ) = r P − X i =0 r L − X j =0 (cid:18) e i,j u ℓ g i · ( f ( j ) ◦ g ) (cid:19) ′ = r P − X i =0 r L − X j =0 (cid:18) e ′ i,j u − ℓe i,j u ′ u ℓ +1 g i · ( f ( j ) ◦ g )+ e i,j u ℓ (cid:16) i g i − · ( f ( j ) ◦ g ) + g i · ( f ( j +1) ◦ g ) (cid:17) g ′ (cid:19) . The first term in the summand expression already matchesthe claimed bound. To complete the proof, we show that (cid:0) i g i − · ( f ( j ) ◦ g ) + g i · ( f ( j +1) ◦ g ) (cid:1) g ′ = 1 u r P − X k =0 q k g k (1)for some polynomials q k of degree at most deg( u ). Indeed,the only critical term is f ( r L ) ◦ g . According to Observa-tion 2, f ( r L ) ◦ g can be rewritten as v P r P − j =0 P r L − k =0 q j,k g j · ( f ( k ) ◦ g ) for some q j,k ∈ C [ x ] of degree at most d L d P .This turns the left hand side of (1) into an expression ofthe form v P r P − j =0 ˜ q j,k g j · ( f ( k ) ◦ g ) for some polynomials q j,k ∈ C [ x ] of degree at most d L d P . An ( r P − v lc y ( P ) rP − P r P − j =0 ¯ q j,k g j · ( f ( k ) ◦ g ) for some polynomials¯ q j,k ∈ C [ x ] of degree at most d L d P + ( r P − d P . NowObservation 3 completes the induction argument. Theorem 3.
Let r, d ∈ N be such that r ≥ r L r P and d ≥ r (3 r P + d L − d P r L r P r + 1 − r L r P . Then there exists an operator M ∈ C [ x ][ ∂ ] of order ≤ r anddegree ≤ d such that for every solution g of P and everysolution f of L the composition f ◦ g is a solution of M . Inparticular, there is an operator M of order r = r L r P anddegree (3 r P + d L − d P r L r P = O (cid:0) ( r P + d L ) d P r L r P (cid:1) .Proof. Let g be a solution of P and f be a solution of L .Then we have P ( x, g ( x )) = 0 and L ( f ) = 0, and we seekan operator M = P di =0 P rj =0 c i,j x i ∂ j ∈ C [ x ][ ∂ ] such that M ( f ◦ g ) = 0. Let r ≥ r L r P and consider an ansatz M = d X i =0 r X j =0 c i,j x i ∂ j with undetermined coefficients c i,j ∈ C .Let u be as in Lemma 2. Then applying M to f ◦ g andmultiplying by u r gives an expression of the form d + r deg( u ) X i =0 r P − X j =0 r L − X k =0 q i,j,k x i g j · ( f ( k ) ◦ g ) , where the q i,j,k are C -linear combinations of the undeter-mined coefficients c i,j . Equating all the q i,j,k to zero leadsto a linear system over C with at most (1+ d + r deg( u )) r L r P equations and exactly ( r + 1)( d + 1) variables. This systemhas a nontrivial solution as soon as( r + 1)( d + 1) > (1 + d + r deg( u )) r L r P ⇐⇒ ( r + 1 − r L r P )( d + 1) > r r L r P deg( u ) ⇐⇒ d > − r r L r P deg( u ) r + 1 − r L r P . The claim follows because deg( u ) ≤ d P d L + (2 r P − d P + r P d P = (3 r P + d L − d P .
3. A DEGREE BOUND FORTHE MINIMAL OPERATOR
According to Theorem 3, there is operator M of order r = r L r P and degree d = O(( r P + d L ) d P r L r P ). Usually there isno operator of order less than r L r P , but if such an operatoraccidentally exists, Theorem 3 makes no statement about itsdegree. The result of the present section (Theorem 8 below)is a degree bound for the minimal order operator, which alsoapplies when its order is less than r L r P , and which is betterthan the bound of Theorem 3 if the minimal order operatorhas order r L r P .The following Lemma is a variant of Lemma 2 in which g isallowed to appear in the denominator, and with exponentslarger than r P −
1. This allows us to keep the x -degreessmaller. Lemma 4.
Let f be a solution of L and g be a solution of P .For every ℓ ∈ N , there exist polynomials E ℓ,j ∈ C [ x, y ] for ≤ j < r L such that deg x E ℓ,j ≤ ℓ (2 d P − and deg y E ℓ,j ≤ ℓ (2 r P + d L − for all ≤ j < r L , and ∂ ℓ ( f ◦ g ) = 1 U ( x, g ) ℓ r L − X j =0 E ℓ,j ( x, g )( f ( j ) ◦ g ) , where U ( x, y ) = P y ( x, y ) l r L ( y ) .Proof. This is true for ℓ = 0. Suppose it is true for some ℓ .Then ∂ ℓ +1 ( f ◦ g ) = U ( x, g ) ℓ r L − X j =0 E ℓ,j ( x, g )( f ( j ) ◦ g ) ! ′ = r L − X j =0 (cid:16) ℓ ( U x + g ′ U y ) U ℓ +1 E i,j · ( f ( j ) ◦ g )+ 1 U ℓ (( E ℓ,j ) x + g ′ · ( E ℓ,j ) y )( f ( j ) ◦ g )+ 1 U ℓ E ℓ,j g ′ · ( f ( j +1) ◦ g ) (cid:17) We consider the summands separately. In ℓ ( U x + g ′ U y ) U ℓ +1 , U x is already a polynomial in x and g of bidegree at most (2 d p − , r P + d L − g ′ = − P x ( x,g ) P y ( x,g ) and U y is divisible by P y , g ′ U y is also a polynomial with the same bound for thebidegree.Futhermore, we can write( E ℓ,j ) x + g ′ · ( E ℓ,j ) y = 1 U ( U ( E ℓ,j ) x − P x P y l r L ( g )( E ℓ,j ) y ) , where the expression in the parenthesis satisfies the statedbound.For j + 1 < r L , the last summand can be written as1 U ℓ E ℓ,j g ′ · ( f ( j +1) ◦ g ) = P x P y l r l ( g ) U ℓ +1 E ℓ,j · ( f ( j +1) ◦ g ) . (2)For j = r L + 1, due to Observation 2 g ′ · ( f ( r L ) ◦ g ) = − P x P y U r L − X j =0 l j ( g )( f ( j ) ◦ g ) . (3)Right-hand sides of both (2) and (3) satisfy the bound.Let f , . . . , f r L be C -linearly independent solutions of L ,and let g , . . . , g r P be distinct solutions of P . By r we denotethe C -dimension of the C -linear space V spanned by f i ◦ g j for all 1 ≤ i ≤ r L and 1 ≤ j ≤ r P . The order of the operatorannihilating V is at least r . We will construct an operatorof order r annihilating V using Wronskian-type matrices. Lemma 5.
There exists a matrix A ( x, y ) ∈ C [ x, y ] ( r +1) × r L such that the bidegree of every entry of the i -th row of A ( x, y ) does not exceed (2 rd P − i + 1 , r (2 r P + d L − and f ∈ V ifand only if the vector ( f, . . . , f ( r ) ) T lies in the column spaceof the ( r + 1) × r L r P matrix (cid:0) A ( x, g ) · · · A ( x, g r P ) (cid:1) .Proof. With the notation of Lemma 4, let A ( x, y ) be thematrix whose ( i, j )-th entry is E i − ,j − ( x, y ) U ( x, y ) r +1 − i .Then A ( x, y ) meets the stated degree bound.By W i we denote the ( r + 1) × r L Wronskian matrix for f ◦ g i , . . . , f r L ◦ g i . Then f ∈ V if and only if the vec-tor ( f, . . . , f ( r ) ) T lies in the column space of the matrix (cid:0) W · · · W r P (cid:1) . Hence, it is sufficient to prove that W i nd A ( x, g i ) have the same column space. The followingmatrix equality follows from the definition of E i,j W i = 1 U ( x, g i ) r A ( x, g i ) f ◦ g i · · · f r L ◦ g i f ′ ◦ g i · · · f r L ◦ g i ... .. . ... f ( r L − ◦ g i · · · f ( r L − r L ◦ g i . The latter matrix is nondegenerate since it is a Wronskianmatrix for the C -linearly independent power series f ◦ g i ,. . . , f r L ◦ g i with respect to the derivation ( g ′ i ) − ∂ . Hence, W i and A ( x, g i ) have the same column space.In order to express the above condition of lying in thecolumn space in terms of vanishing of a single determinant,we want to “square” the matrix (cid:0) A ( x, g ) , · · · , A ( x, g r P ) (cid:1) . Lemma 6.
There exists a matrix B ( y ) ∈ C [ y ] ( r L r P − r ) × r L such that the degree of every entry does not exceed r P − and the ( r L r P + 1) × r L r P matrix C = (cid:18) A ( x, g ) · · · A ( x, g r P ) B ( g ) · · · B ( g r P ) (cid:19) has rank r L r P .Proof. Let D be the Vandermonde matrix for g , . . . , g r P ,and let I r L denote the identity matrix. Then C = D ⊗ I r L is nondegenerate and has the form (cid:0) B ( g ) , . . . , B ( g r P ) (cid:1) ,for some B ( y ) ∈ C [ y ] r L r P × r L with entries of degree at most r P −
1. Since C is nondegenerate, we can choose r L r P − r rows which span a complimentary subspace to the row spaceof (cid:0) A ( x, g ) , . . . , A ( x, g r P ) (cid:1) . Discarding all other rows from B ( y ), we obtain B ( y ) with the desired properties.By C ℓ ( A ℓ ( x, y ), resp.) we will denote the matrix C ( A ( x, y ), resp.) without the ℓ -th row. Lemma 7.
For every ≤ ℓ ≤ r + 1 the determinant of C ℓ is divisible by Q i We show that det C ℓ is divisible by ( g i − g j ) r L forevery i = j . Without loss of generality, it is sufficient toshow this for i = 1 and j = 2. We havedet C ℓ = (cid:12)(cid:12)(cid:12)(cid:12) A ℓ ( x, g ) − A ℓ ( x, g ) A ℓ ( x, g ) · · · A ℓ ( x, g r P ) B ( g ) − B ( g ) B ( g ) · · · B ( g r P ) (cid:12)(cid:12)(cid:12)(cid:12) . Since for every polynomial p ( y ) we have g − g | p ( g ) − p ( g ), every entry of the first r L columns in the above matrixis divisible by g − g . Hence, the whole determinant isdivisible by ( g − g ) r L . Theorem 8. The minimal operator M ∈ C [ x ][ ∂ ] annihi-lating f ◦ g for every f and g such that L ( f ) = 0 and P ( x, g ( x )) = 0 has order r ≤ r L r P and degree at most r d P − ( r − r − 1) + rd P r L (2 r P + d L − − d P r L ( r P − rd P r L ( d L + r P )) . Proof. We construct M using det C ℓ for 1 ≤ ℓ ≤ r + 1.We consider some f and by F we denote the ( r L r P + 1)-dimensional vector ( f, . . . , f ( r ) , , . . . , T . If f ∈ V , thenthe first r + 1 rows of the matrix (cid:0) C F (cid:1) are linearly depen-dent, so it is degenerate. On the other hand, if this matrix isdegenerate, then Lemma 6 implies that F is a linear combi-nation of the columns of C , so Lemma 5 implies that f ∈ V . Hence f ∈ V ⇔ det C f ± · · · + ( − r det C r +1 f ( r ) = 0.Due to Lemma 7, the latter condition is equivalent to c f + · · · + c r +1 f ( r ) = 0, where c ℓ = ( − ℓ − det C ℓ / Q i The proof of Theorem 8 is a generalization ofthe proof of [2, Thm. 1]. Specializing r L = 1, d L = 0 inTheorem 8 gives a sightly larger bound as the bound in [2,Thm. 1], but with the same leading term.Although the bound of Theorem 8 for r = r L r P beats thebound of Theorem 3 for r = r L r P by a factor of r P , it isapparently still not tight. Experiments we have conductedwith random operators lead us to conjecture that in fact, atleast generically, the minimal order operator of order r L r P has degree O( r L r P d P ( d L + r L r P )). By interpolating thedegrees of the operators we found in our computations, weobtain the expression in the following conjecture. Conjecture 10. For every r P , r L , d P , d L ≥ there exist L and P such that the corresponding minimal order operator M has order r L r P and degree r L (2 r P ( r P − 1) + 1) d P + r L r P ( d P ( d L + 1) + 1) + d L d P − r L r P − r L d L d P , and there do not exist L and P for which the correspondingminimal operator M has order r L r P and larger degree. 4. ORDER-DEGREE-CURVEBY SINGULARITIES A singularity of the minimal operator M is a root of itsleading coefficient polynomial lc ∂ ( M ) ∈ C [ x ]. In the nota-tion and terminology of [7], a factor p of this polynomialis called removable at cost n if there exists an operator Q ∈ C ( x )[ ∂ ] of order deg ∂ ( Q ) ≤ n such that QM ∈ C [ x ][ ∂ ]and gcd(lc ∂ ( QM ) , p ) = 1. A factor p is called removable ifit is removable at some finite cost n ∈ N , and non-removable otherwise. The following theorem [7, Theorem 9] translatesinformation about the removable singularities of a minimaloperator into an order-degree curve. Theorem 11. Let M ∈ C [ x ][ ∂ ] , and let p , . . . , p m ∈ C [ x ] be pairwise coprime factors of lc ∂ ( M ) which are removablet costs c , . . . , c m , respectively. Let r ≥ deg ∂ ( M ) and d ≥ deg x ( M ) − (cid:24) m X i =1 (cid:16) − c i r − deg ∂ ( M ) + 1 (cid:17) + deg x ( p i ) (cid:25) , where we use the notation ( x ) + := max { x, } . Then thereexists an operator Q ∈ C ( x )[ ∂ ] such that QM ∈ C [ x ][ ∂ ] and deg ∂ ( QM ) = r and deg x ( QM ) = d . The order-degree curve of Theorem 11 is much more accu-rate than that of Theorem 3. However, the theorem dependson quantities that are not easily observable when only L and P are known. From Theorem 8 (or Conj. 10), we have a goodbound for deg x ( M ). In the the rest of the paper, we discussbounds and plausible hypotheses for the degree and the costof the removable factors. The following example shows howknowledge about the degree of the operator and the degreeand cost of its removable singularities influence the curve. Example 12. The figure below compares the data of Exam-ple 1 with the curve obtained from Theorem 11 using m = 1 , deg x ( M min ) = 544 , deg x ( p ) = 456 , c = 1 . This curve islabeled (a) below. Only for a few orders r , the curve slightlyovershoots. In contrast, the curve of Theorem 3, labeled (b)below, overshoots significantly and systematically.The figure also illustrates how the parameters affect theaccuracy of the estimate. The value deg x ( M min ) = 544 iscorrectly predicted by Conjecture 10. If we use the moreconservative estimate deg x ( M min ) = 1568 of Theorem 8, weget the curve (e). For curve (d) we have assumed a remov-ability degree of deg x ( p ) = 408 , as predicted by Theorem 17below, instead of the true value deg x ( p ) = 456 . For (c) wehave assumed a removability cost c = 10 instead of c = 1 . d r bcde a ···································· · · · · Lemma 13. Let P ( x, y ) ∈ C [ x, y ] be a polynomial with deg y P = d , and R ( x ) = Res y ( P, P y ) . Assume that α ∈ ¯ C is a root of R ( x ) of multiplicity k . Then the squarefree part S ( y ) = P ( α, y ) (cid:14) gcd (cid:0) P ( α, y ) , P y ( α, y ) (cid:1) of P ( α, y ) has degree at least d − k .Proof. Let M ( x ) be the Sylvester matrix for P ( x, y ) and P y ( x, y ) with respect to y . The value R ( k ) ( α ) is of the form P det M i ( α ), where every M i ( x ) has at least 2 d − − k common columns with M ( x ). Since R ( k ) ( α ) = 0, at least oneof these matrices is nondegenerate. Hence, corank M ( α ) ≤ k . On the other hand, corank M ( α ) is equal to the dimensionof the space of pairs of polynomials ( a ( y ) , b ( y )) such that a ( y ) P ( α, y ) + b ( y ) P y ( α, y ) = 0 and deg b ( y ) < d . Then b ( y )is divisible by S ( y ), and for every b ( y ) divisible by S ( y )there exists exactly one a ( y ). Hence, corank M ( α ) = d − deg S ( y ) ≤ k .Let M be the minimal order operator annihilating all com-positions f ◦ g of a solution of P with a solution of L . Theleading coefficient q = lc ∂ ( M ) ∈ C [ x ] can be factored as q = q rem q nrem , where q rem and q nrem are the products of allremovable and all nonremovable factors of lc ∂ ( M ), respec-tively. Lemma 14. deg q nrem ≤ d P (4 r L r P − r L + d L ) .Proof. For α ∈ ¯ C by π α ( λ α , µ α , resp.) we denote r P ( r L or deg ∂ M , resp.) minus the number of solutions of P ( x, g ( x )) = 0 (the dimension of the solutions set of Lf ( x ) =0 or Mf ( x ) = 0, resp.) in ¯ C [[ x − α ]].Corollary 4.3 from [10] implies that ord α q nrem (the mini-mal order at α in in α Cl α ( M ) in notation of [10]) is equal to µ α (ord α B α ( M ) − ( s α + 1) in notation of [10]). Summingover all α , we have P α ∈ ¯ C µ α = deg q nrem . Bounding the de-gree of the nonremovable part of lc ∂ ( L ) by d L , we also have P α ∈ ¯ C λ α ≤ d L .Let R ( x ) be the resultant of P ( x, y ) and P y ( x, y ) withrespect to y . Let α be a root of R ( x ) of multiplicity k .Lemma 13 implies that the degree of the squarefree part of P ( α, y ) is at least r P − k . So, at most k roots are multiple,so at least r P − k roots are simple. Hence, P ( x, y ) = 0 hasat least r P − k solutions in ¯ C [[ x − α ]]. Thus P α ∈ ¯ C π α ≤ R ≤ d P (2 r P − α ∈ ¯ C and let g ( x ) , . . . , g r P − π α ( x ) ∈ ¯ C [[ x − α ]] besolutions of P ( x, g ( x )) = 0. Let β i = g i (0) for all 1 ≤ i ≤ r P − π α . Since the composition of a power series in x − β i with g i ( x ) is a power series in x − α , µ α ≤ r L π α + r P − π α X i =1 λ β i . (4)We sum (4) over all α ∈ ¯ C . The number of occurrences of λ β in this sum for a fixed β ∈ ¯ C is equal to the number ofdistinct power series of the form g ( x ) = β + P c i ( x − γ ) i suchthat P ( x, g ( x )) = 0. Inverting these power series, we obtaindistinct Puiseux series solutions of P ( x, y ) = 0 at y = β , sothis number does not exceed d P . Hence X α ∈ ¯ C µ α ≤ r L X α ∈ ¯ C π α + d P X β ∈ ¯ C λ β ≤ r L d P (2 r P − d P d L . In order to use Theorem 11, we need a lower bound fordeg q rem . Theorem 8 gives us an upper bound for deg x M ,but we must also estimate the difference deg x M − deg lc ∂ M .By N α we denote the Newton polygon for M at α ∈ ¯ C ∪{∞} (for definitions and notation, see [11, Section 3.3]). By H α ,we denote the difference of the ordinates of the highest andthe smallest vertices of N α , and we call this quantity the height of the Newton polygon. Note that H ∞ ≤ deg x M − deg lc ∂ M . This estimate together with the Lemma aboveimplies deg q rem ≥ deg x ( M ) − H ∞ − d P (4 r L r P − r L + d L ).The equation P ( x, y ) = 0 has r P distinct Puiseux seriessolutions g ( x ) , . . . , g r P ( x ) at infinity. For 1 ≤ i ≤ r P , let i = g i ( ∞ ) ∈ ¯ C ∪ {∞} , and let ρ i be the order of zero of g i ( x ) − β i ( g i ( x ) , resp.) at infinity if β i ∈ ¯ C ( β i = ∞ , resp.).The numbers ρ , . . . , ρ r P are positive rationals and can beread off from Newton polygons of P (see [1, Chapter II]). Lemma 15. H ∞ ≤ P r P i =1 ρ i H β i .Proof. Writing L as L ( x, ∂ ) ∈ C [ x ][ ∂ ], we have M = lclm (cid:18) L (cid:18) g , g ′ ∂ (cid:19) , . . . , L (cid:18) g r P , g ′ r P ∂ (cid:19)(cid:19) . Hence, the set of edges of N ∞ is a subset of the union of setsof edges of Newton polygons of the operators L ( g i , g ′ i ∂ ), sothe height of N ∞ is bounded by the sum of the heights ofthe Newton polygons of these operators. Consider g andassume that β ∈ ¯ C . Then the Newton polygon for L at β is constructed from the set of monomials of L written as anelement of C ( x − β )[( x − β ) ∂ ]. Let L ( x, ∂ ) = ˜ L ( x − β , ( x − β ) ∂ ), then L (cid:0) g , g ′ ∂ (cid:1) = ˜ L (cid:0) g − β , g − β g ′ ∂ (cid:1) = ˜ L (cid:0) x − ρ h ( x ) , xh ( x ) ∂ (cid:1) , where h ( ∞ ) and h ( ∞ ) are nonzero elements of ¯ C . Since h and h do not affect the shape of the Newton polygonat infinity, the Newton polygon at infinity for L ( g , g ′ ∂ ) isobtained from the Newton polygon for L at β by stretchingit vertically by the factor ρ , so its height is equal to ρ H β .The case β = ∞ is analogous using L = ˜ L (cid:0) x , − x∂ (cid:1) . Remark 16. Generically, the β i ’s will be ordinary pointsof L , so it is fair to expect H β i = 0 for all i in most situations.The following theorem is a consequence of Theorem 11and the discussion above. Theorem 17. Let ρ , . . . , ρ r P be as above. Assume thatall removable singularities of M are removable at cost atmost c . Let δ = r P P i =1 ρ i H β i + d P (4 r L r P − r L + d L ) . Let r ≥ deg ∂ M + c − and d ≥ δ · (cid:16) − cr − deg ∂ ( M ) + 1 (cid:17) + deg x M · cr − deg ∂ ( M ) + 1 . Then there exists an operator Q ∈ C ( x )[ ∂ ] such that QM ∈ C [ x ][ ∂ ] and deg ∂ ( QM ) = r and deg x ( QM ) = d . Note that deg x ( M ) may be replaced with the expressionfrom Theorem 8 or Conjecture 10. The goal of this final section is to explain why in the case r P > c = 1 in Theorem 17.For a differential operator L ∈ C [ x ][ ∂ ], by M ( L ) we denotethe minimal operator M such that Mf ( g ( x )) = 0 whenever Lf = 0 and P ( x, g ( x )) = 0. We want to investigate the pos-sible behaviour of a removable singularity at α ∈ C when L varies and P with r P > α = 0.We will assume that:(S1) P (0 , y ) is a squarefree polynomial of degree r P ;(S2) g (0) is not a singularity of L for any root g ( x ) of P ;(G) Roots of P ( x, g ( x )) = 0 at zero are of the form g i ( x ) = α i + β i x + γ i x + . . . , where β , . . . , β r P are nonzero,and either β or γ is nonzero. Conditions (S1) and (S2) ensure that zero is not a po-tential true singularity of M ( L ). Condition (G) is an es-sential technical assumption on P . We note that it holdsat all nonsingular points (not just at zero) for almost all P , because this condition is violated at α iff some root of P ( α, y ) = P x ( α, y ) = 0 (this means that at least one of β i is zero) is also a root of either P xx ( α, y ) = 0 (then γ i is alsozero) or P xy ( α, y ) = 0 (then there are at least two such β ’s).For a generic P this does not hold.Under these assumptions we will prove the following the-orem. Informally speaking, it means that if M ( L ) has anapparent singularity at zero, then it almost surely is remov-able at cost one. Theorem 18. Let d L be such that d L ≥ ( r L r P − r L + 1) r P .By V we denote the (algebraic) set of all L ∈ ¯ C [ x ][ ∂ ] of order r L and degree ≤ d L such that the leading coefficient of L does not vanish at α , . . . , α r P . We consider two (algebraic)subsets in VX = (cid:8) L ∈ V (cid:12)(cid:12) M ( L ) has an apparent singularity at (cid:9) ,Y = (cid:8) L ∈ V (cid:12)(cid:12) M ( L ) has an apparent singularity at which is not removable at cost one (cid:9) . Then, dim X > dim Y as algebraic sets. For α ∈ ¯ C , by Op α ( r, d ) we denote the space of differentialoperators in ¯ C [ x − α ][ ∂ ] of order at most r and degree atmost d . By NOp α ( r, d ) ⊂ Op α ( r, d ) we denote the set of L such that ord L = r and (lc ∂ L )( α ) = 0. Then V ⊂ NOp α ( r L , d L ) ∩ . . . ∩ NOp α rP ( r L , d L ) . To every operator L ∈ NOp α ( r, d ) and d ≥ r , we as-sign a fundamental matrix of degree d at α , denote it by F α ( L, d ). It is defined as the r × ( d + 1) matrix such thatthe first r columns constitute the identity matrix I r , and ev-ery row consists of the first d +1 terms of some power seriessolution of L at x = α . Since L ∈ NOp α ( r, d ), F ( L, d ) iswell defined for every d .By F ( r, d ) we denote the space of all possible fundamen-tal matrices of degree d for operators of order r . This spaceis isomorphic to A r ( d +1 − r ) . The following proposition saysthat a generic operator has generic and independent funda-mental matrices, so we can work with these matrices insteadof working with operators. Proposition 19. Let ϕ : V → ( F ( r L , r L r P )) r P be the mapsending L ∈ V to F α ( L, r L r P ) ⊕ . . . ⊕ F α rP ( L, r L r P ) . Then ϕ is a surjective map of algebraic sets, and all fibers of ϕ have the same dimension. For the proof we need the following lemma. Lemma 20. Let ψ : NOp α ( r, d ) → F ( r, d + r ) be the mapsending L to F α ( L, d + r ) . Then ψ is surjective and all fibershave the same dimension.Proof. First we assume that L is of the form L = ∂ r L + a r L − ( x ) ∂ r L − + . . . + a ( x ), and a j ( x ) = a j,d x d + . . . + a j, ,where a j,i ∈ ¯ C . We also denote the truncated power seriescorresponding to the j + 1-st row of F ( L, d + r L ) by f j andwrite it as f j = x j + d X i =0 b j,i x r L + i , where b j,i ∈ ¯ C. e will prove the following claim by induction on i : Claim. For every ≤ j ≤ r L − and every ≤ i ≤ d , b j,i can be written as a polynomial in a p,q with q < i and a j,i . And, vice versa, a j,i can be written as a polynomial in b p,q with q < i and b j,i . The claim would imply that ψ defines an isomorphism ofalgebraic varieties between F α ( r P , d + r ) and the subset ofmonic operators in NOp α ( r, d ).For i = 0, looking at the constant term of L ( f j ), we obtainthat j ! a j, + r L ! b j, = 0. This proves the base case of theinduction.Now we consider i > ∂ i L ( f j ). The operator ∂ i L can be written as ∂ i L = ∂ i + r L + a ( i ) r L − ( x ) ∂ r L − + . . . + a ( i )0 ( x )+ X k
Let d = r L r P − r L . We will factor ϕ as a composition V ϕ −−→ r P M i =1 NOp α i ( r L , d ) ϕ −−→ F ( r L , r L r P ) r P , where ϕ is a component-wise application of F α i ( ∗ , d ) and ϕ sends L ∈ V to a vector whose i -th coordinate is thetruncation at degree d + 1 of L written as an element of¯ C [ x − α i ][ ∂ ]. We will prove that both these maps are sur-jective with fibers of equal dimension.The map ϕ can be extended to ϕ : Op ( r L , d L ) → Op α ( r L , d ) ⊕ . . . ⊕ Op α rP ( r L , d ) . This map is linear, so it is sufficient to show that the dimen-sion of the kernel is equal to the difference of the dimensionsof the source space and the target space. The latter num-ber is equal to ( d L + 1)( r L + 1) − ( d + 1)( r L + 1) r P . Let L ∈ ker ϕ . This is equivalent to the fact that every coeffi-cient of L is divisible by ( x − α i ) d +1 for every 1 ≤ i ≤ r P .The dimension of the space of such operators is equal to( r L + 1)( d L + 1 − r P ( d + 1)) ≥ 0, so ϕ is surjective. Lemma 20 implies that ϕ is also surjective and all fibersare of the same dimension.Let g ( x ) , . . . , g r P ( x ) ∈ ¯ C [[ x ]] be solutions of P ( x, y ) = 0at zero. Recall that g i ( x ) = α i + β i x + . . . for all 1 ≤ i ≤ r P ,and by (G) we can assume that β , . . . , β r P are nonzero.Consider A ∈ F ( r L , d ), assume that its rows correspondto truncations of power series f , . . . , f r L ∈ ¯ C [[ x − α i ]]. By ε ( g i , A ) we denote the r L × ( d + 1)-matrix whose rows aretruncations of f ◦ g i , . . . , f r L ◦ g i ∈ ¯ C [[ x ]] at degree d + 1. Lemma 21. We can write ε ( g i , A ) = A · T ( g i ) , where T ( g i ) is an upper triangular ( d +1) × ( d +1) -matrix depending onlyon g i with , β i , . . . , β di on the diagonal.Futhermore, if β i = 0 and g i ( x ) = α i + γ i x + . . . , thenthe i -th row of T ( g i ) is zero for i ≥ d +32 , and starts with i − zeroes and γ i − i for i < d +32 .Proof. Let the j -th row of A correspond to a polynomial f j ( x − α i ) = x j − + O ( x r L ). The substitution operation f j → f j ◦ g i is linear with respect to coefficients of f i , so ε ( g i , A ) = A · T ( g i ) for some matrix T ( g i ). Since the coefficient of x k in f j ◦ g i is a linear combination of coefficients of ( x − α i ) l with l ≤ k in f j , the matrix T ( g i ) is upper triangular. Since( x − α i ) k ◦ g i = β ki x k + O ( x k +1 ), T ( g i ) has 1 , β i , . . . , β di onthe diagonal.The second claim of the lemma can be verified by a similarcomputation. Corollary 22. If β i = 0 , then the matrix ε ( g i , A ) has theform ( A A ) , where A is an upper triangular matrix over ¯ C , and the entries of A are linearly independent linearforms in the entries of A . An element of the affine space W = ( F ( r L , r L r P )) r P is atuple of matrices N , . . . , N r P ∈ F ( r L , r L r P ), where every N i has the form N i = ( E r L ˜ N i ). Entries of ˜ N , . . . , ˜ N r P arecoordinates on W , so we will view entries of ˜ N i as a set X i of algebraically independent variables. We will represent N as a single ( r L r P ) × ( r L r P + 1)-matrix N = N ... N r P , and set ε ( N ) = ε ( g , N )... ε ( g r P , N r P ) . For any matrix A , by A (1) and A (2) we denote A with-out the last column and without the last but one column,respectively. By π we denote the composition ε ◦ ϕ . Since π ( L ) represents solutions of M ( L ) at zero truncated at de-gree r L r P + 1, properties of the operator L ∈ V can bedescribed in terms of the matrix π ( L ): • M ( L ) has order less than r L r P or has an apparentsingularity at zero iff π ( L ) (1) is degenerate; • M ( L ) has order less than r L r P or has an apparentsingularity at zero which is either not removable atcost one or of degree greater than one iff both π ( L ) (1) and π ( L ) (2) are degenerate.Let X = { L ∈ V | det π ( L ) (1) = 0 } and Y = { L ∈ V | det π ( L ) (2) = 0 } , then X \ Y ⊂ X ⊂ X and Y ⊂ Y . Proposition 23. ϕ ( X ) is an irreducible subset of W , and ϕ ( Y ) is a proper algebraic subset of ϕ ( X ) .roof. The above discussion and the surjectivity of ϕ implythat ϕ ( X ) = { N ∈ W | det ε ( N ) (1) = 0 } . Hence, we needto prove that det ε ( N ) (1) is a nonzero irreducible polynomialin R = ¯ C [ X , . . . , X r P ]. We set A = ε ( N ) (1) .We claim that there is a way to reorder columns and rowsof A such that it will be of the form (cid:18) B C C D (cid:19) , where B and D are square matrices, and • B is upper triangular with nonzero elements of ¯ C onthe diagonal; • entries of D are algebraically independent over the sub-algebra generated in R by entries of B, C , and C .In order to prove the claim we consider two cases:1. β = 0. By Corollary 22, A is already of the desiredform with B being an r L × r L -submatrix.2. β = 0. Then (G) implies that g ( x ) = α + γ x + . . . with γ = 0. Then Lemma 21 implies that the follow-ing permutations would give us the desired block struc-ture with B being an ⌊ r L / ⌋×⌊ r L / ⌋ -submatrix, forcolumns:1 , , . . . , r L − , , , . . . , ⌊ r L / ⌋ , ∗ , and for rows:1 , , . . . , r L , r L + 2 , r L + 4 , . . . , r L + 2 ⌊ r L / ⌋ , ∗ , where ∗ stands for all other indices in any order.Using elementary row operations, we can bring A to theform (cid:18) B ∗ e D (cid:19) , where the entries of e D are still algebraically independent.Hence, det A is proportional to det e D which is irreducible.In order to prove that ϕ ( Y ) is a proper subset of ϕ ( X )it is sufficient to prove that det ε ( N ) (2) is not divisible bydet ε ( N ) (1) . This follows from the fact that these polyno-mials are both of degree r L r P − r L with respect to (alge-braically independent) entries of ˜ N , . . . , ˜ N r P , but involvedifferent subsets of this variable set.Now we can complete the proof of Theorem 18. Proposi-tion 23 implies that dim ϕ ( X ) > dim ϕ ( Y ). Since all fibersof ϕ have the same dimension, dim X > dim Y . Hence,dim X ≥ dim( X \ Y ) = dim X > dim Y ≥ dim Y . Remark 24. Theorem 18 is stated only for points satis-fying (S1) and (S2). However, the proof implies that ev-ery such point is generically nonsingular. We expect thatthe same technique can be used to prove that genericallyno removable singularities occur in points violating condi-tions (S1) and (S2). This expectation agrees with our com-putational experiments with random operators and randompolynomials. We think that these experimental results andTheorem 18 justify the choice c = 1 in Theorem 17 in mostapplications. Remark 25. On the other hand, neither Theorem 18 norour experiments support the choice c = 1 in the case r P = 1.Instead, it seems that in this case the cost for removability issystematically larger. To see why, consider the special case P = y − x of substituting the polynomial g ( x ) = x into asolution f of a generic operator L . If the solution space of L admits a basis of the form1 + a ,r L x r L + a ,r L +1 x r L +1 + · · · ,x + a ,r L x r L + a ,r L +1 x r L +1 + · · · , ... x r L − + a r L − ,r L x r L + a r L − ,r L +1 x r L +1 + · · · , and M is the minimal operator for the composition, then itssolution space obviously has the basis1 + a ,r L x r L + a ,r L +1 x r L +2 + · · · ,x + a ,r L x r L + a ,r L +1 x r L +2 + · · · , ... x r L − + a r L − ,r L x r L + a r L − ,r L +1 x r L +2 + · · · , and so the indicial polynomial of M is λ ( λ − · · · ( λ − r L − M has a removable singularity at the origin and the cost ofremovability is as high as r L .More generally, if g is a rational function and α is a rootof g ′ , so that g ( x ) = c + O(( x − α ) ), a reasoning along thesame lines confirms that such an α will also be a removablesingularity with cost r L . Acknowledgement. We thank the referees for their con-structive critizism. 5. REFERENCES [1] G.A. Bliss. Algebraic functions . AMS, 1933.[2] A. Bostan, F. Chyzak, B. Salvy, G. Lecerf, and´E. Schost. Differential equations for algebraicfunctions. In Proc ISSAC’07 , pages 25–32, 2007.[3] S. Chen and M. Kauers. Order-degree curves forhypergeometric creative telescoping. In Proc ofISSAC’12 , pages 122–129, 2012.[4] S. Chen and M. Kauers. Trading order for degree increative telescoping. J Symb Comput , 47(8):968–995,2012.[5] S. Chen, M. Kauers, and M.F. Singer.Desingularization of Ore polynomials. J SymbComput , 74(5/6):617–626, 2016.[6] E. L. Ince. Ordinary Differential Equations . Dover,1926.[7] M. Jaroschek, M. Kauers, S. Chen, and M.F. Singer.Desingularization explains order-degree curves for Oreoperators. In Proc ISSAC’13 , pages 157–164, 2013.[8] M. Kauers. Bounds for D-finite closure properties. In Proc ISSAC’14 , pages 288–295, 2014.[9] R.P. Stanley. Differentiably finite power series. Euro JCombinat , 1(2):175–188, 1980.[10] H. Tsai. Weyl closure of a linear differential operator. J Symb Comput , 29(4/5):747–775, 2000.[11] M. van Hoeij. Formal solutions and factorization ofdifferential operators with power series coefficients.