A New Foundation for Computational Geometry and Solid

Download Report

Transcript A New Foundation for Computational Geometry and Solid

Interval Derivative of Functions
Abbas Edalat
Imperial College London
www.doc.ic.ac.uk/~ae
The Classical Derivative
• Let f: [a,b]  R be a real-valued function.
The derivative of f at x is defined as
f(x) f(y)
f ' (x)  limyx
xy
when the limit exists (Cauchy 1821).
• If the derivative exists at x then f is continuous at x.
• However, a continuous function may not be differentiable at a point
x and there are indeed continuous functions which are nowhere
differentiable, the first constructed by Weierstrass:

f (x)   b n cos (a n π x ) with 0 <b< 1 and a an odd positive integer.
n 0
Non Continuity of the Derivative
• The derivative of f may exist in a neighbourhood O of x but
the function
f ': O  R
may be discontinuous at x,
f : x  x2 sin x 1
e.g.
with f(0)=0
we have:
f ' (0)  0
f ' (x)  2 x sin x1  cos x 1 (x  0)
limx 0 f ' (x)  f ' (0)
3
A Continuous Derivative for Functions?
• A computable function needs to be
continuous with respect to the topology
used for approximation.
• Can we define a notion of a derivative for
real valued functions which is continuous
with respect to a reasonable topology for
these functions?
4
Dini’s Four Derivates of a Function (1890)
• Upper right derivate at x
• Upper left derivate at x
• Lower right derivate at x
• Lower left derivate at x
f(x) f(y)
D (f)(x) : lim yx 
xy
f(x) f(y)
u
D (f)(x) : lim yx 
xy
f(x) f(y)
l
D (f)(x) : lim yx 
xy
f(x) f(y)
l
D (f)(x) : lim yx 
x y
u
• Clearly, f is differentiable at x iff its four derivates are equal,
the common value will then be the derivative of f at x.
5
Example
2x sin x1

f : x  0
x sin x1

x 0
x 0
0x
1
f(0) f(y) f(y) 
2 sin y


1
0y
y

 sin y
y0
0y
D u  (f)(0)  1
D u  (f)(0)   2
D l  (f)(0)  1
D l  (f)(0)  2
6
Interval Derivative
• Put
f(x) f(y)
D (f)(x) : lim yx
 max ( D u  (f)(x), D u  (f)(x))
xy
f(x) f(y)
l
D (f)(x) : lim yx
 min ( Dl  (f)(x), Dl  (f)(x))
xy
u
• Let IR={ [a,b] | a, b  R}  {R} and consider (IR, ) with R
as bottom.
• The interval derivative of f: [c,d]  R is defined as
df
: [c, d]  IR
dx
df [ lim yx Dl (f)(x), lim yx D u (f)(x)]

dx 

if both limits are finite
otherwise
7
Example
f : x  x2 sin x 1
with f(0)=0
• We have already seen that
f ' (0)  0
f ' (x)  2 x sin x1  cos x1 (x  0)
• We have
Du (f)(x)  Dl (f)(x)  f ' (x)
(x  0)
• Thus
df
(0)  [ lim x 0 Dl (f)(x), lim x 0 D u (f)(x)]
dx
 [ lim x 0f ' (x) , lim x 0f ' (x) ]  [1,1]
8
Interval-Limit of Functions
• Let A  R and f : A  R be any extended real-valued function.
• Then
•
lim f : A  R
lim f : A  R
The interval limit of f is defined as
int - lim(f): A  IR
 
if lim f or lim f is not finiteat x
x
otherwise
[ lim f(x), lim f(x)]
9
Examples
f : [1,0) (0,1] R
int - lim(f): [1,1] IR
  1 if x  0
x 
1 if x  0
 {1} if x  0

x   {1} if x  0
[1,1] if x  0

g : (,0)  (0,)  R
1
x  sin x
int - lim(g): R  IR
{sin x1} if x  0
x 
[1,1] if x  0
10
Interval-limit of Interval-valued Functions
 
A

R
f
, f : A  R be extended real-valued functions
• Let
and


with f  f .
• Consider the interval-valued function f  [f  , f  ] : A  IR
[f  (x),f  (x)] if f  (x) , f  (x) are finite
f(x) 

otherwise

•
The interval-limit of f is now defined as
int - lim(f): A  IR
 
lim f  or lim f  are not finiteat x
x


[
lim
f
(x)
,
lim
f
(x)]
otherwise

11
Continuity of the Interval Derivative
•
Theorem. Given any
the interval limit
•
f :AR
or f  [f - , f  ] : A  R
int - lim(f): A  IR is Scott continuous.
Corollary. The interval derivative of f: [c,d]  R
df
df
: [c, d]  IR
 int - lim( [ Dl (f) , D u (f) ])
dx
dx
is Scott continuous.
12
Computational Content of the Interval Derivative
• Definition. (AE/AL in LICS’02) We say f: [c,d]  R has interval
Lipschitz constant b  [b , b] in an open interval a  [c, d] if
x, y  a  , y  x. b(x  y)  f(x) f(y)  b(x  y)
The set of all functions with interval Lipschitz constant b at a is
called the tie of a with b and is denoted by δ(a,b) .
• Recall the definition of single-step function
a  b : [c,d]  IR with
b
if x  a 
x 
  otherwise
