Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with...

44
Domain Theory and Multi-Variable Domain Theory and Multi-Variable Calculus Calculus Abbas Edalat Imperial College London www.doc.ic.ac.uk/~ae Joint work with Andre Lieutier, Dirk Pattinson

Transcript of Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with...

Page 1: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

Domain Theory and Multi-Variable Domain Theory and Multi-Variable CalculusCalculus

Abbas EdalatImperial College London

www.doc.ic.ac.uk/~aeJoint work with Andre Lieutier, Dirk Pattinson

Page 2: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

2

Computational Model for Classical Computational Model for Classical SpacesSpaces

XClassical Space

x

DXDomain

{x}

• A research project since 1993:Reconstruct basic mathematical analysis

• Embed classical spaces into the set of maximal elements of suitable domains

Page 3: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

3

Computational Model for Classical Computational Model for Classical SpacesSpaces

• Other Applications:

Fractal Geometry

Measure & Integration Theory

Topological Representation of Spaces

Exact Real Arithmetic

Computational Geometry and Solid Modelling

Quantum Computation

Page 4: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

4

A Domain-Theoretic Model for A Domain-Theoretic Model for Differential CalculusDifferential Calculus

• Overall Aim: Synthesize Computer Science with Differential Calculus

• Plan of the talk:1. Primitives of continuous interval-valued function in Rn

2. Derivative of a continuous function in Rn

3. Fundamental Theorem of Calculus for interval-valued functions in Rn

4. Domain of C1 functions in Rn

5. Inverse and implicit functions in domain theory

Page 5: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

5

Continuous Scott DomainsContinuous Scott Domains

• A directed complete partial order (dcpo) is a poset (A, ⊑) , in which every directed set {ai | iI } A has a sup or lub ⊔iI ai

• The way-below relation in a dcpo is defined by:a ≪ b iff for all directed subsets {ai | iI }, the relation b ⊑⊔iI ai implies that there exists i I such that a ⊑ ai

• If a ≪ b then a gives a finitary approximation to b

• B A is a basis if for each a A , {b B | b ≪ a } is directed with lub a

• A dcpo is (-)continuous if it has a (countable) basis

• A dcpo is bounded complete if every bounded subset has a lub

• A continuous Scott Domain is an -continuous bounded complete dcpo

Page 6: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

6

Continuous functionsContinuous functions

• The Scott topology of a dcpo has as closed subsets downward closed subsets that are closed under the lub of directed subsets, usually only T0.

• Fact. The Scott topology on a continuous dcpo A with basis B has basic open sets {a A | b ≪ a } for each b B.

Page 7: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

7

• Let IR={ [a,b] | a, b R} {R}

• (IR, ) is a bounded complete dcpo with R as bottom: ⊔iI ai = iI ai

• a ≪ b ao b

• (IR, ⊑) is -continuous:countable basis {[p,q] | p < q & p, q Q}

• (IR, ⊑) is, thus, a continuous Scott domain.

• Scott topology has basis:↟a = {b | ao b} x {x}

R

I R

• x {x} : R IRTopological embedding

The Domain of nonempty compact The Domain of nonempty compact Intervals of Intervals of RR

Page 8: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

8

Continuous FunctionsContinuous Functions

• Scott continuous f:[0,1]n IR is given by lower and upper semi-continuous functions f -, f +:[0,1]n R with f(x)=[f -(x),f +(x)]

• f : [0,1]n R, f C0[0,1]n, has continuous extension If : [0,1]n IR x {f (x)}

• Scott continuous maps [0,1]n IR with: f ⊑ g x R . f(x) ⊑ g(x)is another continuous Scott domain.

• : C0[0,1]n ↪ ( [0,1]n IR), with f Ifis a topological embedding into a proper subset of maximal elements of [0,1]n IR .

• We identify x and {x}, also f and If

Page 9: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

9

Step FunctionsStep Functions• Single-step function:

a↘b : [0,1]n IR, with a I[0,1]n, b=[b-,b+] IR:

b x ao x otherwise

• Lubs of finite and bounded collections of single- step functions ⊔1in(ai ↘ bi) are called step functions.

• Step functions with ai, bi rational intervals, give a basis for [0,1]n IR. They are used to approximate C0 functions.

Page 10: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

10

Step Functions-An Example in RStep Functions-An Example in R

0 1

R

b1

a3

a2

a1

b3

b2

Page 11: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

11

Refining the Step FunctionsRefining the Step Functions

0 1

R

b1

a3

a2

a1

b3

b2

Page 12: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

12

