Extended Initiality for Typed Abstract Syntax

Initial Semantics aims at interpreting the syntax associated to a signature as the initial object of some category of 'models', yielding induction and recursion principles for abstract syntax. Zsid\'o proves an initiality result for simply-typed syntax: given a signature S, the abstract syntax associated to S constitutes the initial object in a category of models of S in monads. However, the iteration principle her theorem provides only accounts for translations between two languages over a fixed set of object types. We generalize Zsid\'o's notion of model such that object types may vary, yielding a larger category, while preserving initiality of the syntax therein. Thus we obtain an extended initiality theorem for typed abstract syntax, in which translations between terms over different types can be specified via the associated category-theoretic iteration operator as an initial morphism. Our definitions ensure that translations specified via initiality are type-safe, i.e. compatible with the typing in the source and target language in the obvious sense. Our main example is given via the propositions-as-types paradigm: we specify propositions and inference rules of classical and intuitionistic propositional logics through their respective typed signatures. Afterwards we use the category--theoretic iteration operator to specify a double negation translation from the former to the latter. A second example is given by the signature of PCF. For this particular case, we formalize the theorem in the proof assistant Coq. Afterwards we specify, via the category-theoretic iteration operator, translations from PCF to the untyped lambda calculus.

[1]  Chung-Kil Hur,et al.  Equational Systems and Free Constructions (Extended Abstract) , 2007, ICALP.

[2]  Gordon D. Plotkin,et al.  Abstract syntax and variable binding , 1999, Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158).

[3]  Benedikt Ahrens,et al.  Initial Semantics for higher-order typed syntax in Coq , 2011, J. Formaliz. Reason..

[4]  C.-H. Luke Ong,et al.  On Full Abstraction for PCF: I, II, and III , 2000, Inf. Comput..

[5]  Richard S. Bird,et al.  Nested Datatypes , 1998, MPC.

[6]  Marcelo P. Fiore,et al.  Semantic analysis of normalisation by evaluation for typed lambda calculus , 2002, PPDP '02.

[7]  G. Birkhoff,et al.  On the Structure of Abstract Algebras , 1935 .

[8]  Andrew M. Pitts,et al.  A new approach to abstract syntax involving binders , 1999, Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158).

[9]  Chung-Kil Hur,et al.  Strongly Typed Term Representations in Coq , 2011, Journal of Automated Reasoning.

[10]  Joseph A. Goguen,et al.  Initial Algebra Semantics and Continuous Algebras , 1977, J. ACM.

[11]  Thorsten Altenkirch,et al.  Monadic Presentations of Lambda Terms Using Generalized Inductive Types , 1999, CSL.

[12]  Marino Miculan,et al.  A framework for typed HOAS and semantics , 2003, PPDP '03.

[13]  André Hirschowitz,et al.  Modules over monads and initial semantics , 2010, Inf. Comput..

[14]  André Hirschowitz,et al.  Modules over Monads and Linearity , 2006, WoLLIC.

[15]  Julianna Zsido Typed Abstract Syntax , 2010 .

[16]  G.D. Plotkin,et al.  LCF Considered as a Programming Language , 1977, Theor. Comput. Sci..

[17]  A. Troelstra,et al.  Constructivism in Mathematics: An Introduction , 1988 .

[18]  Chung-Kil Hur Categorical equational systems : algebraic models and equational reasoning , 2010 .