• Theorem. For f: [c,d]  R we have:
df
df
 sup{a  b | f  δ(a, b)} , thus
( y)   {b | y  a  & f  δ(a, b)}
dx
dx
13
Fundamental Theorems of Calculus
• Continuous function versus continuously differentiable function
( x f(t)dt)'  f(x)
 c
 x
 c F' (t)dt  F(x)  F(c)
for continuous f
for continuously differentiable F
• Lebesgue integrable function versus absolutely continuous function
( x f(t)dt)'  f(x) a.e.
 c
 x
 c F' (t)dt  F(x)  F(c)
for any Lebesgue integrable f
iff F is absolutely continuous
14
Locally Lipschitz functions
• The interval derivative induces a duality between locally Lipschitz
maps versus bounded integral functions and their interval limits.
• A map f: (c,d)  R is locally Lipschitz if it is Lipschitz in a
neighbourhood of each y  (c,d) .
• A locally Lipschitz map f is differentiable a.e. and

x
c
f ' (t)dt  f(x) f(c)
• The interval derivative of a locally Lipschitz map is never bottom:
df
: (c, d)  IR
dx
with
df
y  (c, d).
(y)  
dx
15
Primitive of a Scott Continuous Map


g

[g
,
g
] : [0,1] IR
• Given Scott continuous
is there
f : [0,1] R
with
•
df
g
dx
In other words, does every Scott continuous function has a
primitive with respect to the interval derivative?
df
• For example, is there a function f with
 [0,1]  [0,1] ?
dx
16
Total Splittings of Intervals
• A total splitting of [0,1] is given by disjoint measurable
subsets A, B with [0,1] A  B such that for any interval
[p,q]  [0,1]
(p  q)
we have:
λ([p,q]  A)  0
&
λ([p,q]  B)  0
where λ is the Lebesgue measure.
• It follows that A and B are both dense with empty interior.
• Non-example: A  Q  [c,d] & B  A'  [c,d]
17
Construction of a Total Splitting
• Construct a fat Cantor set C00 in [0,1] with λ(C00 )  1/4
0
1
• In the open intervals in the complement of C00 construct
countably many Cantor sets C0i (i  0) with λ(i0 C0i )  1 / 8
• In the open intervals in the complement of i0 C0i construct
Cantor sets C1i (i  0) with λ(i0 C1i )  1 / 16 .
• Continue to construct

2 j
C
)

1/2
i0 ji
C with λ(
i 0 ji
• Put A  i, j0 C ji & B  A'  [0,1]
with  (A)   (B)  1/2
18
Primitive of a Scott Continuous Function
• To construct f : [0,1] R with
df
g
dx
for a given
g  [g , g  ] : [0,1] IR
• Take any total splitting (A,B) of [0,1] and put
g  (x) if x  A
f(x)  
g (x) if x  B
• Theorem.
df
g
dx
19
Non-smooth
Smooth
Mathematics
Mathematics
•
•
•
•
•
•
Set Theory
Logic
Algebra
Point-set Topology
Graph Theory
Model Theory
.
.
•
•
•
•
•
Geometry
Differential Topology
Manifolds
Dynamical Systems
Mathematical Physics
.
.
All based on
differential calculus
20
A Domain-Theoretic Model for
Differential Calculus
• Indefinite integral of a Scott continuous function
• Derivative of a Scott continuous function
• Fundamental Theorem of Calculus for
interval-valued functions
• Domain of C1 functions
• Domain of Ck functions
Continuous Scott Domains
• A directed complete partial order (dcpo) is a poset (A, ⊑) , in
which every directed set {ai | iI }  A has a sup or lub ⊔iI ai
• The way-below relation in a dcpo is defined by:
a ≪ b iff for all directed subsets {ai | iI }, the relation
b ⊑ ⊔iI 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
• The Scott topology on a continuous dcpo A with basis B has basic
open sets {a  A | b ≪ a } for each b  B
• A dcpo is bounded complete if every bounded subset has a lub
• A continuous Scott Domain is an -continuous bounded complete
dcpo
22
The Domain of nonempty compact Intervals of R
• Let IR={ [a,b] | a, b  R}  {R}
• (IR, ) is a bounded complete dcpo with R as bottom:
⊔iI ai = iI 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 
• x  {x} : R  IR
Topological embedding
R
IR
23
Continuous 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  If
is a topological embedding into a proper subset of
maximal elements of [0,1]  IR .
24
Step Functions
• Single-step function:
a↘b : [0,1]  IR, with a  I[0,1], b  IR:
x 
b
x  ao

otherwise
• Lubs of finite and bounded collections of singlestep functions
⊔1in(ai ↘ bi)
are called step function.
• Step functions with ai, bi rational intervals, give a
basis for
[0,1]  IR
25
Step Functions-An Example
R
b3
a3
b1
b2
a1
a2
0
1
26
Refining the Step Functions
R
b3
a3
b1
a1
b2
a2
0
1
27
Operations 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]
28
The Basic Construction
• What is the indefinite integral of a single step
function a↘b ?
• Classically,
f
 {F  a | a  R}
