A Computational Model for Multi-Variable Differential Calculus

32
A Computational Model for Multi-Variable Differential Calculus Abbas Edalat Department of Computing, Imperial College London, UK Andr´ e Lieutier Dassault Systemes Provence, Aix-en-Provence, France Dirk Pattinson Department of Computing, Imperial College London, UK Abstract We develop a domain-theoretic computational model for multi-variable differential calculus, which for the first time gives rise to data types for piecewise differentiable or more generally Lipschitz func- tions, by constructing an effectively given continuous Scott domain for real-valued Lipschitz functions on finite dimensional Euclidean spaces. The model for real-valued Lipschitz functions of n variables is built as a sub-domain of the product of two domains by tupling together consistent information about locally Lipschitz functions and their differential properties as given by their L-derivative or equivalently Clarke gradient, which has values given by non-empty, convex and compact subsets of R n . To obtain a computationally practical framework, the derivative information is approximated by the best fit compact hyper-rectangles in R n . In this case, we show that consistency of the function and derivative information can be decided by reducing it to a linear programming problem. This provides an algorithm to check consistency on the rational basis elements of the domain, implying that the domain can be equipped with an effective structure and giving a computable framework for multi-variable differential calculus. We also develop a domain-theoretic, interval-valued, notion of line integral and show that if a Scott contin- uous function, representing a non-empty, convex and compact valued vector field, is integrable, then its interval-valued integral over any closed piecewise C 1 path contains zero. In the case that the derivative information is given in terms of compact hyper-rectangles, we use techniques from the theory of mini- mal surfaces to deduce the converse result: a hyper-rectangular valued vector field is integrable if its interval-valued line integral over any piecewise C 1 path contains zero. This gives a domain-theoretic extension of the fundamental theorem of path integration. Finally, we construct the least and the greatest piecewise linear functions obtained from a pair of function and hype-rectangular derivative information. A preliminary version of this article appeared in the Proceedings of the Eight International Conference on Foundations of Software Science and Computational Structures, FOSSACS 2005, LNCS, vol. 3441, Springer, pp 505-519. * Corresponding author Email addresses: [email protected] (Abbas Edalat), [email protected] (Andr´ e Lieutier), [email protected] (Dirk Pattinson) Preprint submitted to Elsevier July 28, 2014

Transcript of A Computational Model for Multi-Variable Differential Calculus

A Computational Model for Multi-Variable Differential Calculus

Abbas Edalat∗

Department of Computing, Imperial College London, UK

Andre Lieutier

Dassault Systemes Provence, Aix-en-Provence, France

Dirk Pattinson

Department of Computing, Imperial College London, UK

Abstract

We develop a domain-theoretic computational model for multi-variable differential calculus, whichfor the first time gives rise to data types for piecewise differentiable or more generally Lipschitz func-tions, by constructing an effectively given continuous Scott domain for real-valued Lipschitz functionson finite dimensional Euclidean spaces. The model for real-valued Lipschitz functions ofn variables isbuilt as a sub-domain of the product of two domains by tuplingtogether consistent information aboutlocally Lipschitz functions and their differential properties as given by their L-derivative or equivalentlyClarke gradient, which has values given by non-empty, convex and compact subsets ofRn. To obtain acomputationally practical framework, the derivative information is approximated by the best fit compacthyper-rectangles inRn. In this case, we show that consistency of the function and derivative informationcan be decided by reducing it to a linear programming problem. This provides an algorithm to checkconsistency on the rational basis elements of the domain, implying that the domain can be equipped withan effective structure and giving a computable framework for multi-variable differential calculus. Wealso develop a domain-theoretic, interval-valued, notionof line integral and show that if a Scott contin-uous function, representing a non-empty, convex and compact valued vector field, is integrable, then itsinterval-valued integral over any closed piecewiseC1 path contains zero. In the case that the derivativeinformation is given in terms of compact hyper-rectangles,we use techniques from the theory of mini-mal surfaces to deduce the converse result: a hyper-rectangular valued vector field is integrable if itsinterval-valued line integral over any piecewiseC1 path contains zero. This gives a domain-theoreticextension of the fundamental theorem of path integration. Finally, we construct the least and the greatestpiecewise linear functions obtained from a pair of functionand hype-rectangular derivative information.

A preliminary version of this article appeared in the Proceedings of the Eight International Conference on Foundationsof Software Science and Computational Structures, FOSSACS2005, LNCS, vol. 3441, Springer, pp 505-519.

∗Corresponding authorEmail addresses:[email protected] (Abbas Edalat),[email protected] (Andre Lieutier),

[email protected] (Dirk Pattinson)

Preprint submitted to Elsevier July 28, 2014

When the pair is consistent, this provides the least and greatest maps to witness consistency.

1. Introduction

We develop a domain-theoretic computational model for multi-variable differential calculus, whichfor the first time gives rise to data types for real-valued Lipschitz or piecewise differentiable maps onfinite dimensional Euclidean spaces. This extends the corresponding result in [14] for dimensionn = 1to higher dimensionsn > 1. While many of the properties of the domain of Lipschitz functions onRhave been extended, as in [11], even to infinite dimensional Banach spaces, constructing an effectivestructure for the domain in the finite dimensional casen > 1 has been a challenge.

The model is a continuous Scott domain for Lipschitz functions ofn variables. It allows us to dealwith Lipschitz or piecewise differentiable functions in a recursion theoretic setting, and is thus funda-mental for applications in computational geometry, geometric modelling, ordinary and partial differen-tial equations and other fields of computational mathematics. The overall aim of the framework is tosynthesize differential calculus and computer science, which are two major pillars of modern scienceand technology.

The set of real-valued Lipschitz functions defined in a region inRn has very useful closure and conver-

gence properties which make it a suitable set of maps for computation. Lipschitz maps are in particularclosed under takingmin, max and absolute value which are essential operations in nearlyall areas ofscientific computation and CAD. We also have developed a notion of finitary derivative for Lipschitzmaps which leads to a practical model of computation. As in dimension one, the basic idea of the model,for a finite dimensional Euclidean spaceRn or for an infinite dimensional Banach spaceX, is to collecttogether the local differential properties of the functionby developing a generalization of the concept ofLipschitz constant to a non-empty, convex and compact set-valued Lipschitz constant inRn in the finitedimensional case and a non-empty, convex and weak* compact set-valued Lipschitz constant in the dualX∗ for the infinite dimensional case. The collection of these local differential properties are then usedto define the Lipschitz orL-derivativeof a function.

The L-derivative is in fact closely related to Clarke’s gradient, which is a key tool in nonsmoothanalysis, control theory and optimisation theory [8, 9] andis defined by using the generalized directionalderivative based on taking the limit superior of the rate of change of the function along a given direction.It has been shown in [11] that the L-derivative and the Clarke’s gradient coincide in finite dimensions.The Clarke gradient extends the classical derivative to Lipschitz maps, in the sense that the Clarkegradient of anyC1 map coincides with the classical derivative. In dimension one for example, theClarke gradient of the absolute value function at zero is theinterval[−1, 1], and similarly one can derivethe Clarke gradient of a piecewiseC1 function at a point of non-differentiability as the compactintervalobtained by taking the left and right limits of the derivative at that point.

Using the collection of the local differential properties that define the L-derivative, we also obtain theset of primitives of a Scott continuous, non-empty, convex and compact (respectively, weak* compact)set-valued vector field inRn (respectively, inX∗). This leads to an extended Fundamental Theorem ofCalculus for set-valued derivatives, which was shown first for dimension one [14] and then for infinitedimensions [11]. The Fundamental Theorem is used here, in the finite dimensional case, to construct thedomain of Lipschitz functions as a sub-domain of the productof the space of interval-valued functionsof n variables and the space of L-derivatives of Lipschitz functions ofn variables which take non-empty,

2

y

x

slope m

slope n

slope m

slope M

Figure 1. Two examples of consistent function and derivative approximations

convex compact sets as values. Geometrically, the first component of such a pair serves as an approxi-mation of the function value, and the second component simultaneously approximates the L-derivativeor all n partial derivatives. We call such a pair consistent if thereexists a Lipschitz function which isapproximated by the first component, and whose L-derivativeor derivative information is approximatedby the second component of the pair.

Each step function that approximates the function value is represented by a finite set of pairs(ai, bi)i∈Iwhereai ⊆ R

n is a rational hyper-rectangle andbi ⊆ R is a compact interval such thatbi andbj havenon-empty intersection whenever this is the case for the interiors ofai andaj . Similarly, approximationsof then partial derivatives are given as finite sets of pairs(ai, bi)i∈I where theai are as above but thebjare now compact rational polyhedra.

We specifically focus on the special but important case wherethe derivative information is always acompact hyper-rectangle with sides parallel to the coordinate planes. In fact, we can always approxi-mate the derivative information in this setting by replacing the non-empty compact convex set with thesmallest such hyper-rectangle that contains it. This approach is consistent with interval analysis [24] inthat each partial derivative would be a compact interval. Itwill result in some loss of information butwill greatly simplify the framework and provides a practical setting for implementation.

In fact, in the case that the derivative information is givenby compact hyper-rectangles with facesparallel to the coordinate planes for a consistent pair, as we will show in this paper, there is always apiecewise linear witness for consistency. In addition, there are a least and a greatest piecewise linearfunctions which satisfy the function and the partial derivative constraints, both witness to consistency.

Figure 1 shows two examples of consistent tuples forn = 2 and in each case the least and greatestfunctions consistent with the derivative constraints are drawn. In the first case, on the left, there isa single hyper-rectangle for function approximation and the derivative approximations in thex andydirections over the whole domain of the function are given respectively by the constant intervals[n,N ]and[m,M ] with n,m > 0. In the second case, on the right, there are two intersectinghyper-rectanglesfor the function approximation and the derivative approximations are the constant intervals[0, 0] and[m,M ] with m > 0.

A main question now is whether consistency of a pair of step functions containing function and deriva-tive information is actually decidable. This problem can beaddressed directly or alternatively brokenin two parts: (i) first decide whether the derivative information is integrable, and, in case the answer ispositive, (ii) decide whether there is an integral which is consistent with the function information. Forn = 1, where, as in the classical setting, the derivative information is always integrable, it was shownin [14] that consistency is decidable and in [13], a linear algorithm was presented (linear in the numberof pairs in the two step functions) which decides the consistency in this case.

For n ≥ 2, as in classical multi-variable calculus, a Scott continuous function of typeRn → CRn,

3

whereCRn is the domain of non-empty, compact and convex subsets ofR

n ordered by reverse inclusion,may fail to be integrable.

The first main result of the paper is to tackle directly, i.e. without breaking the problem into twoas above, the question whether consistency is decidable on basis elements. Given any convex compactpolygonC ⊂ R

n, we define a finitely generated associated cone centred at theorigin inRn+1 which has

the following property: the graph of any function of typeRn → R that vanishes at the origin, and whoseL-derivative is locally bounded byC, will be locally contained in the associated cone.

We then show that consistency of function and derivative approximations when the latter is providedby compact hyper-rectangles can be established algebraically by reducing the problem of consistency toa linear programming problem: we impose a hyperrectangulargrid on the domain of definition of thefunction where in each grid sub-hyperrectangle both the function and the derivative approximations areconstant and then use the cones associated with the constantderivative values to check consistency offunction and derivative information along all coordinate axes. This reduces the question of consistencyof the function and hyper-rectangular derivative approximation to whether a finite collection of rationalsemi-hyperplanes inRn+1 has non-empty intersection. Since the latter question is equivalent to theconsistency of the constraints in a linear programming problem, it follows that consistency of basiselements in our domain is decidable in this case. Given that this check succeeds, one can construct awitness for consistency by linearly interpolating betweensolutions of the linear programming problem.As a special case, this also shows that the question of integrability of a hyper-rectangular-valued stepfunction is decidable.

The decidability of consistency of basis elements in this case leads to an effective structure for thedomain of real-valued Lipschitz functions of several variables allowing us to enumerate the countableset of computable Lipschitz maps and that of computable functionals defined on this domain. It alsoenables us to construct increasingly finer approximations for a desired multivariable Lipschitz functionby ensuring that at each stage our construction is sound, in the sense that it is a possible approximationto the desired function. Such a situation arises in CAD whereone seeks to use piecewise linear surfacesto approximate a given map.

