Skip to main content
Springer logoLink to Springer
. 2019 Apr 3;64(2):331–360. doi: 10.1007/s10817-019-09521-3

Evaluating Winding Numbers and Counting Complex Roots Through Cauchy Indices in Isabelle/HOL

Wenda Li 1,, Lawrence C Paulson 1
PMCID: PMC6995451  PMID: 32063661

Abstract

In complex analysis, the winding number measures the number of times a path (counter-clockwise) winds around a point, while the Cauchy index can approximate how the path winds. We formalise this approximation in the Isabelle theorem prover, and provide a tactic to evaluate winding numbers through Cauchy indices. By further combining this approximation with the argument principle, we are able to make use of remainder sequences to effectively count the number of complex roots of a polynomial within some domains, such as a rectangular box and a half-plane.

Keywords: Interactive theorem proving, Isabelle/HOL, Computer algebra, Cauchy index, Winding number, Root counting, The Routh–Hurwitz stability criterion

Introduction

The winding number, given by

n(γ,z)=12πiγdww-z,

measures how the path γ winds around the complex point z. It is an important object in complex analysis, and its evaluation is ubiquitous among analytic proofs.

However, when formally evaluating the winding number in proof assistants such as Isabelle/HOL and HOL Light, unexpected difficulties arise, as pointed out by Harrison [8] and Li et al. [14]. To address this problem, we formalise a theory of the Cauchy index on the complex plane, thereby approximating how the path winds. When the path is a cycle and comprises line segments and parts of circles, we can now evaluate the winding number by calculating Cauchy indices along those sub-paths.

In addition, by further combining our previous formalisation of the argument principle [14] (which associates the winding number with the number of complex roots), we build effective procedures to count the complex roots of a polynomial within some domains, such as a rectangle box and a half-plane.

In short, the main contributions of this paper are

  • a novel tactic to enable users to evaluate the winding number through Cauchy indices,

  • and novel verified procedures to count complex roots of a polynomial.

The Isabelle sources of this paper are available from the Archive of Formal Proofs [11, 12].

Formulations in this paper, such as the definition of the Cauchy index and statements of some key lemmas, mainly follow Rahman and Schmeisser’s book [19, Chapter 11] and Eisermann’s paper [6]. Nevertheless, we were still obliged to devise some proofs on our own, as discussed later.

This paper continues as follows: we start with a motivating example (Sect. 2) to explain the difficulty of formal evaluation of the winding number in Isabelle/HOL. We then present an intuitive description of the link between the winding number and the Cauchy indices (Sect. 3), which is then developed formally (Sect. 4). Next, we present verified procedures that count the number of complex roots in a domain (Sect. 5), along with some limitations (Sect. 6) and make some general remarks on the formalisation (Sect. 7). Finally, we discuss related work (Sect. 8) and present conclusions (Sect. 9).

A Motivating Example

In the formalisation of Cauchy’s residue theorem [14], we demonstrated an application of this theorem to formally evaluate an improper integral in Isabelle/HOL:

-dxx2+1=π. 1

The idea is to embed this integral into the complex plane, and, as illustrated in Fig. 1, to construct a linear path Lr from -r to r and a semi-circular path Cr centred at 0 with radius r>1:

Cr(t)=reiπtfort[0,1],Lr(t)=(1-t)(-r)+trfort[0,1].

Next, by letting

f(w)=1w2+1,

and r, we can derive (1) through the following steps:

-dxx2+1=Lrf 2
=Lr+Crf 3
=n(Lr+Cr,i)Res(f,i)+n(Lr+Cr,-i)Res(f,-i) 4
=π. 5

Here Lr+Cr is formed by appending Cr to the end of Lr, and Res(f,i) is the residue of f at i. Equation (3) is because Crf=0 as r. The application of the residue theorem is within (4); we exploit the fact that i and -i are the only two singularities of f over the complex plane, since

1w2+1=1(w-i)(w+i).

While carrying out the formal proofs of (5), surprisingly, the most troublesome part of the proof is to evaluate the winding numbers:

n(Lr+Cr,i)=1 6
n(Lr+Cr,-i)=0. 7

Equations (6) and (7) are straightforward to humans, as it can be seen from Fig. 1 that Lr+Cr passes counterclockwise around the point i exactly one time, and around -i zero times. However, formally deriving these facts was non-trivial.

Fig. 1.

Fig. 1

Complex points (0,-i) and (0, i), and a closed path Lr+Cr

Example 1

(Proof of n(Lr+Cr,i)=1) We defined an auxiliary semi-circular path Cr where

Cr(t)=reiπ(t+1)fort[0,1]

as can be seen in Fig. 1a. As Cr+Cr forms a (full) circular path with i lying inside the circle, we had

n(Cr+Cr,i)=1. 8

In addition, we further proved that Cr+Cr and Lr+Cr are homotopic on the space of the complex plane except for the point i (i.e., on C-{i}), and hence

n(Lr+Cr,i)=n(Cr+Cr,i) 9

by using the following Isabelle lemma:

Lemma 1

( Inline graphic ) graphic file with name 10817_2019_9521_Figb_HTML.jpg

where Inline graphic encodes the winding number of γ1 around z: n(γ1,z), and Inline graphic encodes the homotopic proposition between two paths. Putting (8) and (9) together yields n(Lr+Cr,i)=1, which concludes the whole proof.

Example 2

(Proof of n(Lr+Cr,-i)=0) We started by defining a ray Lr starting from -i and pointing towards the negative infinity of the imaginary axis:

Lr(t)=(-i)-tifort[0,)

as illustrated in Fig. 1b. Subsequently, we showed that

LRdoesnotintersectwithLr+Cr, 10

and then applied the following lemma in Isabelle

Lemma 2

( Inline graphic ) graphic file with name 10817_2019_9521_Figf_HTML.jpg

where

  • Inline graphic assumes that γ is piecewise continuously differentiable on [0, 1],

  • Inline graphic asserts that z is not on the path γ,

  • the assumption Inline graphic asserts that the ray starting at zC and through wC ({z+a(w-z)a>0}) does not intersect with γ—for all a>0, z+a(w-z) does not lie on γ.

Note that the real part of a winding number Re(n(γ,z)) measures the degree of the winding: in case of γ winding around z counterclockwise for exactly one turn, we have n(γ,z)=Re(n(γ,z))=1. Essentially, Lemma 2 claims that a path γ can only wind around z for less than one turn, |Re(n(γ,z))|<1, if there is a ray starting at z and not intersecting with γ. Joining Lemma 2 with (10) leads to

|Re(n(Lr+Cr,-i))|<1. 11

Moreover, as Lr+Cr is a closed path,

n(Lr+Cr,-i)Z 12

By combining (11) and (12), we managed to derive n(Lr+Cr,-i)=0.

As can be observed in Examples 1 and 2, our proofs of n(Lr+Cr,i)=1 and n(Lr+Cr,-i)=0 were ad hoc, and involved the manual construction of auxiliary paths or rays (e.g., CR and LR). Similar difficulties have also been mentioned by John Harrison when formalising the prime number theorem [8]. In the next section, we will introduce an idea to systematically evaluate winding numbers.