with
F' f
• We expect  a↘b  ([0,1]  IR)
• For what f  C1[0,1], should we have If   a↘b ?
• Intuitively, we expect f to satisfy:
x  a o . b  f ' (x)  b
29
Interval 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)}
30
Definition of Interval Derivative
• f  ([0,1]  IR) has an interval derivative
b  IR at a  I[0,1] if x1, x2  ao,
b(x1 – x2) ⊑ f(x1) – f(x2).
• The tie of a with b, is
(a,b) := { f | 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 (hence f continuous)
and Graph(f) is
(x, f(x)) b Graph(f)
within lines of slope
b
b & b at each point
(x, f(x)), x  ao.
.
a
31
For Classical Functions
Let f  C1[0,1]; the following are equivalent:
• If  (a,b)
• x  ao . b  f (x)  b
• x1,x2 [0,1], x1,x2  ao.
b(x1 – x2) ⊑ If (x1) – If (x2)
• a↘b ⊑ If
Thus, (a,b) is our candidate for  a↘b .
32
Properties of Ties
• (a1,b1)  (a2,b2) iff a2 ⊑ a1 & b1 ⊑ b2
• ni=1 (ai,bi)   iff {ai↘bi | 1 i  n} bounded.
• iI (ai,bi)   iff
iff
J finite I
{ai↘bi | iI } bounded
iJ (ai,bi)  
• In fact, (a,b) behaves like a↘b;
we call (a,b) a single-step tie.
33
The Indefinite Integral
•  : ([0,1]  IR)  (P([0,1]  IR),  )
( P the power set constructor)
•  a↘b := (a,b)
•  ⊔i I ai ↘ bi := iI (ai,bi)
•  is well-defined and Scott continuous.
• But unlike the classical case, the
indefinite integral  is not 1-1.
34
Example
 ([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}
35
The Derivative
• Definition. Given f : [0,1]  IR the derivative
of f is:
df
:
[0,1]

IR
dx
df
dx
= ⊔ {a↘b | f  (a,b) }
• Theorem. (Compare with the classical case.)
df
•
is well–defined & Scott continuous.
dx
• If f 
then
df
• f  (a,b) iff a↘b ⊑ dx
C1[0,1],
d If
 If'
dx
36
Examples
f : x | x |: R  R
x | x |
If : x  {| x |} : R  IR
d If
: R  IR
dx
{1} x  0

x [1,1] x  0
{1}
0 x

x
f : x  x 2 sin(x 1 ) : R  R
f : x  x sin(x 1 ) : R  R
d If
: R  IR
dx
x0
If 
x 
[ 1,1] x  0
d If
: R  IR
dx
If 
x 

x0
x0
37
The Derivative Operator
•
d
: ([0,1]  IR)  ([0,1]  IR)
dx
df
f 
dx
is monotone but not continuous. Note that the
classical operator is not continuous either.
•
•
d
(a↘b)= x . 
dx
d is not linear!
dx
For
f : x  {|x|} : [0,1]  IR
g : x  {–|x|} : [0,1]  IR
d (f+g) (0)  df (0) + dg (0)
dx
dx
dx
38
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:
 = iI  (ai,bi)  
• Domain of ties: ( T[0,1] ,  )
• Theorem. ( T[0,1] ,  ) is a continuous Scott domain.
39
The Fundamental Theorem of Calculus

d
• Define
: (T[0,1] , )  ([0,1]  IR)
dx
∆ ⊓
• Theorem.
df
{
dx

: (T[0,1] , )  ([0,1]  IR)
d
dx

is upper adjoint to
: ([0,1]  IR)  (T[0,1] , )

In fact,
|f∆}
d
Id =  °
dx

and
d
Id ⊑
°
dx
40
Fundamental Theorem of Calculus
• For f, g  C1[0,1], let f ~ g if f = g + r, for some r  R.
• We have:

C1[0,1]
~
x

d
dx
g 
f 
x.{f(x)}
{x.{g(x)} c | c  R}
T [0,1]
C 0 [0,1]


d
dx
[0,1]  IR
41
F.T. of Calculus: Isomorphic version
• For f , g  [0,1]  IR, let f ≈ g if f = g a.e.
• We then have:

C1[0,1]
~
x

C 0 [0,1]
d
dx
g 
f 
x.{f(x)}
{x.{g(x)} c | c  R}

T [0,1]

([0,1]  IR)/ 

d
dx
42
A Domain for C1 Functions
• If h C1[0,1] , then
( Ih , Ih )  ([0,1]  IR)  ([0,1]  IR)
• We can approximate ( Ih, Ih ) in ([0,1]  IR)2
i.e. ( f, g) ⊑ ( Ih ,Ih ) with f ⊑ Ih and g ⊑ Ih
• What pairs ( f, g)  ([0,1]  IR)2
approximate a differentiable function?
43
Function and Derivative Consistency
• Define the consistency relation:
Cons  ([0,1]  IR)  ([0,1]  IR) with
(f,g)  Cons if (f)  ( g)  
• Proposition
(f,g)  Cons iff there is a continuous h: dom(g)  R
with f ⊑ Ih and g ⊑
d Ih
dx
.
• 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) .
44
Consistency for basis elements
• (⊔i ai↘bi, ⊔j cj↘dj)  Cons is a finitary property:
G(f,g)= greatest function
Approximating function:
f=
⊔i ai↘bi
fg(t)
L(f,g) = least function
t
Approximating derivative: g = ⊔j cj↘dj
•
1.
2.
We will define L(f,g), G(f,g) in general and show that:
(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) ]
45
Function and Derivative Information
f
1
1
g
2
1
46
Updating
f
1
1
g
2
1
47
Consistency Test and Updating for (f,g)
• For x  dom(g), let g({x}) = [g (x), g+(x)] where
g , g+: dom(g) R are lower and upper semi-continuous.
Similarly we define f , f +: dom(f) R. Write f = [f –, f +].
• Let O be a connected component of dom(g) with
O  dom(f)  . For x , y  O define:
x 
  g (u ) du