In the next part of the paper, we derive a domain-theoretic generalization of Green’s theorem, alsocalled the fundamental theorem of path integration, for a vector field to be a gradient, i.e., to be an exactdifferential. Recall that, in the classical setting, a continuous vector field is the gradient of a differentiablefunction if and only if the path integral of the vector field over any closed smooth path vanishes [22,pages 286-291].

With this goal in mind, we first introduce a domain-theoreticnotion of line integration, developedhere for the general framework, which defines the line integral as an interval valued function. Then weprove that if a Scott continuous compact convex valued function is integrable, i.e., if there is a Lipschitzmap whose Clarke gradient is bounded by the Scott continuousfunction, then its path integral over anyclosed piecewiseC1 path is an interval that contains zero.

The converse is far more conceptually and technically involved to establish. We use techniques fromthe theory of minimal surfaces to show that if the line integral of a Scott continuous hyper-rectangularvalued function over any piecewiseC1 closed path contains zero then the Scott continuous functionis integrable with two canonical witnesses (up to a constant) that respectively maximise the lower lineintegral and minimise the upper line integral from a given point. Thus, we have a domain-theoreticgeneralization of Green’s theorem: a necessary and sufficient condition for a Scott continuous hyper-rectangular valued function to be integrable is that zero must be contained in the line integral of the

4

function with respect to any closed piecewiseC1 path in its domain of definition.Finally, we construct the least and the greatest piecewise linear functions obtained from a pair of

hyper-rectangular valued step functions, representing function and derivative approximation in whichthe derivative part is assumed to be integrable. These surfaces are obtained respectively by patchingtogether, at a finite number of points given by the function information, the minimal and the maximalwitnesses for the integrability of the derivative information. Furthermore, the least and greatest surfacescan be effectively constructed. If consistency holds, thenany witness for consistency will lie betweenthe least and the greatest surface.

1.1. Related Work

The domain for real-valued Lipschitz functions has led to applications in solving initial value prob-lems [13, 19, 15, 17] and in developing a denotational semantics for hybrid automata [18]. The domainfor the Lipschitz functions on finite dimensional Euclideanspaces has been used to develop domain-theoretic inverse and implicit function theorems for Lipschitz functions [16]. The L-derivative has en-abled us to define the weak topology on locally Lipschitz mapswhich has been shown to be coarserthan the Lipschitz norm topology [12]. The L-derivative hasalso been used to develop a typed Lambdacalculus, an extension of PCF with real numbers, equipped with a derivative operator [10], which givesa denotational semantics for algorithmic differentiation[21].

We have already pointed out the related work of Clarke [8] andthe equivalence of the L-derivative andthe Clarke in finite dimensional Euclidean spaces. In a series of papers, Borwein and his collaboratorshave studied various properties of the Clarke gradient and developed new related notions [4, 5, 6]. Inparticular, given a weak* upper semi-continuous mapg that is non-empty, convex and weak* compactset-valued from a Banach space to the space of subsets of its dual, ag-Lipschitz mapis defined as onewhose Clarke gradient at every point is contained in the set value ofg at that point. In finite dimensions,the set ofg-Lipschitz maps is precisely the set of primitives ofg, a result which is a direct consequenceof the equivalence of the L-derivative and Clarke gradient.Whereas in the domain-theoretic settingthe generalized differential properties are used to develop the notion of primitives and the extendedFundamental Theorem of Calculus is then deduced as a proposition, in the work of Borwein et al. theg-Lipschitz maps are defined precisely by using the relation that expresses the Fundamental Theorem ofCalculus. In addition, we also mention the necessary and sufficient condition given by Borwein et al. [6]for the integrability of a Scott continuous function definedon a connected open set, a condition which isbased on the existence of a measurable subset and a measurable selection.

In computable analysis, Pour-El and Richards [25] relate the computability of a function with thecomputability of its derivative. The scheme employed in particular by Weihrauch [29] leads to partiallydefined representations, but there is no general result on decidability. Interval analysis [24] also pro-vides a framework for verified numerical computation. In this context, differentiation is performed bysymbolic techniques [26] in contrast to our sequence of approximations of the functions.

In [7], a more recent application of domain theory in differential calculus, in the context of viscositysolutions of Hamiltonian equations, is introduced which uses thestrong derivative. This notion is notdirectly related to our work here since, as shown in [23, Proposition 1.9], there are Lipschitz functionsdefined on the unit interval which have a non-point valued Clarke gradient, equivalently, L-derivative atevery point and are not strongly differentiable at any point.

5

1.2. Notations and terminology

We assume the reader is familiar with elements of domain theory and multivariable differential calcu-lus. Some basic knowledge of linear programming is also usedto deduce the decidability of consistency.We use the standard notions of domain theory as in [1, 20]. We write R for the set of real numbers andIR = [a, b] | a ≤ b ∈ R ∪ R for the interval domain, i.e. the set of compact, nonempty intervals,equipped with a least element⊥ = R, ordered by reverse inclusion. It has a canonical basis consistingof all compact intervals with rational end points augmentedwith ⊥. We write a non-bottom elementv ∈ IR asv = [v−, v+]. As usual, we identify any real numberx ∈ R with the singletonx ⊂ R sothat we identify the set of maximal elements ofIR asR.

We will also consider the (smash) product domainIRn consisting of all non-empty compact hyper-

rectangles with faces parallel to the standard coordinate planes ordered with reverse inclusion and aug-mented with the whole spaceRn as the bottom element. It has a canonical basis consisting ofall itsrational (compact) hyper-rectangles and the bottom element. We denote the continuous Scott domainof the nonempty, compact and convex subsets ofR

n, taken together withRn as the bottom element andordered by reverse inclusion, byCR

n. We will use a canonical basis ofCRn, consisting of rational

convex compact polyhedra together with the setRn as the bottom element.

For an open subsetU ⊂ Rn, let C0(U) be the function space of all continuous functions of type

U → R. We will also use domains of function spaces of the form(U → D) whereD is a countablybased continuous dcpo, which is eitherIR, IRn or CR

n in this paper. Thus,(U → D) consists of Scottcontinuous functions partially ordered pointwise by the order inherited fromD. For convenience, wewrite D0(U) = U → IR. A function f ∈ D0(U) is given by a pair of respectively lower and uppersemi-continuous functionsf−, f+ : U → R with f(x) = [f−(x), f+(x)] whenf(x) 6= ⊥ for all x ∈ U .Recall that given an open subseta ⊂ U and an elementb ∈ D, thesingle step functionbχa : X → D isdefined as(bχa)(x) = b if x ∈ a and⊥ otherwise, where we have used the notation in [20]. Single-stepfunctions are continuous with respect to the Scott topology. Any finite set of single-step functions thatare bounded in the function spaceU → D has a least upper bound, called astep function; the set of stepfunctions provides a basis for the continuous Scott domainU → D. This basis in turn gives a countableand canonical basis ofrational step functionsfor U → D, whereD = IR, IRn or CR

n, generated bysingle-step functions of the formbχa wherea is a rational open hyper-rectangle with faces parallel tothe coordinate hyper-planes ofRn andb is a rational interval forD = IR, a rational hyper-rectanglefor D = IR

n and a rational compact convex polyhedron inRn for D = CR

n. Finally, in our list ofdomain-theoretic terminology, the set of elements above anelementc in a domain is denoted by↑ c.

We use standard operations of interval arithmetic [24], which extend the usual operations such asaddition and multiplication of numbers by pointwise application to sets of points. There are two suchoperations we specifically use in this paper. Let‖x‖ =

∑ni=1 x

2i be the standard Euclidean norm

of x = (x1, · · · , xn) ∈ Rn. Then the Euclidean norm is extended pointwise tob ∈ CR

n by ‖b‖ =max‖x‖ : x ∈ b. We will also consider the extension− · − : CR

n × Rn → IR of the scalar product

which is defined pointwiseb · x = y · x : y ∈ b.Recall that the directional derivative of a mapf : U ⊂ R

n → R at x ∈ U , in the directionu 6= 0when it exists, is defined as

f ′(x; u) = limh→0+

f(x+ hu)− f(x)

h.

Recall also that the derivative off at x ∈ U , when it exists, is defined as the linear mapT : Rn → R

6

with

lim‖x−y‖→0

|f(x)− f(y)− T (x− y)|

‖x− y‖= 0.

The linear mapT is denoted byf ′(x). Let∇f denote the gradient off , when it exists, i.e.,

(∇f)i(x) =∂f

∂xi(x) =

limx′

i→xi

f(x1, . . . , xi, . . . , xn)− f(x1, . . . , x′i, . . . , xn)

xi − x′i

,

for 1 ≤ i ≤ n. Recall that if the derivative exists at a point then the gradient also exists at that point andhas the same value. We will reserve the notationLf exclusively in this paper for the L-derivative offwhich will be introduced later. The interior of a setA ⊂ R

n is denoted byA and its closure by cl(A).We next define the generalized (Clarke) gradient of a function [8, Chapter 2] and explain its properties.

Let U ⊂ X be an open subset of a Banach spaceX and letf : U → R be Lipschitz nearx ∈ U andv ∈ X. Thegeneralized directional derivativeof f atx in the direction ofv is

f (x; v) = lim supy→x t↓0

f(y + tv)− f(y)

t.

Let us denote byX∗ the dual ofX, i.e. the set of real-valued continuous linear functions onX. WeconsiderX∗ with its weak* topology, i.e., the weakest topology onX∗ in which for anyx ∈ X the mapf 7→ f(x) : X∗ → R is continuous.

Thegeneralized gradientof f atx, denoted by∂f(x) is the subset ofX∗ given by

A ∈ X∗ : f (x; v) ≥ A(v) for all v ∈ X.

It is shown in [8, page 27] that

• ∂f(x) is a non-empty, convex, weak* compact subset ofX∗.

• Forv ∈ X, we have:f (x; v) = maxA(v) : A ∈ ∂f(x).

WhenX is finite dimensional, sayX = Rn, there is a simpler characterization of the generalized

gradient. In this case, by Rademacher’s theorem [9, page 148], a locally Lipschitz mapf : U ⊂ Rn → R

is Frechet differentiable almost everywhere with respectto the Lebesgue measure. IfΩf is the nullsetwheref fails to be differentiable then:

∂f(x) = Colim f ′(xi) : xi → x, xi /∈ Ωf, (1)

where Co(S) is the convex hull of a subsetS ⊂ Rn [8, page 63]. The above expression is interpreted

as follows. Consider all sequences(xi)i≥0, with xi /∈ Ωf , for i ≥ 0, which converge tox such thatlimi→∞ f ′(xi) exists. Then the generalized gradient is the convex hull of all such limits. Note that,in the above definition, sincef is locally Lipschitz atx, it is differentiable almost everywhere in aneighbourhood ofx and thus there are plenty of sequences(xm)m≥0 such thatlimm→∞ xm = x andlimm→∞ f ′(xm) exists.

7

2. Domain for Lipschitz Functions

This section reviews the necessary background on theL-derivative and the domain of Lipschitz maps,specialised to finite dimensions, from [11] to which we also refer for all proofs. The local differentialproperties of a function are formalised in the domain-theoretic framework by the notion of a set-valuedLipschitz constant. AssumeU ⊂ R

n is an open subset.

Definition 2.1. The continuous functionf : U → R hasa non-empty, convex and compact set-valuedLipschitz constantb ∈ CR

n in an open subseta ⊂ U if for all x, y ∈ a we have:b·(x−y) ⊑ f(x)−f(y).The single-step tieδ(a, b) ⊆ C0(U) of a with b is the collection of all partial functionsf on U witha ⊂ dom(f) ⊂ U in C0(U) which haveb as a non-empty convex compact set-valued Lipschitz constantin a.

Note that, as stated in the introduction, we have used the extension of the scalar product to subsets ofR

n and identified in the above definition the real numberf(x)− f(y) with the singletonf(x)− f(y).For example, ifn = 2 andb = b1 × b2 ⊆ R