The Intuition

The fundamental idea of evaluating a winding number n(γ,z0) in this paper is to reduce the evaluation to classifications of how paths cross the line {zRe(z)=Re(z0)}: continuously or not and in which direction.

In a simple case, suppose a path γ crosses the line {zRe(z)=Re(z0)} exactly once at the point γ(t0) such that Im(γ(t0))>Im(z0) (see Fig. 2 (left)), and let θ be the change in the argument of a complex point travelling through γ. It should not be hard to observe that

0<θ<2π,

and by considering Re(n(γ,z0))=θ/(2π) we can have

0<Re(n(γ,z0))<1,

which is an approximation of Re(n(γ,z0)). That is, we have approximated Re(n(γ,z0)) by the way that γ crosses the line {zRe(z)=Re(z0)}.

Fig. 2.

Fig. 2

Left: a path γ crosses the line {zRe(z)=Re(z0)} at γ(t0) such that Re(γ(t0))>Re(z0). Right: the image of f as a point travels through γ

To make this idea more precise, let

f(t)=Im(γ(t)-z0)Re(γ(t)-z0).

The image of f as a point travels through γ is as illustrated in Fig. 2 (right), where f jumps from + to - across t0. We can then formally characterise those jumps.

Definition 1

(Jump) For f:RR and xR, we define

jump+(f,x)=12iflimux+f(u)=+,-12iflimux+f(u)=-,0otherwise,jump-(f,x)=12iflimux-f(u)=+,-12iflimux-f(u)=-,0otherwise.

Specifically, we can conjecture that jump+(f,t0)-jump-(f,t0) captures the way that γ crosses the line {zRe(z)=Re(z0)} in Fig. 2, hence Re(n(γ,z0)) can be approximated using jump+ and jump-:

Re(n(γ,z0))+jump+(f,t0)-jump-(f,t0)2<12.

In more general cases, we can define Cauchy indices by summing up these jumps over an interval and along a path.

Definition 2

(Cauchy index) For f:RR and a,bR, the Cauchy index of f over a closed interval [ab] is defined as

Indab(f)=x[a,b)jump+(f,x)-x(a,b]jump-(f,x).

Definition 3

(Cauchy index along a path) Given a path γ:[0,1]C and a point z0C, the Cauchy index along γ about z0 is defined as

Indp(γ,z0)=Ind01(f)

where

f(t)=Im(γ(t)-z0)Re(γ(t)-z0).

In particular, it can be checked that the Cauchy index Indp(γ,z0) captures the way that γ crosses the line {zRe(z)=Re(z0)}, hence leads to an approximation of Re(n(γ,z0)):

Re(n(γ,z0))+Indp(γ,z0)2<12.

More interestingly, by further knowing that γ is a loop we can derive Re(n(γ,z0))=n(γ,z0)Z and Indp(γ,z0)/2Z, following which we come to the core proposition of this paper:

Proposition 1

Given a valid path γ:[0,1]C and a point z0C, such that γ is a loop and z0 is not on the image of γ, we have

n(γ,z0)=-Indp(γ,z0)2.

That is, under some assumptions, we can evaluate a winding number through Cauchy indices!

A formal proof of Proposition 1 will be introduced in Sect. 4.1. Here, given the statement of the proposition, we can have alternative proofs for n(Lr+Cr,i)=1 and n(Lr+Cr,-i)=0.

Example 3

(Alternative proof of n(Lr+Cr,i)=1) As Lr+Cr is a loop, applying Proposition 1 yields

n(Lr+Cr,i)=-Indp(Lr+Cr,i)2=-12(Indp(Lr,i)+Indp(Cr,i)),

which reduces n(Lr+Cr,i) to the evaluations of Indp(Lr,i) and Indp(Cr,i). In this case, by definition we can easily decide Indp(Lr,i)=-1 and Indp(Cr,i)=-1 as illustrated in Fig. 3a. Hence, we have

n(Lr+Cr,i)=-12((-1)+(-1))=1

and conclude the proof.

Fig. 3.

Fig. 3

Evaluating n(Lr+Cr,i) and n(Lr+Cr,-i) through the way that the path Lr+Cr crosses the imaginary axis

Example 4

(Alternative proof of n(Lr+Cr,-i)=0) As shown in Fig. 3b, we can similarly have

n(LR+CR,-i)=-Indp(Lr+Cr,-i)2=-12(Indp(Lr,-i)+Indp(Cr,-i))=-12(1+(-1))=0

by which the proof is completed.

Compared to the previous proofs presented in Examples 1 and 2, the alternative proofs in Examples 3 and 4 are systematic and less demanding to devise once we have a formalisation of Proposition  1, which is what we will introduce in the next section.

Evaluating Winding Numbers

The previous section presented an informal intuition to systematically evaluate winding numbers; in this section, we will report the formal development of this intuition. We will first present a mechanised proof of Proposition 1 (Sect. 4.1), which includes mechanised definitions of jumps and Cauchy indices (i.e., Definition 12 and 3) and several related properties of these objects. After that, we build a tactic in Isabelle/HOL that is used to mechanise proofs presented in Example 3 and 4 (Sect. 4.2). Finally, we discuss some subtleties we encountered during the formalisation (Sect. 4.3).

A Formal Proof of Proposition 1

For jump- and jump+ (see Definition 1), we have used the filter mechanism [9] to define a function Inline graphic : graphic file with name 10817_2019_9521_Figk_HTML.jpg and encoded jump-(f,x) and jump+(f,x) as

Inline graphic and Inline graphic ,

respectively. Here, Inline graphic , Inline graphic , Inline graphic , and Inline graphic are all filters, where a filter is a predicate on predicates that satisfies certain properties. Filters are extensively used in the analysis library of Isabelle to encode varieties of logical quantification: for example, Inline graphic encodes the statement “for a variable that is sufficiently close to x from the left", and Inline graphic represents “for a sufficiently large variable". Furthermore, Inline graphic encoded the proposition

limux-f(u)=+, 13

and this encoding can be justified by the following equality in Isabelle: graphic file with name 10817_2019_9521_Figu_HTML.jpg where Inline graphic matches the usual definition of (13) in textbooks.

We can then encode Indab(f) and Indp(γ,z0) (see Definitions 2 and 3) as Inline graphic and Inline graphic respectively: graphic file with name 10817_2019_9521_Figy_HTML.jpggraphic file with name 10817_2019_9521_Figz_HTML.jpg Note, in the definition of Indab(f) we have a term

x[a,b)jump+(f,x)

which actually hides an assumption: that only a finite number of points within the interval [ab) contribute to the sum. This assumption is made explicit when Inline graphic is defined by summing jumps over the following set: graphic file with name 10817_2019_9521_Figab_HTML.jpg If the set above is infinite (i.e., the sum x[a,b)jump+(f,x) is not mathematically well-defined) we have graphic file with name 10817_2019_9521_Figac_HTML.jpg In other words, Isabelle/HOL deems the sum over an infinite set to denote zero.

Due to the issue of well-defined sums, many of our lemmas related to Inline graphic should assume a finite number of jumps: graphic file with name 10817_2019_9521_Figae_HTML.jpg which guarantees the well-definedness of Inline graphic .

