Domain Theory, Computational Geometry and Differential Calculus Abbas Edalat Imperial College London www.doc.ic.ac.uk/~ae With contributions from Andre.

Slides:



Advertisements
Similar presentations
Abbas Edalat Imperial College London Interval Derivative of Functions.
Advertisements

Joint work with Andre Lieutier Dassault Systemes Domain Theory and Differential Calculus Abbas Edalat Imperial College Oxford.
Abbas Edalat Imperial College London Contains joint work with Andre Lieutier (AL) and joint work with Marko Krznaric (MK) Data Types.
Joint work with Andre Lieutier Dassault Systemes Domain Theoretic Models of Geometry and Differential Calculus Abbas Edalat Imperial College
5.1 Real Vector Spaces.
Shortest Vector In A Lattice is NP-Hard to approximate
Introduction The concept of transform appears often in the literature of image processing and data compression. Indeed a suitable discrete representation.
CSCI 115 Chapter 6 Order Relations and Structures.
By Groysman Maxim. Let S be a set of sites in the plane. Each point in the plane is influenced by each point of S. We would like to decompose the plane.
Lecture 6 Hyperreal Numbers (Nonstandard Analysis)
ECIV 720 A Advanced Structural Mechanics and Analysis
Foundations of Data-Flow Analysis. Basic Questions Under what circumstances is the iterative algorithm used in the data-flow analysis correct? How precise.
1 Basic abstract interpretation theory. 2 The general idea §a semantics l any definition style, from a denotational definition to a detailed interpreter.
Optical Flow Estimation using Variational Techniques Darya Frolova.
1 Foundations of Interval Computation Trong Wu Phone: Department of Computer Science Southern Illinois University Edwardsville.
Copyright © Cengage Learning. All rights reserved.
Mathematics for Business (Finance)
Partially Ordered Sets (POSets)
Relations Chapter 9.
Chapter 6. Order Relations and Structure
Algebra Review. Polynomial Manipulation Combine like terms, multiply, FOIL, factor, etc.
1 Preliminaries Precalculus Review I Precalculus Review II
Functions of Several Variables Local Linear Approximation.
CHAPTER FIVE Orthogonality Why orthogonal? Least square problem Accuracy of Numerical computation.
Linear Algebra Chapter 4 Vector Spaces.
ME 2304: 3D Geometry & Vector Calculus Dr. Faraz Junejo Double Integrals.
Relative Location of a Point with Respect to a Straight Line (0,0) 5 5 (2, 2) (4, 5) (0, 5) (6, 3) -3x + 2y +2 = 0 s = A x t + B y t + C s < 0 s > 0.
Solving fixpoint equations
AP CALCULUS PERIODIC REVIEW. 1: Limits and Continuity A function y = f(x) is continuous at x = a if: i) f(a) is defined (it exists) ii) iii) Otherwise,
Abbas Edalat Imperial College London joint work with Marko Krznaric and Andre Lieutier Domain-theoretic Solution of Differential Equations.
Math 3121 Abstract Algebra I Section 0: Sets. The axiomatic approach to Mathematics The notion of definition - from the text: "It is impossible to define.
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
استاد : دکتر گلبابایی In detail this means three conditions:  1. f has to be defined at c.  2. the limit on the left hand side of that equation has.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Pareto Linear Programming The Problem: P-opt Cx s.t Ax ≤ b x ≥ 0 where C is a kxn matrix so that Cx = (c (1) x, c (2) x,..., c (k) x) where c.
The Integers. The Division Algorithms A high-school question: Compute 58/17. We can write 58 as 58 = 3 (17) + 7 This forms illustrates the answer: “3.
Robustness in Numerical Computation I Root Finding Kwanghee Ko School of Mechatronics Gwnagju Institute of Science and Technology.
TEL-AVIV UNIVERSITY RAYMOND AND BEVERLY SACKLER FACULTY OF EXACT SCIENCES SCHOOL OF MATHEMATICAL SCIENCES An Algorithm for the Computation of the Metric.
SECTION 13.8 STOKES ’ THEOREM. P2P213.8 STOKES ’ VS. GREEN ’ S THEOREM  Stokes ’ Theorem can be regarded as a higher- dimensional version of Green ’
Elementary Linear Algebra Anton & Rorres, 9th Edition
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 8 Relations 歐亞書局.
CS201: Data Structures and Discrete Mathematics I
1 ECG Saarbrücken Robustness issues & CAD André Lieutier Robustness issues in Geometric computations for Computer Aided Design André Lieutier practices.
Copyright © Cengage Learning. All rights reserved.
CHAPTER 3 FUZZY RELATION and COMPOSITION. 3.1 Crisp relation Product set Definition (Product set) Let A and B be two non-empty sets, the product.
Domain-theoretic Models of Differential Calculus and Geometry Abbas Edalat Imperial College London BRICS, February 2003 Contributions.
Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London Joint work with Andre Lieutier, Dirk Pattinson.
Interval Notation Interval Notation to/from Inequalities Number Line Plots open & closed endpoint conventions Unions and Intersections Bounded vs. unbounded.
Problem Statement How do we represent relationship between two related elements ?
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Unit II Discrete Structures Relations and Functions SE (Comp.Engg.)
A data Type for Computational Geometry & Solid Modelling Abbas Edalat Andr é Lieutier Imperial College Dassault Systemes.
DOUBLE INTEGRALS OVER RECTANGLES
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.
Department of Statistics University of Rajshahi, Bangladesh
The Jordan Arc theorem. A Lemma: For a connected, finite union of open discs, no two of which are mutually tangent, the outer boundary (which separates.
Prepared By Meri Dedania (AITS) Discrete Mathematics by Meri Dedania Assistant Professor MCA department Atmiya Institute of Technology & Science Yogidham.
CHAPTER 9.10~9.17 Vector Calculus.
1 Chapter 4 Geometry of Linear Programming  There are strong relationships between the geometrical and algebraic features of LP problems  Convenient.
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
Functions of Complex Variable and Integral Transforms
Unit-III Algebraic Structures
Complex Variables. Complex Variables Open Disks or Neighborhoods Definition. The set of all points z which satisfy the inequality |z – z0|
CS201: Data Structures and Discrete Mathematics I
Polyhedron Here, we derive a representation of polyhedron and see the properties of the generators. We also see how to identify the generators. The results.
Polyhedron Here, we derive a representation of polyhedron and see the properties of the generators. We also see how to identify the generators. The results.
Sungho Kang Yonsei University
I.4 Polyhedral Theory (NW)
I.4 Polyhedral Theory.
Presentation transcript:

Domain Theory, Computational Geometry and Differential Calculus Abbas Edalat Imperial College London With contributions from Andre Lieutier, Ali Khanban, Marko Krznaric and Dirk Pattinson First SQU Workshop on Topology and its Applications December 2004

2 First rudimentary notion of a real number In his ``Commentaries on the Difficulties in the Postulates of Euclid's Elements'', Omar Khayyam, the 11th century Persian mathematician and poet, first showed the equivalence of Euclid's notion of ratios with that of continued fractions. Then, in a stroke of genius, he defined two ratios as equal ``when they can be expressed by the ratio of integer numbers with as great a degree of accuracy as we like.'' Three centuries later, Ghiasseddin Jamshid Kashani, another Persian mathematician, devised the first fixed point technique for computation in analysis in the beginning of the 15th century: He used a cubic polynomial in a recursive scheme to approximate thesine of 1 ° correctly up to 17 decimal places

3 Computational Model for Classical Spaces X Classical Space x DX Domain {x} Research project since 1993: Reconstruct mathematical analysis in an order-theoretic setting Embed classical spaces into the set of maximal elements of suitable partially ordered sets, called domains:

4 Computational Model for Classical Spaces Applications: Fractal Geometry Measure & Integration Theory: Generalized Riemann Integration Topological Representation of Spaces Exact Real Arithmetic Computational Geometry and Solid Modelling Differential Calculus Quantum Computation

5 Continuous Scott Domains A directed complete partial order (dcpo) is a poset (A, ⊑ ), in which every directed set {a i | i  I }  A has a sup or lub sup i  I a i The way-below relation in a dcpo is defined by: a ≪ b iff for all directed subsets {a i | i  I }, the relation b ⊑ sup i  I a i implies that there exists i  I such that a ⊑ a i 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

6 Continuous 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 T 0. Proposition. If D is a dcpo then f:D  D is Scott continuous iff (i) f is monotone, i.e. f(x) ⊑ f(y) if x ⊑ y, and (ii) f preserves sups of directed subsets, i.e. for any directed set A  D, we have: sup a  A f(a) = f(supA) Fact. The Scott topology on a continuous dcpo A with basis B has basic open sets {a  A | b ≪ a } for each b  B.

7 Let IR={ [a,b] | a, b  R}  {R} (IR,  ) is a bounded complete dcpo with R as bottom: sup i  I a i =  i  I a i a ≪ b  a o  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 | a o  b}  x {x} R I R x  {x} : R  IR an embedding We identify {x} with x The Domain of nonempty compact Intervals of R