Interval Lipschitz constant in dimension Interval Lipschitz constant in dimension oneone• For f ([0,1] IR) we have:

x1, x2 ao, b(x1 – x2) ⊑ f(x1) – f(x2) iff for all x2x1

• b- (x1 – x2) f(x1) – f(x2) b+(x1 – x2) iff

• Graph(f) is within lines of slope b- & b+ at each point (x, f(x)), x ao.

(x, f(x)) b+

a

Graph(f).b-

Page 13: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

13

Functions of several varibalesFunctions of several varibales

• (IR)1× n row n-vectors with entries in IR

• For dcpo A, let (An)s = smash product of n copies of A:x(An)s if x=(x1,…..xn) with xi non-bottom for all i or x=bottom

• Interval Lipschitz constants of real-valued functions in Rn take values in (IR1× n)s

Page 14: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

14

Interval Lipschitz constant in R Interval Lipschitz constant in R n n

• f ([0,1]n IR) has an interval Lipschitz constantb (IR1xn)s in a I[0,1]n if x, y ao,

b(x – y) ⊑ f(x) – f(y).

• Proposition. If f(a,b), then f(x) Maximal (IR) for x ao and

for all x,y ao. |f(x)-f(y)| k ||x-y|| with k=max i (|bi+|, |bi

-|)

• The tie of a with b, is

(a,b) := { f | x,y ao. b(x – y) ⊑ f(x) – f(y)}

Page 15: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

15

Let f C1[0,1]n; the following are equivalent:

• f (a,b)x ao . b- f ´(x) b+

x,y ao , b(x – y) ⊑ f (x) – f (y)

• a↘b ⊑ f ´

For Classical FunctionsFor Classical Functions

Thus, (a,b) is our candidate for a↘b .

Page 16: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

16

Set of primitive mapsSet of primitive maps

: ([0,1]n IR) (P([0,1]n (IR1xn)s), ) ( P the power set constructor)

a↘b := (a,b)

⊔i I ai ↘ bi := iI (ai,bi)

is well-defined and Scott continuous. g can be the empty set for 2 n

Eg. g=(g1,g2), with g1(x , y)= y , g2(x , y)=0

Page 17: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

17

The DerivativeThe Derivative

• Definition. Given f : [0,1]n IR the derivative of f is:

: [0,1]n (IR1xn)s

= ⊔ {a↘b | f (a,b) }dx

dfdx

df

• Theorem. (Compare with the classical case.)

• is well–defined & Scott continuous.dx

df

dx

df

• If f C1[0,1], then

• f (a,b) iff a↘b ⊑

' fdx

df

Page 18: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

18

ExamplesExamples

