Schemas as Toposes Steven Vickers Department of Pure Mathematics Open University Z schemas – specification1st order theories – logic geometric theories.

Slides:



Advertisements
Similar presentations
Computing Fundamentals 2 Introduction to CafeOBJ Lecturer: Patrick Browne Lecture Room: K408 Lab Room: A308 Based on work by: Nakamura Masaki, João Pascoal.
Advertisements

Chair of Software Engineering The alias calculus Bertrand Meyer ITMO Software Engineering Seminar June 2011.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
SYMBOLIC MODEL CHECKING: STATES AND BEYOND J.R. Burch E.M. Clarke K.L. McMillan D. L. Dill L. J. Hwang Presented by Rehana Begam.
Predicate Calculus Formal Methods in Verification of Computer Systems Jeremy Johnson.
1 Relational Algebra & Calculus. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.  Relational.
ISBN Chapter 3 Describing Syntax and Semantics.
Copyright © 2006 Addison-Wesley. All rights reserved. 3.5 Dynamic Semantics Meanings of expressions, statements, and program units Static semantics – type.
CS 355 – Programming Languages
School of Computing and Mathematics, University of Huddersfield CAS810: WEEK 3 LECTURE: LAMBDA CALCULUS PRACTICAL/TUTORIAL: (i) Do exercises given out.
PSUCS322 HM 1 Languages and Compiler Design II Formal Semantics Material provided by Prof. Jingke Li Stolen with pride and modified by Herb Mayer PSU Spring.
Software Verification Bertrand Meyer Chair of Software Engineering Lecture 2: Axiomatic semantics.
Describing Syntax and Semantics
1 Relational Algebra and Calculus Yanlei Diao UMass Amherst Feb 1, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
Propositional Calculus Math Foundations of Computer Science.
Discrete Math 6A Max Welling. Recap 1. Proposition: statement that is true or false. 2. Logical operators: NOT, AND, OR, XOR, ,  3. Compound proposition:
1 First order theories. 2 Satisfiability The classic SAT problem: given a propositional formula , is  satisfiable ? Example:  Let x 1,x 2 be propositional.
The Relationship between Topology and Logic Dr Christopher Townsend (Open University)
First Order Logic. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about first order.
Intro to Discrete Structures
DEDUCTIVE DATABASE.
A Logic for Decidable Reasoning about Services Yilan Gu Dept. of Computer Science University of Toronto Mikhail Soutchanski Dept. of Computer Science Ryerson.
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.
A Z Approach in Validating ORA-SS Data Models Scott Uk-Jin Lee Jing Sun Gillian Dobbie Yuan Fang Li.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: More Proofs.
DECIDABILITY OF PRESBURGER ARITHMETIC USING FINITE AUTOMATA Presented by : Shubha Jain Reference : Paper by Alexandre Boudet and Hubert Comon.
The Relational Model: Relational Calculus
© Kenneth C. Louden, Chapter 11 - Functional Programming, Part III: Theory Programming Languages: Principles and Practice, 2nd Ed. Kenneth C. Louden.
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
Formal Verification Lecture 9. Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
1 Relational Algebra and Calculas Chapter 4, Part A.
Copyright © 2014 Curt Hill Sets Introduction to Set Theory.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
© Kenneth C. Louden, Chapter 11 - Functional Programming, Part III: Theory Programming Languages: Principles and Practice, 2nd Ed. Kenneth C. Louden.
Formal Semantics of Programming Languages 虞慧群 Topic 1: Introduction.
CSE 230 The -Calculus. Background Developed in 1930’s by Alonzo Church Studied in logic and computer science Test bed for procedural and functional PLs.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
CompSci 102 Discrete Math for Computer Science
Course: Software Engineering – Design I Unit 1: Theories and SchemasSlide Number 1 Course: Software Engineering - Design I Lecturer: Dr. Alessandra Russo.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
CS6133 Software Specification and Verification
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Mathematical Preliminaries
Sets 2/10/121. What is a Set? Informally, a collection of objects, determined by its members, treated as a single mathematical object Not a real definition:
Course: Software Engineering Unit 2: Theories and SchemasSlide Number 1 Unit 2: Theories and Schemas This lecture aims to: Recall some concepts in logic:
1 / 48 Formal a Language Theory and Describing Semantics Principles of Programming Languages 4.
1. Outline I. Specification and Definition II. Typed Predicate Logic III. Specification in TPL IV. Theories off Types V. Polymorphic Specifications VI.
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
lamsweerde Chap.4: Formal Requirements Specification © 2009 John Wiley and Sons Fundamentals of RE Chapter 4 Requirements.
Types and Programming Languages Lecture 11 Simon Gay Department of Computing Science University of Glasgow 2006/07.
1 First order theories (Chapter 1, Sections 1.4 – 1.5) From the slides for the book “Decision procedures” by D.Kroening and O.Strichman.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Richard Dedekind ( ) The grandfather of mathematical structuralism
Introduction Chapter 0.
Axioms for a category of spaces
MA/CSSE 474 More Math Review Theory of Computation
Introduction Chapter 0.
Department of Computer Science
ICOM 5016 – Introduction to Database Systems
This Lecture Substitution model
Representations & Reasoning Systems (RRS) (2.2)
Presentation transcript:

Schemas as Toposes Steven Vickers Department of Pure Mathematics Open University Z schemas – specification1st order theories – logic geometric theories toposes – as generalized topological spaces

Z schemas e.g. Trans [X] R: X  X R  R  R schema name generic set declaration predicate meaning: “function”: {sets}  {sets} X  {R  X  X   R  R  R} = {transitive relations on X}

First-order theory e.g. sortX binary predicateR(x,y)  x,y,z:X. (R(x,y)  R(y,z)  R(x,z)) vocabulary axiom Meaning: Set of all logical consequences of axioms amongst well-formed formulae using vocabulary.

Models – of a first-order theory Interpret vocabulary as actual sets, relations, etc. … in such a way that the axioms are all true e.g. for Trans A model of Trans is a pair (X,R) with X a set and R a transitive binary relation on it. Guiding principle: The purpose of a schema or theory is to delineate a class of models

SchemasasTheories Relational calculusPredicate calculus R  R  R  x,y,z. (R(x,y)  R(y,z)  R(x,z)) Generics as parametersSorts as carriers Higher-orderFirst-order can translate geometric logic

Types in Z ZZ integers cartesian product power set Presence of  means can have variables and terms for sets, not just for elements. e.g.  S:  X. … Higher order! 1st order logic can’t do this.

Geometric logic First order, many sorted. Two levels of axiom formation: Formulas: built using , V, , , true, false Axioms:  x:X, y:Y, … (  (x,y,…)   (x,y,…)) formulas

e.g. groups Group [G] e: G -1 : G  G : G  G  G  x,y,z: G (true  x(yz) = (xy) z)  x: G (true  xe = x  ex = x)  x: G (true  xx -1 = e  x -1 x = e)