2, the information relation above reduces tob1(x1 − y1) +b2(x2−y2) ⊑ f(x)−f(y). For a single-step tieδ(a, b), one can think ofb as the non-empty compact-setLipschitz constant for the family of functions inδ(a, b). The classical Lipschitz constant forf wouldsimply bek = ‖b‖ ≥ 0. By generalizing the concept of a Lipschitz constant in thisway, one is able toobtain essential information about the differential properties of the function. In particular, iff ∈ δ(a, b)for a 6= ∅ andb 6= ⊥, thenf(x) is maximal for eachx ∈ a and the induced functionf : a → R isLipschitz: for allx, y ∈ a we have|f(x) − f(y)| ≤ ‖b‖‖x − y‖. Forf ∈ C1(U), the following threeconditions are shown to be equivalent in [11]: (i)f ∈ δ(a, b), (ii) ∀z ∈ a. f ′(z) ∈ b and (iii)a ց b ⊑ f ′.For the rest of this section, we assume we are in dimensionn ≥ 2 and for convenience we writeC0 forC0(U).

Definition 2.2. A step tieof C0 is any finite intersection⋂

i∈I δ(ai, bi) ⊂ C0, whereI is a finite indexingset. Atie of C0 is any intersection∆ =

i∈I δ(ai, bi) ⊂ C0, for an arbitrary indexing setI. Thedomainof a non-empty tie∆ is defined asdom(∆) =

i∈Iai | bi 6= ⊥.

A non-empty step tie with rational intervals gives us a family of functions with afiniteset of consistentdifferential properties, and a non-empty general tie givesa family of functions with a consistent set ofdifferential properties. Recall that a functionf : U → R defined on the open setU ⊆ R

n is locallyLipschitzif it is Lipschitz in a neighbourhood of any point inU . If ∆ ⊂ C0 is a tie andf ∈ ∆, thenf(x) is maximal forx ∈ dom(∆) andf is locally Lipschitz ondom(∆).

We now collect some simple properties of step ties, which we will use later and refer to [11] for proofs.For any indexing setI, the family of step functions(biχai)i∈I is consistent if

i∈I δ(ai, bi) 6= ∅. Oneimportant corollary of this is that consistency of a family of step functions can be determined from theassociated ties in a finitary manner: The family(biχai)i∈I is consistent if for any finite subfamilyJ ⊆ Iwe have

i∈J δ(ai, bi) 6= ∅.Let (T 1(U),⊇) be the dcpo of ties ofC0 ordered by reverse inclusion. We are finally in a position

to define the set of primitives of a Scott continuous function; in fact now we can do more and define acontinuous functional as follows:

Definition 2.3. The primitive map∫

: (U → CRn) → T 1(U) is defined by

(g) =⋂

i∈I δ(ai, bi),whereg = supi∈I biχai . We usually write

(f) as∫

f and call it the set ofprimitivesof f .

8

The primitive map is well-defined, onto and continuous. Forn ≥ 2, as we are assuming here, theprimitive map will have the empty tie in its range, a situation which does not occur forn = 1.

Example 2.4.Let g ∈ [0, 1]2 → CR2 be given by

g = (g1, g2) = (λx1.λx2.1, λx1.λx2.x1).

Then ∂g1∂x2

= 0 6= 1 = ∂g2∂x1

, and it will follow that∫

g = ∅.

Therefore, we have the following important notion in dimensionsn ≥ 2.

Definition 2.5. A mapg ∈ U → CRn is said to beintegrableif

g 6= ∅.

Given a continuous functionf : U → R, the relationf ∈ δ(a, b) provides, as we have seen, finitaryinformation about the local differential properties off . By collecting all such local information, weobtain the complete differential properties off , namely its derivative.

Definition 2.6. Thederivativeof a continuous functionf : U → R is the map

Lf =⊔

f∈δ(a,b)

bχa : U → CRn.

We have the following properties, which are established in [11] for the case of arbitrary (possiblyinfinite) dimension.

Theorem 2.7. (i) Lf is well-defined and Scott continuous.

(ii) If f ∈ C1(U) thenLf = f ′.

(iii) f ∈ δ(a, b) iff bχa ⊑ Lf .

We also obtain the generalization of Theorem 2.7(iii) to ties, which provides a duality between thedomain-theoretic derivative and integral and can be considered as a variant of the Fundamental Theoremof Calculus:

Corollary 2.8. f ∈∫

g iff g ⊑ Lf .

Moreover, we have the fundamental result:

Theorem 2.9. [11, Corollary 8.2] In finite dimensional Euclidean spaces,the L-derivative coincideswith the Clarke gradient.

The set of primitive maps ofg is closely related to the notion ofg-Lipschitz functions due to Borweinet al. [6] defined as follows; we restrict to finite dimensions. Let g ∈ (U → CR

n) be Scott continuous.Then, the set ofg-Lipschitz mapsis defined in terms of the Clarke gradient∂f of locally Lipschitzfunctions as

χg = f : U → R : f is locally Lipschitz and∂f(x) ⊂ g(x) for all x ∈ U.

By the equivalence of the Clarke gradient and the L-derivative in finite dimensions (Theorem 2.9), itfollows immediately from Corollary 2.8 thatχg =

g.

9

A domain for locally Lipschitz functions and forC1(U) is constructed as follows. The idea is touseD0(U) to represent the function andU → CR

n to represent the differential properties (partialderivatives) of the function. Consider theconsistencyrelation

Cons ⊂ D0(U)× (U → CRn),

defined by(f, g) ∈ Cons if ↑f ∩∫

g 6= ∅. For a consistent(f, g), we think off as thefunction partorthe function approximationandg as thederivative partor thederivative approximation. We will showthat the consistency relation is Scott closed.

Proposition 2.10.Let g ∈ U → CRn and(fi)i∈I be a non-empty family of functionsfi : dom(g) → R

with fi ∈∫

g for all i ∈ I. If h1 = inf i∈I fi is real-valued (i.e., if the familyfi : i ∈ I is non-emptyand bounded below) thenh1 ∈

g. Similarly, if h2 = supi∈I fi is real-valued (i.e., if the family isnon-empty and bounded above), thenh2 ∈

g.

In later sections, we will consider piecewise linear paths in dom(g); it is convenient to work with aconnected componentO of dom(g) as we will do in the following. LetR(U) be the set of partial mapsof U into the extended real lineR ∪ ∞,−∞. Consider the two dcpos(R(U),≤) and(R(U),≥) withpointwise ordering inherited from the extended real line. Define the mapss : D0(O)× (U → CR

n) →(R(U),≤) andt : D0(O)× (U → CR

n) → (R(U),≥) by

s : (f, g) 7→ infh : dom(g) → R | h ∈

g & h ≥ f−

t : (f, g) 7→ suph : dom(g) → R | h ∈

g & h ≤ f+.

We use the convention that the infimum and the supremum of the empty set are∞ and−∞, respectively.Note that ifO∩dom(f) = ∅, thens(f, g)(x) = −∞ andt(f, g)(x) = ∞ for x ∈ O. In words,s(f, g) isthe least primitive map ofg that is greater than the lower part off , whereast(f, g) is greatest primitivemap ofg less that the upper part off . It then follows that the following three conditions are equivalent:(i) (f, g) ∈ Cons, (ii) s(f, g) ≤ t(f, g) and (iii) There exists a locally Lipschitz functionh : dom(g) → R

with g ⊑ Lh andf ⊑ h ondom(g).Moreover, the mapss andt are Scott continuous and the relationCons is Scott closed. We can sum

up the situation for a consistent pair of function and derivative information.

Corollary 2.11. Let(f, g) ∈ Cons. Then in each connected componentO of the domain of definition ofgwhich intersects the domain of definition off , there exist two locally Lipschitz functionss(f, g) : O → R

and t(f, g) : O → R such thats(f, g), t(f, g) ∈ ↑f ∩∫

g and for eachu ∈ ↑f ∩∫

g, we haves(f, g)(x) ≤ u(x) ≤ t(f, g)(x) for all x ∈ O.

The central notion of this paper is now presented as follows:

Definition 2.12. Thedomain of locally Lipschitz functions onU with non-empty, convex and compactderivativesis given by

D1(U) = (f, g) ∈ D0(U)× (U → CRn) : (f, g) ∈ Cons

and thedomain of locally Lipschitz functions onU with rectangular derivativeis the space

D1R(U) = (f, g) ∈ D0(U)× (U → IR

n) : (f, g) ∈ Cons

whereU ⊂ Rn is an arbitrary open subset.

10

Both posetsD1(U) andD1R(U) are continuous Scott domains, i.e. bounded complete countably based

continuous dcpos and the inclusioni : D1R(U) → D1(U) is Scott-continuous. IfL(U) andC1(U) denote

the collection of real-valued locally Lipschitz functionsand continuously differentiable functions onUrespectively, we have the maps

Γ : L(U) → D1R(U) defined byΓ(f) = (f,Lf)

Γ1 : C1(U) → D1

R(U) defined byΓ1(f) = (f, f ′).

We note thatΓ1 andiΓ1 are continuous injections ofC1(U), equipped with theC1 norm topology, intothe set of maximal elements ofD1

R(U) andD1(U), respectively. In [12], the weakest topology onL(U)is defined as the coarsest topology that makes the mapΓ continuous. With respect to this topology onL(U), the mapΓ andi Γ are embeddings (whereLf 6= ⊥ for all x).

The difference betweenD1(U) andD1R(U) is mainly one of taste and the problem at hand. Theoreti-

cally,D1(U) provides a much more fine grained approximation of values of the L-derivative. However,working withD1

R(U), which entails some loss of information, is conceptually easier and computationallymore practical as derivative values are represented by compact rectangles rather than non-empty, convexand compact sets. We now proceed to show thatD1

R(U) can be equipped with an effective structure,thus paving the way for a computational and domain theoreticanalysis of differentiable functions.

3. Effective Structure for D1

R(U)

We show in this section thatD1R(U), which uses hyper-rectangles as derivative information, can be

equipped with an effective structure by proving that consistency of the derivative and function informa-tion is decidable for it. We will however present a general framework, allowing us to deal with convexand compact polyhedra as derivative information, which canbe used to study the consistency inD1(U)as well. This we think is justified in particular because the general setting is not more conceptuallyor technically involved and thus we do not gain much by restricting it to hyper-rectangles. The gen-eral setting is also used to show, by providing a counter-example, why our solution for decidability ofconsistency in the hyper-rectangular case does not work in the more general domainD1(U).

We assume in the sequel thatU = (0, 1)n is the open unit cube which permits us to focus on effectivestructures for differentiable functions (we can also takeU to be the closed unit cube[0, 1]n). As explainedin the introduction, we take the canonical countable bases of IR, IRn andCR

n consisting of non-emptycompact rational intervals, compact hyper-rectangles andnon-empty rational compact convex polyhedrarespectively. These three bases respectively generate canonical bases of(U → IR), (U → IR

n) and(U → CR

n) consisting of step functions made up of rational single-step functions with values of thethree different kinds above and defined on rational open hyper-rectangles inU as open sets.

We now introduce the main concept required in our framework for investigating consistency of func-tion and derivative information. Recall that a setC ⊆ R

n is called aconewith vertex at the origin ifx ∈ C impliesrx ∈ C for all r ≥ 0. The set−C = −x : x ∈ C is themirror coneof C. For anyw ∈ R

n, the setC + w = x + w : x ∈ C is the coneC transportedto w. A coneC ⊂ Rn is finitely

generatedby the vectorsk1, k2, · · · , km if

C = m∑

j=1

rjkj : rj ≥ 0, j = 1, . . . , m.

Let b ∈ CRn be any non-empty convex compact subset ofR

n.

11

Definition 3.1. Theupperb surfacethrough the origin is defined byUb : Rn → R with Ub(x) = (b ·x)+.

Similarly, thelower b surfacethrough the origin is defined asLb : Rn → R with Lb(x) = (b · x)−, for

any vectorx ∈ Rn. Theb-cone centred at the origin is the coneCb in R

n+1 bounded by the lower andupperb-surfaces through the origin.