Now, suppose that we know that Indp is well-defined: there are only a finite number of jumps over the path. What strategy can we employ to formally prove Proposition 1? Naturally, we may want to divide the path into a finite number of segments (subpaths) separated by those jumps, and then perform inductions on these segments. To formalise the finiteness of such segments, we defined an inductive predicate: graphic file with name 10817_2019_9521_Figag_HTML.jpggraphic file with name 10817_2019_9521_Figah_HTML.jpg The idea behind Inline graphic is that a jump of

f(t)=Im(γ(t)-z0)Re(γ(t)-z0)

takes place only if λt.Re(γ(t)-z0) changes from 0 to 0 (or vice versa). Hence, each of the segments of the path γ separated by those jumps has either λt.Re(γ(t)-z0)=0 or λt.Re(γ(t)-z0)0.

As can be expected, the finiteness of jumps over a path can be derived by the finiteness of segments:

Lemma 3

( Inline graphic ) graphic file with name 10817_2019_9521_Figak_HTML.jpg

where Inline graphic asserts that γ is a continuous function on [0..1] (so that it is a path). Roughly speaking, Lemma 3 claims that a path will have a finite number of jumps if it can be divided into a finite number of segments.

By assuming such a finite number of segments we have well-defined Inline graphic , and can then derive some useful related properties:

Lemma 4

( Inline graphic ) graphic file with name 10817_2019_9521_Figao_HTML.jpg

where Inline graphic gives a sub-path of γ based on parameters a and b: graphic file with name 10817_2019_9521_Figaq_HTML.jpg

Essentially, Lemma 4 indicates that we can combine Cauchy indices along consecutive parts of a path: given a path γ and three parameters abc with 0abc1, we have

Indp(γ1,z0)+Indp(γ2,z0)=Indp(γ3,z0).

where γ1=λt.γ((b-a)t+a), γ2=λt.γ((c-b)t+b) and γ3=λt.γ((c-a)t+a).

More importantly, we now have an induction rule for a path with a finite number of segments:

Lemma 5

( Inline graphic ) graphic file with name 10817_2019_9521_Figas_HTML.jpg

where Inline graphic is a predicate that takes a path Inline graphic and a complex point Inline graphic , and

  • Inline graphic is the base case that Inline graphic holds for a constant path;

  • Inline graphic is the inductive case when the last segment is right on the line {xRe(x)=Re(z)}: t(s,1).Re(g(t))=Re(z);

  • Inline graphic is the inductive case when the last segment does not cross the line {xRe(x)=Re(z)}: t(s,1).Re(g(t))Re(z).

Given a path γ with a finite number of segments, a complex point z0 and a predicate P that takes a path and a complex number and returns a boolean, Lemma 5 provides us with an inductive rule to derive P(γ,z0) by recursively examining the last segment.

Before attacking Proposition 1, we can show an auxiliary lemma about Re(n(γ,z0)) and Indp(γ,z0) when the end points of γ are on the line {zRe(z)=Re(z0)}:

Lemma 6

( Inline graphic ) graphic file with name 10817_2019_9521_Figbb_HTML.jpg

Here, Lemma 6 is almost equivalent to Proposition 1 except for that more restrictions haven been placed on the end points of γ.

Proof of Lemma 6

As there are a finite number of segments along γ (i.e., Inline graphic ), by inducting on these segments with Lemma 5 we end up with three cases. The base case is straightforward: given a constant path g:[0,1]C and a complex point zC, we have Re(n(g,z))=0 and Indp(g,z)=0, hence 2Re(n(g,z))=-Indp(g,z).

For the inductive case when the last segment is right on the line {xRe(x)=Re(z)}, there is t(s,1).Re(g(t))=Re(z) as illustrated in Fig. 4a. Let

g1(t)=g(st)g2(t)=g((1-s)t).

We have

n(g,z)=n(g1,z)+n(g2,z), 14

and, by the induction hypothesis,

2Re(n(g1,z))=-Indp(g1,z). 15

Moreover, it is possible to derive

2Re(n(g2,z))=-Indp(g2,z), 16

since n(g2,z)=0 and Indp(g2,z)=0. Furthermore, by Lemma 4 we can sum up the Cauchy index along g1 and g2:

Indp(g1,z)+Indp(g2,z)=Indp(g,z) 17

Combining Eqs. (14), (15), (16) and (17) yields

2Re(n(g,z))=2(Re(n(g1,z))+Re(n(g2,z)))=-Indp(g1,z)-Indp(g2,z)=-Indp(g,z) 18

which concludes the case.

Fig. 4.

Fig. 4

Inductive cases when applying Lemma 5

For the other inductive case when the last segment does not cross the line {xRe(x)=Re(z)}, without loss of generality, we assume

t(s,1).Re(g(t))>Re(z), 19

and the shape of g is as illustrated in Fig. 4b. Similar to the previous case, by letting g1(t)=g(st) and g2(t)=g((1-s)t), we have n(g,z)=n(g1,z)+n(g2,z) and, by the induction hypothesis, 2Re(n(g1,z))=-Indp(g1,z). Moreover, by observing the shape of g2 we have

2Re(n(g2,z))=jump-(f,1)-jump+(f,0) 20
Indp(g2,z)=jump+(f,0)-jump-(f,1) 21

where f(t)=Im(g2(t)-z)/Re(g2(t)-z). Combining (20) with (21) leads to 2Re(n(g2,z))=-Indp(g2,z), following which we finish the case by deriving 2Re(n(g,z))=-Indp(g,z) in a way analogous to (18).

Finally, we are ready to formally derive Proposition 1 in Isabelle/HOL:

Theorem 1

( Inline graphic ) graphic file with name 10817_2019_9521_Figbe_HTML.jpg

Proof

By assumption, we know that γ is a loop, and the point γ(0)=γ(1) can be away from the line {zRe(z)=Re(z0)} which makes Lemma 6 inapplicable. To resolve this problem, we look for a point γ(s) on γ such that 0s1 and Re(γ(s))=Re(z0), and we can either fail or succeed.

In the case of failure, without loss of generality, we can assume Re(γ(t))>Re(z0) for all 0t1, and the shape of γ is as illustrated in Fig. 5a. As the path γ does not cross the line {zRe(z)=Re(z0)}, we can evaluate

Indp(γ,z0)=0n(γ,z0)=Re(n(γ,z0))=Im(Ln(γ(1)-z0))-Im(Ln(γ(0)-z0))2π=0

where Ln is the principle value of a complex logarithm function with its branch being the negative real axis and -π<Im(Ln(z))π for all z. Hence, n(γ,z0)=-Indp(γ,z0)/2 which concludes the case.

Fig. 5.

Fig. 5

To derive n(γ,z0)=-Indp(γ,z0)2 when γ is a loop

In the case of success, as illustrated in Fig. 5b, we have Re(γ(s))=Re(z0). We then define a shifted path γs:

γs(t)=γ(t+s)ifs+t1,γ(t+s-1)otherwise,

such that Re(γs(0))=Re(γs(1))=Re(z0). By applying Lemma 6, we obtain a relationship between Re(n(γs,z0)) and Indp(γs,z0):

