(Effectul) Game Semantics for Dependent Types

Size: px
Start display at page:

Download "(Effectul) Game Semantics for Dependent Types"

Transcription

1 Eindhoven, 3 April 2016

2

3 Overview Game theoretic models of dependent type theory (DTT): get faithful model of (total) DTT with Σ-, Π-, intensional Id-types and finite inductive type families; fully complete if Id-types limited;

4 Overview Game theoretic models of dependent type theory (DTT): get faithful model of (total) DTT with Σ-, Π-, intensional Id-types and finite inductive type families; fully complete if Id-types limited; very intensional model - refines domain model; Id-types more intensional: function extensionality fails; intensional orthogonally to HoTT (time vs space): UIP holds;

5 Overview Game theoretic models of dependent type theory (DTT): get faithful model of (total) DTT with Σ-, Π-, intensional Id-types and finite inductive type families; fully complete if Id-types limited; very intensional model - refines domain model; Id-types more intensional: function extensionality fails; intensional orthogonally to HoTT (time vs space): UIP holds; call-by-name evaluation; can (dis)allow effects by varying condition on strategies: combining dependent types and effects!

6 The Semantic (Hyper)Cube Consider subfamily str of all strategies to exclude effects: No non-termination: winning No state: history-freeness / innocence + visibility No control operators: question-answer discipline No erratic choice: determinacy for Player.

7 The Semantic (Hyper)Cube Consider subfamily str of all strategies to exclude effects: No non-termination: winning No state: history-freeness / innocence + visibility No control operators: question-answer discipline No erratic choice: determinacy for Player. Primarily, here, for str we demand all these conditions (for completeness results), but can vary to model effects.

8 Games and Simple Type Theory (STT) Write (Game, I, &, ) for ccc of games and strategies.

9 Games and Simple Type Theory (STT) Write (Game, I, &, ) for ccc of games and strategies. Ground types (finite inductive types): for a set X, game X with one Opponent move, followed by any of the Player moves x X.

10 Games and Simple Type Theory (STT) Write (Game, I, &, ) for ccc of games and strategies. Ground types (finite inductive types): for a set X, game X with one Opponent move, followed by any of the Player moves x X. Call simple type theory (STT): λ-calculus with binary products, function types and finite inductive types {a i 1 i n}, or a total finitary PCF with binary products. Straightforward consequence of AJM2000: Theorem Interpretation in Game fully and faithfully complete: [[ ]] Syntax STT Game full and faithful.

11 Dependent type theory (DTT)? What is it? Curry-Howard for predicate logic: types with free (term) variables, constructions Σ, Π, Id (cf.,, =) on types. Judgements like x : A B(x) type and x : A b(x) : B(x). Order in context matters! No clean separation syntax types and terms.

12 Dependent type theory (DTT)? What is it? Curry-Howard for predicate logic: types with free (term) variables, constructions Σ, Π, Id (cf.,, =) on types. Judgements like x : A B(x) type and x : A b(x) : B(x). Order in context matters! No clean separation syntax types and terms. Why care? Move towards richer type systems: e.g. GADTs in Haskell. Types allowed to refer to data: e.g. n : N List(n) type. Specification by typing: certification by type checking. Programming logic as a proof assistant. Logical Frameworks.

13 Dependent types and their terms: n : N List(n) type n : N, x : List(n) reverse(x) : List(n) Π- and Σ-types (generalising and ): λ n λ x reverse(x) : Π n:n List(n) List(n) mult : Π k,l,m:n matrix(k, l) matrix(l, m) matrix(k, m) 9, [No, wise, fish, would, go, anywhere, without, a, porpoise] : Σ n:n List(n)

14 Dependent types and their terms: n : N List(n) type n : N, x : List(n) reverse(x) : List(n) Π- and Σ-types (generalising and ): λ n λ x reverse(x) : Π n:n List(n) List(n) mult : Π k,l,m:n matrix(k, l) matrix(l, m) matrix(k, m) 9, [No, wise, fish, would, go, anywhere, without, a, porpoise] : Σ n:n List(n) Id-type: refl : Id N (0, (λ x x)(0)) x, y : B case(x,case(y,refl,refl),case(y,refl,refl)) : Id B (lsor(x,y),rsor(x,y)) Finite inductive type families: x : months days(x) type 31 : days(october).

15 A Faithful Translation to Simple Type Theory (STT) Idea: DTT talks about same algorithms as STT but can assign them a more precise type/specification. Formally: have faithful translation ( ) T of DTT into STT.

16 A Faithful Translation to Simple Type Theory (STT) Idea: DTT talks about same algorithms as STT but can assign them a more precise type/specification. Formally: have faithful translation ( ) T of DTT into STT. x : A (a i i {b i,j j}) type {b i,j i, j} type x : A Σ y:b C type B T C T type x : A Π y:b C type B T C T type x : A, y : B, y : B Id B (y, y ) type {refl} type x : A B(a) type B(x) T type + translation on terms.

17 The idea of our interpretation [[ ]] will be to construct a category CtxtGame of dependent context games with a functor ( ) to Game, such that Syntax DTT ( ) T Syntax STT [[ ]] CtxtGame ( ) [[ ]] Game. Games model of DTT will therefore automatically be faithful.

18 Dependent Games and Strategies Game B with dependency on A consists of: game (B) (without dependency); function str(a) B Sub( (B)) from strategies on A to subgames ( -closed subsets of plays) of (B). Can define I, & and on games with dependency and make into ccc with homset DGame(A)(B, C) := str(π A (B C)).

19 We define a game Π A B A (B) of dependent functions. Idea: the choice of a fibre B(a) for the output of a dependent function f : Π A B is entirely the responsibility of the context that provides the argument a.