In fact,Ub is thesupport functionof the compact convex setb [27, 3] in a finite dimensional Euclideanspace and is a bounded convex function; it is thus Lipschitz [8, Proposition 2.2.6]. Note thatLb(x) =−Ub(−x); see Figure 2 in whichx has been chosen as a unit vector so thatv · x is simply the projectionof v along the vectorx, i.e., the distance from the origin of orthogonal projection of v into x. Forexample, for the unitn-dimensional closed unit disc,b = D1(0), we haveUD1(0)(x) = ‖x‖ whereasLD1(0)(x) = −‖x‖. TheD1(0)-coneCD1(0) at the origin is then given by

(x, y) ∈ Rn × R : −‖x‖ ≤ y ≤ ‖x‖.

For convex functions, the directional derivative exists ateach point for each direction and coincides withthe corresponding generalised directional derivative. This implies that the Clarke gradient at each pointis the convex closure of all the directional derivatives at that point. [8, 2.3.4 and 2.3.6]. Moreover, thedirectional derivative of the support functionUb at a pointx in the direction ofu 6= 0 is given by

U ′b(x; u) = Ub∩H(x)(u), (2)

whereH(x) = y ∈ Rn : y · x = Ub(x) [28, page 40]. This means thatUb is differentiable atx if and

only if b ∩H(x) is a singleton. It is now straightforward to conclude the following results.

Proposition 3.2.For all x ∈ Rn we have(LLb)(x) ⊒ b and(LUb)(x) ⊒ b, and(LLb)(0) = (LUb)(0) =

b.

From now on, assume thatb is a non-empty convex compact polyhedron inRn. Let v be a vertex of

b formed by the intersection of, say,i facesD1, D2, · · · , Di of b and letkj be the outer unit normal toDj for 1 ≤ j ≤ i. The vertexv ∈ b induces anassociated conePv(b) in R

n centered at the origin andfinitely generated by thei vectorskj for 1 ≤ j ≤ i. When the polyhedronb is clear from the context,we writePv(b) simply asPv. For any two different verticesv andw of b, the interiors of the two conesPv(b) andPw(b) are disjoint and then-dimensional spaceRn is the union of the cones associated to allthe vertices ofb. It follows from Equation (2) thatUb is differentiable for anyx ∈ P

v with U ′b(x) = v,

which impliesUb(x) = v · x. Figure 2 illustrates an example inR2 with b a triangle. The three verticesvi of b induce the three associated conesPvi , for 1 ≤ i ≤ 3. On the left, two horizontal cross sections ofthe lower surfaceLb of the coneCb have been depicted as the two dashed triangles withLb(x) = c1 andLb(x) = c2 for two constantsc1 > c2 > 0.

In the language of convex analysis, the facesDj for 1 ≤ j ≤ i are the extremal support hyper-planesfor the boundary pointv of the convex setb. Furthermore, the mirror cone−Pv is finitely generatedby the vectors−kj for 1 ≤ j ≤ i andRn is the union, with disjoint interiors, of all cones−Pv for allverticesv of b. For anyx ∈ −Pv we have(b · x)− = v · x. Summarising we have:

Proposition 3.3. We haveUb(x) = v · x for x ∈ Pv andLb(x) = v · x for x ∈ −Pv.

Consider now the two restrictionsUbPv: Pv → R andLb−Pv

: −Pv → R of the upper and lowersurfaces ofCb through the origin respectively.

12

x

P

P

b

bU (x)

L (x)b

.

.

P

0

b L (x)=c1

L (x)=c2b

v

v1

v2

v

v1

v3

2 3

Figure 2. The associated cones of the three vertices of a triangle b and a unit vector x. Two horizontalsections of the lower surface Lb are depicted on the left.

Proposition 3.4. The graph of the restrictionsUbPvandLb−Pv

are finitely generated cones and the twographs are mirror cones.

Proof. We claim that the graph ofUbPvis finitely generated by thei vectors

(kj, Ub(kj)) = (kj , v · kj) ∈ Rn × R

for j = 1, . . . , i. In fact, any vector inPv is of the form∑i

j=1 rjkj. SinceUb(∑i

j=1 rjkj) = v ·

(∑i

j=1 rjkj), any vector in the graph ofUbPvis of the form

(i

j=1

rjkj , Ub(i

j=1

rjkj)) = (i

j=1

rjkj, (v ·i

j=1

rjkj)) =i

j=1

rj(kj, v · kj)

as required. A dual argument shows that the graph ofLb−Pvis finitely generated by thei vectors

(−kj,−v · kj) ∈ Rn × R for j = 1, . . . , i. Since for anyx ∈ Pv we have−x ∈ −Pv with (x, Ub(x)) =

(x, v · x) = −(−x,−v · x) = −(−x, Lb(−x)), it follows that the graphs ofUbPvandLb−Pv

are mirrorcones.

Putting the graphs ofUbPv(respectivelyUb−Pv

) together for all verticesv of b we obtain:

Corollary 3.5. The graph ofUb andLb are mirror cones of each other and each is the union of finitelygenerated cones with generators that are computed fromb and the normal vectors to the faces ofb.

It now follows that ifb is a rational polyhedron and(x, y) ∈ Rn×R is a point with rational coordinates,

then the inequalitiesLb(x) ≤ y ≤ Ub(x) are decidable. Since we haveCb = (x, y) ∈ Rn×R : Lb(x) ≤

y ≤ Ub(x), we obtain:

13

Corollary 3.6. For a rational polyhedronb, the membership predicate of theb-cone is decidable forrational points.

We now explain the framework to study consistency whenn = 2 as the general case forn > 2is similar. We impose a grid(p0, . . . , pk) × (q0, . . . , ql) on the unit squareU such that the functionapproximation given by the step functionf : U → IR and the derivative approximation given by thestep functiong : U → CR

n are constant respectively with valuescij ∈ IR and bij ∈ CRn inside

every subrectangle(pi, pi+1)× (qj , qj+1), for i = 0, . . . , k − 1 andj = 0, . . . , l− 1, defined by adjacentgrid points. Note that ifcij = ⊥ or bij = ⊥ thenf or g are undefined in the subrectangle and theircontribution can be ignored in the following analysis.

If the pair of step functions(f, g) ∈ (U → IR)× (U → CRn) is consistent then we can find values

hi,j ∈ R at all the grid points(pi, qj) for i = 0, . . . , k andj = 0, . . . , l such that fori = 0, . . . , k− 1 andj = 0, . . . , l − 1 they satisfy the following two conditions:

C(i) c−ij ≤ hs,t ≤ c+ij for s = i, i+ 1 andt = j, j + 1,

C(ii) the coneCbij transported to any of the four points

((pi, qj), hij), ((pi+1, qj), hi+1,j), ((pi, qj+1), hi,j+1), ((pi+1, qj+1), hi+1,j+1),

contains all the other three points as well (i.e., each of thefour cones must contain all the fourpoints).

In fact, if f andg are consistent with a Lipschitz witnessh : U → R, then we puthi,j = h((pi, qj))which indeed must satisfy conditionC(i) above. Furthermore, sincebij ⊑ (Lh)(x) for all x ∈ (pi, pi+1)×(qj, qj+1), it follows that((ps, qt), hs,t) ∈ Cbij + ((pu, qv), hu,v) for s, u = i, i + 1 andt, v = j, j + 1,sinceh goes through all the four values at the corners of the subrectangle.

Next we look at the converse of the above result. Suppose there exist real numbershij, for i = 0, . . . , kandj = 0, . . . , l, such that conditionsC(i) andC(ii) above hold. Consider the piecewise linear function

h : U → R (3)

defined as follows:

W(i) In the triangle with vertices(pi, qj), (pi, qj+1) and(pi+1, qj), the maph linearly interpolates be-tween the valueshij , hi,j+1 andhi+1,j at these vertices respectively.

W(ii) In the triangle with vertices(pi+1, qj+1), (pi, qj+1) and(pi+1, qj), the maph linearly interpolatesbetween the valueshi+1,j+1, hi,j+1 andhi+1,j at these vertices respectively.

Proposition 3.7. Given a pair of step functions(f, g) ∈ (U → IR) × (U → IRn), if there exist real

numbershij, for i = 0, . . . , k andj = 0, . . . , l, such that conditionsC(i) and C(ii) above hold, then thepiecewise linear maph defined in Equation (3) satisfyingW(i) and W(ii) is a witness of consistency of(f, g).

Proof. By C(i), the maph satisfies the function information. To check that it also satisfies the deriva-tive information, letbij = b1ij × b2ij for compact intervalsb1ij , b

2ij ∈ IR. Since byC(ii), the coneCbij

transported to((pi, qj), hij) contains((pi+1, qj), hi+1,j) and((pi, qj+1), hi,j+1), we have:

hi+1,j − hi,j ∈ b · ((pi+1, qj)− (pi, qj)) = b1ij(pi+1 − pi),

14

hi,j+1 − hi,j ∈ b · ((pi, qj+1)− (pi, qj)) = b2ij(qj+1 − qj).

By division we obtain:

c :=

(

hi+1,j − hi,j

pi+1 − pi,hi,j+1 − hi,j

qj+1 − qj

)

∈ b1ij × b2ij = bij .

Since forh restricted to the interior of the triangle with vertices(pi, qj), (pi, qj+1) and(pi+1, qj), we haveh′ = c, it follows thatLh(x) = h′(x) = c ⊂ bij for x in the interior of this triangle. Similarly,Lh(x) = h′(x) = c ⊂ bij in the interior of the the triangle with vertices(pi+1, qj+1), (pi, qj+1) and(pi+1, qj). By Scott continuity ofLh we haveLh(x) ⊒ g(x) for all x ∈ U , including at the boundarypoints of the triangles.

Note that the witness functionh can alternatively be constructed by interpolating the values given atthe vertices of the two other triangles, i.e., one with vertices(pi, qj), (pi, qj+1) and(pi+1, qj+1), and theother with vertices(pi, qj), (pi+1, qj) and(pi+1, qj+1).

Corollary 3.8. A pair (f, g) ∈ (U → IR)× (U → IRn) is consistent iff we can find valueshi,j ∈ R at

grid points such thatC(i) andC(ii) ae satisfied.

Since as basis elements,f andg are given in terms of rational numbers, the question of consistencyis then reduced to solving a finite set of inequalities with rational coefficients for the(k + 1) × (l + 1)unknownshi,j for i = 0, . . . , k andj = 0, . . . , l, i.e., the intersection of a finite set of half-spaces, whichis decidable; it in fact represents the set of constraints for a linear programming problem.

For n > 2, the same result holds by considering a similar grid in the unit cubeU in Rn with sub-

hyperrectangles in which thef andg values are constant. In order to find the witness for consistencywhen2n real values are given for the vertices of each sub-hyperrectangle satisfying the containmentcondition for the corresponding transported cone, we choose any partition of each sub-hyperrectangleinto the union ofn-simplexes with disjoint interiors.

Corollary 3.9. The predicateCons is decidable on the basis elements of(U → IR)× (U → IRn).

We have therefore proved:

Corollary 3.10. The domainD1R(U) can be given an effective structure.

We also note that given a rational step functiong : U → IRn, we can determine ifg is integrable

by dropping conditionC(i) and deciding if there existsh : U → R satisfying conditionC(ii). Thus wehave:

Corollary 3.11. The integrability of a basis element of(U → IRn) is decidable.

Finally, we note that in the more general case when(f, g) ∈ (U → IR) × (U → CRn) and the

two conditionsC(i) andC(ii) for somehij values on the grid points are satisfied, the maph defined inEquation (3) withW(i) andW(ii) does not necessarily give a witness for consistency. For example takeb = [(0, 0), (2, 1)], the closed line segment from the origin to the point(2, 1) in the plane, and considerthe three points(0, 0, 0), (1, 0, 1) and(0, 1, 0). Then we can easily check that theb-cone transported toeach of the three points contains the other two. However, theplanef through the three points(0, 0, 0),(1, 0, 1) and(0, 1, 0) is given byf(x, y) = x with f ′ = (1, 0) /∈ b = [(0, 0), (2, 1)]. Thus, the questionof decidability of consistency remains open in this more general framework.

15

[ −2 , 2 ]

[ −1 , 1 ]

[ −3 , 3 ]

[ −2 , 2 ]

2

2

2

2

Figure 3. Crescents of a step function

4. Interval-valued Line Integration