8 Continuous 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  C 0 [0,1] n, has continuous extension i(f ): [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. The function space [0,1] n  IR is a continuous Scott domain.  : C 0 [0,1] n ↪ ( [0,1] n  IR), with f  i(f) is a topological embedding into a proper subset of maximal elements of [0,1] n  IR. We identify x and {x}, also f and i(f)

9 Step Functions Single-step function: a ↘ b : [0,1] n  IR, with a  I[0,1] n, b=[b -,b + ]  IR : b x  a o x   otherwise Lubs of finite and bounded collections of single- step functions f= sup 1  i  n (a i ↘ b i ) are called step functions with N(f):= n (number of pieces) Step functions with a i, b i rational intervals give a basis for [0,1] n  IR. They are used to approximate C 0 functions.

10 Step Functions-An Example in R 01 R b1b1 a3a3 a2a2 a1a1 b3b3 b2b2

11 Refining the Step Functions 01 R b1b1 a3a3 a2a2 a1a1 b3b3 b2b2

12 Kleene’s Fixed Point Theorem Theorem. If D is a dcpo with bottom (least element) d 0 and if f : D  D is Scott continuous then f has a least fixed point given by sup i  N f i (d 0 )

13 Initial Value Problems in Domain Consider initial value problems given by where y=(y 1,…,y n ): [-a,a]  R n and v: [-K,K] n  [-M,M] n are continuous.. ODE solving: Mathematical Analysis: no direct computational content Numerical Analysis: no correctness guarantee Interval Analysis: no convergence guarantee Computable Analysis: no data types Domain Theory provides a method which 1.is based on proper data types 2.has guaranteed speed of convergence 3.is directly implementable on a digital computer

14 Picard's Classical Theorem Proof: For y: [-a, a]  [-K, K] n let P v (y): [-a, a]  [-K, K] n with Standard assumption: v: [-K, K] n  [-M, M] n and aM ≤K. Theorem: Suppose v is Lipschitz: |v(x) - v(y)| ≤ L |x – y| for some L > 0 and all x, y  [-K, K] n. then, there exists a unique y: [-a, a]  [-K, K] n with By Banach's fixed point theorem, the sequence y k defined by y 0 = any initial continuous function, and y k+1 = P v (y k ) converges to the unique fixed point.

15 Translation to Domain Theory: Road map Formulate the problem as fixed point equation over [-a,a]  I[-K,K] n Apply Kleene's Theorem to obtain the least fixed point Relate domain-theoretic fixed points to the classical problem Show that the computations restrict to bases of the involved domains. Furthermore, we give: (i) Estimates on the speed of convergence (ii) Estimates on the (algebraic) complexity of the problem.

16 Translation to Domain Theory: Solutions Interval valued approximations to the solution: S = { y: [-a, a]  I[-K, K] n | y Scott continuous} where I[-K, K] n = {A | A  [-K, K] n is a compact rectangle} is the sub-domain of rectangles contained in [-K, K] n with reverse inclusion. The order on S is pointwise: If f, g  S then f ⊑ g iff f(x) ⊑ g(x) for all x  [-a, a].

17 Translation into Domain Theory: Vector Field Computing v(y) requires vector fields with interval input: V= { u: I[-K, K] n  I[-M, M] n | u Scott continuous } with pointwise ordering Relationship to Classical Vector Fields: Extensions u  V extends a classical v: [-K, K] n  [-M, M] n if u({x}) = { v(x) } for all x  [-K, K] n. The greatest or canonical extension of v is given by Iv: I[-K, K] n  I[-M, M] n with ((Iv)(A)) i =v i [A]

18 The Domain Theoretic Picard Operator where for f = [f - -, f + ]: [-a, a]  I[-K, K] Let u  V. The domain-theoretic Picard operator P u :S  S is given by The monotone convergence theorem shows that P u is Scott continuous.

19 Relationship to the Classical Problem Assume u is an extension of v: [-K, K] n  [-M, M] n. Suppose y is the least fixed point of P u Every solution f satisfies y ⊑ f If y = [y -, y + ] and y - = y +, then y - is the unique solution. That is, we look for fixed points of width 0: For (A 1, …..,A n )  I[-K, K] n, we write A i = [A i -, A i + ] and define the width of A by w(A)=max{A i + -A i - | 1≤i≤n} w(f)=sup{w(f(x))| x  [-a,a]}

20 The Lipschitz Case Recall: The classical proof assumes that v is Lipschitz. Suppose u is interval Lipschitz, that is w(u(x)) ≤L w(x) for all x  I[-K, K] n. Then w(P u (y)) ≤ a L w(y) for all y  S. Assuming aL < 1 (which can be actually removed), we obtain Theorem: y 0 = [-K, K] n and y k+1 = P u (y k ). Then y = sup k  N y k satisfies P u (y) = y and w(y) = 0. In particular, y - = y + is the unique solution.

21 Approximations of the Vector Field Proposition: The map P: V→(S→S) with u→ P u is Scott continuous. This allows us to use approximations of the vector field to obtain the solution:. Then y = sup k  N y k satisfies P u (y) =y and w(y) = 0. Speed of Convergence: If aL < c < 1 and d(u, u k ) < 2Mc k (c - aL), then w(y k ) ≤c k w(y 0 ), where Theorem: Suppose u = sup k u k and y 0 = [-K, K] n and

22 Restrinting to a Base Let a,K,M  Q. Denote the class of rational step functions I[-K,K] n →I[-M,M] n by V Q. We also have the class S L Q of rational piecewise linear step functions f:[-a,a]→I[-K,K] n We again put N(f) = number of pieces in f In the above example N(f)=3

23 Computing with S L Q and V Q P u restricts to the base: Suppose u  V Q and y  S L Q then: The map u(y) is piecewise constant, hence P u (y)  S L Q P u (y)  S L Q. P u (y) can be computed in time O(N(u)N(y)), i.e. N(P u (y))  O(N(u)N(y)).

24 Summary Summary Suppose u = sup k u k with u k  V Q, y 0 = [-K, K] n and then y k  S L Q for all k  N y = sup k y k has width 0 and is the unique solution w(y k )  O(c k ) if d(u, u k )  O(c k ). Given an elementary function u, one can use continued fractions for to obtain u k with the above properties.. These properties are preserved in an implementation using rational arithmetic.

25 PART II: A Domain-Theoretic Model for Differential Calculus Overall Aim: Synthesize Computer Science with Differential Calculus Plan of the talk: 1.Primitives of continuous interval-valued function in R n 2.Derivative of a continuous function in R n 3.Fundamental Theorem of Calculus for interval-valued functions in R n 4.Domain of C 1 functions in R n 5.Inverse and implicit functions in domain theory

26 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 + ] Recall that for real x, we identify {x} with x. Operations in Interval Arithmetic