0 ]1,1[

0 fI x

IRR:dx

If d

RR:)sin(:f 12

x

x

xxx

|| xx

x

x

x

xx

xx

0 {1}

0 ]1,1[

0 x}1{

x

IRR:dx

If d

IRR:|}{|:If

RR|:|:f

Page 19: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

19

Relation with Clarke’s gradientRelation with Clarke’s gradient

• For a locally Lipschitz f : [0,1]n R

• ∂ f (x) := convex-hull{ lim mf ´(xm) | x mx}

• It is a non-empty compact convex subset of Rn

• Theorem:• For locally Lipschitz f : [0,1]n R • The domain-theoretic derivative at x is the smallest

n-dimensional rectangle with sides parallel to the coordinate planes that contains ∂ f (x)

• In dimension one, the two notions coincide.

Page 20: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

20

In dimension twoIn dimension two

• f: R2R with f(x1, x2) = max ( min (x1, x2) , x2-x1 )

x2=x1/2

x2=x1x2=2x1

(1,0)

(0, -1)

(-1,1)

([-1,1],[-1,1])

r=([-1,0],[-1,1])

s=([0,1],[-1,0])t=([-1,1],[0,1])∂ f (0)=

convex((-1,1),(-1,0),(01))

Page 21: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

21

Fundamental Theorem of CalculusFundamental Theorem of Calculus

• f g iff g ⊑ (interval version) dx

df

dx

df

• If gC0 then f g iff g = (classical version)

Page 22: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

22

• If h C1[0,1]n , then ( h , h´ ) ([0,1]n IR) ([0,1]n IR)n

s

Idea of Domain for Idea of Domain for CC11 Functions Functions

• What pairs ( f, g) ([0,1]n IR) ([0,1]n IR)ns

approximate a differentiable function?

• We can approximate ( h, h´ ) in ([0,1]n IR) ([0,1]n IR)n

s

i.e. ( f, g) ⊑ ( h ,h´ ) with f ⊑ h and g ⊑h´

Page 23: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

23

Function and Derivative ConsistencyFunction and Derivative Consistency

• Define the consistency relation:Cons ([0,1]n IR) ([0,1]n IR)n

s with(f,g) Cons if (f) ( g)

• In fact, if (f,g) Cons, there are least and greatest functions h with the above properties in each connected component of dom(g) which intersects dom(f) .

• Proposition (f,g) Cons iff there is a continuous h: dom(g) R with f h ⊑ and g .⊑ dx

dh

Page 24: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

24

Approximating function: f = ⊔i ai↘bi

• (⊔i ai↘bi, ⊔j cj↘dj) Cons is a finitary property:

Consistency in dimension oneConsistency in dimension one

s(f,g) = least function

t(f,g)= greatest function

Approximating derivative: g = ⊔j cj↘dj

Page 25: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

25

f

1

1

Function and Derivative Function and Derivative Information Information

g

1

2

Page 26: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

26

f

1

1

Least and greatest functionsLeast and greatest functions

g

1

2

Page 27: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

27

Solving Initial Value ProblemsSolving Initial Value Problems

1

f

g

1

1

1

v

v is approximated by a sequence of step functions, v0, v1, …

v = ⊔i vi

We solve: = v(t,x), x(t0) =x0

for t [0,1] with

v(t,x) = t and t0=1/2, x0=9/8.

dt

dx

a3

b3

a2

b2

a1

b1

v3

v2

v1

The initial condition is approximated by rectangles aibi:

{(1/2,9/8)} = ⊔i aibi,

t

t

.

Page 28: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

28

SolutionSolution

1

f

g

1

1

1.

Page 29: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

29

SolutionSolution

1

f

g

1

1

1 .

Page 30: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

30

SolutionSolution

1

f

g

1

1

1 .

Page 31: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

31

• Definition. g:[0,1]n (IRn)s the domain of g is dom(g) = {x | g(x) non-bottom}

• Basis element: (f, g1,g2,….,gn) ([0,1]n IR) ([0,1]n IR)ns

• Each f, gi :[0,1]n IR is a rational step function.

• dom(g) is partitioned by disjoint crescents (intersection of closed and open sets) in each of which g is a constant rational interval.

Eg. For n=2:A step function gi with four single stepfunctions with two horizontal and twovertical rectangles as their domainsand a hole inside, and with eight vertices.

Basis of Basis of ([0,1]([0,1]n n IR) IR) ([0,1] ([0,1]n n IR) IR)nnss

[-2,2]

[-2,2]

[-3,3][-1,1]

Page 32: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

32

Decidability of ConsistencyDecidability of Consistency

• (f,g) Cons if (f) ( g) • First we check if g is integrable, i.e. if g • In classical calculus, g:[0,1]n Rn will be integrable

by Green’s theorem iff for any piecewise smooth closed non-intersecting path

• p:[0,1] [0,1]n with p(0)=p(1)

0dt (t)p'g(p(t))1

0

• We generalize this to type g:[0,1]n (IRn)s

Page 33: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

33

Interval-valued path integralInterval-valued path integral

• For vIRn , uRn define the interval-valued scalar product

1. vand ]v,[vv},{-,0, sign(r)σ(r) where

uvu)(v and uvu)(v

with]u)(v,u)[(vv}w|u{w:uv

0

n

1ii

)σ(ui

n

1ii

)σ(-ui

-

-

ii

dt(t))p' (g(p(t))gdt Uanddt (t))p' (g(p(t))gdtL

with]gdtU,gdt[Lgdt

i.e. (t)dt,p'g(p(t)):gdt

1

0p

-1

0p

ppp

1

0p

Page 34: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

34

Generalized Green’s TheoremGeneralized Green’s Theorem

• Definition. g:[0,1]n (IRn)s the domain of g is dom(g) = {x | g(x) non-bottom}

• Theorem. g iff for any piecewise smooth non-intersecting path p:[0,1] dom(g) with p(0)=p(1), we have zero-containment:

1

0(t)dtp'g(p(t))0

• We can replace piecewise smooth with piecewise linear.

• For step functions, the lower and upper path integrals will depend linearly on the nodes of the path, so their extreme values will be reached when these nodes are at the corners of dom(g).

• Since there are finitely many of these extreme paths, zero containment can be decided in finite time for all paths.

Page 35: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

35

Locally minimal pathsLocally minimal paths

• Definition. Given x,ydom(g), a non-self-intersecting pathp:[0,1] closure(dom(g)) with p(0)=y and p(1)=x islocally minimal if its length is minimal in its homotopicclass of paths from y to x.

y.

.x

Page 36: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

36

Minimal surface Minimal surface

• Step function g:[0,1]n (IRn)s . Let O be a component of dom(g) . Let x,yclosure(O).

• Consider the following supremum over all piecewise linear paths p in closure(O) with p(0 )= y and p(1)= x.

1

0pg (t)dt}p'g(p(t)){Lsupy)(x,V

• Theorem. If g satisfies the zero-containment condition, then there is a non-self-intersecting locally minimal piecewise linear path p with

1

0g (t)dtp'g(p(t))Ly)(x,V

• For fixed y, the map Vg (. ,y): cl(O) R is a rational piecewise linear function.

• It is the least continuous function or surface with:

dx

)(.,dVg y• Vg (y ,y)=0 and g ⊑

Page 37: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

37

Maximal surface Maximal surface

• Step function g:[0,1]n (IRn)s . Let O be a component of dom(g) . Let x,ycl(O).

• Consider the following infimum over all piecewise linear paths p in cl(O) with p(0 )= y and p(1)= x.

1

0pg (t)dt}p'g(p(t)){Uinfy)(x,W