In this section, we extend the classical theory of line integration to interval-valued vector fields anduse it to derive, in this section and the next, an extension ofthe fundamental theorem of path integrationto the domain-theoretic setting. We will use it to show in Section 6 that for step functionsf ∈ D0(U)andg ∈ U → IR

n, the mapss(f, g) andt(f, g), as in Corollary 2.11, will be piecewise linear, whichcan be effectively obtained whenf andg are rational step functions.

Let g ∈ U → CRn be a rational step function. SinceIRn ⊂ CR

n, we will use the following notionsalso forg ∈ U → IR

n. Recall that acrescentis the intersection of an open set and a closed set. Thedomain dom(g) of g is partitioned into a finite set of disjoint crescentsCj : j ∈ I, in each of which thevalue ofg is constant as a non-empty compact and convex set; they are called theassociated crescents,or simply thecrescentsof g, which play a main part in the framework for deciding integrability as wewill see later in this section. Each associated crescent hasboundaries parallel to the coordinate planesand these boundaries intersect at points, which are called thecornersof the crescent.

In Figure 3, an example of a step functiong is given with its associated crescents, the interval in eachcrescent gives the value ofg in that crescent. A solid line on the boundary of a crescent indicates thatthe boundary is in the crescent, whereas a broken line indicates that it is not.

Remark 4.1. We have theadjacency propertyof the values of a step functiong as follows. By the Scottcontinuity ofg at a pointx of the boundary of any number of crescents, it follows thatg(x) ⊑ g(y) fory in any of of the neighbouring crescents ofx. If fact, for anyb ≪ g(x) there exists a neighbourhoodN of x for which b ≪ g(y) for y ∈ N and our claim follows. Sinceg(x) is itself the value ofg at thecrescent to whichx belongs, it follows thatg(x) = ⊓i∈Ici whereci : i ∈ I is the set of values ofg inthe neighbouring crescents ofx. In particular, ifx is on the boundary of precisely two crescents, thenthe constant valuesc1 andc2 of the two crescents satisfyc1 ⊑ c2 or c2 ⊑ c1.

A path in a connected regionO ⊂ Rn is a continuous mapp : [0, 1] → O with endpointsp(0) and

p(1). We sayp is piecewiseC1, if p′ exists and is continuous except for a finite number of points atwhich the left and right derivatives ofp exist and are limits ofp′ from left and right respectively. The

16

spaceP (O) of piecewiseC1 paths in the regionO ⊂ Rn is equipped with theC1 norm:

‖p‖ = maxmaxr∈[0,1]

‖p(r)‖, supp′(r) exists

‖p′(r)‖. (4)

A pathp is non-self-intersectingif p(r) = p(r′) for r < r′ impliesr = 0 andr′ = 1. We will be mainlyconcerned with the subsetP0(O) ⊂ P (O) of piecewise linear paths in this paper. For these paths, thereexists a strictly increasing finite sequence of points(ri)0≤i≤k for somek ∈ N with 0 = r0 < r1 <· · · rk−1 < rk = 1 such thatp is linear in[ri, ri+1] for 0 ≤ i ≤ k − 1. The pointsp(ri) for i = 0, · · · , k,are said to be thenodesof p; the nodesp(ri) for i = 1, · · · , k − 1 are called theinner nodes. The linesegmentp(r) : ri ≤ r ≤ ri+1 is denoted byp([ri, ri+1]). If p(0) = p(1), the path is said to beclosed.We also use the notationpi := p(ri) for the nodes of the pathp in the rest of the paper. Asimplepath ina regionO ⊂ R

n is a non-self-intersecting piecewiseC1 map.Recall that given a vector fieldF : O → R

n in a regionO ⊂ Rn and a piecewiseC1 pathp : [0, 1] →

O, the line integral ofF with respect top from 0 to w ∈ [0, 1] is defined as∫ w

0F (p(r)) · p′(r) dr, when

the integral exists. Here,u · v =∑n

i=1 uivi denotes the usual scalar product of two vectorsu, v ∈ Rn.

Before introducing the interval-valued line integral, we derive some technical properties. For anyA ∈ CR

n andδ > 0, we consider the open setAδ = x ∈ Rn : d(x,A) < δ ⊂ R

n, whered(x,A) isthe minimum distance from the pointx to A.

Lemma 4.2. The map− · − : Rn ×CRn → IR given byr · A = r · x : x ∈ A is Scott continuous.

Proof. Assumer ∈ Rn andA ∈ CR

n. Supposeǫ > 0 is given and consider the open ballB(r, δ)centered atr and of radiusδ = min(1, ǫ/2(M + 1)) with M = sup‖r‖ : r ∈ A. LetB ∈ CR

n withB ⊂ Aǫ/2(‖r‖+1). For anyx ∈ B, takey ∈ A with |x − y| ≤ ǫ/2(‖r‖ + 1). Then, for anys ∈ B(r, δ),we have:s · x = s · x− s · y + s · y − r · y + r · y = s · (x− y) + (s− r) · y + r · y < ǫ/2 + ǫ/2 + r · yand thuss · x < r · y + ǫ ≤ (r ·A)+ + ǫ and it follows that(s ·B)+ < (r ·A)+ + ǫ. Similarly, we have:(s ·B)− > (r ·A)− − ǫ.

Corollary 4.3. For a Scott continuousg : U → CRn, whereU ⊂ R

n is an open set, and a piecewiseC1 pathp : [0, 1] → U , the mapt 7→ g(p(t)) · p′(t) : [0, 1] → IR is Scott continuous.

Corollary 4.4. For any piecewiseC1 pathp ∈ P (U), the mapg 7→ λt.g(p(t)) · p′(t) : (U → CRn) →

D0(U) is Scott continuous.

Note that in Corollaries 4.3 and 4.4 we haveg(p(t)) · p′(t) = ⊥ at the finite number of pointstwherep′(t) is undefined. We now define the notion of line integral of the compact-convex polyhedronvalued Scott continuous functiong ∈ U → CR

n with respect to any piecewiseC1 path fromy to x in aconnected component of dom(g).

Definition 4.5. Giveng ∈ U → CRn and a piecewiseC1 pathp ∈ P (U) with image in the domain of

g the line integralof g overp is defined as:∫

p[0,1]

g(r) dr =

[

L

p[0,1]

g(r) dr,U

p[0,1]

g(r) dr

]

(5)

where thelower integraland theupper integralof g overp are respectively given by

L

p[0,1]

g(r) dr =

∫ 1

0

(g(p(r)) · p′(r))− dr,

17

U

p[0,1]

g(r) dr =

∫ 1

0

(g(p(r)) · p′(r))+ dr.

Note that sinceλt.(g(p(t)) · p′(t))+ andλt.(g(p(t)) · p′(t))− are, by Corollary 4.3, respectively upperand lower semi-continuous functions, the Lebesgue integrals in the above definition exist. In dealingwith line integrals as above, we always assume implicitly that the piecewiseC1 pathp lies in the domainof the functiong. We sometimes write

pg(r) dr for

p[0,1]g(r) dr. Furthermore, when the pathp from

p(0) = y to p(1) = x is clear from the context, we sometimes write∫

p[0,1]

g(r) dr =

∫ x

y

g(r) dr,

to emphasise the dependence of the integral ony andx for the given path. In addition, we sometimeswrite the pathp from y to x aspy or px to emphasise its initial or end points.

Proposition 4.6. Givenp ∈ P (U), the map∫

p[0,1]: (U → CR

n) → IR is Scott continuous.

Proof. It is easy to see that∫

p[0,1]is monotonic. Ifg = supi≥0 gi is the supremum of an increasing chain

of mapsgi ∈ (U → CRn) for i ≥ 0 andp lies in the domain ofgi for all i ≥ 0, then by Corollary 4.4

and Lebesgue’s monotone convergence theorem it follows that supi≥0 L∫

p[0,1]gi(r) dr = L

p[0,1]g(r) dr

andinf i≥0 U∫

p[0,1]gi(r) dr = U

p[0,1]g(r) dr.

Remark 4.7. The interval-valued line integral∫

p[0,1]g(p(t))·p′(t) dt for a step functiong ∈ (U → CR

n)

and a piecewise linear pathp is easy to compute. Consider a straight line segmentp : [a, b] → C withp(t) = p(a) + (t − a)(p(b) − p(a))/(b − a), and thusp′(t) = (p(b) − p(a))/(b − a) ∈ R

n, fort ∈ (a, b) ⊂ [0, 1], contained in an associated crescentC of g with valueK ∈ CR

n, say. We have:

L

p[a,b]

g(t) dt =

∫ b

a

(p′(t) ·K)− dt =(b− a)((p(b)− p(a)) ·K)−

b− a= ((p(b)− p(a)) ·K)−.

U

p[a,b]

g(t) dt =

∫ b

a

(p′(t) ·K)+ dt =(b− a)((p(b)− p(a)) ·K)+

b− a= ((p(b)− p(a)) ·K)+.

Thus we conclude:∫

p[a,b]

g(t) dt = (p(b)− p(a)) ·K = (p(b)− p(a)) · x : x ∈ K = [m,M ],

with m andM respectively the least and greatest values of(p(b)− p(a)) · x for x ∈ K:

m = minx∈K

(p(b)− p(a)) · x = (p(b)− p(a)) · u M = maxx∈K

(p(b)− p(a)) · x = (p(b)− p(a)) · v,

whereu andv are two points on the boundary ofK. In fact, u can be taken to be any point of theboundary ofK where the hyper-plane with outer normalp(b)− p(a) touchesK whereasv can be takento be any point of the boundary ofK where the hyper-plane with outer normal−(p(b) − p(a)) touchesK. In the case thatK is a compact convex polyhedron we havep(b)−p(a) ∈ −Pu andp(b)−p(a) ∈ Pv

as in Proposition 3.3.

18

A simple property of the lower and upper integrals is given inthe following.

Proposition 4.8. Given a single-step functiong = bχa ∈ U → CRn and a straight line segment

p ∈ P0(a) from the fixed pointp(0) = y to the pointp(1) = x, the L-derivatives with respect tox of thelower and upper integrals satisfy:

g(x) ⊑ LL(

∫ x

y

g(r) dr), g(x) ⊑ LU(

∫ x

y

g(r) dr)

Proof. We shall prove the property for the upper integral as the casefor the lower integral is entirelysimilar. We can assumeb is a convex, compact polyhedron as the general case follows from this byProposition 4.6 since any convex, compact subset is the intersection of a shrinking sequence of convex,compact polyhedra. Then, for fixedy, we have:

f(x) := U(∫ x

yg(r) dr)

= ((x− y) · b)+

= (x− y) · v

where(x − y) ∈ Pv, by Proposition 3.3, for some vertexv ∈ b. Assume now thatx − y is notperpendicular to any of the faces ofb. Then, foru in a small neighbourhood ofx we have:f ′(u) = v.It follows from Equation (1) and the equivalence of the L-derivative and the Clarke gradient in finitedimensional Euclidean spaces (Theorem 2.9), thatLf(x) = v ⊒ b. By Scott continuity it follows thatLf(x) ⊒ b for anyx ∈ a.

5. Fundamental Theorem of Path Integration

Recall the fundamental theorem of path integration, a classical result in multi-variable differentialcalculus:

Theorem 5.1. [22, 2] Let O be an open, connected set inRn, and letG : O → Rn be a continuous

vector field. Then the following two conditions are equivalent.

• There is a differentiable functionF : O → R such thatG = F ′.

• The line integrals ofG over closed, piecewiseC1 curves inO are zero.

We note that one can replaceC1 curves with piecewise linear curves in the above theorem, since everyC1 curve can be obtained as theC1 limit of a sequence of piecewise linear curves. In this section, wewill develop a domain-theoretic extension of the fundamental theorem of path integration, but first wewill point out a related result in this area.

Borwein et al. [6] give a necessary and sufficient condition for a Scott continuous functiong : O →CR

n whereO ⊂ Rn is a non-empty open connected subset to be integrable (see also [5, Theorem 8]).

We will now explain their condition.The line integralof a measurable mapf : O → R

n on the line segment[a, b] ⊂ O is given by theLebesgue integral:

19

[a,b]