27 Basic Construction n=1 What is a primitive map of a single step function a ↘ b ? Classically, with We expect  a ↘ b  ([0,1]  IR) For what f  C 1 [0,1], should we have If   a ↘ b ? f should satisfy:

28 Assume f  C 1 [0,1], a  I[0,1], b  IR. Suppose  x  a o. b -  f ′ (x)  b +. We think of [b -, b + ] as an interval Lipschitz constant for f at a. Interval Lipschitz contant Note that  x  a o. b -  f ′(x)  b + iff  x 1, x 2  a o & x 1 > x 2, b - (x 1 – x 2 )  f(x 1 ) – f(x 2 )  b + (x 1 – x 2 ), i.e. b(x 1 – x 2 ) ⊑ {f(x 1 ) – f(x 2 )} = {f(x 1 )} – {f(x 2 )}

29 Definition of Interval Lipschitz constant f  ([0,1]  IR) has an interval Lipschitz constant b  IR at a  I[0,1] if  x 1, x 2  a o, b(x 1 – x 2 ) ⊑ f(x 1 ) – f(x 2 ). The tie of a with b, is  (a,b) := { f |  x 1,x 2  a o. b(x 1 – x 2 ) ⊑ f(x 1 ) – f(x 2 )} Proposition. For f: [0,1]  IR, we have f   (a,b) iff f(x)  Maximal (IR) for x  a o (hence f continuous) and Graph(f) is within lines of slope b - & b + at each point (x, f(x)), x  a o. (x, f(x)) b+b+ a Graph(f). b-b-

