Joint work with Andre Lieutier
Dassault Systemes
Domain Theory and Differential CalculusDomain Theory and Differential Calculus
Abbas Edalat Imperial College
http://www.doc.ic.ac.uk/~ae
Oxford
17/2/2003
2
Computational Model for Classical Computational Model for Classical SpacesSpaces
• A research project since 1993: Reconstruct some basic
mathematics• Embed classical spaces into the set of
maximal elements of suitable domains
XClassical
Space
x
DXDomain
{x}
3
Computational Model for Classical Computational Model for Classical SpacesSpaces
Previous Applications:
• Fractal Geometry
• Measure & Integration Theory
• Exact Real Arithmetic
• Computational Geometry/Solid Modelling
4
Non-smooth Non-smooth MathematicsMathematics
• Set Theory• Logic• Algebra• Point-set Topology• Graph Theory• Model Theory . .
• Geometry• Differential Topology• Manifolds• Dynamical Systems• Mathematical Physics . . All based on
differential calculus
Smooth Smooth MathematicsMathematics
A Domain-Theoretic Model for A Domain-Theoretic Model for Differential CalculusDifferential Calculus
• Indefinite integral of a Scott continuous function• Derivative of a Scott continuous function• Fundamental Theorem of Calculus• Domain of C1 functions• (Domain of Ck functions)• Picard’s Theorem:
A data-type for differential equations
6
• (IR, ) is a bounded complete dcpo: ⊔iI ai = iI ai
• a ≪ b ao b• (IR, ⊑) is -continuous: Basis {[p,q] | p < q & p, q Q}• (IR, ⊑) is, thus, a continuous Scott
domain.• Scott topology has basis:
↟a = {b | a ≪ b}x {x}
R
I R
• x {x} : R IRTopological embedding
The Domain of nonempty compact Intervals of The Domain of nonempty compact Intervals of RR
7
Continuous FunctionsContinuous Functions
• f : [0,1] R, f C0[0,1], has continuous extension
If : [0,1] IR
x {f (x)}
• Scott continuous maps [0,1] IR with: f ⊑ g x R . f(x) ⊑ g(x)is another continuous Scott domain.
• : C0[0,1] ↪ ( [0,1] IR), with f Ifis a topological embedding into a proper subset of maximal elements of [0,1] IR .
8
Step FunctionsStep Functions
• a↘b : [0,1] IR, with a I[0,1], b IR:
b x ao x otherwise
• Finite lubs of consistent single step functions
⊔1in(ai ↘ bi)
with ai, bi rational intervals, give a basis for
[0,1] IR
9
Step Functions-An ExampleStep Functions-An Example
0 1
R
b1
a3
a2
a1
b3
b2
10
Refining the Step FunctionsRefining the Step Functions
0 1
R
b1
a3
a2
a1
b3
b2
11
Operations in Interval ArithmeticOperations in Interval Arithmetic
• For a = [a, a] IR, b = [b, b] IR,and * { +, –, } we have:
a * b = { x*y | x a, y b }
For example:• a + b = [ a + b, a + b]
12
• Intuitively, we expect f to satisfy:
• What is the indefinite integral of a single step function a↘b ?
The Basic ConstructionThe Basic Construction
• Classically, with }|{ RaaFf fF '
• We expect a↘b ([0,1] IR)
• For what f C1[0,1], should we have If a↘b ?
b(x)' fb .ax o
13
Interval DerivativeInterval Derivative
• Assume f C1[0,1], a I[0,1], b IR.
• Suppose x ao . b f (x) b.
• We think of [b, b] as an interval derivative for f at a.
• Note that x ao . b f (x) b
iff x1, x2 ao & x1 > x2 ,
b(x1 – x2) f(x1) – f(x2) b(x1 – x2), i.e.
b(x1 – x2) ⊑ {f(x1) – f(x2)} = {f(x1)} – {f(x2)}
14
Definition of Interval DerivativeDefinition of Interval Derivative
• f ([0,1] IR) has an interval derivativeb IR at a I[0,1] if x1, x2 ao,
b(x1 – x2) ⊑ f(x1) – f(x2).
• Proposition. For f: [0,1] IR, we have f (a,b)
iff f(x) Maximal (IR) for x ao , and Graph(f) is
within lines of slopeb & b at each point (x, f(x)), x ao.
(x, f(x))
b
b
a
Graph(f).
• The tie of a with b, is (a,b) := { f | x1,x2 ao. b(x1 – x2) ⊑ f(x1) – f(x2)}
15
Let f C1[0,1]; the following are equivalent: • If (a,b)x ao . b f (x) bx1,x2 [0,1], x1,x2 ao.
b(x1 – x2) ⊑ If (x1) – If (x2)
• a↘b ⊑ If
For Classical FunctionsFor Classical Functions
Thus, (a,b) is our candidate for a↘b .
16
(a1,b1) (a2,b2) iff a2 ⊑ a1 & b1 ⊑ b2
ni=1 (ai,bi) iff {ai↘bi | 1 i n}
consistent.
iI (ai,bi) iff {ai↘bi | iI }
consistent iff J finite I iJ (ai,bi)
• In fact, (a,b) behaves like a↘b; we call (a,b) a single-step tie.
Properties of TiesProperties of Ties
17
The Indefinite IntegralThe Indefinite Integral
: ([0,1] IR) (P([0,1] IR), ) ( P the power set)
a↘b := (a,b)
⊔i I ai ↘ bi := iI (ai,bi)
is well-defined and Scott continuous.• But unlike the classical case, is not 1-1.
18
ExampleExample
([0,1/2] {0})↘ ([1/2,1] {0}) ([0,1] [0,1]) ↘ ↘⊔ ⊔=
([0,1/2] , {0}) ([1/2,1] {0}) ↘ ([0,1] [0,1]) ↘
=
([0,1] , {0}) =
[0,1] {0}↘
19
The Derivative OperatorThe Derivative Operator
• : (I[0,1] IR) (I[0,1] IR)
is monotone but not continuous. Note that the classical operator is not continuous either.
• (a↘b)= x .
• is not linear! For f : x x : I[0,1] IR g : x –x : I[0,1] IR
(f+g) + = x . (1 – 1) = x . 0dx
d
dx
d
dx
df f
dx
d
dx
df
dx
dg
dx
d
20
The DerivativeThe Derivative
• Definition. Given f : [0,1] IR the derivative of f is:
: [0,1] IR
= ⊔ {a↘b | f (a,b) }dx
dfdx
df
• Theorem. (Compare with the classical case.)
• is well–defined & Scott continuous.dx
df
'f Idx
If d
dx
df•If f C1[0,1], then • f (a,b) iff a↘b ⊑
21
ExamplesExamples
0 ]1,1[
0 fI x
IRR:dx
If d
RR:)sin(:f 12
x
x
xxx
0
0 fI x
IRR:dx
If d
RR:)sin(:f 1
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
22
Domain of Ties, or Indefinite Integrals Domain of Ties, or Indefinite Integrals
• Recall : ([0,1] IR) (P([0,1] IR), )
• Let T[0,1] = Image ( ), i.e. T[0,1] iff
x is the nonempty intersection of a family of single ties:
= iI (ai,bi)
• Domain of ties: ( T[0,1] , )
• Theorem. ( T[0,1] , ) is a continuous Scott domain.
23
• Define : (T[0,1] , ) ([0,1] IR)
∆ ⊓ { | f ∆ }
dx
d
dx
df
The Fundamental Theorem of CalculusThe Fundamental Theorem of Calculus
• Theorem. : (T[0,1] , ) ([0,1] IR)
is upper adjoint to : ([0,1] IR) (T[0,1] , )
In fact, Id = ° and Id ⊑ ° dx
d
dx
d
dx
d
24
Fundamental Theorem of CalculusFundamental Theorem of Calculus
• For f, g C1[0,1], let f ~ g if f = g + r, for some r R.
• We have:
x.{f(x)}
f
R}c|cg(x)}.{{
g
x
~]1,0[1C ]1,0[0C
x
dx
d≡
IR]1,0[ T[0,1]
dx
d
25
F.T. of Calculus: Isomorphic versionF.T. of Calculus: Isomorphic version
• For f , g [0,1] IR, let f ≈ g if f = g a.e.
• We then have:
x.{f(x)}
f
R}c|cg(x)}.{{
g
x
~]1,0[1C ]1,0[0C
x
dx
d≡
IR)/]1,0([T[0,1]
dx
d≡
26
A Domain for A Domain for CC11 Functions Functions
• If h C1[0,1] , then ( Ih , Ih ) ([0,1] IR) ([0,1] IR)
• What pairs ( f, g) ([0,1] IR)2 approximate a differentiable function?
• We can approximate ( Ih, Ih ) in ([0,1] IR)2
i.e. ( f, g) ⊑ ( Ih ,Ih ) with f ⊑ Ih and g ⊑ Ih
27
• Proposition (f,g) Cons iff there is a continuous h: dom(g) R
with f Ih ⊑ and g ⊑ .
dx
Ih d
Function and Derivative ConsistencyFunction and Derivative Consistency
• Define the consistency relation:Cons ([0,1] IR) ([0,1] IR) with(f,g) Cons if (f) ( g)
• In fact, if (f,g) Cons, there are always a least and a greatest functions h with the above properties.
28
Approximating function: f = ⊔i ai↘bi
• (⊔i ai↘bi, ⊔j cj↘dj) Cons is a finitary property:
Consistency for basis elementsConsistency for basis elements
L(f,g) = least function
G(f,g)= greatest function
• (f,g) Cons iff L(f,g) G(f,g) . Cons is decidable on the basis.• Up(f,g) := (fg , g) where fg : t [ L(f,g)(t) , G(f,g)(t) ]
fg(t)
t
Approximating derivative: g = ⊔j cj↘dj
29
• Lemma. Cons ([0,1] IR)2 is Scott closed.
• Theorem.D1 [0,1]:= { (f,g) ([0,1]IR)2 | (f,g) Cons}is a continuous Scott domain, which can be given an effective structure.
The Domain of The Domain of CC11 FunctionsFunctions
• Define D1c := {(f0,f1) C1C0 | f0 = f1 }
• Theorem. : C1[0,1] C0[0,1] ([0,1] IR)2
restricts to give a topological embedding D1
c ↪ D1
(with C1 norm) (with Scott topology)
30
Higher Interval DerivativeHigher Interval Derivative
• Proposition. For f C2[0,1], the following are equivalent: • If 2(a,b)x a0. b f (x) bx1,x2 a0. b (x1 – x2) ⊑ If (x1) – If (x2)
• a↘b ⊑ If
• Let 1(a,b) = (a,b)
• Definition. (the second tie) f 2(a,b) P([0,1] IR) if 1(a,b)
• Note the recursive definition, which can be extended to higher derivatives.
dx
df
31
Higher Derivative and Indefinite Higher Derivative and Indefinite Integral Integral
• For f : [0,1] IR we define:
: [0,1] IR by
• Then = ⊔f 2(a,b) a↘b
: ([0,1] IR) (P([0,1] IR), ) a↘b := (a,b)
⊔i I ai ↘ bi := iI (ai,bi)
is well-defined and Scott continuous.
2
2
dx
fd
dx
df
dx
d
dx
fd2
2
2
2
dx
fd
2(2)
(2)
(2)
(2)2
32
Domains of Domains of C C 22 functionsfunctions
• D2c := {(f0,f1,f2) C2C1C0 | f0 = f1, f1 = f2}
• Theorem. restricts to give a topological embedding D2
c ↪ D2
• Define Cons (f0,f1,f2) iff f0 f1 f2 (2)
Theorem. Cons (f0,f1,f2) is decidable on basis elements.
(The present algorithm to check is NP-hard.)
• D2 := { (f0,f1,f2) (I[0,1]IR)3 | Cons (f0,f1,f2) }
33
Domains of Domains of C C kk functionsfunctions
• Dk := { (fi)0ik (I[0,1]IR)k+1 | Cons (fi)0ik }
• D := { (fk)k0 ( I[0,1]IR)ω | k0. (fi)0ik Dk }∞
(i)• Let (fi)0ik (I[0,1]IR)k+1
Define Cons (fi)0ik iff 0ik fi
• The decidability of Cons on basis elements for k 3 is an
open question.
34
• Theorem. There exists a neighbourhood of t0 where there is a unique solution, the fixed point of:
P: C0 [t0-k , t0+k] C0 [t0-k , t0+k]
f t . (x0 + F(t , f(t) ) dt)
for some k>0 .
t0
t
Picard’s TheoremPicard’s Theorem
• = F(t,x) with F: R2 R
x(t0) = x0 with (t0,x0) R2
where F is Lipschitz in x uniformly in t for some neighbourhood of (t0,x0).
dt
dx
35
• Up⃘�ApF: (f,g) (t . (x0 + g dt , t . F(t,f(t)))
has a fixed point (f,g) with f = g = t . F(t,f(t))
t
t0
Picard’s Solution ReformulatedPicard’s Solution Reformulated
• Up: (f,g) ( t . (x0 + g(t) dt) , g )t
t0
• P: f t . (x0 + F(t , f(t)) dt)
can be considered as upgrading the information about the function f and the information about its derivative g.
t
t0
• ApF: (f,g) (f , t. F(t,f(t)))
36
• We now have the basic framework to obtain Picard’s theorem with domain theory.
• However, we have to make sure that derivative updating preserves consistency.
• Say (f , g) is strongly consistent, (f , g) S-Cons, if h ⊒ g. (f , h) Cons
• On basis elements, strong consistency is decidable.
A domain-theoretic Picard’s theoremA domain-theoretic Picard’s theorem
37
A domain-theoretic Picard’s theoremA domain-theoretic Picard’s theorem
• Let F : [0,1] IR IR and
ApF : ([0,1] IR)2 ([0,1] IR)2
(f,g) ( f , F (. , f ) )
Up : ([0,1] IR)2 ([0,1] IR)2 Up(f,g) = (fg , g) where fg (t) = [ L (f,g) (t) , G (f,g) (t) ]
• Consider any initial value f [0,1] IR with
(f, F (. , f ) ) S-Cons
• Then the continuous map P = Up � ApF has a least fixed point above (f, F (. , f ))
• Theorem. If F = Ih for a map h : [0,1] R R which satisfies the Lipschitz property of Picard’s theorem, then the domain-theoretic solution coincides with the classical solution.
38
ExampleExample
1
f
g
1
1
1
F
F is approximated by a sequence of step functions, F1, F2, …
F = ⊔i Fi
We solve: = F(t,x), x(t0) =x0
for t [0,1] with
F(t,x) = t and t0=1/2, x0=9/8.
dt
dx
a3
b3
a2
b2
a1
b1
F3
F2
F1
The initial condition is approximated by rectangles aibi:
{(1/2,9/8)} = ⊔i aibi,
t
t
.
39
SolutionSolution
1
f
g
1
1
1
At each stage we find Li and Gi
.
40
SolutionSolution
1
f
g
1
1
1 .
At each stage we find Li and Gi
41
SolutionSolution
1
f
g
1
1
1 Li and Gi tend to
the exact solution:f: t t2/2 + 1
.
At each stage we find Li and Gi
42
Further WorkFurther Work
• Solving Differential Equations with Domains
• Differential Calculus with Several Variables
• Implicit and Inverse Function Theorems
• Reconstruct Geometry and Smooth Mathematics with Domain Theory
• Continuous processes, robotics,…
43
THE ENDTHE END
http://www.doc.ic.ac.uk/~aehttp://www.doc.ic.ac.uk/~ae
44
45
Higher Interval DerivativeHigher Interval Derivative
• Proposition. For f C2[0,1], the following are equivalent: • If 2(a,b)x a0. b f (x) bx1,x2 ≫ a. b (x1 – x2) ⊑ If (x1) – If (x2)
• a↘b ⊑ If
• Let 1(a,b) = (a,b)
• Definition. (the second tie) f 2(a,b) P(I[0,1] IR) if 1(a,b)
• Note the recursive definition, which can be extended to higher derivatives.
dx
df
46
Higher Interval DerivativeHigher Interval Derivative
• For f : I[0,1] IR we define:
: I[0,1] IR by
• Then = ⊔f 2(a,b) a↘b
: (I[0,1] IR) (P(I[0,1] IR), ) a↘b := (a,b)
2
2
dx
fd
dx
df
dx
d
dx
fd2
2
2
2
dx
fd
2(2)
(2)
47
Domains of Domains of C C 22and and C C kk functionsfunctions
• D2c := {(f0,f1,f2) C2C1C0 | f0 = f1, f1 = f2}
• Theorem. restricts to give a topological embedding D2
c ↪ D2
• Dk := { (fi)0ik (I[0,1]IR)k+1 | 0ik fi }(i)
• D := { (fk)k0 ( I[0,1]IR) | k0. fk Dk }∞
• D2 := { (f0,f1,f2) (I[0,1]IR)3 | f0 f1 f2 }(2)
48
Consistency Test for Consistency Test for (f,g)(f,g)
yxduug
xyduug
yxdx
y
x
y
)(
)(
),(
yxduug
xyduug
yxdx
y
x
y
)(
)(
),(
• Also define: L(x) := supyODom(f)(f –(y) + d–+(x,y)) and G(x) := infyODom(f)(f +(y) + d+–(x,y))
• For x Dom(g), let g({x})=[g (x),g+(x)] where g ,g+: Dom(g) R are semi-continuous functions.
Similarly we define f , f+: Dom(f) R. • Let O be a connected component of Dom(g) with
O Dom(f) . For x , y O define:
49
• Theorem. (f, g) Con iff x O. L(x) G(x). For (f, g) = (⊔1in ai↘bi, ⊔1jm cj↘dj)
the rational end–points of ai and cj induce a partition X = {x0 < x1 < x2 < … < xk} of O.
• Proposition. For arbitrary x O, there isp, where 0 p k, with: L(x) = f –(xp) + d–+(x,xp).
• Similarly for G(x).
Consistency TestConsistency Test