20 We define a game Π A B A (B) of dependent functions. Idea: the choice of a fibre B(a) for the output of a dependent function f : Π A B is entirely the responsibility of the context that provides the argument a. Opponent can determine fibre B(τ) of B: explicitly, revealing strategy τ on A, by playing in A; implicitly, by playing in (B); Player has to stay within B(τ) for all τ consistent with Opponent s behaviour.

21 We define a game Π A B A (B) of dependent functions. Idea: the choice of a fibre B(a) for the output of a dependent function f : Π A B is entirely the responsibility of the context that provides the argument a. Opponent can determine fibre B(τ) of B: explicitly, revealing strategy τ on A, by playing in A; implicitly, by playing in (B); Player has to stay within B(τ) for all τ consistent with Opponent s behaviour. That is, as long as there is such a τ; otherwise, anything goes. Indeed, Opponent is totally free and might not respect the type dependency, as ( ) should be faithful (to match ( ) T ).

22 Non-example of dependently typed algorithm: scheduling finance meetings Player/Academic: Opponent/Education Finance Business Manager Manager: x : months 31 : days(x) Π( months, days ) O 31 P Player chooses fibre: e.g. February doesn t have a 31 st day. Mr Manager shouldn t allow that...

23 Example of dependently typed algorithm: Academic/Player: Opponent/Education Finance Business Manager Manager: x : months case days,months (x, {31, 1,..., 1, 31}) : days(x) [January/x] Π( months, days ) O P January O 31 P

24 Example (fibre-wise identities): Player: Opponent: x : A, y : B(x) y : B(x) choose your favourite Π( [[A]], [[B]] [[B]]) b b b. b O P O P

25 Theorem Have indexed ccc Game op DGame CCCat of dependent games: ob(dgame(a)) := {str(a) B Sub( (B))} hom-sets DGame(A)(B, C) := str(π A (B C)) fibrewise identities as in example; fibrewise comp. & change of base: usual AJM-composition.

26 Theorem Have indexed ccc Game op DGame CCCat of dependent games: ob(dgame(a)) := {str(a) B Sub( (B))} hom-sets DGame(A)(B, C) := str(π A (B C)) fibrewise identities as in example; fibrewise comp. & change of base: usual AJM-composition. As we don t have (additive) Σ-types, not a model of DTT! Well! I ve often seen a cat without a grin, thought Alice; but a grin without a cat! It s the most curious thing I ever saw in all my life.

27 Theorem Have indexed ccc Game op DGame CCCat of dependent games: ob(dgame(a)) := {str(a) B Sub( (B))} hom-sets DGame(A)(B, C) := str(π A (B C)) fibrewise identities as in example; fibrewise comp. & change of base: usual AJM-composition. As we don t have (additive) Σ-types, not a model of DTT! Well! I ve often seen a cat without a grin, thought Alice; but a grin without a cat! It s the most curious thing I ever saw in all my life. Theorem Formally add them: get model CtxtGame of DTT with ΣΠ-types! Obj: lists [X k ] k, where str( (X 1 )& & (X k 1 )) X k Sub( (X k )). Mor: lists of strategies on Π-games of more variables.