y

d   ( x, y )  
x
 g  (u ) du

y

y  x



x  y



x 
 g (u ) du
y

d   ( x, y )  
x
  g  (u ) du

y

y  x



x  y



• Define: L(f,g)(x) := supyOdom(f)(f –(y) + d–+(x,y))
and
G(f,g)(x) := infyOdom(f)(f +(y) + d+–(x,y))
• Theorem. (f, g)  Con iff x  O. L (f, g) (x)  G (f, g) (x).
48
Updating Linear step Functions
• A linear single-step function:
a↘[b–, b +] : [0,1]  IR, with b–, b +: ao  R linear
[b–(x) , b +(x)]
x  ao
x 

otherwise
We write this simply as a↘b with b=[b–, b +] .
•
b
x
a
b
For (f, g) = (⊔1in ai↘bi , ⊔1jm cj↘dj) with f linear g standard,
the rational end–points of ai and cj induce a partition
y0 < y1 < y2 < … < yk of the connected component O of dom(g).
• Proposition. For x  O, we have:
L(f,g)(x) = max {f –(x) , limsup f –(y) + d–+(x , y) | ym  O  dom(f) }
y  ym
• Hence L(f,g) is the max of k+2 linear maps.
•
Similarly for G(f,g)(x).
49
Updating Algorithm
f
1
1
g
2
1
50
Updating Algorithm (left to right)
f
1
1
g
2
1
51
Updating Algorithm (left to right)
f
1
1
g
2
1
52
Updating Algorithm (right to left)
f
1
1
g
2
1
53
Updating Algorithm (right to left)
f
1
1
g
2
1
54
Updating Algorithm (similarly for upper one)
f
1
1
g
2
1
55
Output of the Updating Algorithm
f
1
1
g
2
1
56
The Domain of C1 Functions
• 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.
•
Define
D1c := {(f0,f1)  C1C0 | f0 = f1 }
• Theorem.
 : C1[0,1]  C0[0,1]  ([0,1]  IR)2
restricts to give a topological embedding
D1c
↪
D1
(with C1 norm)
(with Scott topology)
57
Higher Interval Derivative
• Let 1(a,b) = (a,b)
• Definition. (the second tie)
df
2
f   (a,b)  P([0,1]  IR) if
 1(a,b)
dx
• Note the recursive definition, which can be
extended to higher derivatives.
• Proposition. For f  C2[0,1], the following are
equivalent:
• If  2(a,b)
• x  ao. b  f (x)  b
• x1,x2 ao. b (x1 – x2) ⊑ If (x1) – If (x2)
58
• a↘b ⊑ If
Higher Derivative and Indefinite Integral
• For f : [0,1]  IR we define:
d 2f
dx 2
: [0,1]  IR by
• Then
d 2f
dx 2
d 2f
d df

2
dx
dx dx
= ⊔f   (a,b) a↘b
2
(2)
•  : ([0,1]  IR)  (P([0,1]  IR),  )
(2)
•  a↘b :=  2(a,b)
(2)
•  ⊔i I ai ↘ bi := iI  (ai,bi)
2
(2)
•  is well-defined and Scott continuous.
59
Domains of C 2 functions
(2)
• Define Cons (f0,f1,f2) iff f0   f1   f2 
Theorem. Cons (f0,f1,f2) is decidable on basis elements.
(The present algorithm to check seems to be NP-hard.)
• D2 := { (f0,f1,f2)  (I[0,1]IR)3 | Cons (f0,f1,f2) }
• D2c := {(f0,f1,f2)  C2C1C0 | f0 = f1, f1 = f2}
• Theorem.  restricts to give a topological
embedding D2c ↪ D2
60
Domains of C k functions
• Let (fi)0ik  (I[0,1]IR)k+1
(i)
Define Cons (fi)0ik iff  0ik  fi  
• The decidability of Cons on basis elements for k  3 is an
open question.
• Dk := { (fi)0ik  (I[0,1]IR)k+1 | Cons (fi)0ik }
• D∞:= { (fk)k0 ( I[0,1]IR)ω |  k0. (fi)0ik  Dk }
61
Part (II)
Domain-theoretic Solution of Differential Equations
• Develop proper data types for ordinary
differential equations.
• Solve initial value problem up to any given
precision.
62
Picard’s Theorem
•
dx
= v(t,x)
dt
with v: R2  R continuous
with (t0,x0) R2
x(t0) = x0
and v is Lipschitz in x uniformly in t for some
neighbourhood of (t0,x0).
• Theorem. In a neighbourhood of t0, there is a
unique solution, which is the unique fixed point of:
P: C0 [t0-k , t0+k] 
C0 [t0-k , t0+k]
f
for some k>0 .