30 Let f  C 1 [0,1]; the following are equivalent: f   (a,b)  x  a o. b -  f ′(x)  b +  x 1,x 2  [0,1], x 1,x 2  a o. b(x 1 – x 2 ) ⊑ f (x 1 ) – f (x 2 ) a ↘ b ⊑ f ′ For Classical Functions Thus,  (a,b) is our candidate for  a ↘ b.

31 Set of primitive maps  : ([0,1]  IR)  (P([0,1]  IR),  ) ( P the power set constructor)  a ↘ b :=  (a,b)  ⊔ i  I a i ↘ b i :=  i  I  (a i,b i )  is well-defined and Scott continuous.  f is always a non-empty set.

32 The Derivative Definition. Given f : [0,1]  IR the derivative of f is: : [0,1]  IR = ⊔ {a ↘ b | f   (a,b) } Theorem. (Compare with the classical case.) is well–defined & Scott continuous. If f  C 1 [0,1], then f   (a,b) iff a ↘ b ⊑

33 Examples

34 f  g iff g (interval version) If g  C 0 then f  g iff g = (classical version) Fundamental Theorem of Calculus ⊑

35 We can approximate ( h, h′ ) in ([0,1]  IR) 2 i.e. ( f, g) ⊑ ( h,h′ ) with f ⊑ h and g ⊑ h′ If h  C 1 [0,1], then ( h, h′ )  ([0,1]  IR)  ([0,1]  IR) Idea of Domain for C 1 Functions What pairs ( f, g)  ([0,1]  IR) 2 approximate a differentiable function?

36 Proposition (f,g)  Cons iff there is a continuous h: dom(g)  R with f ⊑ h and g ⊑. Function 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 least and greatest functions h with the above properties in each connected component of dom(g) which intersects dom(f).

37 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, let: Consistency Test for (f,g) Define the upper envelop: s(f,g)(x) := sup y  O  dom(f) S (f,g) (x,y) Proposition. s(f,g) is the least function with f -  s(f,g) and g ⊑

38 The lower envelop: t(f,g)(x) := inf y  O  dom(f) (f + (y) + T (f,g) (x,y)) Proposition. t(f,g) is the greatest function with t(f,g)  f + and g ⊑ Theorem. (f, g)  Con iff for all component O of dom(g) with O  dom(f)   and all x  O. s (f, g) (x)  t (f, g) (x). Similarly, let:

39 Approximating function: f = ⊔ i a i ↘ b i ( ⊔ i a i ↘ b i, ⊔ j c j ↘ d j )  Cons is a finitary property: Consistency for basis elements s(f,g) = least function t(f,g) = greatest function Approximating derivative: g = ⊔ j c j ↘ d j

40 f 1 1 Function and Derivative Information g 1 2

41 f 1 1 Least and greatest functions g 1 2

42 Decidability of consistency Hence s(f,g) is the max of k+2 rational linear maps. Similarly for t(f,g)(x). Thus, s(f,g)  t(f,g) is decidable. Theorem. Consistency is decidable. Proposition. For x  O, we have: s(f,g)(x) = max {f – (x), limsup f – (y) + S (f,g) (x, y) | y m  O  dom(f) } For (f, g) = ( ⊔ 1  i  n a i ↘ b i, ⊔ 1  j  m c j ↘ d j ), the rational end–points of a i and c j induce a partition y 0 < y 1 < y 2 < … < y k of the connected component O of dom(g).