Types out of logic Th [X, Y, Z] i: X  Z j: Y  Z  x, x': X. (i(x) = i(x')  x = x')  y, y': Y. (j(y) = j(y')  y = y')  z: Z. (true   x: X. z = i(x)   y: Y. z = j(y))  x: X, y: Y. (i(x) = j(y)  false) e.g. forcing Z  X+Y (disjoint union)

Moral either: can eliminate “type constructor” X+Y by introducing new sort with 1st order structure and axioms or: can harmlessly extend geometric logic with + as type constructor

Using infinite disjunctions e.g. forcing Y  F(X) (finite power set) Th2 [X, Y]  : Y {–}: X  Y  : Y  Y  Y  y,y',y": Y. (true  (y  y')  y" = y  (y'  y"))  y,y': Y. (true  y  y' = y'  y)  y: Y. (true  y  = y   y = y)  y: Y. (true  V n  nat  x 1, …, x n. y = {x 1 }  …  {x n })  x 1, …, x m, x' 1, …, x' n : X. ({x 1 }  …  {x m } = {x' 1 }  …  {x' n }   1  i  m V 1  j  n x i = x' j   1  j  n V 1  i  m x' j = x i )

Weak 2nd order Geometric logic has 2nd order capabilities for finite sets. e.g.  S: F(X). (…)– in formulas  S: F(X). (…)– in axioms Also, if S finite and  a formula then  x  S.  (x) definable as a formula V n  nat  x 1, …, x n. (S = {x 1 }  …  {x n }   1  i  n  (x i ))

Topology – e.g. real line R L, R  Q true   q: Q. L(q)   q': Q. R(q')  q, q': Q. (q < q'  L(q')  L(q))  q: Q. (L(q)   q': Q. (q < q'  L(q'))  q, q': Q. (q > q'  R(q')  R(q))  q: Q. (R(q)   q': Q. (q > q'  R(q'))  q: Q. (L(q)  R(q)  false)  q, q': Q. (q < q'  L(q)  R(q')) Each model is a real number (Dedekind section) Topology is intrinsic: each proposition is an open set L(q): q < x R(q): x < q

GeoZ – geometric logic as specification language Take Z-style calculus Modify type system and logic to be geometric Type constructors: , +, equalizers, coequalizers, N, Z, Q, F, free algebras But not:  (power set),  (function set), R Constrains the language … but practical expressive power seems comparable with Z

Geometric logic – summary of features Advantages (simplicity) of 1st order logic … but can emulate higher order features (e.g. weak 2nd order) Natural picture: schema specifies “space of implementations” Good structure on each class of models – categorical, topological Natural to consider maps that are functorial, continuous Full mathematical answer is abstruse! – geometric morphisms between classifying toposes (topos as generalized topological space)

Challenge Can the mathematics be made less abstruse for the sake of specificational practice? (And to the benefit of the mathematics too!)

Topology-free spaces Synthetic topology Idea: Treat spaces like sets – forget topology For functions: Use constraints on mode of definition to ensure definable  continuous

Old examples polynomial functions p: R  R are automatically continuous p(x) = a n x n + … + a 1 x + a 0 denotational semantics of programming languages Given: a functional programming language, and a denotational semantics for it. Each function written in that language denotes a continuous map between two topological spaces, “semantic domains”. Continuity guaranteed by general semantic result.

Newer example (Escardo) -calculus -definable functions between topological spaces are automatically continuous – even if some of the function spaces don’t properly exist! Simple proofs of topological results (compactness, closedness, …) express logical essence of proof hide topological housekeeping (continuity proofs etc.)

Geometric reasoning Describe points of space = models of geometric theory  intrinsic topology Describe function using geometric constructions  automatic continuity Geometrically constructivist mathematics  “topology-free spaces” Logical approach  locales / formal topologies(propositional theories) toposes(predicate theories)

Topical Categories of Domains (Vickers) Apply methods to denotational semantics. [SFP] = “space” of SFP domains Solving recursive domain equations X  F(X): – any continuous map F: [SFP]  [SFP] – has initial algebra X – and its structure map  : F(X)  X is an isomorphism (a fixed point) – copes with problems like F(X) = [X  X] topos geometri c morphis m

(Topical Categories of Domains) Task: define basic domain constructions ( , +, function spaces, power domains, …) geometrically (geometric constructivism). Then e.g. function space construction is a geometric morphism. [-  -]: [SFP] 2  [SFP] Constructive reasoning  geometric morphism  generalized continuity required for fixed points as limits If E any local topos (e.g. [SFP]), F: E  E any geometric morphism, then F has an initial fixed point.   F(  )  F 2 (  )  F 3 (  )  …– take colimit

Mathematical payoff from geometric constructivism Focus on essence of mathematics Ignore topological housekeeping (e.g. continuity proofs) Includes generalization from topology to toposes e.g. free access to fixed point results (e.g. domain equations) [SFP] a presheaf topos – without examining category structure of topos “Spatial” proofs in locale theory

Current work (+ Townsend + Escardo) Make -calculus methods work with locales (propositional geometric theories) Combine with geometric logic e.g.P U (P L (X))  $ ($ X ) upper and lower powerlocales (cf. powerdomains) Definable in terms of geometric theories function spaces – so can use -calculus

Specificational aim Mathematical “logic of continuity” (topology-free spaces)  Formal GeoZ specification language  Can test more fully in application

Conclusions Computer science  has big influence on Pure mathematics The maths it leads to is worth investigating even for its own sake … BUT it retains links with computer science: motivation potential applications