t
t . (x0 +  v(t , f(t) ) dt)
t0
63
Picard’s Solution Reformulated
•
t
P: f  t . (x0 +  t0 v(t , f(t)) dt)
can be considered as upgrading the information
about the function f and the information about its
derivative g.
•
•
Apv:
(f,g)  (f , t. v(t,f(t)))
Up: (f,g)  ( t . (x0 +
t
t0 g(t)
dt) , g )
t
• Up⃘Apv: (f,g)  (t . (x0 +  gt0 dt , t . v(t,f(t)))
has a fixed point (f,g) with f = g = t . v(t,f(t))
64
A domain-theoretic Picard’s theorem
•
•
•
To obtain Picard’s theorem with domain theory, we have to
make sure that derivative updating preserves consistency.
(f , g) is strongly consistent, (f , g) S-Cons, if
 h ⊒ g we have: (f , h)  Cons
Q(f,g)(x) := supyODom(f) (f –(y) + d+–(x,y))
R(f,g)x) := infyODom(f) (f +(y) + d–+(x,y))
•
Theorem. If f –, f +, g–, g+: [0,1]  R are bounded and g–, g+ are
continuous a.e. (e.g. for polynomial step functions f and g),
then (f,g) is strongly consistent iff for any connected
component O of dom(g) with O  dom(f)   ,
we have: x  O. Q(f,g)(x), R(f,g)(x)  [f –(x) , f +(y) ]
•
Thus, on basis elements strong consistency is decidable.
65
A domain-theoretic Picard’s theorem
• Let v : [0,1]  IR  IR be Scott continuous and
Apv : ([0,1]  IR)2 
([0,1]  IR)2
(f,g)
 ( f , t. v (t , f(t) ))
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, t. v (t , f(t) ) )  S-Cons
• Then the continuous map Up ⃘ Apv has a least fixed point
above (f, t.v (t , f(t))) given by
(fs, gs) =
⊔n 0 (Up ⃘ Apv )n (f, t.v (t , f(t) ) )
66
The Classical Initial Value Problem
• Suppose v = Ih for a continuous h : [-1,1]  R  R which satisfies
the Lipschitz property around (t0,x0) =(0,0).
• Then h is bounded by M say in a compact rectangle K around the
origin. We can choose positive a  1 such that [-a,a] [-Ma,Ma]  K.
• Put f = ⊔n 0 fn where fn = [-a/2n,a /2n] ↘ [-Ma/2n , Ma/ 2n ]
• Then (f , [-a,a ] ↘ [-M ,M ] )  S-Cons, hence
(f, t. v(t , f(t) ) )  S-Cons since
([-a,a ] ↘ [-M ,M ]) ⊑ t. v (t , f(t) )
• Theorem. The domain-theoretic solution
(fs, gs) =
⊔n 0 (Up ⃘ Apv
)n (f, t. v (t , f(t) ))
gives the unique classical solution through (0,0).
67
Computation of the solution for a given precision  >0
• We express f and v as lubs of step functions:
f = ⊔n 0 fn
v = ⊔n 0 vn
• Putting Pv := Up ⃘ Apv the solution is obtained as:
• (fs, gs) = ⊔n 0 (Pv )n (f , t. v (t , f(t) ) ) = ⊔n 0 (Pv )n (fn , t. vn (t , fn(t) ) )
n
• Let (un , wn) := (Pv )n (fn , t. vn (t , fn(t) ) ) with un = [un- ,un+]
n
• For all n 0 we have:
un-  un+1-  un+1+  un+ with un+ - un-  0
• Compute the piecewise linear maps un- , un+ until
the first n 0 with un+ - un-  
68
Example
f
We solve:
dx
= v(t,x), x(t0) =x0
dt
for t [0,1] with
v(t,x) = t and t0=1/2, x0=9/8.
b1 b2 b3
1
v is approximated by a
sequence of step
functions, v0, v1, …
.
aa3
2
a1
1
g
1
t
The initial condition is
approximated by
rectangles aibi:
v1
v2
v3
v = ⊔i vi
{(1/2,9/8)} =
v
1
t
⊔i aibi,
69
Solution
f
At stage n we find
un - and un +
1
.
1
g
1
1
70
Solution
f
At stage n we find
un - and un +
1
.
1
g
1
1
71
Solution
f
At stage n we find
un - and un +
1
.
1
g
1
1
un - and un + tend to
the exact solution:
f: t  t2/2 + 1
72
Computing with polynomial step functions
73
Part III:
A Domain-Theoretic Model of Geometry
• To develop a Computable model for Geometry
and Solid Modelling, so that:
•
the model is mathematically sound, realistic;
•
the basic building blocks are computable;
•
it bridges theory and practice.
Why do we need a data type for solids?
Answer: To develop robust algorithms!
Lack of a proper data type and use of real
RAM in which comparison of real numbers
is decidable give unreliable programs in
practice!
75
The Intersection of two lines
L1
L2
P
With floating point arithmetic, find the point
P of the intersection L1  L2. Then:
min_dist(P, L1) > 0,
min_dist(P, L2) > 0.
76
The Convex Hull Algorithm
A, B & C nearly collinear
A
With floating point we
can get:
B
C
77
The Convex Hull Algorithm
A, B & C nearly collinear
A
With floating point we
can get:
(i) AC, or
B
C
78
The Convex Hull Algorithm
A, B & C nearly collinear
A
With floating point we
can get:
(i) AC, or
(ii) just AB, or
B
C
79
The Convex Hull Algorithm
A, B & C nearly collinear
A
With floating point we
can get:
(i) AC, or
(ii) just AB, or
(iii) just BC, or
B
C
80
The Convex Hull Algorithm
A, B & C nearly collinear
A
With floating point we
can get:
(i) AC, or
(ii) just AB, or
(iii) just BC, or
(iv) none of them.
B
C
The quest for robust algorithms is the most fundamental
unresolved problem in solid modelling and computational
geometry.
81
A Fundamental Problem in Topology and Geometry
• Subset A  X topological space.
Membership predicate A : X  {tt, ff }
 tt