43 Lemma. Cons  ([0,1]  IR) 2 is Scott closed. Theorem. D 1 [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 C 1 Functions Theorem.  : C 0 [0,1]  D 1 [0,1] f  (f, ) is topological embedding, giving a computational model for continuous functions and their differential properties. It restricts to give an embedding of C 1 [0,1].

44 Functions of several varibales (IR) 1× n row n-vectors with entries in IR For dcpo A, let (A n ) s = smash product of n copies of A: x  (A n ) s if x=(x 1,…..x n ) with x i non-bottom or x=bottom We work with (IR 1× n ) s

45 Definition of Interval Lipschitz constant f  ([0,1] n  IR) has an interval Lipschitz constant b  (IR 1xn ) s in a  I[0,1] n if  x, y  a o, b(x – y) ⊑ f(x) – f(y). Proposition. If f  (a,b), then f(x)  Maximal (IR) for x  a o and for all x,y  a o. |f(x)-f(y)|  k ||x-y|| with k=max i (|b i + |, |b i - |) The tie of a with b, is  (a,b) := { f |  x,y  a o. b(x – y) ⊑ f(x) – f(y)}

46 Let f  C 1 [0,1] n ; the following are equivalent: f   (a,b)  x  a o. b -  f ´(x)  b +  x,y  a o. b(x – y) ⊑ f (x) – f (y) a ↘ b ⊑ f ′ For Classical Functions Thus,  (a,b) is our candidate for  a ↘ b.

47 Set of primitive maps  : ([0,1] n  IR)  ( P ([0,1] n  (IR 1xn ) s ),  ) ( P the power set constructor)  a ↘ b :=  (a,b)  sup i  I a i ↘ b i :=  i  I  (a i,b i )  is well-defined and Scott continuous.  g can be the empty set for 2  n Eg. g=(g 1,g 2 ), with g 1 (x, y)= y, g 2 (x,, y)=0

48 The Derivative Definition. Given f : [0,1] n  IR the derivative of f is: : [0,1] n  (IR 1xn ) s =sup {a ↘ b | f   (a,b) } Theorem. (Compare with the classical case.) is well–defined & Scott continuous. If f  C 1 [0,1], then f   (a,b) iff a ↘ b ⊑

49 f  g iff g ⊑ (interval version) If g  C 0 then f  g iff g = (classical version) Fundamental Theorem of Calculus

50 Relation with Clarke’s gradient For a locally Lipschitz f : [0,1] n  IR ∂ f (x)=convex{ lim m f ´(x m ) | x m  x} It is a non-empty compact convex subset of R n Theorem: For locally Lipschitz f : [0,1] n  IR, the following holds: The domain-theoretic derivative at x, i.e. is the smallest n-dimensional rectangle with sides parallel to the coordinate planes that contains ∂ f (x) In dimension one the two coincide.

51 If h  C 1 [0,1] n, then ( h, h′ )  ([0,1] n  IR)  ([0,1] n  IR) n s Idea of Domain for C 1 Functions What pairs ( f, g)  ([0,1] n  IR)  ([0,1] n  IR) n s 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´

52 Function 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 ⊑.

53 Basis elements Definition. g:[0,1] n  (IR n ) s the domain of g is dom(g) = {x | g(x) non-bottom} Basis element: (f, g 1,g 2,….,g n )  ([0,1] n  IR)  ([0,1] n  IR) n s Each f, g i :[0,1] n  IR is a rational step function. Recall: the intersection of a closed and an open set is a crescent. dom(g) is partitioned by disjoint crescents in each of which g is a constant rational interval.. [-2,2] [-3,3] [-1,1] Eg. For n=2: A step function g i with four single step functions with two horizontal and two vertical rectangles as their domains and a hole inside, and with eight vertices.

54 Corners and their coaxial points [-2,2] [-3,3] [-1,1] Step function corners their coaxial points vertices=corners  coaxial points

55 Decidability 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  R n 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) We generalize this to the type g:[0,1] n  (IR n ) s

56 Interval-valued path integral For v  IR n, u  R n define the interval-valued scalar product

57 Generalized Green’s Theorem Theorem.  g   iff for all piecewise smooth non-intersecting path p:[0,1]  dom(g) with p(0)=p(1), we have zero-containment: For step functions, we can and will replace “smooth” with “linear”. Then, the lower and upper path integrals will depend piecewise linearly on the coordinates of nodes the path, so their extreme values will be reached when these nodes are at the corners of dom(g) or their coaxial points. Since there are finitely many of these extreme paths, zero containment can be decided in finite time for all paths.

58 Minimal surface for g Step function g:[0,1] n  (IR n ) s with  g  . Let O be a component of dom(g). Let x,y  cl(O). Consider the following supremum over all piecewise linear paths p in cl(O) with p(0 )= y and p(1)= x. The above supremum is attanied. For fixed y, the map V g (.,y): cl(O)  R is a rational piecewise linear function. It is the least continuous function or surface with: V g (y,y)=0 and g ⊑