28 We can also interpret finite inductive type families x : A (a i i {b i,j j} type: [[a i ]] {b i,j j} {b i,j i, j} else {b i,j i, j} ; identity types x : A, x : A Id A (x, x ) type: (σ, σ ) {refl σ = σ } {refl}.

29 Non-Example: Player: x : B, y : B p : Id B (x, y) Opponent : [tt/x, ff/y] Π( B, Π( B, Id B ) tt ff refl O P O P O P...as tt ff.

30 Example: Player: x : B refl x : Id B (x, x) Opponent:...as x = x. Π( B, Id B {diag B }) refl O P

31 Example, given x : A f : B(x, x, refl x ): Player: Opponent: x : A, x : A, y : Id A (x, x ) J(f ) : B Π( A, Π( A, Π( Id A, B))) b refl f (b) a f (a).. O P O P O P...as refl move by Opponent has excluded all pairs (x, x ) with x x.

32 Place in intensionality spectrum Id-types: Domains HoTT Games Failure of Equality Reflection Streicher Intensionality Criteria (I1) and (I2) Streicher Intensionality Criterion (I3) Failure of Function Extensionality (FunExt) Failure of Uniqueness of Identity Proofs (UIP). Discrete ground types (0-types), but function hierarchy generates (open) propositional identities: applicative equivalences.

33 Completeness Results Summarising, we have Theorem (Soundness and Faithfulness) We have a faithful model of DTT with Σ-, Π-, intensional Id-types and finite inductive type families: faithful functor Syntax DTT [[ ]] CtxtGame.

34 Completeness Results Summarising, we have Theorem (Soundness and Faithfulness) We have a faithful model of DTT with Σ-, Π-, intensional Id-types and finite inductive type families: faithful functor Syntax DTT [[ ]] CtxtGame. Actually, the model has strong completeness properties. Theorem (Full Completeness) This interpretation is full when restricted to the types of the form A or Π A Id B (f, g) with A and B built without Id-types: Restricted Types SyntaxDTT [[ ]] CtxtGame full.

35 Alternative Id-types and Function Extensionality Interpretation intensional Id-types not unique! Try alternative, mimicking the domain semantics, validating function extensionality: Π x:a Id B (f (x), g(x)) = Id Πx:A B(f, g). Demand that dep. games respect applicative equivalence. Define Id A : (σ, σ ) σ AE σ AE (A), where σ AE is the set of plays of (A) that is compatible with a strategy that is applicatively equivalent to σ.

36 Alternative Id-types and Function Extensionality Interpretation intensional Id-types not unique! Try alternative, mimicking the domain semantics, validating function extensionality: Π x:a Id B (f (x), g(x)) = Id Πx:A B(f, g). Demand that dep. games respect applicative equivalence. Define Id A : (σ, σ ) σ AE σ AE (A), where σ AE is the set of plays of (A) that is compatible with a strategy that is applicatively equivalent to σ. Interpret x : A refl x : Id A (x, x) as the copycat. For x : A f : B(x, x, refl x ), interpret x : A, x : A, y : Id A (x, x ) J(f ) : B(x, x, y) by playing [[f ]] between [[Id A ]] and [[B]]. Incompatible with partial or non-deterministic strategies!

37 Future Work game semantics of higher inductive types / quotient types; combining function extensionality with partiality and non-determinism; modelling universes and univalence; infinite inductive type families and their definability results; examining full completeness (w.r.t. DTT + UIP) of the model for the type hierarchy including unrestricted Id-types; what do these models teach us about DTT with effects? construct CBV and CBPV models; compare with realizability models.

38 In particular, for the first item: HtpyGame... Gpd Set Game Game A collapsing time-like identity, a.k.a. extensional collapse Gpd Set collapsing space-like identity, a.k.a. 0-truncation X X 0. str(a)/obs.equiv.

39 Bonus Example (Higher order dependent functions): approving holiday plans Player/PhD Student: Opponent/Supervisor : w : years, x : Π(y : days(w), Π(z : holidays(w, y), B)) going on holidays? : B [2015/w, acceptable holidays/x] Π(years, Π( Π(days, Π(holidays, B ))), B ) O P O International Talk Like a Pirate Day P ff O ff P (ITLPD happens every year, so don t need to ask about the year. Moreover, Player is also in charge of supplying the date, so we don t have to determine the date before specifying the holiday.)

40 Bonus Example (Higher order dependent functions): approving holiday plans Player/PhD Student: Opponent/Supervisor : w : years, x : Π(y : days(w), Π(z : holidays(w, y), B)) going on holidays? : B [2015/w, acceptable holidays/x] disobedient student... Π(years, Π( Π(days, Π(holidays, B ))), B ) International Talk Like a Pirate Day ff tt O P O P O P

41 Bonus Example (Higher order dependent functions): approving holiday plans Player/PhD Student: Opponent/Supervisor : w : years, x : Π(y : days(w), Π(z : holidays(w, y), B)) going on holidays? : B [2015/w, acceptable holidays/x] Π(years, Π( Π(days, Π(holidays, B ))), B ) O P O Holi P O P 2015 O 65 P tt O tt P (Note that Holi happens every year with variable Gregorian date and that Player gets to choose the day so can even specify the holiday before the day.)

Game Semantics for Dependent Types

Game Semantics for Dependent Types Bath, 20 ctober, 2015 verview Game theoretic model of dependent type theory (DTT): refines model in domains and (total) continuous functions; call-by-name evaluation; faithful model of (total) DTT with

More information

a brief introduction to (dependent) type theory

a brief introduction to (dependent) type theory a brief introduction to (dependent) type theory Cory Knapp January 14, 2015 University of Birmingham what is type theory? What is type theory? formal language of terms with types x : A x has type A What

More information

A NEW PROOF-ASSISTANT THAT REVISITS HOMOTOPY TYPE THEORY THE THEORETICAL FOUNDATIONS OF COQ USING NICOLAS TABAREAU

A NEW PROOF-ASSISTANT THAT REVISITS HOMOTOPY TYPE THEORY THE THEORETICAL FOUNDATIONS OF COQ USING NICOLAS TABAREAU COQHOTT A NEW PROOF-ASSISTANT THAT REVISITS THE THEORETICAL FOUNDATIONS OF COQ USING HOMOTOPY TYPE THEORY NICOLAS TABAREAU The CoqHoTT project Design and implement a brand-new proof assistant by revisiting

More information

Negations in Refinement Type Systems

Negations in Refinement Type Systems Negations in Refinement Type Systems T. Tsukada (U. Tokyo) 14th March 2016 Shonan, JAPAN This Talk About refinement intersection type systems that refute judgements of other type systems. Background Refinement

More information

Univalent fibrations in type theory and topology

Univalent fibrations in type theory and topology Univalent fibrations in type theory and topology Dan Christensen University of Western Ontario Wayne State University, April 11, 2016 Outline: Background on type theory Equivalence and univalence A characterization

More information

Game Semantics: an Overview

Game Semantics: an Overview Game Semantics: an Overview Guy McCusker Game Semantics: an Overview p.1/45 What did he say? Qu est-ce ue c est la sémantiue des jeux? Or in English... Game Semantics: an Overview p.2/45 What did he say?

More information

Introduction to Homotopy Type Theory

Introduction to Homotopy Type Theory Introduction to Homotopy Type Theory Lecture notes for a course at EWSCS 2017 Thorsten Altenkirch March 5, 2017 1 What is this course about? To explain what Homotopy Type Theory is, I will first talk about

More information

Using Agda to Explore Path-Oriented Models of Type Theory

Using Agda to Explore Path-Oriented Models of Type Theory 1/22 Using Agda to Explore Path-Oriented Models of Type Theory Andrew Pitts joint work with Ian Orton Computer Laboratory Outline 2/22 The mathematical problem find new models of Homotopy Type Theory Why

More information

Inductive Types for Free

Inductive Types for Free Inductive Types for Free Representing Nested Inductive Types using W-types Michael Abbott (U. Leicester) Thorsten Altenkirch (U. Nottingham) Neil Ghani (U. Leicester) Inductive Types for Free p.1/22 Ideology

More information

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic. Overview CS389L: Automated Logical Reasoning Lecture 6: First Order Logic Syntax and Semantics Işıl Dillig So far: Automated reasoning in propositional logic. Propositional logic is simple and easy to

More information

Categorical models of type theory

Categorical models of type theory 1 / 59 Categorical models of type theory Michael Shulman February 28, 2012 2 / 59 Outline 1 Type theory and category theory 2 Categorical type constructors 3 Dependent types and display maps 4 Fibrations

More information

The three faces of homotopy type theory. Type theory and category theory. Minicourse plan. Typing judgments. Michael Shulman.

The three faces of homotopy type theory. Type theory and category theory. Minicourse plan. Typing judgments. Michael Shulman. The three faces of homotopy type theory Type theory and category theory Michael Shulman 1 A programming language. 2 A foundation for mathematics based on homotopy theory. 3 A calculus for (, 1)-category

More information

Lecture slides & distribution files:

Lecture slides & distribution files: Type Theory Lecture slides & distribution files: http://www.cs.rhul.ac.uk/home/zhaohui/ttlectures.html Zhaohui Luo Department of Computer Science Royal Holloway, University of London April 2011 2 Type

More information

Less naive type theory

Less naive type theory Institute of Informatics Warsaw University 26 May 2007 Plan 1 Syntax of lambda calculus Why typed lambda calculi? 2 3 Syntax of lambda calculus Why typed lambda calculi? origins in 1930s (Church, Curry)

More information

Type Theory in Type Theory using Quotient Inductive Types

Type Theory in Type Theory using Quotient Inductive Types Type Theory in Type Theory using Quotient Inductive Types Thorsten Altenkirch University of Nottingham {txa,auk}@cs.nott.ac.uk Ambrus Kaposi Abstract We present an internal formalisation of dependent type

More information

Cubical sets as a classifying topos

Cubical sets as a classifying topos Chalmers CMU Now: Aarhus University Homotopy Type Theory The homotopical interpretation of type theory: types as spaces upto homotopy dependent types as fibrations (continuous families of spaces) identity

More information

Recent Work in Homotopy Type Theory

Recent Work in Homotopy Type Theory Recent Work in Homotopy Type Theory Steve Awodey Carnegie Mellon University AMS Baltimore January 2014 Introduction Homotopy Type Theory is a newly discovered connection between logic and topology, based

More information

The design of a programming language for provably correct programs: success and failure

The design of a programming language for provably correct programs: success and failure The design of a programming language for provably correct programs: success and failure Don Sannella Laboratory for Foundations of Computer Science School of Informatics, University of Edinburgh http://homepages.inf.ed.ac.uk/dts

More information

ABriefOverviewofAgda A Functional Language with Dependent Types

ABriefOverviewofAgda A Functional Language with Dependent Types ABriefOverviewofAgda A Functional Language with Dependent Types Ana Bove, Peter Dybjer, and Ulf Norell e-mail: {bove,peterd,ulfn}@chalmers.se Chalmers University of Technology, Gothenburg, Sweden Abstract.

More information

Proofs-Programs correspondance and Security

Proofs-Programs correspondance and Security Proofs-Programs correspondance and Security Jean-Baptiste Joinet Université de Lyon & Centre Cavaillès, École Normale Supérieure, Paris Third Cybersecurity Japanese-French meeting Formal methods session

More information

Computational Higher Type Theory

Computational Higher Type Theory Computational Higher Type Theory Robert Harper Computer Science Department Carnegie Mellon University HoTT Workshop 2016 Leeds, UK Thanks Joint work with Carlo Angiuli (CMU) and Todd Wilson (CSUF). Thanks

More information

Safe Stratified Datalog With Integer Order Does not Have Syntax

Safe Stratified Datalog With Integer Order Does not Have Syntax Safe Stratified Datalog With Integer Order Does not Have Syntax Alexei P. Stolboushkin Department of Mathematics UCLA Los Angeles, CA 90024-1555 aps@math.ucla.edu Michael A. Taitslin Department of Computer

More information

Introduction to dependent types in Coq

Introduction to dependent types in Coq October 24, 2008 basic use of the Coq system In Coq, you can play with simple values and functions. The basic command is called Check, to verify if an expression is well-formed and learn what is its type.

More information

The Next 700 Syntactic Models of Type Theory

The Next 700 Syntactic Models of Type Theory The Next 700 Syntactic Models of Type Theory Simon Boulier 1 Pierre-Marie Pédrot 2 Nicolas Tabareau 1 1 INRIA, 2 University of Ljubljana CPP 17th January 2017 Pédrot & al (INRIA & U Ljubljana) The Next

More information

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Lecture 19 Tuesday, April 3, 2018 1 Introduction to axiomatic semantics The idea in axiomatic semantics is to give specifications

More information

DATABASE THEORY. Lecture 11: Introduction to Datalog. TU Dresden, 12th June Markus Krötzsch Knowledge-Based Systems

DATABASE THEORY. Lecture 11: Introduction to Datalog. TU Dresden, 12th June Markus Krötzsch Knowledge-Based Systems DATABASE THEORY Lecture 11: Introduction to Datalog Markus Krötzsch Knowledge-Based Systems TU Dresden, 12th June 2018 Announcement All lectures and the exercise on 19 June 2018 will be in room APB 1004

More information

Typed Lambda Calculus

Typed Lambda Calculus Department of Linguistics Ohio State University Sept. 8, 2016 The Two Sides of A typed lambda calculus (TLC) can be viewed in two complementary ways: model-theoretically, as a system of notation for functions

More information

Logic as a framework for NL semantics. Outline. Syntax of FOL [1] Semantic Theory Type Theory

Logic as a framework for NL semantics. Outline. Syntax of FOL [1] Semantic Theory Type Theory Logic as a framework for NL semantics Semantic Theory Type Theory Manfred Pinkal Stefan Thater Summer 2007 Approximate NL meaning as truth conditions. Logic supports precise, consistent and controlled

More information

Sheaves and Stacks. November 5, Sheaves and Stacks

Sheaves and Stacks. November 5, Sheaves and Stacks November 5, 2014 Grothendieck topologies Grothendieck topologies are an extra datum on a category. They allow us to make sense of something being locally defined. Give a formal framework for glueing problems

More information

Introduction to Type Theory August 2007 Types Summer School Bertinoro, It. Herman Geuvers Nijmegen NL

Introduction to Type Theory August 2007 Types Summer School Bertinoro, It. Herman Geuvers Nijmegen NL Introduction to Type Theory August 2007 Types Summer School Bertinoro, It Herman Geuvers Nijmegen NL Lecture 2: Dependent Type Theory, Logical Framework 1 For λ : Direct representation (shallow embedding)

More information

Universes. Universes for Data. Peter Morris. University of Nottingham. November 12, 2009

Universes. Universes for Data. Peter Morris. University of Nottingham. November 12, 2009 for Data Peter Morris University of Nottingham November 12, 2009 Introduction Outline 1 Introduction What is DTP? Data Types in DTP Schemas for Inductive Families 2 of Data Inductive Types Inductive Families

More information

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS What is discrete? Sets (Rosen, Chapter 2) TOPICS Discrete math Set Definition Set Operations Tuples Consisting of distinct or unconnected elements, not continuous (calculus) Helps us in Computer Science

More information

3.7 Denotational Semantics

3.7 Denotational Semantics 3.7 Denotational Semantics Denotational semantics, also known as fixed-point semantics, associates to each programming language construct a well-defined and rigorously understood mathematical object. These

More information

Identity in Homotopy Type Theory, Part I: The Justification of Path Induction

Identity in Homotopy Type Theory, Part I: The Justification of Path Induction Identity in Homotopy Type Theory, Part I: The Justification of Path Induction Friday 24 th October, 2014 Abstract Homotopy type theory (HoTT) is a new branch of mathematics that connects algebraic topology

More information

On the Expressiveness of Polyadicity in Higher-Order Process Calculi

On the Expressiveness of Polyadicity in Higher-Order Process Calculi On the Expressiveness of Polyadicity in Higher-Order Process Calculi Ivan Lanese, Jorge A. Pérez, Davide Sangiorgi (Univ. di Bologna) Alan Schmitt (INRIA Grenoble - Rhône Alpes) ICTCS 09 Cremona, September

More information

Part I Logic programming paradigm

Part I Logic programming paradigm Part I Logic programming paradigm 1 Logic programming and pure Prolog 1.1 Introduction 3 1.2 Syntax 4 1.3 The meaning of a program 7 1.4 Computing with equations 9 1.5 Prolog: the first steps 15 1.6 Two

More information

Arithmetic universes as generalized point-free spaces

Arithmetic universes as generalized point-free spaces Arithmetic universes as generalized point-free spaces Steve Vickers CS Theory Group Birmingham * Grothendieck: "A topos is a generalized topological space" *... it's represented by its category of sheaves

More information

Embedding logics in Dedukti

Embedding logics in Dedukti 1 INRIA, 2 Ecole Polytechnique, 3 ENSIIE/Cedric Embedding logics in Dedukti Ali Assaf 12, Guillaume Burel 3 April 12, 2013 Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 1 Outline Introduction

More information

COS 320. Compiling Techniques

COS 320. Compiling Techniques Topic 5: Types COS 320 Compiling Techniques Princeton University Spring 2016 Lennart Beringer 1 Types: potential benefits (I) 2 For programmers: help to eliminate common programming mistakes, particularly

More information

Lecture 5 - Axiomatic semantics

Lecture 5 - Axiomatic semantics Program Verification March 2014 Lecture 5 - Axiomatic semantics Lecturer: Noam Rinetzky Scribes by: Nir Hemed 1.1 Axiomatic semantics The development of the theory is contributed to Robert Floyd, C.A.R

More information

Lecture 6,

Lecture 6, Lecture 6, 4.16.2009 Today: Review: Basic Set Operation: Recall the basic set operator,!. From this operator come other set quantifiers and operations:!,!,!,! \ Set difference (sometimes denoted, a minus

More information

Towards a Logical Reconstruction of Relational Database Theory

Towards a Logical Reconstruction of Relational Database Theory Towards a Logical Reconstruction of Relational Database Theory On Conceptual Modelling, Lecture Notes in Computer Science. 1984 Raymond Reiter Summary by C. Rey November 27, 2008-1 / 63 Foreword DB: 2

More information

Modelling environments in call-by-value programming languages

Modelling environments in call-by-value programming languages Modelling environments in call-by-value programming languages Paul Blain Levy University of Birmingham, Birmingham B15 2TT, UK pbl@cs.bham.ac.uk and John Power 1 University of Edinburgh, Edinburgh EH9

More information

Denotational Semantics. Domain Theory

Denotational Semantics. Domain Theory Denotational Semantics and Domain Theory 1 / 51 Outline Denotational Semantics Basic Domain Theory Introduction and history Primitive and lifted domains Sum and product domains Function domains Meaning

More information

Cubical Homotopy Type Theory

Cubical Homotopy Type Theory Cubical Homotopy Type Theory Steve Awodey Carnegie Mellon University Logic Colloquium and CLMPS August 2015 Outline I. Basic ideas of Homotopy Type Theory. II. The univalence axiom. III. Higher inductive

More information

The Truth about Types. Bartosz Milewski

The Truth about Types. Bartosz Milewski The Truth about Types Bartosz Milewski Truth Truth Logic Types Categories Truth intro Unit type Terminal object true I () : () Proofs Logic Types Categories Proof of proposition A Type A is inhabited Morphism

More information

Constructing the Propositional Truncation using Non-recursive HITs

Constructing the Propositional Truncation using Non-recursive HITs Constructing the Propositional Truncation using Non-recursive HITs Floris van Doorn Carnegie Mellon University January 19, 2016 Floris van Doorn (CMU) Constructing Propositional Truncation January 19,

More information

Typed Lambda Calculus for Syntacticians

Typed Lambda Calculus for Syntacticians Department of Linguistics Ohio State University January 12, 2012 The Two Sides of Typed Lambda Calculus A typed lambda calculus (TLC) can be viewed in two complementary ways: model-theoretically, as a

More information

From natural numbers to the lambda calculus

From natural numbers to the lambda calculus From natural numbers to the lambda calculus Benedikt Ahrens joint work with Ralph Matthes and Anders Mörtberg Outline 1 About UniMath 2 Signatures and associated syntax Outline 1 About UniMath 2 Signatures

More information

Tracing Ambiguity in GADT Type Inference

Tracing Ambiguity in GADT Type Inference Tracing Ambiguity in GADT Type Inference ML Workshop 2012, Copenhagen Jacques Garrigue & Didier Rémy Nagoya University / INRIA Garrigue & Rémy Tracing ambiguity 1 Generalized Algebraic Datatypes Algebraic

More information

A Model of Type Theory in Simplicial Sets

A Model of Type Theory in Simplicial Sets A Model of Type Theory in Simplicial Sets A brief introduction to Voevodsky s Homotopy Type Theory T. Streicher Fachbereich 4 Mathematik, TU Darmstadt Schlossgartenstr. 7, D-64289 Darmstadt streicher@mathematik.tu-darmstadt.de

More information

Second-Order Type Systems

Second-Order Type Systems #1 Second-Order Type Systems Homework 5 Summary Student : 37.9704 Student : 44.4466 ORIGINAL : 50.2442 Student : 50.8275 Student : 50.8633 Student : 50.9181 Student : 52.1347 Student : 52.1633 Student

More information

Topos Theory. Lectures 3-4: Categorical preliminaries II. Olivia Caramello. Topos Theory. Olivia Caramello. Basic categorical constructions

Topos Theory. Lectures 3-4: Categorical preliminaries II. Olivia Caramello. Topos Theory. Olivia Caramello. Basic categorical constructions Lectures 3-4: Categorical preliminaries II 2 / 17 Functor categories Definition Let C and D be two categories. The functor category [C,D] is the category having as objects the functors C D and as arrows

More information

Computational problems. Lecture 2: Combinatorial search and optimisation problems. Computational problems. Examples. Example

Computational problems. Lecture 2: Combinatorial search and optimisation problems. Computational problems. Examples. Example Lecture 2: Combinatorial search and optimisation problems Different types of computational problems Examples of computational problems Relationships between problems Computational properties of different

More information

Automatic synthesis of switching controllers for linear hybrid systems: Reachability control

Automatic synthesis of switching controllers for linear hybrid systems: Reachability control Automatic synthesis of switching controllers for linear hybrid systems: Reachability control Massimo Benerecetti and Marco Faella Università di Napoli Federico II, Italy Abstract. We consider the problem

More information

Lecture 3: Recursion; Structural Induction

Lecture 3: Recursion; Structural Induction 15-150 Lecture 3: Recursion; Structural Induction Lecture by Dan Licata January 24, 2012 Today, we are going to talk about one of the most important ideas in functional programming, structural recursion

More information

To illustrate what is intended the following are three write ups by students. Diagonalization

To illustrate what is intended the following are three write ups by students. Diagonalization General guidelines: You may work with other people, as long as you write up your solution in your own words and understand everything you turn in. Make sure to justify your answers they should be clear

More information

Towards elementary -toposes

Towards elementary -toposes Towards elementary -toposes Michael Shulman 1 1 (University of San Diego) September 13, 2018 Vladimir Voevodsky Memorial Conference Institute for Advanced Study Outline 1 A bit of history 2 Elementary

More information

CMPSCI 250: Introduction to Computation. Lecture #28: Regular Expressions and Languages David Mix Barrington 2 April 2014

CMPSCI 250: Introduction to Computation. Lecture #28: Regular Expressions and Languages David Mix Barrington 2 April 2014 CMPSCI 250: Introduction to Computation Lecture #28: Regular Expressions and Languages David Mix Barrington 2 April 2014 Regular Expressions and Languages Regular Expressions The Formal Inductive Definition

More information

Typing Control. Chapter Conditionals

Typing Control. Chapter Conditionals Chapter 26 Typing Control 26.1 Conditionals Let s expand our language with a conditional construct. We can use if0 like before, but for generality it s going to be more convenient to have a proper conditional

More information

CMSC 336: Type Systems for Programming Languages Lecture 5: Simply Typed Lambda Calculus Acar & Ahmed January 24, 2008

CMSC 336: Type Systems for Programming Languages Lecture 5: Simply Typed Lambda Calculus Acar & Ahmed January 24, 2008 CMSC 336: Type Systems for Programming Languages Lecture 5: Simply Typed Lambda Calculus Acar & Ahmed January 24, 2008 Contents 1 Solution to the Exercise 1 1.1 Semantics for lambda calculus.......................

More information

CMPS 277 Principles of Database Systems. https://courses.soe.ucsc.edu/courses/cmps277/fall11/01. Lecture #11

CMPS 277 Principles of Database Systems. https://courses.soe.ucsc.edu/courses/cmps277/fall11/01. Lecture #11 CMPS 277 Principles of Database Systems https://courses.soe.ucsc.edu/courses/cmps277/fall11/01 Lecture #11 1 Limitations of Relational Algebra & Relational Calculus Outline: Relational Algebra and Relational

More information

CS-XXX: Graduate Programming Languages. Lecture 9 Simply Typed Lambda Calculus. Dan Grossman 2012

CS-XXX: Graduate Programming Languages. Lecture 9 Simply Typed Lambda Calculus. Dan Grossman 2012 CS-XXX: Graduate Programming Languages Lecture 9 Simply Typed Lambda Calculus Dan Grossman 2012 Types Major new topic worthy of several lectures: Type systems Continue to use (CBV) Lambda Caluclus as our

More information

Tradeoffs. CSE 505: Programming Languages. Lecture 15 Subtyping. Where shall we add useful completeness? Where shall we add completeness?

Tradeoffs. CSE 505: Programming Languages. Lecture 15 Subtyping. Where shall we add useful completeness? Where shall we add completeness? Tradeoffs CSE 505: Programming Languages Lecture 15 Subtyping Zach Tatlock Autumn 2017 Desirable type system properties (desiderata): soundness - exclude all programs that get stuck completeness - include

More information

Maximal Monochromatic Geodesics in an Antipodal Coloring of Hypercube

Maximal Monochromatic Geodesics in an Antipodal Coloring of Hypercube Maximal Monochromatic Geodesics in an Antipodal Coloring of Hypercube Kavish Gandhi April 4, 2015 Abstract A geodesic in the hypercube is the shortest possible path between two vertices. Leader and Long

More information

CS 6110 S14 Lecture 1 Introduction 24 January 2014

CS 6110 S14 Lecture 1 Introduction 24 January 2014 CS 6110 S14 Lecture 1 Introduction 24 January 2014 1 Introduction What is a program? Is it just something that tells the computer what to do? Yes, but there is much more to it than that. The basic expressions

More information

Topic 1: What is HoTT and why?

Topic 1: What is HoTT and why? Topic 1: What is HoTT and why? May 5, 2014 Introduction Homotopy type theory (HoTT) is a newly emerging field of mathematics which is currently being developed as a foundation of mathematics which is in

More information

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur Module 6 Knowledge Representation and Logic (First Order Logic) 6.1 Instructional Objective Students should understand the advantages of first order logic as a knowledge representation language Students

More information

Introductory logic and sets for Computer scientists

Introductory logic and sets for Computer scientists Introductory logic and sets for Computer scientists Nimal Nissanke University of Reading ADDISON WESLEY LONGMAN Harlow, England II Reading, Massachusetts Menlo Park, California New York Don Mills, Ontario

More information

Chapter 2 The Language PCF

Chapter 2 The Language PCF Chapter 2 The Language PCF We will illustrate the various styles of semantics of programming languages with an example: the language PCF Programming language for computable functions, also called Mini-ML.

More information

Semantics of programming languages

Semantics of programming languages Semantics of programming languages Informatics 2A: Lecture 27 John Longley School of Informatics University of Edinburgh jrl@inf.ed.ac.uk 21 November, 2011 1 / 19 1 2 3 4 2 / 19 Semantics for programming

More information

Compositional Software Model Checking

Compositional Software Model Checking Compositional Software Model Checking Dan R. Ghica Oxford University Computing Laboratory October 18, 2002 Outline of talk program verification issues the semantic challenge programming languages the logical

More information

Formal Syntax and Semantics of Programming Languages

Formal Syntax and Semantics of Programming Languages Formal Syntax and Semantics of Programming Languages Mooly Sagiv Reference: Semantics with Applications Chapter 2 H. Nielson and F. Nielson http://www.daimi.au.dk/~bra8130/wiley_book/wiley.html axioms

More information

Types Summer School Gothenburg Sweden August Dogma oftype Theory. Everything has a type

Types Summer School Gothenburg Sweden August Dogma oftype Theory. Everything has a type Types Summer School Gothenburg Sweden August 2005 Formalising Mathematics in Type Theory Herman Geuvers Radboud University Nijmegen, NL Dogma oftype Theory Everything has a type M:A Types are a bit like

More information

An Introduction to Programming and Proving in Agda (incomplete draft)

An Introduction to Programming and Proving in Agda (incomplete draft) An Introduction to Programming and Proving in Agda (incomplete draft) Peter Dybjer January 29, 2018 1 A first Agda module Your first Agda-file is called BoolModule.agda. Its contents are module BoolModule

More information

AXIOMS FOR THE INTEGERS

AXIOMS FOR THE INTEGERS AXIOMS FOR THE INTEGERS BRIAN OSSERMAN We describe the set of axioms for the integers which we will use in the class. The axioms are almost the same as what is presented in Appendix A of the textbook,

More information

Strategy Improvement for Parity Games. A combinatorial perspective

Strategy Improvement for Parity Games. A combinatorial perspective : A combinatorial perspective InfoSys seminar Oxford University Computing Laboratory 28 October 2008 Overview Theorem The strategy improvement algorithm for parity games is a bottom-antipodal sink-finding

More information

Programming with Math and Logic

Programming with Math and Logic .. Programming with Math and Logic an invitation to functional programming Ed Morehouse Wesleyan University The Plan why fp? terms types interfaces The What and Why of Functional Programming Computing

More information

Goal. CS152: Programming Languages. Lecture 15 Parametric Polymorphism. What the Library Likes. What The Client Likes. Start simpler.

Goal. CS152: Programming Languages. Lecture 15 Parametric Polymorphism. What the Library Likes. What The Client Likes. Start simpler. Goal Understand what this interface means and why it matters: CS152: Programming Languages Lecture 15 Parametric Polymorphism Dan Grossman Spring 2011 type a mylist; val mt_list : a mylist val cons : a

More information

Programming Proofs and Proving Programs. Nick Benton Microsoft Research, Cambridge

Programming Proofs and Proving Programs. Nick Benton Microsoft Research, Cambridge Programming Proofs and Proving Programs Nick Benton Microsoft Research, Cambridge Coffee is does Greek 1. To draw a straight line from any point to any point. 2. To produce a finite straight line continuously

More information

Turing Machines Part Two

Turing Machines Part Two Turing Machines Part Two Recap from Last Time The Turing Machine A Turing machine consists of three parts: A finite-state control that issues commands, an infinite tape for input and scratch space, and

More information

Translation Validation for a Verified OS Kernel

Translation Validation for a Verified OS Kernel To appear in PLDI 13 Translation Validation for a Verified OS Kernel Thomas Sewell 1, Magnus Myreen 2, Gerwin Klein 1 1 NICTA, Australia 2 University of Cambridge, UK L4.verified sel4 = a formally verified

More information

Isomorphisms between low n and computable Boolean algebras

Isomorphisms between low n and computable Boolean algebras Isomorphisms between low n and computable Boolean algebras Jonny Stephenson UChicago October 1, 2013 Jonny Stephenson (UChicago) Low n Boolean Algebras October 1, 2013 1 / 20 Computability of low n Boolean

More information

Introduction to Denotational Semantics. Brutus Is An Honorable Man. Class Likes/Dislikes Survey. Dueling Semantics

Introduction to Denotational Semantics. Brutus Is An Honorable Man. Class Likes/Dislikes Survey. Dueling Semantics Brutus Is An Honorable Man HW2 will not be due today. Homework X+1 will never be due until after I have returned Homework X to you. Normally this is never an issue, but I was sick yesterday and was hosting

More information

Unfolding FOLDS. Matthew Weaver and Dimitris Tsementzis. HoTT/UF Workshop. Sept. 9, 2017

Unfolding FOLDS. Matthew Weaver and Dimitris Tsementzis. HoTT/UF Workshop. Sept. 9, 2017 Unfolding FOLDS HoTT/UF Workshop Sept. 9, 2017 Matthew Weaver and Dimitris Tsementzis Princeton Rutgers The Syntax of Syntax Type theory has a rich syntax which is why we love it! and is also what makes

More information

Stop coding Pascal. Saturday, April 6, 13

Stop coding Pascal. Saturday, April 6, 13 Stop coding Pascal...emotional sketch about past, present and future of programming languages, Python, compilers, developers, Life, Universe and Everything Alexey Kachayev CTO at KitApps Inc. Open source

More information

A Typed Lambda Calculus for Input Sanitation

A Typed Lambda Calculus for Input Sanitation A Typed Lambda Calculus for Input Sanitation Nathan Fulton Carthage College nfulton@carthage.edu April 11, 2013 Abstract Programmers often wish to validate or sanitize user input. One common approach to

More information

Programming with Universes, Generically

Programming with Universes, Generically Programming with Universes, Generically Andres Löh Well-Typed LLP 24 January 2012 An introduction to Agda Agda Functional programming language Static types Dependent types Pure (explicit effects) Total

More information

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine. 1. true / false By a compiler we mean a program that translates to code that will run natively on some machine. 2. true / false ML can be compiled. 3. true / false FORTRAN can reasonably be considered

More information

axiomatic semantics involving logical rules for deriving relations between preconditions and postconditions.

axiomatic semantics involving logical rules for deriving relations between preconditions and postconditions. CS 6110 S18 Lecture 18 Denotational Semantics 1 What is Denotational Semantics? So far we have looked at operational semantics involving rules for state transitions, definitional semantics involving translations

More information

Lecture 10, Zero Knowledge Proofs, Secure Computation

Lecture 10, Zero Knowledge Proofs, Secure Computation CS 4501-6501 Topics in Cryptography 30 Mar 2018 Lecture 10, Zero Knowledge Proofs, Secure Computation Lecturer: Mahmoody Scribe: Bella Vice-Van Heyde, Derrick Blakely, Bobby Andris 1 Introduction Last

More information

CSCI B522 Lecture 11 Naming and Scope 8 Oct, 2009

CSCI B522 Lecture 11 Naming and Scope 8 Oct, 2009 CSCI B522 Lecture 11 Naming and Scope 8 Oct, 2009 Lecture notes for CS 6110 (Spring 09) taught by Andrew Myers at Cornell; edited by Amal Ahmed, Fall 09. 1 Static vs. dynamic scoping The scope of a variable

More information

Mathematics for Computer Scientists 2 (G52MC2)

Mathematics for Computer Scientists 2 (G52MC2) Mathematics for Computer Scientists 2 (G52MC2) L07 : Operations on sets School of Computer Science University of Nottingham October 29, 2009 Enumerations We construct finite sets by enumerating a list

More information

CSE505, Fall 2012, Midterm Examination October 30, 2012

CSE505, Fall 2012, Midterm Examination October 30, 2012 CSE505, Fall 2012, Midterm Examination October 30, 2012 Rules: The exam is closed-book, closed-notes, except for one side of one 8.5x11in piece of paper. Please stop promptly at Noon. You can rip apart

More information

CS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Dan Grossman Spring 2011

CS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Dan Grossman Spring 2011 CS152: Programming Languages Lecture 11 STLC Extensions and Related Topics Dan Grossman Spring 2011 Review e ::= λx. e x e e c v ::= λx. e c τ ::= int τ τ Γ ::= Γ, x : τ (λx. e) v e[v/x] e 1 e 1 e 1 e

More information

CS 6110 S11 Lecture 25 Typed λ-calculus 6 April 2011

CS 6110 S11 Lecture 25 Typed λ-calculus 6 April 2011 CS 6110 S11 Lecture 25 Typed λ-calculus 6 April 2011 1 Introduction Type checking is a lightweight technique for proving simple properties of programs. Unlike theorem-proving techniques based on axiomatic

More information

Research Statement. Daniel R. Licata

Research Statement. Daniel R. Licata Research Statement Daniel R. Licata I study programming languages, with a focus on applications of type theory and logic. I have published papers in major conferences in my area (POPL 2012, MFPS 2011,

More information

1 Introduction. 3 Syntax

1 Introduction. 3 Syntax CS 6110 S18 Lecture 19 Typed λ-calculus 1 Introduction Type checking is a lightweight technique for proving simple properties of programs. Unlike theorem-proving techniques based on axiomatic semantics,

More information

CS422 - Programming Language Design

CS422 - Programming Language Design 1 CS422 - Programming Language Design Denotational Semantics Grigore Roşu Department of Computer Science University of Illinois at Urbana-Champaign 2 Denotational semantics, alsoknownasfix-point semantics,

More information

Note that in this definition, n + m denotes the syntactic expression with three symbols n, +, and m, not to the number that is the sum of n and m.

Note that in this definition, n + m denotes the syntactic expression with three symbols n, +, and m, not to the number that is the sum of n and m. CS 6110 S18 Lecture 8 Structural Operational Semantics and IMP Today we introduce a very simple imperative language, IMP, along with two systems of rules for evaluation called small-step and big-step semantics.

More information