2Re(n(γs,z0))=-Indp(γs,z0),

following which we have n(γ,z0)=-Indp(γ,z0)/2, since n(γs,z0)=n(γ,z0) and Indp(γs,z0)=Indp(γ,z0).

A Tactic for Evaluating Winding Numbers

With Proposition 1 formalised, we are now able to build a tactic to evaluate winding numbers using Cauchy indices. The idea has already been sketched in Examples 3 and 4. We have built a tactic Inline graphic , for goals of the form

n(γ1+γ2++γn,z0)=k, 22

where k is an integer and γj (1jn) is either a linear path:

γj(t)=(1-t)a+tbwherea,bC

or a part of a circular path:

γj(t)=z+rei((1-t)a+tb)wherea,b,rRandzC.

The tactic Inline graphic will transform (22) into

γj(1)=γj+1(0)forall1jn-1,andγn(1)=γ1(0), 23
z0{γj(t)0t1}forall1jn, 24
Indp(γ1,z0)+Indp(γ2,z0)++Indp(γn,z0)=-2k, 25

where (23) ensures that the path γ1+γ2++γn is a loop; (24) certifies that z0 is not on the image of γ1+γ2++γn.

To achieve this transformation, Inline graphic will first perform a substitution step on the left-hand side of Eq. (22) using Theorem 1. As the substitution is conditional, we will need to resolve four extra subgoals (i.e., (26), (27), (28) and (29) as follows) and Eq. (22) is transformed into (30):

graphic file with name 10817_2019_9521_Equ26_HTML.gif 26
graphic file with name 10817_2019_9521_Equ27_HTML.gif 27
graphic file with name 10817_2019_9521_Equ28_HTML.gif 28
graphic file with name 10817_2019_9521_Equ29_HTML.gif 29
graphic file with name 10817_2019_9521_Equ30_HTML.gif 30

To simplify (26), the tactic will keep applying the following introduction rule:1

Lemma 7

( Inline graphic ) graphic file with name 10817_2019_9521_Figbj_HTML.jpg

to eliminate the path join operations ( Inline graphic ) until the predicate Inline graphic is only applied to a linear path or a part of a circular path, and either of these two cases can be directly discharged because these two kinds of paths are proved to be divisible into a finite number of segments by the imaginary axis:

Lemma 8

( Inline graphic ) graphic file with name 10817_2019_9521_Figbn_HTML.jpg

Lemma 9

( Inline graphic ) graphic file with name 10817_2019_9521_Figbp_HTML.jpg

In terms of other subgoals introduced when applying Lemma 7, such as Inline graphic , Inline graphic and Inline graphic , we can discharge them by the following introduction and simplification rules (all of which have been formally proved):

  • Inline graphic ,

  • Inline graphic ,

  • Inline graphic ,

  • Inline graphic ,

  • Inline graphic .

As a result, Inline graphic will eventually simplify the subgoal (26) to (23).

Similar to the process of simplifying (26) to (23), the tactic Inline graphic will also simplify

Finally, with respect to (30), we can similarly rewrite with a rule between the Cauchy index ( Inline graphic ) and the path join operation ( Inline graphic ):

Lemma 10

( Inline graphic ) graphic file with name 10817_2019_9521_Figcd_HTML.jpg

to convert the subgoal (30) to (23) and (25).

After building the tactic Inline graphic , we are now able to convert a goal like Eq. (22) to (23), (24) and (25). In most cases, discharging (23) and (24) is straightforward. To derive (25), we will need to formally evaluate each Indp(γj,z0) (1jn) when γj is either a linear path or a part of a circular path.

When γj is a linear path, the following lemma grants us a way to evaluate Indp(γj,z0) through its right-hand side:

Lemma 11

( Inline graphic ) graphic file with name 10817_2019_9521_Figcg_HTML.jpg

Although Lemma 11 may appear terrifying, evaluating its right-hand side is usually automatic when the number of free variables is small. For example, in a formal proof of Example 3 in Isabelle/HOL, we can have the following fragment: graphic file with name 10817_2019_9521_Figch_HTML.jpg where Inline graphic is first applied to convert the goal into (23), (24) and (25), and Inline graphic subsequently simplifies those newly generated subgoals. In the middle of the proof, we show that the complex point i is not on the image of the linear path Lr (i.e., Inline graphic in Isabelle/HOL), following which we apply Lemma 11 to derive Indp(Lr,i)=-1: the evaluation process is automatic through the command Inline graphic , given the assumption Inline graphic .

When γj is a part of a circular path, a similar lemma has been provided to facilitate the evaluation of Indp(γj,z0).

Subtleties

The first subtlety we have encountered during the formalisation of Proposition 1 is about the definitions of jumps and Cauchy indices, for which our first attempt followed the standard definitions in textbooks [2, 16, 19].

Definition 4

(Jump) For f:RR and xR, we define

jump(f,x)=1iflimux-f(u)=-andlimux+f(u)=+,-1iflimux-f(u)=+andlimux+f(u)=-,0otherwise.

Definition 5

(Cauchy index) For f:RR and a,bR, the Cauchy index of f over an open interval (ab) is defined as

Indab(f)=x(a,b)jump(f,x).

The impact of the difference between the current definition of the Cauchy index (i.e., Definition 2) and the classic one (i.e., Definition 5) is small when formalising the Sturm–Tarski theorem [10, 13], where f is a rational function. In this case, the path γ intersects with the line {zRe(z)=Re(z0)} a finite number of times, and for each intersection point (see Fig. 6a, b), by letting f(t)=Im(γ(t)-z0)/Re(γ(t)-z0), we have

jump(f,t)=jump+(f,t)-jump-(f,t),

hence

x(a,b)jump(f,x)=x[a,b)jump+(f,x)-x(a,b]jump-(f,x),

provided jump+(f,a)=0 and jump-(f,b)=0. That is, the classic Cauchy index and the current one are equal when f is a rational function and does not jump at both ends of the target interval.

Fig. 6.

Fig. 6

Different ways a path γ can intersect with the line {zRe(z)=Re(z0)}

Naturally, the disadvantages of Definition 5 are twofold:

  • The function λt.Re(γ(t)-z0) cannot vanish at either end of the interval. That is, we need to additionally assume Re(γ(0)-z0)0 as in Rahman and Schmeisser’s formulation [19, Lemma 11.1.1 and Theorem 11.1.3], and Proposition 1 will be inapplicable in the case of Fig. 6c where Re(γ(0))=Re(γ(1))=Re(z0).

  • The function λt.Im(γ(t)-z0)/Re(γ(t)-z0) has to be rational, which makes Proposition 1 inapplicable for cases like in Fig. 6d (if we follow Definition 5). To elaborate, it can be observed in Fig. 6d that n(γ,z0)=-1, while we will only get a wrong answer by following Definition 5 and evaluating via Proposition 1:
    -12x(0,1)jump(f,x)=-jump(f,t2)2=-12,
    where f(t)=Im(γ(t)-z0)/Re(γ(t)-z0). In comparison, Definition 2 leads to the correct answer:
    n(γ,z0)=-12x[0,1)jump+(f,x)-x(0,1]jump-(f,x)=-12jump+(f,t2)+jump+(f,t1)-jump-(f,t2)-jump-(f,t0)=-1212+12-(-12)-(-12)=-1.