59 Maximal surface for g Step function g:[0,1] n  (IR n ) s. Let O be a component of dom(g). Let x,y  cl(O). The following infimum is attained over all piecewise linear paths p in cl(O) with p(0 )= y and p(1)= x. For fixed y, the map W g (.,y): cl(O)  R is a rational piecewise linear function. It is the greatest continuous function or surface with: W g (y,y)=0 and g ⊑

60 Minimal surface for (f,g) (f,g)  ([0,1] n  IR)  ([0,1] n  IR) n s rational step function Assume we have determined that  g   Put Proposition. Theorem. s(f,g): dom(g)  R is the least continuous function with f -  s(f,g) and g ⊑

61 Maximal surface for (f,g) Theorem. t(f,g): dom(g)  R is the least continuous function with t(f,g)  f + and g ⊑ Theorem. Consistency is decidable. Proof: In s(f,g)  t(f,g) we compare two rational piecewise-linear surfaces, which is decidable.

62 Lemma. Cons  ([0,1] n  IR)  ([0,1] n  IR) n s is Scott closed. Theorem. D 1 [0,1] n := { (f,g) | (f,g)  Cons} is a continuous Scott domain that can be given an effective structure. The Domain of C 1 Functions Theorem.  : C 0 [0,1] n  D 1 [0,1] n f  (f, ) is topological embedding, and so is its restriction to C 1 [0,1] n, giving a computational model for continuous functions and their differential properties.

63 Example 1 f g v v is approximated by a sequence of step functions, v 0, v 1, … v = ⊔ i v i We solve: = v(t,x), x(t 0 ) =x 0 for t  [0,1] with v(t,x) = t and t 0 =1/2, x 0 =9/8. a3a3 b3b3 a2a2 b2b2 a1a1 b1b1 v3v3 v2v2 v1v1 The initial condition is approximated by rectangles a i  b i : {(1/2,9/8)} = ⊔ i a i  b i, t t.

64 Solution 1 f g At stage n we find u n - and u n +.

65 Solution 1 f g At stage n we find u n - and u n +

66 Solution 1 f g u n - and u n + tend to the exact solution: f: t  t 2 / At stage n we find u n - and u n +

67 Computing with polynomial step functions

68 Some Open Problems Topologically, what sort of a set is  (a,b) ? Topologically, what sort of a set is C 0 in the set of maximal elements of D 0 =[0,1]  IR? Similarly, for C 1 as a subset of maximal elements of D 1. For a domain of twice differentiable functions, is consistency decidable? (It is true for n=1.) Decidability of consistency for 3 rd and higher derivatives (not known even for n=1). Construct a domain for analytic functions. For solving PDE’s, obtain a domain-theoretic version of the finite difference and finite element methods.

Part III: A Domain-Theoretic Model of Geometry To develop a model for Computational Geometry and Solid Modelling, so that: the model is mathematically sound, realistic; the basic building blocks are computable; it bridges theory and practice.

70 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!

71 The Intersection of two lines With floating point arithmetic, find the point P of the intersection L 1  L 2. Then: min_dist(P, L 1 ) > 0, min_dist(P, L 2 ) > 0.

72 The Convex Hull Algorithm A, B & C nearly collinear With floating point we can get:

73 A, B & C nearly collinear The Convex Hull Algorithm With floating point we can get: (i) AC, or

74 A, B & C nearly collinear The Convex Hull Algorithm With floating point we can get: (i) AC, or (ii) just AB, or

75 A, B & C nearly collinear The Convex Hull Algorithm With floating point we can get: (i) AC, or (ii) just AB, or (iii) just BC, or

76 A, B & C nearly collinear With floating point we can get: (i) AC, or (ii) just AB, or (iii) just BC, or (iv) none of them. The quest for robust algorithms is the most fundamental unresolved problem in solid modelling and computational geometry. The Convex Hull Algorithm

77 Subset A  X topological space. Membership predicate  A : X  {tt, ff } is continuous iff A is both open and closed. A Fundamental Problem in Topology and Geometry In particular, for A  R n, A  , A  R n  A : R n  {tt, ff } is not continuous. Most engineering is done, however, in R n.

78 There is discontinuity at the boundary of the set. Non-computability of the Membership Predicate 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. FalseTrue