x
 ff
x A
x A
is continuous iff A is both open and closed.
• In particular, for A  Rn, A  , A  Rn
A : Rn  {tt, ff } is not continuous.
• Most engineering is done, however, in Rn.
82
Non-computability of the Membership Predicate
• There is discontinuity at
the boundary of the set.
True
False
x
• This predicate is not
computable:
If x is on the boundary, we
cannot in general determine if
it is in or out at any finite
stage of computation.
x
83
Non-computable Operations in Classical CG & SM
• A: Rn  {tt, ff} not continuous means it is not
computable, even for simple objects like A=[0,1]n.
• x  A is not decidable even for simple objects:
for A = [0,)  R, we just have the undecidability
of x  0.
• The Boolean operation  is not continuous, hence
noncomputable, wrt the natural notion of topology
on subsets:
 : C(Rn)  C(Rn)  C(Rn), where C(Rn) is
compact subsets with the Hausdorff metric.
84
Intersection of two 3D cubes
85
Intersection of two 3D cubes
86
Intersection of two 3D cubes
87
This is Really Ironical!
• Topology and geometry have been developed to
study continuous functions and transformations
on spaces.
• The membership predicate and the binary
operation for  are the fundamental building
blocks of topology and geometry.
• Yet, these fundamental functions are not
continuous in classical topology and geometry.
88
Elements of a Computable Topology/Geometry
• The membership predicate A : X  {tt, ff} fails to be
continuous on A, the boundary of A.
• For any open or closed set A, the predicate x  A is
non-observable, like x = 0.
open
open
tt
• Redefine: A : X {tt, ff}
tt

x   ff


x  IntA
ff
observable
observable
x  IntAc
x  A
with the Scott topology on {tt, ff}.
• A is now a continuous function.

Non-observable
89
Elements of a Computable Topology/Geometry
• Note that A=B iff int A=int B & int Ac=int Bc,
i.e. sets with the same interior and exterior have the
same membership predicate.
• We now change our view: In analogy with classical set
theory where every set is completely determined by its
membership predicate, we define a (partial) solid
object to be given by any continuous map:
f : X  { tt, ff }
• Then:
f –1{tt} is open; it’s called the interior of the object.
f –1{ff} is open; it’s called the exterior of the object.
90
Partial Solid Objects
• We have now introduced partial solid objects, since
X \ (f –1{tt}  f –1{ff})
may have non-empty interior.
• We partially order the continuous functions:
f, g : X  {tt, ff } f ⊑ g  x  X . f(x) ⊑ g(x)
• f ⊑ g  f –1{tt}  g –1{tt} & f –1{ff}  g –1{ff}
Therefore, f ⊑ g means g has more information about an
idealized real solid object.
91
The Geometric (Solid) Domain of X
• The geometric (solid) domain S (X) of X is the poset
(X  {tt, ff }, ⊑ )
• S(X) is isomorphic to the poset SO(X) of pairs of disjoint
open sets (O1,O2) ordered componentwise by inclusion:
S(X )

f

( f 1{tt}, f 1{ ff })

(O1 , O2 )
O1  O2  
tt

x   ff