f(z) · dz :=

1∫

0

f(tb+ (1− t)a) · (b− a) dt.

The line integral off on a piecewise linear pathP inU is simply the sum of its line integrals on the linesegments ofP . For any fixedǫ > 0, an ordered collection of line segmentsP (ǫ) = [ai, bi] : 1 ≤ i ≤ nis anǫ-path froma to b provided:

‖a− a1‖+n−1∑

i=1

‖ai+1 − bi‖+ ‖bn − b‖ < ǫ.

Such a path is closed ifa = b. For a Borel subsetE ⊂ O, anǫ-pathP (ǫ) is anE-admissibleǫ-path froma to b if λ(t ∈ [0, 1] : tbi + (1− t)ai /∈ E) = 0 for 1 ≤ i ≤ n− 1, whereλ is the Lebesgue measure.Line integrals on anǫ-path are defined similarly as above.

Theorem 5.2. [6, Theorem 8] LetU be a non-empty open connected subset ofRn and letg : U → CR

n

be a bounded Scott continuous map. Theng is integrable if and only if there exists a Borel setE ⊂ Uwith λ(U \ E) = 0 and a measurable selectionf : E → R

n of g so thatlimǫ→0+∫

P (ǫ)f(z) dz = 0,

whereP (ǫ) is any closedE-admissibleǫ-path inU .

The existence of a measurable selection as above is in general non-decidable. We have already shownin Corollary 3.9 that for a rational step functiong ∈ (U → IR

n) integrability is a decidable predicate.In this section, we will derive an alternative necessary andsufficient condition for the integrability ofa Scott continuous functiong : U → IR

n, which is the domain-theoretic counterpart for the classicalcondition that the line integral over closed piecewiseC1 paths be zero.

We now introduce the main concept in the domain-theoretic generalization of the fundamental theo-rem of path integration for the integrability of a vector field.

Definition 5.3. Giveng ∈ (U → CRn) and a closed simple pathp in a connected component of dom(g),

we say thatg satisfies thezero-containment loop condition forp if

0 ∈

p[0,1]

g(r) dr.

We say thatg ∈ (U → CRn) satisfies thezero-containment loop conditionif it satisfies the zero-

containment loop condition for any closed simple pathp in any connected component of dom(g).

We note that ifg is a step function then in the zero-containment loop condition above, it suffices toconsider piecewise linear closed simple paths. In fact, it can be easily shown that the integral of a stepfunction with respect to a piecewiseC1 path is the limit of integrals of the step function over a sequenceof piecewise linear paths that converge in theC1 norm (Equation (4)) to the piecewiseC1 path.

If g only takes point (maximal) values, then the zero-containment loop condition is simply the standardcondition forg to be a gradient i.e., the line integral ofg vanishes on any closed path. Figure 4 gives anexample of rectangular valued step functiong = (g1, g2) ∈ U → IR

2, with dom(g) = ((0, 3)× (0, 3)) \([1, 2]× [1, 2]) which does not satisfy the zero-containment loop condition. The values ofg1 (left) andg2 (right) are given for each of the four single-step functions. Denote the dashed path byp; it has nodes

20

[−4, 4] [−4, 4]

[−2, −1]

[1, 2]

[−2, −1] [1, 2]

[−4, 4]

[−4, 4]

Figure 4. Failure of zero-containment loop condition: g1 (left) and g2 (right)

at p(0) = p(1) = (1/2, 1/2), p(1/4) = (5/2, 1/2), p(1/2) = (5/2, 5/2) andp(3/4) = (1/2, 5/2). Asimple calculation shows that

p′(r) =

(8, 0) 0 < r < 1/4(0, 8) 1/4 < r < 1/2(−8, 0) 1/2 < r < 1/4(0,−8) 3/4 < r < 1

Thus, evaluating the line integral for the four parts of the path, we obtain:

L∫

p[0, 14]g(r)dr = L

p[ 14, 12]g(r)dr = L

p[ 12, 34]g(r)dr = L

p[ 34,1]g(r)dr = 2

Summing the contributions from the four parts above, the lower line integral ofg overp then gives astrictly positive value:

L∫

p[0,1]g(r)dr = 8.

In the proof of the following theorem we invoke the mean valuetheorem for the Clarke gradient dueto Lebourg, which we state here for finite dimensional Euclidean spaces where the Clarke gradient andthe L-derivative coincide:

Theorem 5.4. [8, Theorem 2.37] Letx, y ∈ Rn and assume the line segment between them is in the

domain of a real-valued Lipschitz functionh. Then there exists a pointu in the open interval betweenxandy such thath(y)− h(x) ∈ (Lh(u)) · (y − x).

Theorem 5.5. Supposeg ⊑ Lh for a Scott continuous functiong ∈ (U → CRn) and a Lipschitz map

h : dom(g) → R. Then for any piecewiseC1 pathp fromy to x in a connected component of dom(g) wehaveh(x)− h(y) ∈

p[0,1]g(r) dr.

Proof. By Proposition 4.6, we only need to prove the result for a stepfunctiong, in which case we canalso take the pathp to be piecewise linear. By introducing additional inner nodes if required, we can alsoassume that the interior of each line segmentp([ri−1, ri]) of p, with 1 ≤ i ≤ k − 1, lies in a crescent ofg with a constant valueKi say. By Lebourg’s mean value property (Theorem 5.4), there existsui in theinterior ofp([ri−1, ri]) such that

h(p(ri))−h(p(ri−1)) ∈ (Lh(ui))·(p(ri)−p(ri−1)) ⊒ g(ui)·(p(ri)−p(ri−1)) = Ki·(p(ri)−p(ri−1)) =

∫ ri

ri−1

g(r) dr.

21

Adding the above relations fori = 1, · · · , k, we obtain the result.

Recall thatg ∈ (U → CRn) is called integrable if

g 6= ∅. The following corollary is an extension ofGreen’s Theorem also called the Gradient Theorem in classical differential calculus [22, 2].

Corollary 5.6. Supposeg ∈ (U → CRn) is an integrable function. Theng satisfies the zero-containment

loop condition.

Proof. Assumeh ∈∫

g and thus, by Corollary 2.8,

g ⊑ Lh. (6)

Take any closed piecewise linear pathp in a connected componentO of dom(g) and putx = y = p(0)in Theorem 5.5.

We are now ready to introduce a key concept of this paper. Notethat any step functiong can beextended to the boundary of dom(g) by the lower and upper semi continuity ofg−i andg+i respectivelyfor 1 ≤ i ≤ n. For a step functiong ∈ (U → CR

n) andx, y ∈ cl(O), wherey is regarded as theparameter andx as the variable, we put

Vg(x, y) = supL

p[0,1]

g(r) dr : p a piecewise linear path in cl(O) from y to x,

Wg(x, y) = infU

p[0,1]

g(r) dr : p a piecewise linear path in cl(O) from y to x.

Corollary 5.7. Supposeg ⊑ Lh for a step functiong ∈ (U → CRn) and a Lipschitz maph : dom(g) →

R. Then for any piecewise linear path fromy to x in a connected component ofg we have:

Vg(x, y) ≤ h(x)− h(y) ≤ Wg(x, y).

Proof. This follows immediately from Theorem 5.5 by taking the supremum, respectively the infimum,of the values of the lower integrals, respectively the upperintegrals, over all piecewise linear paths fromy to x.

From now on, i.e., for the rest of this paper, we will restrictourselves to hyper-rectangular valuedderivative information. We will show that if

g = (g1, . . . , gn) ∈ (U → IRn)

satisfies the zero-containment loop condition, then it is integrable. LetO be a connected component ofdom(g) for the rest of this paper. We adopt the following convention.

Remark 5.8. If two crescents have a common boundary, we consider their common boundary as in-finitesimally separated so that they have distinct boundaries. This means that a line segment of a piece-wise linear simple path on a common boundary of two differentcrescents is always regarded as the limitof a sequence of parallel segments contained on one side of this boundary. In the two dimensional casen = 2, this means that the same edge on the boundary of two crescents can represent two different linesegments, i.e., one in each crescent.

22

[ −2 , 2 ]

[ −1 , 1 ]

[ −3 , 3 ]

[ −2 , 2 ]

2

2

2

2

Figure 5. Crescents of a step function (left); the corners and their coaxial points (right)

Definition 5.9. Let O be a connected component of the domain of a step functiong ∈ (U → IRn). We

say that any orthogonal projection of a pointx ∈ cl(O) to anym-dimensional boundary of a crescent inO (for 1 ≤ m ≤ n− 1) is acoaxial pointof x.

Clearly, each point has a finite number of coaxial points. In Figure 5, the coaxial points of the cornersof the crescents of the step function in Figure 3, reproducedon the left, are illustrated on the picture onthe right. We collect a few technical results before we are able to prove the equivalence of integrabilityand the zero-containment loop condition. Our first challenge is to show that there are actually pathswhich respectively attain the lower and the upper integralsof g from y to x.

We considerO as the disjoint union of a set of crescents generated by open hyper-rectangles inRn. Inthis section, we take this set of crescents precisely as the crescents on whichg has constant value. (In thenext section we will refine these crescents with those of dom(f).) LetEO denote the set of vertices of thecrescents ofO. Given a finite set of pointsx1, . . . , xt, we denote byHO(x1, . . . , xt), the coarsest hyper-rectangular partition that includes as vertices the pointsin EO ∪x1, . . . , xt and all their coaxial points.Let EO(x1, . . . , xt) denote the set of all corners of the hyper-rectangles inHO(x1, . . . , xt). Denote thehyper-rectangles inHO(x, y) by Ri wherei ∈ I for some finite indexing setI. Suppose thatKi ∈ IR

n

is the (constant) value ofg onRi for i ∈ I.Next, consider a vectorz ∈ R

n. Then for each coordinate indexk = 1, · · · , n we havezk ≷ 0 where≷ stands for≥ or≤. This gives at most2n possibledirection typesfor z, each of which we can representby the finite sequences = s1s2 · · · sn wheresk ∈ −,+ according to the sign ofzk. Note that by ourformulation, forzk = 0 we have bothsk = + andsk = −. Also observe that ifz is direction types then−z has the direction type−s where(−s)k = −sk with the usual multiplication of signs±.

If K ∈ IRn, we say a vertexv of K has types ∈ +,−n if z := v − y has types for somey ∈ K,

and we writev = K(s). If the interior ofK is non-empty then each vertex ofK will have a uniquecorner type. It is now easy to see the following simple proposition whichgives, in the case of rectangularderivative, the complete description of the more general results in Proposition 3.3.

Proposition 5.10. If z has direction types then the two vertices,K(s) andK(−s), ofK of corner typess and−s respectively satisfy:(K · z)+ = K(s) · z and(K · z)− = K(−s) · z.

The first lemma shows that ifg satisfies the zero-containment loop condition, then, givenx, y ∈ cl(O),the supremum of lower path integrals fromx to y is always attained for a simple piecewise linear pathwhose nodes are in the setEO(x, y).

23

Lemma 5.11.Suppose the step functiong satisfies the zero-containment loop condition. Ifx, y ∈ cl(O),then

supL

q

g(r)dr | q piecewise linear path inO fromx to y

is attained for a simple piecewise linear path with nodes in the setEO(x, y). The dual property holdsfor the infimum of upper integrals.

Proof. We show that every piecewise linear pathp with nodes

p0, . . . , pj−1, pj , pj+1, . . . , pl

from x = p0 to y = pl can be modified to a piecewise linear pathq, also fromx to y such that

(i) q is simple (i.e., non-intersecting);

(ii) the nodes ofq are inEO(x, y);

(iii) L∫

qg(r)dr ≥ L

pg(r)dr.

First note that by the zero-containment loop condition, if we remove any loop fromp then the lowerintegral will increase, i.e., condition (iii) will be satisfied. We can therefore remove all loops fromp,which means that we can assume our path is simple, i.e., (i) isestablished. Next, suppose thatp isa simple piecewise linear path inO with nodesx = p0, . . . , pl = y. We may assume without lossof generality that each open line segment(pj−1, pj) lies within a single hyper-rectangleRij ⊆ O ofHO(x, y); note thatRij for j = 1, . . . , l are not necessarily distinct. By Remark 4.7, we have:

L

p

g(r)dr =l

j=1

(Kij · (pj − pj−1))− =

l∑

j=1

minx∈Kij

x · (pj − pj−1). (7)

We consider two steps to ensure that condition (ii) is met. First we remove all inner nodes that are inthe interior of the hyper-rectanglesRi for i ∈ I. Suppose that for somej with 1 ≤ j ≤ l − 1, the nodepj is in the interior of the hyper-rectangleRij . By our assumption above, it follows that(pj−1, pj) and(pj, pj+1) are both contained inRij . Since for any two vectorsa, b ∈ R

n we have(Kij · a) + (Kij · b) ⊃Kij · (a+ b), it follows that(Kij · (pj −pj−1))+ (Kij · (pj+1−pj)) ⊃ Kij · (pj+1−pj−1), which impliesthat (Kij · (pj+1 − pj−1))

− + (Kij · (pj+1 − pj)))− ≤ (Kij · (pj+1 − pj−1))

−. Thus, by removing thenodepj from our simple piecewise linear pathp, we obtain a new simple piecewise linear pathq withconsecutive nodesx = p(0) = p0, . . . , pj−1, pj+1, . . . , pl = p(1) = y with L

qg(r)dr ≥ L

pg(r)dr.

By repeatedly removing inner nodes that are in the interior of the hyper-rectanglesRi for i ∈ I, we canassume that for any simple piecewise linear pathp there is a simple piecewise linear pathq that satisfies(iii) and has its inner nodes at the boundaries of the hyper-rectangles ofHO(x, y).

Our final step is then to show that a simple piecewise linear path whose nodes are at the boundariesof Ri’s can be replaced with one whose nodes are all inEO(x, y), i.e., at the vertices ofRi for i ∈ I.Assume therefore thatp has its nodespj for 1 ≤ j ≤ l on the boundaries of the hyper-rectanglesRi.For any nodepj on a co-dimension one boundary hyper-plane of someRi, the coordinatespjk with1 ≤ k ≤ n have maximum and minimum values as determined by the given boundary hyper-plane of

24

Ri. Consider the segment ofp from pj−1 to pj which by our assumption lies inRij . Let sj ∈ −,+n

be the direction type ofpj − pj−1. Then, by Proposition 5.10, we have:

minx∈Kij

x · (pj − pj−1) = Kij (−sj) · (pj − pj−1).

Thus, from Equation (7), we can write the lower integral for pathp as:

L

p

g(r)dr =

l∑

j=1

minx∈Kij

x · (pj − pj−1) =

l∑

j=1

Kij (−sj) · (pj − pj−1) =

−Ki1(−s1) · p0 +Kil(−sl) · pl +l−1∑

j=1

(Kij (−sj)−Kij+1(−sj+1)) · pj.

We consider the lower integralL∫

pg(r)dr over the pathp above as the objective function of a linear

programming problem, with variablespj (j = 1, . . . l − 1) and constraints given by the position of eachpj on a given boundary ofRij together with the minimum and maximum values this boundary imposeson the coordinates ofpj. We note that the vertices of the convex polytope that represents the domain ofthe objective function are given by the points inEO(x, y). In fact, the conditionsp(j−1)k − pjk ≷ 0 donot give rise to new extremal points of the domain of the objective function. For, if at least one of thecoordinatesp(j−1)k andpjk, for somek = 1, · · · , n, is constant for the two boundaries ofRij on whichp(j−1)k andpjk lie, then one or the other of the inequalitiesp(j−1)k−pjk ≷ 0 is satisfied, otherwise if bothp(j−1)k andpjk are non-constant for the two boundaries, thenp(j−1)k andpjk will have the same range ofvalues[m,M ] say and the two inequalitiesp(j−1)k − pjk ≷ 0 would correspond to the two right angledtriangles with vertices(m,m), (m,M), (M,M) and(m,m), (M,m), (M,M), which correspond to thekth coordinates of two corners ofRi. Thus, for a given set of valuessj ∈ −,+n with 1 ≤ j ≤ lfor l sequences of±, each of lengthn, the supremum of the lower integral is attained, by basic linearprogramming, for a value of eachpj at a vertex of the hyper-rectangleRij for 1 ≤ j ≤ l. Since thereare a finite number (in fact2nl) of such sets of sequences of lengthn, it follows that the supremum ofthe lower integral is attained for a path going through the vertices of the hyper-rectangles inHO(x, y),which completes the proof.

We note that the proof of Lemma 5.11 crucially uses the fact that the set of coaxial points of a givenpoint is finite and is closed under taking coaxial points. This clearly holds under the assumption we havein this section, i.e., the values of the derivative information g are hyper-rectangles with faces parallelto the coordinate planes. In the case thatg takes values as non-empty compact and convex rationalpolyhedra, we do not know if in general a given point gives rise to a finite set closed under takingcoaxial points.

Corollary 5.12. Suppose the pathp ∈ P0(U) fromy to x satisfiesVg(x, y) = L∫

p[0,1]g(r) dr. Then for

any pointz = p(r0) with r0 ∈ [0, 1] we have

Vg(z, y) = L

p[0,r0]

g(r) dr, Vg(x, z) = L

p[r0,1]

g(r) dr, Vg(x, y) = Vg(x, z) + Vg(z, y) (8)

25

A similar result holds forWg.

Proof. Suppose the first equality in Equation 8 does not hold. Then ifq is the path fromy to z thatattains the lower integral ofg, we can concatenateq with the second segment ofp, i.e., fromr = r0 tor = 1, to get a new path fromy to x which has a greater value for its lower integral thanp : [0, 1] → U .This gives a contradiction and hence the first equality holds. Similarly the second equality holds. Thethird is simply the additivity of the line integral.

Corollary 5.13. LetO be a connected component of step functiong ∈ (U → IRn). If g ⊑ g0, then for

anyx, y ∈ cl(O) we haveVg(x, y) ≤ Vg0(x, y) ≤ Wg0(x, y) ≤ Wg(x, y).

Proof. Supposep attainsL∫

p[0,1]g dr = Vg(x, y). By the definition ofVg0(x, y) and monotonicity of path

integration (Proposition 4.4), we obtain:Vg(x, y) ≤ Vg0(x, y). Similarly for the upper integrals.

We now need a technical lemma to proceed. Fixy ∈ cl(O) and letx andz be in the interiorR ofthe same hyper-rectangleR of HO(y) (which is a coarser partition thanHO(x, y)). Consider any pathpx

from y to x with l + 1 nodesy = px0 , px1 , . . . , p

xl = x in EO(x, y). Then, there exists a pathpz from y to

z also withl + 1 nodesy = pz0, pz1, . . . , p

zl = z in EO(z, y) such that

• for eachi = 1, . . . , l − 1 eitherpxi = pzi ∈ EO(y), or pxi andpzi are coaxial points ofx andzrespectively that lie on the same face of a hyper-rectangle inHO(y), and

• for 0 ≤ i ≤ l the two line segmentspxi , pxi+1 andpzi , p

zi+1 belong to the same hyper-rectangle in

HO(y).

The second condition ensures that in casepxi , pxi+1 andpzi , p

zi+1 are both on the boundary of some cres-

cents, then they would be considered infinitesimally contained in the same crescent ofg. We say that thetwo pathspx andpz have the sametypefor x, z ∈ R.

Lemma 5.14. For a step functiong, the line integral∫

pxg(r) dr depends linearly on the coordinates of

x ∈ R when the type ofpx is unchanged.

Proof. Suppose the two pathspx andpz, with x, z ∈ R, have the same type each havingl + 1 nodes.Then theirjth segments frompj−1 to pj (for eachj = 1, . . . , l) lie in the same hyperrectangle inHO(y)of constantg valueKij say. We have,

L

pxg(r)dr =

l∑

j=1

(Kij · (pxj − pxj−1))

− =l

j=1

minu∈Kij

u · (pxj − pxj−1).

L

pzg(r)dr =

l∑

j=1

(Kij · (pzj − pzj−1))

− =

l∑

j=1

minu∈Kij

u · (pzj − pzj−1).

Sincepxj − pxj−1 andpzj − pzj−1 belong to the same orthant inRn, we obtain:

L

pxg(r)dr =

l∑

j=1

uj · (pxj − pxj−1).

26

L

pzg(r)dr =

l∑

j=1

uj · (pzj − pzj−1),

where−(pxj − pxj−1),−(pzj − pzj−1) ∈ Puj, and thus,

L

pzg(r)dr− L

pxg(r)dr = (z − x) · ul +

l−1∑

j=1

(uj − uj+1) · (pzj − pxj ). (9)

Since the two paths are of the same type, forj = 1, . . . , l − 1 eitherpxj = pzj ∈ EO(y), thus makingno contribution to Equation (9) orpxi andpzi are coaxial points ofx andz respectively, which dependlinearly onn − 1 coordinates ofx andz respectively. It follows that

pxg dr depends linearly onx as

this point varies inR while the type of the path is unchanged.

For a given step functiong ∈ (U → IRn)with a connected componentO, the mapsλp ∈ P0(O).L

pg(r) dr

andλp ∈ P0(O).U∫

pg(r) dr are not in general continuous with respect respect to theC1 norm onP0(O),

as it is easy to verify by considering a path consisting of a single line segment that coincides with theboundary of two crescents with different values. However, the mapsVg(·, y),Wg(·, y) giving the lowerand upper integrals from the pointy respectively are continuous:

Proposition 5.15. If the step functiong satisfies the zero-containment loop condition, then, for all y ∈cl(O), the two maps given byVg(·, y),Wg(·, y) : cl(O) → R are continuous, piecewise linear and satisfyVg(y, y) = Wg(y, y) = 0.

Proof. Fix y ∈ cl(O), and consider a pathpx from y tox as this point varies in the interior of a hyperrect-angleR of HO(y), while the type ofpx remains unchanged. By Lemma 5.14, the integralL

pxg(r) dr

depends linearly on the coordinates ofx ∈ R. Thus, we obtain forx ∈ R a finite set of pathspx withpx(0) = y andpx(1) = x, of all possible types, such that the mappingλx.L

pxg(r) dr is a continuous

piecewise linear surface. Therefore the mapVg(·, y), which is locally the maximum of a finite numberof continuous piecewise linear local surfaces is itself a continuous piecewise linear surface.

In order to show thatVg(y, y) = 0, we note that the trivial constant pathp with constant valuey isa piecewise linear simple path fromy to y with L

p[0,1]g(r) dr = 0. By the zero-containment loop

condition, any other closed piecewise linear simple pathq from y to y satisfiesL∫

qg(r) dr ≤ 0 and thus

Vg(y, y) = L∫

p[0,1]g(r) dr = 0. The statement for the upper line integral is entirely dual.

The importance of the mapsVg(·, y) andWg(·, y), for a fixedy ∈ cl(O), lies in the fact that theirderivatives provide a refinement ofg.

Proposition 5.16. If the step functiong satisfies the zero-containment loop condition, then the mapsVg(·, y) andWg(·, y) satisfy

g(x) ⊑ LVg(x, y) and g(x) ⊑ LWg(x, y)

for all y ∈ cl(O).

27

Proof. We prove thatg ⊑ LVg(·, y), as the statement concerning the upper line integral is entirelyanalogous. We can assume thatx is in the interior of a crescentC of g with constant valueK, sincethe general case then follows by Scott continuity. Thus, there exists a smalla > 0 such that the closedn-dimensional open ballBa(x) of radiusa and centerx lies in the interiorC. Denote the boundary ofthis disk bySa(x). For anyz ∈ Sa(x) andu ∈ Ba(x), we have:Vg(u, y) ≥ Vg(z, y) + Vg(u, z) sinceany pair of piecewise linear pathsp1 (from y to z) andp2 (from z to u) gives rise, by concatenation, to apiecewise linear path (p1 followed byp2) from y to u. Moreover,

Vg(u, y) = supVg(z, y) + Vg(u, z) : z ∈ Sa(x), (10)

sinceVg(u, y) is the maximum value of the lower path integral over all piecewise linear paths fromy tou and any pathp0 as such will intersectSa(x) at some pointz and thus gives rise to a piecewise linearpathp1 from y to z and a piecewise linear pathp2 from z to u. Now for fixedy and fixedz ∈ Sa(x), themapλu.Vg(z, y) + Vg(u, z), by Proposition 4.8, satisfies