79 Non-computable Operations in Classical CG & SM  A : R n  {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(R n )  C(R n )  C(R n ), where C(R n ) is compact subsets with the Hausdorff metric.

80 Intersection of two 3D cubes

81 Intersection of two 3D cubes

82 Intersection of two 3D cubes

83 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.

84 Computable Topology and Geometry Computable Topology and 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. Redefine:  A : X  {tt, ff}  with the Scott topology on {tt, ff} . ttff open  observable Non-observable  A is now a continuous function.

85 Elements of a Computable Topology/Geometry Note that  A =  B iff int A=int B & int A c =int B c, 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.

86 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.

87 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 S O (X) of pairs of disjoint open sets (O 1,O 2 ) ordered componentwise by inclusion:

88 Theorem For a second countable locally compact Hausdorff space X (e.g. R n ), S(X) is bounded complete and  –continuous (i.e. a continuous Scott domain) with (U 1, U 2 ) << (V 1, V 2 ) iff the closures of U 1 and U 2 are compact subsets of V 1 and V 2 respectively. Theorem If X is Hausdorff, then: (O 1, O 2 )  Maximal (S X, ⊑ ) iff O 1 = int O 2 c & O 2 = int O 1 c. This is a regular solid object: O 1 =int O 1 & O 2 =int O 2 Properties of the Geometric (Solid) Domain Definition (O 1, O 2 ), O 1 ≠ ∅ ≠ O 2, is a classical object if O 1 ∪ O 2 = X.

89 Examples A = {x  R 2 ⃒ |x| ≤ 1}  [1, 2] represented in the model by A rep = (int A, int A c ) = ( {x ⃒ |x| < 1}, R 2 \ A ) is a classical (but non-regular) solid object. B = {x  R 2 ⃒ |x| ≤ 1} represented by B rep = ({x ⃒ |x| 1})  Maximal (SR 2, ⊑ ) is a regular solid object with A rep ⊑ B rep.

90 Boolean operations and predicates Theorem All these operations are Scott continuous and preserve classical solid objects.

91 Subset Inclusion Subset inclusion is Scott continuous. Let

92 General Minkowski operator For smoothing out sharp corners of objects. S b R n = { (A, B)  SR n | B c is bounded} ∪ {( ∅, ∅ )}. All real solids are represented in S b R n. Define: _  _ : SR n  S b R n  SR n ((A,B), (C,D)) ↦ (A ⊕ C, (B c ⊕ D c ) c ) where A ⊕ C = { a+c | a  A, c  C } Theorem _  _ is Scott continuous.

93 (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: An effectively given solid domain The geometric domain SX can be given effective structure for any locally compact second countable Hausdorff space, e.g. R n, S n, T n, [0,1] n. Consider X=R n. The set of pairs of disjoint open rational bounded polyhedra of the form K = (L 1, L 2 ), with L 1  L 2 = , gives a basis for SX. Let K n = (π 1 ( K n ), π 2 ( K n ) ) be an enumeration of this basis. (A, B) = sup n K ß(n) =( ∪ n π 1 ( K ß(n) ), ∪ n π 2 ( K ß(n) ) )

94 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.

95 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.

96 Quantative Measure of Convergence In our present model for computable solids, we require a quantitative measure for the convergence of the basis elements to a computable solid. We will enrich the notion of domain-theoretic computability in two different ways to include a quantitative measure of convergence.

97 We strengthen the notion of a computable solid by using the Hausdorff distance d between compact sets in R n. d(C,D) = min{ r>0 | C  D r & D  C r } where D r = { 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/2 n, d (π 2 ( K ß(n) ), B) < 1/2 n Hausdorff Computability

98 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.

99 Boolean Intersection is not Hausdorff computable However: Q  ([0,1]  {0}) = [r,1]  {0}  R 2 is not Hausdorff computable. is Hausdorff computable.

100 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) ), ∪ n π 2 ( K ß(n) ) ) µ(A) - µ(π 1 ( K ß(n) ) ) < 1/2 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.

101 Hausdorff computable ⇏ Lebesgue computable Complement of a Cantor set with Lebesgue measure 1– r with r =lim r n : left computable but non-computable real. 01 s0s0 At stage n remove 2 n open mid-intervals of length s n /2 n. s tart with stage 1 stage 2

102 Hausdorff and Lebesgue computability Lebesgue computable ⇏ Hausdorff computable Let 0 < r n  Q with r n ↗ r, left computable, non- computable 0 < r < 1. Then [r,1]  {0}  R 2 is Lebesgue computable but not Hausdorff computable.

103 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. Hausdorff and Lebesgue Computable Objects

104 Summary 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

105 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

106 The Outer Convex Hull Algorithm

107 The Inner Convex Hull Algorithm Top right corners Top left corners bottom right cornersbottom left corners

108 The Convex Hull Algorithm

109 The Convex Hull Algorithm

110 Let H m : (R 2 ) m  C(R 2 ) be the classical convex Hull map, with C(R 2 ) the set of compact subsets of R 2, with the Hausdorff metric. Let (IR 2,  ) be the domain of rectangles in R 2. The Convex Hull map For x=(T 1,T 2,…,T m )  (IR 2 ) m, define: C m : (IR 2 ) m  SR 2, C m (x) = (I m (x),E m (x)) with: E m (x):=  {(H m (y)) c | y  (R 2 ) m, y i  T i, 1  i  m} I m (x):=  {(H m (y)) 0 | y  (R 2 ) m, y i  T i, 1  i  m} T1T1 T2T2 T3T3 T4T4 Each rectangle T  IR 2 has vertices T 1,T 2,T 3,T 4, going anti-clockwise from the right bottom corner.

111 The Convex Hull is Computable! Proposition: E m (x)=(H 4m ((T i 1,T i 2,T i 3,T i 4 )) 1  i  m ) c I m (x)=Int(  {H m ((T i n )) 1  i  m ) | n=1,2,3,4}). Theorem: The map C m : (IR 2 ) m  SR 2 is Scott continuous, Hausdorff and Lebesgue computable. Complexity: 1. E m (x) is O(m log m). 2. I m (x) is also O(m log m). We have precisely the complexity of the classical convex hull algorithm in R 2 and R 3.