x  O1
x  O2
otherwise
SO ( X )
92
Properties of the Geometric (Solid) Domain
• Theorem For a second countable locally compact
Hausdorff space X (e.g. Rn), S(X) is bounded complete and
–continuous with (U1, U2) << (V1, V2) iff the closures of U1 and
U2 are compact subsets of V1 and V2 respectively.
• Theorem If X is Hausdorff, then:
(O1, O2)  Maximal (S X, ⊑) iff
O1= int O2c &
O2= int O1c.
This is a regular solid object: O1=int O1 & O2=int O2
• Definition
(O1, O2) , O1 ≠ ∅ ≠ O2 , is a classical object if O1 ∪ O2 = X.
93
Examples
• A = {xR2 ⃒ |x| ≤ 1}  [1, 2]
represented in the model by
Arep = (int A, int Ac) =
( {x ⃒ |x| < 1}, R2 \ A )
is a classical (but non-regular) solid object.
• B = {xR2 ⃒ |x| ≤ 1}
represented by Brep=
({x ⃒ |x| < 1} , {x ⃒ |x| > 1})  Maximal (SR2, ⊑)
is a regular solid object with Arep ⊑ Brep.
94
Boolean operations and predicates
 : SX  SX
(O1 , O2 )  (O2 , O1 )
 : SX  SX  SX
(( A1 , A2 ) , ( B1 , B2 ))  ( A1  B1 , A2  B2 )
 : SX  SX  SX
(( A1 , A2 ) , ( B1 , B2 ))  ( A1  B1 , A2  B2 )
Theorem All these operations are Scott continuous and
preserve classical solid objects.
95
Subset Inclusion
• Let Sb X  {( A1, A2 )  SX | A2 compact}{(, )}.
c
 : Sb X  SX  {tt , ff }
tt

(( A1 , A2 ), ( B1 , B2 ))   ff


A2  B1  X
A1  B2  
otherwise.
• Subset inclusion is Scott continuous.
96
General Minkowski operator
• For smoothing out sharp corners of objects.
• SbRn = { (A, B)  SRn | Bc is bounded} ∪{(∅,∅)}.
All real solids are represented in SbRn.
• Define:
__ :
SRn  SbRn  SRn
((A,B) , (C,D)) ↦ (A ⊕ C , (Bc ⊕ Dc)c) where
A ⊕ C = { a+c | a A, c C }
• Theorem __ is Scott continuous.
97
An effectively given solid domain
• The geometric domain SX can be given effective
structure for any locally compact second countable
Hausdorff space, e.g. Rn, Sn, Tn, [0,1]n.
• Consider X=Rn. The set of pairs of disjoint open rational
polyhedra of the form K = (L1 , L2) , with L1  L2 = ,
gives a basis for SX.
• Let Kn= (π1 ( K n ) , π2 ( K n) ) be an enumeration of this
basis.
• (A, B) is a computable partial solid object if there
exists a total recursive function ß:NN such that :
( K ß(n) ) n 0 is an increasing chain with:
(A , B) = ( ∪n π1 ( K ß(n) ) ,
∪n π2 ( K ß(n) ) )
98
Computing a Solid Object
• In this model, a solid object is
represented by its interior and
exterior.
• The interior and the exterior
are approximated by two
nested sequence of rational
polyhedra.
99
Computable Operations on the Solid Domain
• F: (SX)n  SX
or
F: (SX)n  { tt, ff }
is computable if it takes computable sequences of
partial solid objects to computable sequences.
• Theorem All the basic Boolean operations and
predicates are computable wrt any effective
enumeration of either the partial rational polyhedra
or the partial dyadic voxel sets.
100
Quantative Measure of Convergence
• In our present model for computable solids,
there is no quantitative measure for the
convergence of the basis elements to a
computable solid.
• We will enrich the notion of domain-theoretic
computability to include a quantitative measure
of convergence.
101
Hausdorff Computability
• We strengthen the notion of a computable solid by using
the Hausdorff distance d between compact sets in Rn.
•
d(C,D) = min{ r | C  Dr & D  Cr }
where
Dr = { x |  y  D. |x-y|  r }
• (A , B)  S [–k, k]n is Hausdorff computable
if there exists an effective chain Kß(n) of basis elements
with ß :NN a total recursive function such that:
(A , B) = ( ∪n π1 ( K ß(n) ) ,
∪n π2 ( K ß(n) ) )
with
d (π1 ( K ß(n) ) , A ) < 1/2n , d (π2 ( K ß(n) ) , B) < 1/2n
102
Hausdorff computability
• Two solid objects which have a small Hausdorff
distance from each other are visually close.
• The Hausdorff distance gives a natural quantitative
measure for approximation of solid objects.
• However, the intersection or union of two Hausdorff
computable solid objects may fail to be Hausdorff
computable.
• Examples of such failure are nontrivial to construct.
103
Boolean Intersection is not Hausdorff computable
(1,1)
(0,1)
rn rat ional,rn  r
left comput able.
Q   Qn
Qn
n0
is Hausdorff
computable.
1
2
1
2 n1
1
2n
(0,0)
r0 r1
rn 1 rn r
(1,0)
However:
Q([0,1]  {0})
= [r,1]  {0}  R2
is not Hausdorff
computable.
104
Lebesgue Computability
• (A , B)  S [–k, k]d is Lebesgue computable iff there
exists an effective chain K ß(n) of basis elements with
ß :NN a total recursive function such that:
(A , B) = ( ∪n π1 ( K ß(n) ) ,
µ(A) - µ(π1 ( K ß(n) ) ) < 1/2 n
&
∪n π2 ( K ß(n) ) )
µ(B) - µ(π2 ( K ß(n) ) ) < 1/2 n
• A computable function is Lebesgue computable if it
preserves Lebesgue computable sequences.
• Theorem Boolean operations are Lebesgue computable.
105
Hausdorff and Lebesgue computability
• Hausdorff computable ⇏ Lebesgue computable
Complement of a Cantor set with Lebesgue measure 1– r
with r =lim rn: left computable but non-computable real.
sn  rn  rn1 ,
• start with
n
s
m 0
m
 rn ,

