Presentation is loading. Please wait.

Presentation is loading. Please wait.

T YPE I SOMORPHISM O LA M AHMOUD S UPERVISED BY : D R. M ARCELO F IORE UNIVERSITY OF CAMBRIDGE Computer Laboratory Theory & Semantics Group I NTRODUCTION.

Similar presentations


Presentation on theme: "T YPE I SOMORPHISM O LA M AHMOUD S UPERVISED BY : D R. M ARCELO F IORE UNIVERSITY OF CAMBRIDGE Computer Laboratory Theory & Semantics Group I NTRODUCTION."— Presentation transcript:

1 T YPE I SOMORPHISM O LA M AHMOUD S UPERVISED BY : D R. M ARCELO F IORE UNIVERSITY OF CAMBRIDGE Computer Laboratory Theory & Semantics Group I NTRODUCTION & M OTIVATION G ENERIC R ECURSIVE P OLYNOMIAL T YPES C ATEGORICAL T YPE T HEORY F UTURE D IRECTIONS Isomorphism The familiar notion of isomorphism (from Greek isos morphe meaning same shape) refers to an invertible mapping between two objects making them in some sense structurally equivalent: A B Theoretic Motivation Complete Axiomatization: Complete Axiomatization: As is common in Mathematical Logic, we seek a complete axiom system E for a given type theory Th, i.e. a finite set of ismorphisms of the form T S such that two types are isomorphic in Th iff they can be proven to be isomorphic using only the identities appearing in E. Explicit Decidability: Explicit Decidability: providing non-exhaustive methods (possibly algorithms) for constructing explicit isomorphisms, when they exist Practical Applications Types as search keys : using type isomorphism as a key tool for retrieving library components Inside Type Systems : performing transformations of data types inside a programming language via isomorphism We are interested in the isomorphisms of types in some abstract programming language. Two types are isomorphic if there are mutually inverse procedures for transforming data between them. For example, for the sum type constructor + we know that T + S S + T, and T + 0 T, etc. Category Theory Category Theory is often referred to as the Mathematics of Mathematics. It will be our main tool for proving isomorphisms. DEFINITION DEFINITION: A category C consists of (1) a collection of objects; (2) a collection of relations (arrows) between the objects; (3) for f : A B and g:B C the composition g f ; (4) for every object A the identity arrow; such that for all f, f id = f = id f and for all f,g,h, f (g h) = (f g) h. Why Category Theory? It gives an elegant formalization of the description of mathematical structures (type theories) via universal properties It provides an abstract way for reasoning about theories Categories can be used as models for certain structures/theories, providing syntactic-hygiene and a better understanding of the syntax, semantics and logic of a theory Categorical Type Theory Correspondence There is a correspondence between type theories and categories, enabling us to see the latter as giving an abstract, or presentation-free, semantics of a type theory. For a given theory Th, it is possible to construct a category Cl(Th) which contains in some sense the smallest or most general model of Th. We call it the classifying category of the theory Th. Using the above correspondence, we want to classify isomorphisms in Cl(Th R ), for Th R the theory of generic resursive polynomial types. TYPE THEORY Th Cl(Th) Th(C) C CATEGORY THEORY generic recursive polynomial types, Our current focus is type isomorphism in the context of generic recursive polynomial types, more specifically: recursively defined types of the form ρX.P(X), i.e. the type representing the solution of the equation X P(X), where P(X) is a multivariate polynomial type, i.e. one built out of the sum and product type constructors; that are generic in the sense that the only operations for manipulating them are those of folding and unfolding. Formal definition of the Type Theory The type theory of sums, products, and generic recursive types has types given by the following grammar: T := X | 0 | T 1 + T 2 | 1 | T 1 × T 2 | ρX.T Motivation Recursively defined types occur naturally in programming languages (lists, trees, etc.) Isomorphisms in this restricted setting are realisable by finitistic programs Preliminary Results The equational theory of polynomial types and of polynomial type theory with one recursive type only is completely axiomatized by the equational theory of the polynomial semiring N[X] and by that of the quotient polynomial semiring N[X]/X P(X), respectively. This result is due to Robbie Gates. Result we seek THEOREM THEOREM: Two generic mutually recursive polynomial types are isomorphic iff they are provably equal in the equational theory of commutative semirings with the equations X i P i (X) Other Construct the classifying category of recursive polynomial type theory Characterize isomorphisms of other type theories, e.g. lambda calculus plus recursive types Formalize reasoning about categorical isomorphisms f f g id B id A A B


Download ppt "T YPE I SOMORPHISM O LA M AHMOUD S UPERVISED BY : D R. M ARCELO F IORE UNIVERSITY OF CAMBRIDGE Computer Laboratory Theory & Semantics Group I NTRODUCTION."

Similar presentations


Ads by Google