112 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.

113 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 Voronoi Diagram & Partial Circles 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.

114 Partial Perpendicular Bisector of Two Partial Points

115 PPBs for Three Partial Points Partial Centre

116 Partial Circles The Interior is the intersection of the interiors of the three blue circles. The exterior is the union of the exteriors of the three red 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.

117 Partial Circles With more exact partial points, the boundaries of the interior and exterior of the partial circle get closer to each other.

118 Partial Circles In the limit, the area between the interior and exterior of the partial circle, and the Hausdorff distance between their boundaries, tends to zero. We get a Scott continuous map C : (IR 2 ) 3  SR 2 We obtain a robust Voronoi algorithm.

119 Part IV Inverse and Implicit Function Theorems Domain of Manifolds The mains tool in multi-variable calculus. In CAD curves and surfaces are built from the implicit function theorem, f(x,y,z) = 0 for a C 1 map f: R 3  R A domain-theoretic framework can be the basis of a robust CAD. Implicit function theorem follows from the inverse function theorem, both classically and domain-theoretically.

120 Calculus of operations in D 1 For a vector function f = (f i ) i := (f i ) 1≤i≤n we write f  D 1 ([0,1] n  R n ) if f i  D 1 ([0,1] n  R) for 1 ≤i ≤ n The following operations are well-defined and Scott continuous: -  - : D 1 ([0,1] n  IR n )× D 1 ([0,1] n  IR n )  D 1 ([0,1] n  IR n ) ( f, g )  f  g with (f  g) i = ( f i0  g i0, f i1  g i1,…….., f in  g in ) - ◦ - : D 1 (R n  IR n )× D 1 ([0,1] n  IR n )  D 1 ([0,1] n  IR n ) ( f, g )  f◦g This extends the higher dimensional chain rule.

121 Inverse Constructor (function part) Idea: First find the inverse of a map which differs from the identity map by a contraction Let A=[-a,a] n and B=[-ca,ca] n for a> 0 and 0< c ≤1/2 V: (A→IB)×(B→IB)→(B→IB) (f,g) → - If ◦ (id+g), where id is the identity map. Theorem. Suppose f:[-a,a] n →R n has Lipschitz constant nc<1 wrt the max norm and f(0)=0. Then V(f,.): (B→IB)→(B→IB) has a unique fixed point g satisfying g - = g + and g(0)=0 id+f : [-a,a] n →R n has inverse id+g In fact: g = - f ◦ (id+g) implies (id +f)◦(id+g) = id+ g – g = id

122 Inverse Constructor (derivative part) Recall A=[-a,a] n and B=[-ca,ca] n for a> 0 and 0< c ≤1/2 The classical functional (f, g)→ - f ◦ (id+g): C 1 ×C 1 →C 1 is extended to: T: D 1 (A → IB) × D 1 ( B → IB ) → D 1 ( B→IB ) (f, g ) → ( V((f i0 ) i, (g i0 ) i ), S ((f ij ) ij,(g i0 ) i, (g ij ) ij ) ) with S: (A → IB) × (B → IB) × (B→ IR n ) → (B → IR n ) (h, u,w) → - ( Ih ◦ (id +u) )  ( x.id + w)

123 Invesre Constructor (derivative part) Suppose f:[-a,a] n →R n has Lipschitz constant nc < 1 wrt the max norm and f(0)=0. Then the functional has a unique fixed point ((g i0 ) i,(g ij ) ij ) where (g i0 ) i is the unique fixed point of V(f,-) and (g ij ) ij is the unique fixed point of If f '(x) exists for some x  [-a,a] n, so does (g i0 ) i ' (x) and we have: (g i0 ) i ' (x) = (g ij ) ij (x)

124 Mean Differential Lemma u: [-a,a] n → R n has Lipschitz constant nc<1 wrt the max norm iff u i  δ([-a,a] n,[-c,c]) for 1 ≤i ≤ n Definition. Given u:[-1,1] n  R n, the mean differential at x 0  :[-1,1] n is the linear map represented by the matrix M with Proposition. Suppose the mean differential M of u:[-1,1] n  R n at 0 is invertible with k:=|| M -1 - id || 0 such that the map f=M -1 u- id: [-a,a] n → R n satisfies f i  δ([-a,a] n,[-c,c]) for 1 ≤i ≤ n; thus the map f has Lipschitz constant nc<1 wrt the max norm

125 Inverse Function theorem Theorem. Let u:[-1,1] n  R n and suppose the mean differential M of u at 0 is invertible with || M -1 - id || < 1/n. Then: The map u has a Lipschitz inverse in a neighbourhood of 0. Given an increasing sequence of linear step functions converging to u, we can effectively obtain an increasing sequence of linear step functions converging to u -1 If furthermore u is C 1 and given also an increasing sequence of linear step functions converging to u' we can also effectively obtain an increasing sequence of polynomial step functions converging to (u -1 )'

126 Current and Further Work A domain (w-continuous dcpo) for Lipschitz manifolds with basis given by rational piecewise linear manifold (i.e., polyhedra). Construct the kernel of a robust CAD, based on domain-theoretic approximations to curves and surfaces obtained by the implicit function theorem.