g ⊑ L(λu.Vg(z, y) + Vg(u, z))

sinceVg(z, y) is a constant andu ∈ Ba(x). Thus by Proposition 2.10 applied to the family of maps onthe right hand side of Equation (10), we haveg(u) ⊑ λu ∈ Ba(x).LVg(u, y). Sinceu ∈ Ba(x) is anarbitrary point, by lettingu = x we obtaing ⊑ LVg(·, y) and the proof is complete.

Corollary 5.17. A step functiong ∈ (U → IRn) is integrable iff it satisfies the zero-containment loop

condition.

Proof. Corollary 5.6 gives the left to right implication. In the other direction, ifg satisfies the zero-containment loop condition, then Propositions 5.15 and 5.16 imply that in any connected componentO ⊂ dom(g) the mapsVg(·, y) andWg(·, y), for anyy ∈ O, are both witness to the integrability ofg.

Corollary 5.18. The zero-containment loop condition is decidable for a basis element of(U → IRn).

Proof. This follows from Corollary 3.11 and Corollary 5.17.

We can also extend Corollary 5.17 to the following result, which can be regarded as the extension ofthe fundamental theorem of path integration to Scott continuous rectangular-valued vector fields.

Theorem 5.19. A functiong ∈ (U → IRn) is integrable iff it satisfies the zero-containment loop

condition.

Proof. The left to right direction was shown in Corollary 5.6. Suppose thatg satisfies the zero-containmentloop condition. SinceU → IR

n is a continuous Scott domain, we haveg = supi≥0 gi where(gi)i≥0 isan increasing sequence of step functions. Then by the monotonicity of line integration eachgi also sat-isfies the zero-containment loop condition and is thus integrable by Corollary 5.17. Since(gi)i≥0 is anincreasing sequence of integrable functions, by Corollary5.13 we have for any fixedy ∈ cl(O):

· · · , Vgi(·, y) ≤ Vgi+1(·, y) ≤ · · · ≤ Wgi+1

(·, y) ≤ Wgi(·, y) ≤ · · · ,

whenevery ∈ cl(dom(gi)) for i ≥ 0. Moreover, we have:

gi ⊑ LVgi(·, y) and gi ⊑ LWgi(·, y).

Let hy = supi≥0Vgi(·, y). Thenhy : O → R is real-valued and thus by Proposition 2.10, we havegi ⊑ Lhy for eachi ≥ 0. It follows thatg ⊑ Lhy and thusg is integrable.

28

6. Construction of Least and Greatest Consistency Witness

In this section, we will explicitly constructs(f, g) andt(f, g), for step functionsf ∈ (U → IR) andg ∈ (U → IR

n), which will be piecewise linear functions and would respectively be the least and thegreatest witness for consistency when(f, g) is indeed consistent. These results extend those in [14] tohigher dimensions. Letx andy be in the same connected componentO of dom(g) with O∩dom(f) 6= ∅.

Theorem 6.1. The mapsVg(·, y),Wg(·, y) : cl(O) → R are respectively the least and the greatestcontinuous mapsL,G : cl(O) → R with L(y) = 0 andG(y) = 0 such thatg ⊑ LL andg ⊑ LG.

Proof. Consider any functionF : cl(O) → R with F (y) = 0 andg ⊑ LF . By Corollary 5.7, we obtainF (x)− F (y) ≥ Vg(x, y), i.e.,F (x) ≥ Vg(x, y) for all x ∈ cl(O) → R. We conclude thatL = Vg(·, y).The case forG is similar.

Let S(f,g)(x, y) = Vg(x, y) + limf−(y).

Corollary 6.2. LetO be a connected component of dom(g) with non-empty intersection with dom(f).For x ∈ O, we have:

s(f, g)(x) = supy∈O∩dom(f)

S(f,g)(x, y). (11)

Proof. By Theorem 6.1, the maphy = λx.S(f,g)(x, y) is the least function withhy(y) = limf−(y) suchthatg ⊑ Lhy. By definition,s(f, g) is precisely the upper envelope ofhy for y ∈ O ∩ dom(f).

Proposition 6.3. LetO be a connected component of dom(g) with non-empty intersection with dom(f).There exist a finite number of pointsy0, y1, . . . , yi ∈ cl(O ∩ dom(f)) with

s(f, g)(x) = maxS(f,g)(x, yj) : j = 0, 1, . . . , i

for x ∈ O.

Proof. ConsiderO as the disjoint union of the crescents inO \ dom(f) and the intersection of crescentsof O and dom(f). For a fixedx ∈ O, consider any piecewise linear pathpy from y to x ∈ O withnodes at points in the setEO(x, y). Supposey belongs to a hyper-rectangleR of the coarser partitionHO(x). Since the integral

pyg(r) dr depends, for a fixed type ofpy, continuously ony and since, by

Lemma 5.14, it depends linearly on the coordinates ofy ∈ R, it follows that the maximum value of thepath integral will be reached fory at a corner ofR. On the other hand, for fixedx, the value ofVg(x, y)is attained by a piecewise linear pathpy from y to x with nodes at points in the setEO(x, y). Thus, themaximum value ofVg(x, y) for y ∈ R is reached fory in a corner ofR and thus some point inEO(x).Sincef− is constant in the interior of each crescent inO, it also follows that the maximum value oflimf−

in R is always attained at the corners ofR. Therefore,s(f, g)(x) = maxS(f, g)(x, y) : y ∈ EO(x)which completes the proof.

Results dual to those above are obtained fort(f, g) as follows. We putT(f,g)(x, y) = Wg(x, y) +limf+(y). Then, forx ∈ O, we have

t(f, g)(x) = infy∈O∩dom(f)

T(f,g)(x, y),

29

and there existy0, y1, . . . , yi ∈ cl(O ∩ dom(f)) with

t(f, g)(x) = minT(f,g)(x, yj) : j = 0, 1, . . . , i

We can therefore conclude:

Corollary 6.4. If O is a connected component of dom(g) with non-empty intersection with dom(f), thens(f, g) and t(f, g) are piecewise linear maps inO, which are respectively the least and the greatestconsistency witnesses inO when(f, g) is a consistent pair.

7. Concluding remarks

We have proved the decidability of consistency in the construction of the domain of real-valued multi-variable Lipschitz maps with hyper-rectangular valued L-derivative or Clarke gradient which ensuresthat this domain can be given an effective structure. We havealso extended the celebrated Gradienttheorem of differential calculus to the domain-theoretic setting in the case of Lipschitz maps with hyper-rectangular valued L-derivative and used it to obtain the least and the greatest maps that satisfy theconstraints of a consistent pair of step functions.

The question still remains if consistency is decidable for apair of rational step functions(f, g) ∈(U → IR) × (U → CR

n) and if the results on the zero-containment loop condition asa necessaryand sufficient condition for integrability, and the construction of the least and the greatest witness forconsistency can be extended from the rectangular valued derivative g : O → IR

n, to the more generalcase of compact, convex valued derivative of the formg : O → CR

n. These will be addressed in futurework.

The results in this paper lay the groundwork for developing domain-theoretic computational modelsin vector calculus, differential geometry and differential topology as well as in complex analysis, allbased on the class of locally Lipschitz maps which have appropriate closure and differential properties.

References

[1] S. Abramsky and A. Jung. Domain theory. In S. Abramsky, D.M. Gabbay, and T. S. E. Maibaum,editors,Handbook of Logic in Computer Science, volume 3. Clarendon Press, 1994.

[2] T. Apostol. Calculus, volume 2. Wiley, 1969.

[3] T. Bonnesen and W. Fenchel.Theory of Convex Bodies. BCS Associates, 1988.

[4] J. M. Borwein and W. B. Moors. Essentially smooth Lipschitz functions. Journal of FunctionalAnalysis, 149(2), 1997.

[5] J. M. Borwein, W. B. Moors, and Y. Shao. Subgradient representation of multifunctions.Journalof the Australian Mathematical Society-Series B, 40:301–313, 1998.

[6] J. M. Borwein, W. B. Moors, and X. Wang. Generalized subdifferentials: A Baire categoricalapproach.Transactions of the American Mathematical Society, 353(10), 2001.

30

[7] R. Cazacu and J. D. Lawson. Quasicontinuous functions, domains, extended calculus, and viscositysolutions.Applied General Topology, 8:1–33, 2007.

[8] F. H. Clarke.Optimization and Nonsmooth Analysis. Wiley, 1983.

[9] F. H. Clarke, Yu. S. Ledyaev, R. J. Stern, and P. R. Wolenski. Nonsmooth Analysis and ControlTheory. Springer, 1998.

[10] P. Di Gianantonio and A. Edalat. A language for differentiable functions, Fourth Workshop onFormal Topology. Available atwww.doc.ic.ac.uk/˜ae/papers/pcdf.pdf , 2012.

[11] A. Edalat. A continuous derivative for real-valued functions. In S. B. Cooper, B. Lowe, andA. Sorbi, editors,New Computational Paradigms, Changing Conceptions of Whatis Computable,pages 493–519. Springer, 2008.

[12] A. Edalat. A differential operator and weak topology for Lipschitz maps.Topology and its Appli-cations, 157,(9):1629–1650, June 2010.

[13] A. Edalat, M. Krznaric, and A. Lieutier. Domain-theoretic solution of differential equations(scalar fields). InProceedings of MFPS XIX, volume 83 ofElectronic Notes in TheoreticalComputer Science, 2003. www.entcs.org/files/mfps19/mfps19.html , full paper inwww.doc.ic.ac.uk/˜ae/papers/scalar.ps .

[14] A. Edalat and A. Lieutier. Domain theory and differential calculus (Functions of one variable).Mathematical Structures in Computer Science, 14(6):771–802, December 2004.

[15] A. Edalat and D. Pattinson. Domain theoretic solutionsof initial value problems for unboundedvector fields. In M. Escardo, editor,Proc. MFPS XXI, volume 155 ofENTCS, pages 565–581,2005.

[16] A. Edalat and D. Pattinson. Inverse and implicit functions in domain theory. In P. Panangaden,editor,Proc. 20th IEEE Symposium on Logic in Computer Science (LICS2005), pages 417–426,2005.

[17] A. Edalat and D. Pattinson. A domain theoretic account of Euler’s method for solving initial valueproblems. In J. Dongarra, K. Madsen, and J. Wasniewski, editors,Proc. PARA 2004, volume 3732of Lecture Notes in Comp. Sci., pages 112–121, 2006.

[18] A. Edalat and D. Pattinson. Denotational semantics of hybrid automata.Journal of Logic andAlgebraic Programming, 73:3–21, 2007.

[19] A. Edalat and D. Pattinson. A domain-theoretic accountof Picard’s theorem.LMS Journal ofComputation and Mathematics, 10:83–118, 2007.

[20] G. Gierz, K. H. Hofmann, K. Keimel, J. D. Lawson, M. Mislove, and D. S. Scott.ContinuousLattices and Domains. Cambridge University Press, 2003.

[21] A. Griewank and A. Walther.Evaluating Derivatives. Siam, second edition, 2008.

31

[22] W. Kaplan.Advanced Calculus. Addison-Wesley, 1991.

[23] G. Lebourg. Generic differentiability of Lipschitzian functions.Transaction of AMS, 256:125–144,1979.

[24] R. E. Moore.Interval Analysis. Prentice-Hall, Englewood Cliffs, 1966.

[25] M. B. Pour-El and J. I. Richards.Computability in Analysis and Physics. Springer-Verlag, 1988.

[26] Louis B. Rall and George F. Corliss. Automatic differentiation: Point and interval AD. In P. M.Pardalos and C. A. Floudas, editors,Encyclopedia of Optimization. Kluwer, 1999.

[27] R. Tyrrell Rockafellar.Convex Analysis. Princeton Landmarks in Mathematics. Princeton, 1997.

[28] R. Schneider.Convex bodies: the Brunn-Minkowski theory. Cambridge University Press, 1993.

[29] K. Weihrauch.Computable Analysis (An Introduction). Springer, 2000.

32