Fortunately, Eisermann [6] recently proposed a new formulation of the Cauchy index that overcomes those two disadvantages, and this new formulation is what we have followed (in Definitions 1 and 2).

Another subtlety we ran into was the well-definedness of the Cauchy index. Such well-definedness is usually not an issue and left implicit in the literature, because, in most cases, the Cauchy index is only defined on rational functions, where only finitely many points can contribute to the sum. When attempting to formally derive Proposition 1, we realised that this assumption needed to be made explicit, since the path γ can be flexible enough to allow the function f(t)=Im(γ(t)-z0)/Re(γ(t)-z0) to be non-rational (e.g., Fig. 6d). In our first attempt of following Definition 5, the Cauchy index was formally defined as follows: graphic file with name 10817_2019_9521_Figcn_HTML.jpg and its well-definedness was ensured by the finite number of times that γ crosses the line {zRe(z)=Re(z0)}: graphic file with name 10817_2019_9521_Figco_HTML.jpg where the part Inline graphic ensures that Inline graphic is non-zero only at finitely many points over the interval [0, 1]. When constrained by Inline graphic , the function f(t)=Im(γ(t)-z0)/Re(γ(t)-z0) behaves like a rational function. More importantly, the path γ, in this case, can be divided into a finite number of ordered segments delimited by those points over [0, 1], which makes an inductive proof of Proposition 1 possible. However, after abandoning our first attempt and switching to Definition 2, the well-definedness of the Cauchy index is assured by the finite number of jump+ and jump- of f (i.e., Definition Inline graphic in Sect. 4.1), with which we did not know how to divide the path γ into segments and carry out an inductive proof. It took us some time to properly define the assumption of a finite number of segments (i.e., Definition Inline graphic ) that implied the well-definedness using Lemma 3 and provided a lemma for inductive proofs (i.e., Lemma 5).

Counting the Number of Complex Roots

The previous section described a way to evaluate winding numbers via Cauchy indices. In this section, we will further explore this idea and propose verified procedures to count the number of complex roots of a polynomial in some domain such as a rectangle and a half-plane.

Does a winding number have anything to do with the number of roots of a polynomial? The answer is yes. Thanks to the argument principle, we can calculate the number of roots by evaluating a contour integral:

12πiγp(x)p(x)dx=N 31

where pC[x], p(x) is the first derivative of p and N is the number of complex roots of p (counted with multiplicity) inside the loop γ. Also, by the definition of winding numbers, we have

n(pγ,0)=12πiγp(x)p(x)dx. 32

Combining Eqs. (31) and (32) gives us the relationship between a winding number and the number of roots of a polynomial:

n(pγ,0)=N. 33

And the question becomes: can we evaluate n(pγ,0) via Cauchy indices?

Roots in a Rectangle

Let N be the number of complex roots of a polynomial p inside the rectangle defined by its lower left corner a1 and upper right corner a3. As illustrated in Fig. 7, we can define four linear paths along the edge of the rectangle:

L1(t)=(1-t)a1+ta2L2(t)=(1-t)a2+ta3L3(t)=(1-t)a3+ta4L4(t)=(1-t)a4+ta1

where a2=Re(a3)+iIm(a1) and a4=Re(a1)+iIm(a3). Combining Proposition 1 with Eq. (33) yields

N=n(p(L1+L2+L3+L4),0)=-12Indp(p(L1+L2+L3+L4),0)=-12Indp(pL1,0)+Indp(pL2,0)+Indp(pL3,0)+Indp(pL4,0). 34

Here, the path pLj:[0,1]C (1j4) is (mostly) neither a linear path nor a part of a circular path, which indicates that the evaluation strategies of Sect. 4.2, such as Lemma 11, will no longer apply. Thankfully, the Sturm–Tarski theorem [10, 13] came to our rescue.

Fig. 7.

Fig. 7

Complex roots of a polynomial (red dots) and a rectangular path (L1+L2+L3+L4) on the complex plane. (Color figure online)

In general, the Sturm–Tarski theorem is about calculating Tarski queries through sign variations and signed remainder sequences: let p,qR[x], a and b be two extended real numbers such that a<b and are not roots of p, we have

TaQ(q,p,a,b)=Var(SRemS(p,pq);a,b) 35

where

  • p is the first derivative of p,

  • the Tarski query TaQ(q,p,a,b) defined as follows:
    TaQ(q,p,a,b)=x(a,b),p(x)=0sgn(q(x)),
  • SRemS(p,q) is the signed remainder sequence started with p and q.

  • Let [p1,p2,,pn] be a sequence of polynomials, Var([p1,p2,,pn];a,b) is the difference in the number of sign variations when evaluating [p1,p2,,pn] at a and b:
    Var([p1,p2,,pn];a,b)=Var([p1(a),p2(a),,pn(a)])-Var([p1(b),p2(b),,pn(b)]). 36

Note that when q=1, (35) becomes the famous Sturm’s theorem, which counts the number of distinct real roots over an interval. For example, by calculating

TaQ(1,(x-1)(x-2),0,3)=Var(SRemS(x2-3x+2,2x-3);0,3)=Var([x2-3x+2,2x-3,1/4];0,3)=Var([x2-3x+2,2x-3,1/4];0)-Var([x2-3x+2,2x-3,1/4];3)=Var([2,-3,1/4])-Var([2,3,1/4])=2-0=2,

we know that the polynomial x2-3x+2 has two distinct real roots within the interval (0, 3).

In our previous formal proof of the Sturm–Tarski theorem [10, 13], we used the Cauchy index to relate the Tarski query and the right-hand side of (35). Therefore, as a byproduct, we can also evaluate the Cauchy index through sign variations and signed remainder sequences:

Indabλt.q(t)p(t)=Var(SRemS(p,q);a,b), 37

where p,qR[x], ab are two extended real numbers such that a<b and are not roots of p.

Back to the case of Indp(pLj,0), we have

Indp(pLj,0)=Ind01λt.Im(p(Lj(t)))Re(p(Lj(t))),

and both Im(p(Lj(t))) and Re(p(Lj(t))) happen to be polynomials with real coefficients. Therefore, combining Eqs. (34) and (37) yields an approach to count the number of roots inside a rectangle.

While proceeding to the formal development, the first problem we encountered was that the Cauchy index in Eq. (37) actually follows the classic definition (i.e., Definition 5), and is different from the one in Eq. (34) (i.e., Definitions 2 and 3). Subtle differences between these two formulations have already been discussed in Sect. 4.3. Luckily, Eisermann [6] has also described an alternative sign variation operator so that our current definition of the Cauchy index (i.e., Definition 2) can be computationally evaluated:

Lemma 12

( Inline graphic ) graphic file with name 10817_2019_9521_Figcv_HTML.jpg

Here, Inline graphic encodes our current definition of the Cauchy index Indab(λt.q(t)/p(t)), and Inline graphic stands for

Var^(SRemS(p,q);a,b) 38

where the alternative sign variation operator Var^ is defined as follows:

Var^([p1,p2,,p3];a,b)=Var^([p1,p2,,p3];a)-Var^([p1,p2,,p3];b),Var^([p1,p2,,p3];a)=Var^([p1(a),p2(a),,p3(a)]),Var^([])=0,Var^([x1])=0,Var^([x1,x2,,xn])=|sgn(x1)-sgn(x2)|+Var^([x2,,xn]).

The difference between Var^ and Var is that Var discards zeros before calculating variations while Var^ takes zeros into consideration. For example, Var([1,0,-2])=Var([1,-2])=1, while Var^([1,0,-2])=2.

Before implementing Eq. (34), we need to realise that there is a restriction in our strategy: roots are not allowed on the border (i.e., the image of the path L1+L2+L3+L4). To computationally check this restriction, the following function is defined graphic file with name 10817_2019_9521_Figcy_HTML.jpg which will return “true” if there is no root on the closed segment between Inline graphic and Inline graphic , and “false” otherwise. Here, Inline graphic is defined as the set {(1-u)a+ub0u1}C, and the function Inline graphic gives the set of roots of the polynomial Inline graphic within the set Inline graphic : graphic file with name 10817_2019_9521_Figdf_HTML.jpg

The next step is to make the definition Inline graphic executable. This is achieved by proving a code equation, where the left-hand side of the equation is the target definition and the right-hand side is an executable expression. In the case of Inline graphic , the code equation is the following lemma:

Lemma 13

( Inline graphic ) graphic file with name 10817_2019_9521_Figdj_HTML.jpg

where Inline graphic is the polynomial composition operation and Inline graphic and Inline graphic , respectively, extract the real and imaginary parts of the complex polynomial Inline graphic .

Proof of Lemma 13

Supposing L:[0,1]C is a linear path from a to b: L(t)=(1-t)a+tb, we know that pL is still a polynomial with complex coefficients. Subsequently, we extract the real and imaginary parts (pR and pI, respectively) of pL such that

p(L(t))=pR(t)+ipI(t).

If there is a root of p lying right on L, we will be able to obtain some t0[0,1] such that

pR(t0)=pI(t0)=0,

hence, by letting g=gcd(pR,pI) we have g(t0)=0. Therefore, the polynomial p has no (complex) root on L if and only if g has no (real) root within the interval [0, 1], and the latter can be computationally checked using Sturm’s theorem.

Finally, we define the function Inline graphic that returns the number of complex roots of a polynomial (counted with multiplicity) within a rectangle defined by its lower left and upper right corner: graphic file with name 10817_2019_9521_Figdp_HTML.jpg where Inline graphic denotes the number of roots of the polynomial p within the set s: graphic file with name 10817_2019_9521_Figdr_HTML.jpg The executability of the function Inline graphic can be established with the following code equation:

Lemma 14

( Inline graphic ) graphic file with name 10817_2019_9521_Figdu_HTML.jpg

The proof of the above code equation roughly follows Eqs. (34) and (37), where Inline graphic checks if there is a root of Inline graphic on the rectangle’s border. Note that the gcd calculations here, such as Inline graphic , are due to the coprime assumption in Lemma 12.

Example 5

Given a rectangle defined by (-1,2+2i) (as illustrated in Fig. 8) and a polynomial p with complex coefficients:

p(x)=x2-2ix-1=(x-i)2

we can now type the following command to count the number of roots within the rectangle: graphic file with name 10817_2019_9521_Figdy_HTML.jpg which will return 2 as p has exactly two complex roots (i.e., i with multiplicity 2) in the area.

Fig. 8.

Fig. 8

A complex point i and a rectangle defined by its lower left corner -1 and upper right corner 2+2i

Roots in a Half-plane

For roots in a half-plane, we can start with a simplified case, where we count the number of roots of a polynomial in the upper half-plane of C: graphic file with name 10817_2019_9521_Figdz_HTML.jpg As usual, our next step is to set up the executability of Inline graphic . To achieve that, we first define a linear path Lr(t)=(1-t)(-r)+tr and a semi-circular path Cr(t)=reiπt, as illustrated in Fig. 9. Subsequently, let

Cp(r)=pCrLp(r)=pLr,

and by following Eq. (33) we have

Nr=n(p(Lr+Cr),0)=Re(n(Lp(r),0))+Re(n(Cp(r),0)) 39

where Nr is the number of roots of p inside the path Lr+Cr. Note that as r approaches positive infinity, Nr will be the roots on the upper half-plane (i.e., Inline graphic ), which is what we are aiming for. For this reason, it is natural for us to examine two cases:

limr+Re(n(Lp(r),0))=?limr+Re(n(Cp(r),0))=?.

For the case of limr+Re(n(Lp(r),0)), we can have

Fig. 9.

Fig. 9

Complex roots of a polynomial (red dots) and a linear path (Lr) concatenated by a semi-circular path (Cr) on the complex plane. (Color figure online)

Lemma 15

( Inline graphic ) graphic file with name 10817_2019_9521_Figed_HTML.jpg

which essentially indicates

limr+Re(n(Lp(r),0))=-12limr+Indp(Lp(r),0), 40

provided that the polynomial p is monic and does not have any root on the real axis.

Next, for limr+Re(n(Cp(r),0)), we first derive a lemma about Cr:

Lemma 16

( Inline graphic ) graphic file with name 10817_2019_9521_Figef_HTML.jpg

that is, limr+Re(n(Cr,0))=1/2, following which and by induction we have

Lemma 17

( Inline graphic ) graphic file with name 10817_2019_9521_Figeh_HTML.jpg

which is equivalent to

limr+Re(n(Cp(r),0))=deg(p)2, 41

provided deg(p)>0.

Putting Eqs. (40) and (41) together yields the core lemma about Inline graphic in this section:

Lemma 18

( Inline graphic ) graphic file with name 10817_2019_9521_Figek_HTML.jpg

where Inline graphic is mathematically interpreted as Ind-+(λt.Im(p(t))/Re(p(t))), which is derived from limrIndp(Lp(r),0) in Eq. (40) since

limr+Indp(Lp(r),0)=limr+Indp(Lp(r),0)=limr+Ind01λt.Im(Lp(r,t))Re(Lp(r,t))=limr+Ind-rrλt.Im(p(t))Re(p(t))=Ind-+λt.Im(p(t))Re(p(t)).

Finally, following Lemma 18, the executability of the function Inline graphic is established:

Lemma 19

( Inline graphic ) graphic file with name 10817_2019_9521_Figeo_HTML.jpg

where

  • Inline graphic divides the polynomial Inline graphic by its leading coefficient so that the resulting polynomial Inline graphic is monic. This corresponds to the assumption Inline graphic in Lemma 18.

  • Inline graphic checks if Inline graphic has no root lying on the real axis, which is due to the second assumption in Lemma 18.

  • Inline graphic evaluates
    Ind-+λt.Im(pI(t))Re(pR(t))
    by following Eq. (37).

As for the general case of a half-plane, we can have a definition as follows: graphic file with name 10817_2019_9521_Figew_HTML.jpg which encodes the number of roots in the left half-plane of the vector b-a. Roots of Inline graphic in this half-plane can be transformed to roots of Inline graphic in the upper half-plane of C:

Lemma 20

( Inline graphic ) graphic file with name 10817_2019_9521_Figfa_HTML.jpg

And so we can naturally evaluate Inline graphic through Inline graphic :

Lemma 21

( Inline graphic ) graphic file with name 10817_2019_9521_Figfe_HTML.jpg

Example 6

We can now use the following command graphic file with name 10817_2019_9521_Figff_HTML.jpg to decide that the polynomial

p(x)=x2+(2-i)x+(1-i)=(x+1)(x+1-i)

has exactly two roots within the left half-plane of the vector (0, i), as shown in Fig. 10.

Fig. 10.

Fig. 10

Complex roots of a polynomial (red dots) and a vector (0, i). (Color figure online)

Despite our naive implementation, both Inline graphic and Inline graphic are applicable for small or medium examples. For most polynomials with coefficient bitsize up to 10 and degree up to 30, our complex root counting procedures terminate within minutes.

Limitations and Future Work

There are, of course, several improvements that can be made on both the evaluation tactic of Sect. 4.2 and the root counting procedures of Sect. 5. As the tactic is intended to be applied to winding numbers with variables, full automation with this tactic is unlikely in most cases, but we can always aim for better automation and an enhanced interactive experience for users (e.g., presenting unsolved goals in a more user-friendly way).

Regarding the two root-counting procedures in Sect. 5, a key limitation is that they do not allow cases where any root is on the border. There are two possible solutions to this problem:

  • To generalise the definition of winding numbers. The current formulation of winding numbers in Isabelle/HOL follows the one in complex analysis:
    n(γ,z)=12πiγdww-z
    which becomes undefined when the point z is on the image of the path γ. With more general formulations of winding numbers, such as the algebraic version by Eisermann [6], we may be able to derive a stronger version of the argument principle that allows zeros on the border.
  • To deploy a more sophisticated strategy to count the number of times that the path winds. Recall that the underlying idea in this paper is to reduce the evaluation of winding numbers to classifications of how paths cross some line. The Cauchy index merely provides one classification strategy, which we considered simple and elegant enough for formalisation. In contrast, Collins and Krandick [4] propose a much more sophisticated strategy for such classifications. Their strategy has, in fact, been widely implemented in modern systems, such as Mathematica and SymPy, to count the number of complex roots.

Neither of these two solutions are straightforward to incorporate, hence we leave them for future investigation.

Besides rectangles and half-planes, it is also possible to similarly count the number of roots in an open disk and even a sector:

sector(z0,α,β)={zα<arg(z-z0)<β}

where arg(-) returns the argument of a complex number. Informal proofs of root counting in these domains can be found in Rahman and Schmeisser [19, Chapter 11].

Potential Applications

Rahman and Schmeisser’s book [19, Chapter 11] and Eisermann’s paper [6] are the two main sources that our development is built upon. Nevertheless, there are still some differences in formulations:

  • Rahman and Schmeisser formulated the Cauchy index as in Definitions 4 and 5, and we used their formulation in our first attempt. However, after we realised the subtleties discussed in Sect. 4.3, we abandoned this formulation and switched to Eisermann’s (i.e., Definition 2). As a result, the root counting procedures presented in this paper are more general than the ones in their book, having fewer preconditions.

  • Eisermann formulated a winding number n(γ,z0) in a real-algebraical sense where γ is required to be a piecewise polynomial path (i.e., each piece from the path needs to be a polynomial). In comparison, n(γ,z0) in Isabelle/HOL follows the classic definition in complex analysis, and places fewer restrictions on the shape of γ (i.e., piecewise continuously differentiable is less restrictive than being a piecewise polynomial) but does not permit z0 to be on the image of γ (while Eisermann’s formulation does). Consequently, Eisermann’s root counting procedure works in more restrictive domains (i.e., he only described the rectangle case in his paper) but does not prevent roots on the border.

Another point worth mentioning is the difference between informal and formal proofs. In this development, we generally treated their lemma statements as bald facts: we had to discover our own proofs. For instance, when proving Proposition 1, we defined an inductive data type for segments and derived an induction rule for it, which was nothing like the informal proof. Such situations also happened when we justified the root counting procedure in a half-plane. Overall, the formal proofs are about 12,000 lines.

Interestingly, the root-counting procedure in a half-plane is also related to the stability problems in the theory of dynamical systems. For instance, let ARn×n be a square matrix with real coefficients and y:[0,+)Rn be a function that models the system state over time. A linear dynamical system can be described as an ordinary differential equation:

dy(t)dt=Ay(t) 42

with an initial condition y(0)=y0. The system of (42) is considered stable if all roots of the characteristic polynomial of A lie within the open left half-plane (i.e., {zRe(z)<0}), and this stability test is usually referred as the Routh–Hurwitz stability criterion [1, Section 23], [16, Chapter 9]. As has been demonstrated in Example 6, counting the number of roots in the left half-plane is within the scope of the procedure Inline graphic . For this reason, we believe that the development in this paper will be beneficial for reasoning about dynamical systems in Isabelle/HOL.

It is worth mentioning that root counting in a rectangle is usually coupled with a classic problem in computer algebra, namely, complex root isolation. The basic idea is to keep bisecting a rectangle (vertically or horizontally) into smaller ones until a sub-rectangle contains exactly one root or none (provided the target polynomial is square-free). Following this idea, it is possible to build a simple and verified procedure for complex root isolation similar to Wilf’s algorithm [20]: we start with a large rectangle and then repeatedly apply the verified procedure to count roots during the rectangle bisection phase. However, compared to modern complex procedures [4, 21], this simplistic approach suffers from several drawbacks:

  • Our root counting procedure is based on remainder sequences, which are generally considered much slower than those built upon Descartes’ rule of signs.

  • Modern isolation procedures are routinely required to deliver isolation boxes whose sizes meet some user-specified limit, hence they usually keep refining the isolation boxes even after the roots have been successfully isolated. The bisection strategy still works in the root refinement stage, but dedicated numerical approaches such as Newton’s iteration are commonly implemented for efficiency reasons.

  • Modern isolation procedures sometimes prefer a bit-stream model in which the coefficients of the polynomial are approximated as a bit stream. This approach is particularly beneficial when the coefficients have extremely large bit-width or consist of algebraic numbers.

  • Modern implementations usually incorporate numerous low-level optimisations, such as hash tables, which are hard to implement as verified procedures in a theorem prover.

Therefore, it is unlikely that our verified root counting procedures will ever deliver high performance. Nevertheless, they can be used to certify results from untrusted external root isolation programs, as in the certificate-based approach to solving univariate polynomial problems [13].

Related Work

Formalisations of the winding number (from an analytical perspective) are available in Coq [3], HOL Light [7] and Isabelle/HOL. To the best of our knowledge, our tactic of evaluating winding numbers through Cauchy indices is novel. As both HOL Light and Isabelle/HOL have a relatively comprehensive library of complex analysis (i.e., at least including Cauchy’s integral theorem), our evaluation tactic could be useful when deriving analytical proofs in these two proof assistants.