s
m 0
m
r
0
1
• stage 1
s0
• stage 2
s1
2
s1
2
• At stage n remove 2n open mid-intervals of length sn/2n.
106
Hausdorff and Lebesgue computability
• Lebesgue computable ⇏ Hausdorff computable
Let 0 < rn  Q with rn ↗ r, left computable, noncomputable 0 < r < 1.
• Then [r,1]  {0}  R2 is Lebesgue computable but not
Hausdorff computable.
0
r0
rn
r
1
107
Hausdorff and Lebesgue Computable Objects
• Hausdorff computable ⇏ Lebesgue computable
• Lebesgue computable ⇏ Hausdorff computable
• Theorem: A regular solid object is computable iff
it is Hausdorff computable.
• However: A computable regular solid object may
not be Lebesgue computable.
108
Conclusion
Our model satisfies:





A well-defined notion of computability
Reflects the observable properties of geometric objects
Is closed under basic operations
Captures regular and non-regular sets
Supports a methodology for designing robust
algorithms
109
Data-types for Computational Geometry and Systems of
Linear Equations
• The Convex Hull
• Voronoi Diagram or the Post Office problem
• Delaunay Triangulation
• The Partial Circle through three partial points
110
The Outer Convex Hull Algorithm
111
The Inner Convex Hull Algorithm
Top left corners
bottom left corners
Top right corners
bottom right corners
112
The Convex Hull Algorithm
113
The Convex Hull Algorithm
114
The Convex Hull map
• Let Hm: (R2)m  C(R2) be the classical convex Hull map, with
C(R2) the set of compact subsets of R2, with the Hausdorff metric.
• Let (IR2,  ) be the domain of rectangles in R2.
3
2
T
T
• Each rectangle TIR2 has vertices T1,T2,T3,T4,
going anti-clockwise from the right bottom corner.
• For
x=(T1,T2,…,Tm)(IR2)m,
define:
T4
T1
Cm : (IR2)m  SR2,
Cm(x) = (Im(x),Em(x)) with:
Em(x):={Hm (y) | y(R2)m, yiTi, 1  i  m}
Im(x):= {Hm (y) | y(R2)m, yiTi, 1  i  m}
115
The Convex Hull is Computable!
• Proposition: Em(x)=(H4m((Ti1,Ti2,Ti3,Ti4))1im)c
Im(x)=Int({Hm((Tin))1im) | n=1,2,3,4}).
• Theorem: The map Cm : (IR2)m  SR2 is Scott
continuous, Hausdorff and Lebesgue computable.
• Complexity:
1. Em(x) is O(m log m).
2. Im(x) is also O(m log m).
We have precisely the complexity of the classical convex
hull algorithm in R2 and R3.
116
Voronoi Diagrams
• We are given a finite number of points in the plane.
• Divide the plane into components closest to these points.
• The problem is equivalent to the Delaunay triangulation of the points:
(1) Triangulate the set of given points so that the interior of the
circumference circles do not contain any of the given points.
(2) Draw the perpendicular bisectors of
the edges of the triangles.
117
Voronoi Diagram & Partial Circles
• Recall that the Voronoi diagram is dual to the Delaunay
triangulation: Given a finite number of points of the plane
find the triples of points so that
the interior of the circle through
any triple does not contain any
other points.
.
.
. .
. .
• The centre of the circle through the three vertices of
a triangle is the intersection of the perpendicular
bisectors of the three edges of the triangle.
• The partial circle of three partial points in the plane is
obtained by considering the Partial Perpendicular Bisector
of two partial points in the plane.
118
Partial Perpendicular Bisector of Two Partial Points
119
PPBs for Three Partial Points
Partial Centre
120
Partial Circles
Each partial circle is defined by its interior and exterior. The exterior (interior)
consists of all those points of the plane which are outside (inside) all circles
passing through any three points in the three rectangles.
The exterior is the union of the exteriors of the three red circles.
The Interior is the intersection of the interiors of the three blue circles.
121
Partial Circles
With more exact partial points, the boundaries of the interior and exterior of
the partial circle get closer to each other.
122
Partial Circles
• The limit of the area between the interior and exterior of the
partial circle, and the Hausdorff distance between their boundaries,
is zero.
• We get a Scott continuous map C : (IR2)3SR2
• We obtain a robust Voronoi algorithm which is m log m on average.
123
Current and Further Work
• Let IR={ [a,b] | a, b  R}  {R}
• (IR, ) equipped with the Scott topology is a continuous
Scott domain with R as bottom.
124
THE END
http://www.doc.ic.ac.uk/~ae
125