• Theorem. If g satisfies the zero-containment condition, then there is a non-self- intersecting locally minimal piecewise linear path q with

1

0g (t)dtq'g(q(t))Uy)(x,W

• For fixed y, the map Wg (. ,y): cl(O) R is a rational piecewise linear function.

• It is the greatest continuous function or surface with:

• Wg (y ,y)=0 and g ⊑

dx

)(.,dWg y

Page 38: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

38

Minimal surface for (f,g)Minimal surface for (f,g)

• (f,g)([0,1]n IR) ([0,1]n IR)ns rational step function

• Assume we have determined that g

dom(g)in x of component theOwith

}O y |y)(x,{S supg)(x)s(f,

x

xg)(f,

dx

g)ds(f,• Theorem. s(f,g): dom(g) R is the least continuous function

with f - s(f,g) and g ⊑

• Proposition. )}O vertices(y |y)(x,{Smax g)(x)s(f, xg)(f,

and (y)fy)(x,Vy)(x,S gg)(f,

• Put

Page 39: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

39

Maximal surface for (f,g)Maximal surface for (f,g)

dx

g)dt(f,

and (y)fy)(x,Wy)(x,T gg)(f,

}O y |y)(x,{T infg)(x)t(f, xg)(f,

Theorem. t(f,g): dom(g) R is the least continuous function with

t(f,g) f + and g ⊑

)}O vertices(y |y)(x,{T infg)(x)t(f, xg)(f,

Page 40: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

40

Decidability of ConsistencyDecidability of Consistency

• Theorem. Consistency is decidable.

Proof: In s(f,g)t(f,g) we compare two rational piecewise-linear surfaces, which is decidable.

Page 41: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

41

The Domain of The Domain of CC11 FunctionsFunctions

• Lemma. Cons ([0,1]n IR) ([0,1]n IR)ns is Scott closed.

• Theorem.D1 [0,1]n:= { (f,g) | (f,g) Cons} is a continuous Scott domain that can be given an effective structure.

• Theorem. : C0[0,1]n D1 [0,1]n

f (f , ) is topological embedding into maximal

elements of D1 , giving a computational model for continuous functions and their differential properties.

dx

df

Page 42: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

42

Inverse and Implicit Function Inverse and Implicit Function theoremstheorems

• Definition. Given f:[-1,1]nRn the mean derivative at x0 is the linear map represented by the matrix M with

Mij=

• Theorem. Let f:[-1,1]nRn such that the mean derivative M of

f at 0 is invertible with || M-1 -I ||<1/n. Then:

1. The map f has a Lipschitz inverse in a neighbourhood of 0 .2. Given an increasing sequence of step functions converging to f we

can effectively obtain an increasing sequence of step functions converging to f-1

3. If f is C1 and given also an increasing sequence of step functions converging to f ´we can also effectively obtain an increasing sequence of step functions converging to (f-1)'

(0)dx

df

]))(xdx

df())(x

dx

df[(

2

1ij0ij0

Page 43: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

43

Further WorkFurther Work

• A robust CAD• PDE’s• Differential Topology• Differential Geometry

Page 44: Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London ae Joint work with Andre Lieutier, Dirk Pattinson.

http://www.doc.ic.ac.uk/~ae

THE ENDTHE END