The ability to count the real roots of a polynomial only requires Sturm’s theorem, so this capability is widely available among major proof assistants including PVS [18], Coq [15], HOL Light [17] and Isabelle [5, 10, 13]. However, as far as we know, our procedures to count complex roots are novel, as they require a formalisation of the argument principle [14], which is only available in Isabelle at the time of writing.

Conclusion

In this paper, we have described a novel tactic Inline graphic to evaluate winding numbers via Cauchy indices: given a goal of the form

n(γ1+γ2++γn,z0)=k,

the tactic converts the target into an equality about Cauchy indices:

Indp(γ1,z0)+Indp(γ2,z0)++Indp(γn,z0)=-2k.

This can be then solved by individually evaluating Indp(γ1,z0),,Indp(γn,z0). As open variables may occur in those Cauchy indices, the evaluation of them is unlikely to be fully automatic, but we provide lemmas (e.g., Lemma 11) to mitigate the laborious process. The tactic Inline graphic has greatly helped us with the motivating proofs shown in Sect. 2, and we believe that it should be also beneficial in similar situations when dealing with winding numbers in a formal framework.

We have further related Cauchy indices to the argument principle and developed novel verified procedures to count the complex roots of a polynomial within the areas of rectangles and half-planes. Despite the limitations of not allowing roots on the border (which we will solve in future work), the ability to formally count complex roots is believed to lay the foundations for conducting stability analysis (e.g., the Routh–Hurwitz stability criterion) in the framework of the Isabelle theorem prover.

Acknowledgements

We thank Dr. Angeliki Koutsoukou-Argyraki and Anthony Bordg for commenting on the early version of this draft. The work was supported by the ERC Advanced Grant ALEXANDRIA (Project 742178), funded by the European Research Council.

Footnotes

1

Applying an introduction rule will replace a goal by a set of subgoals derived from the premises of the rule, provided the goal can be unified with the conclusion of the rule.

The first author was funded by the China Scholarship Council, via the CSC Cambridge Scholarship programme. This development is also supported by the European Research Council Advanced Grant ALEXANDRIA (Project 742178).

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Contributor Information

Wenda Li, Email: wl302@cam.ac.uk.

Lawrence C. Paulson, Email: lp15@cam.ac.uk

References

  • 1.Arnold VI. Ordinary Differential Equations. Berlin: Springer; 1992. [Google Scholar]
  • 2.Basu S, Pollack R, Roy MF. Algorithms in Real Algebraic Geometry. Berlin: Springer; 2006. [Google Scholar]
  • 3.Brunel, A.: Non-constructive complex analysis in Coq. In: Danielsson, N.A., Nordström, B. (eds.) 18th International Workshop on Types for Proofs and Programs (TYPES 2011), pp. 1–15. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany (2013)
  • 4.Collins, G.E., Krandick, W.: An efficient algorithm for infallible polynomial complex root isolation. In: Proceedings of International Symposium on Symbolic and Algebraic Computation, ISSAC ’92, pp. 189–194. ACM (1992)
  • 5.Eberl, M.: A decision procedure for univariate real polynomials in Isabelle/HOL. In: Conference on Certified Programs and Proofs, pp. 75–83. ACM Press (2015)
  • 6.Eisermann M. The fundamental theorem of algebra made effective: an elementary real-algebraic proof via Sturm chains. Am. Math. Mon. 2012;119(9):715. doi: 10.4169/amer.math.monthly.119.09.715. [DOI] [Google Scholar]
  • 7.Harrison, J.: Formalizing basic complex analysis. In: Matuszewski, R., Zalewska, A. (eds.) From Insight to Proof: Festschrift in Honour of Andrzej Trybulec, Studies in Logic, Grammar and Rhetoric, vol. 10, no. 23, pp. 151–165. University of Białystok (2007). http://mizar.org/trybulec65/. Accessed 2 Apr 2019
  • 8.Harrison J. Formalizing an analytic proof of the prime number theorem (Dedicated to Mike Gordon on the occasion of his 60th birthday) J. Autom. Reason. 2009;43:243–261. doi: 10.1007/s10817-009-9145-6. [DOI] [Google Scholar]
  • 9.Hölzl Johannes, Immler Fabian, Huffman Brian. Interactive Theorem Proving. Berlin, Heidelberg: Springer Berlin Heidelberg; 2013. Type Classes and Filters for Mathematical Analysis in Isabelle/HOL; pp. 279–294. [Google Scholar]
  • 10.Li, W.: The Sturm–Tarski theorem. In: Archive of Formal Proofs (2014). http://isa-afp.org/entries/Sturm_Tarski.html. Accessed 2 Apr 2019
  • 11.Li, W.: Count the number of complex roots. In: Archive of Formal Proofs (2017). http://isa-afp.org/entries/Count_Complex_Roots.html. Accessed 2 Apr 2019
  • 12.Li, W.: Evaluate winding numbers through cauchy indices. In: Archive of Formal Proofs (2017). http://isa-afp.org/entries/Winding_Number_Eval.html. Accessed 2 Apr 2019
  • 13.Li W, Passmore GO, Paulson LC. Deciding univariate polynomial problems using untrusted certificates in Isabelle/HOL. J Autom Reason. 2017;62:69–91. doi: 10.1007/s10817-017-9424-6. [DOI] [Google Scholar]
  • 14.Li, W., Paulson, L.C.: A formal proof of Cauchy’s residue theorem. In: Blanchette, J.C., Merz, S., (eds.) 7th International Conference on Interactive Theorem Proving, pp. 235–251. Springer (2016)
  • 15.Mahboubi A, Cohen C. Formal proofs in real algebraic geometry: from ordered fields to quantifier elimination. Log. Methods Comput. Sci. 2012;8(1):1–40. doi: 10.2168/LMCS-8(1:2)2012. [DOI] [Google Scholar]
  • 16.Marden M. Geometry of Polynomials. 2. Providence: American Mathematical Society; 1949. [Google Scholar]
  • 17.McLaughlin S, Harrison J. A proof-producing decision procedure for real arithmetic. In: Nieuwenhuis R, editor. Automated Deduction – CADE-20. CADE 2005. Lecture Notes in Computer Science. Berlin: Springer; 2005. [Google Scholar]
  • 18.Narkawicz A, Muñoz CA, Dutle A. Formally-verified decision procedures for univariate polynomial computation based on Sturm’s and Tarski’s theorems. J. Autom. Reason. 2015;54(4):285–326. doi: 10.1007/s10817-015-9320-x. [DOI] [Google Scholar]
  • 19.Rahman QI, Schmeisser G. Analytic Theory of Polynomials (2002) Oxford: Oxford University Press; 2016. [Google Scholar]
  • 20.Wilf HS. A global bisection algorithm for computing the zeros of polynomials in the complex plane. J. ACM. 1978;25(3):415–420. doi: 10.1145/322077.322084. [DOI] [Google Scholar]
  • 21.Yap, C.K., Sagraloff, M.: A simple but exact and efficient algorithm for complex root isolation. In: 36th International Symposium on Symbolic and Algebraic Computation, ISSAC ’11, pp. 353–360. ACM Press (2011)

Articles from Journal of Automated Reasoning are provided here courtesy of Springer

RESOURCES