coq-club AT inria.fr
Subject: The Coq mailing list
List archive
Re: [Coq-Club] [Agda] Re: [HoTT] newbie questions about homotopy theory & advantage of UF/Coq
Chronological Thread
- From: Cody Roux <cody.roux AT andrew.cmu.edu>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] [Agda] Re: [HoTT] newbie questions about homotopy theory & advantage of UF/Coq
- Date: Fri, 14 Mar 2014 19:16:02 -0400
On 03/14/2014 03:42 PM, Abhishek Anand
wrote:
===Summary====
This is a really nice summary! I'll only address point d), with
a small comment concerning the translation between a)/b):For the "types as propositions" paradigm to work,
we need the types denoting non-trivial logical propositions to
NOT have diverging elements. 1) Readability of code At first, I included expressivity in the list above, but It seems to me that for all the methods considered in this thread, a terminating function expressible by one method can be expressed by another method using a complicated-enough translation. One exception is noted below. I think that people mainly considered the methods a)-d) below in this thread. a) Recursors/Eliminators of inductive types The following paper of Gimenez's details the translation of a simple guard condition for Coq into recursors: Codifying guarded definitions with recursive schemes http://link.springer.com/chapter/10.1007%2F3-540-60579-7_3 (I'm afraid I can't seem to find an open version online at the moment). The guard condition has evolved significantly since then though, so the translation has become accordingly more complex, and I'm not aware of any article detailing it. d) Sized Types : For example, I don't see how a sized-types based
typechecker would accept NPeano.gcd: The idea is to give the following type to mod: mod : nat a+1 -> nat inf -> nat a where nat s denotes the elements of nat of size 's'. This would disallow the application mod 0 x, but that's ok: this case is a "garbage case" anyways! The problem though is that for technical reasons, the Barthe et al system gives size 1 to 0, which doesn't allow this type to be appropriate. I think without too much effort, one could devise and implement a system which accepts all currently guarded programs in Coq with the simple size language. Andreas Abel describes most common functions like "gcd" in his (excellent) phd dissertation. pros: logically simple (compositional), minimal
work from users when it works. Can the Function mechanism mentioned in c) be built on top of sized types? All the best, Cody References: Thanks, On Fri, Jan 10, 2014 at 7:58 AM,
Jorge Luis Sacchini <sacchini AT qatar.cmu.edu>
wrote:
You may also want to look at the following papers: Gilles Barthe, Benjamin Grégoire, and Fernando Pastawski. Practical inference for type-based termination in a polymorphic setting. TLCA 2005. Gilles Barthe, Benjamin Grégoire, and Fernando Pastawski. CIC^ : Type-based termination of recursive definitions in the Calculus of Inductive Constructions. LPAR 2006. They describe type systems with sized types for system F and CIC, including a size-inference algorithm. My work on sized types builds directly on top of these systems. There is also this tutorial: Gilles Barthe, Benjamin Grégoire, and Colin Riba. A Tutorial on Type-Based Termination. LERNET 2008 summer school. which may have more examples and metatheory (I don't remember the details very well). -- Jorge |
- Re: [Coq-Club] [Agda] Re: [HoTT] newbie questions about homotopy theory & advantage of UF/Coq, Abhishek Anand, 03/14/2014
- Re: [Coq-Club] [Agda] Re: [HoTT] newbie questions about homotopy theory & advantage of UF/Coq, Cody Roux, 03/15/2014
- Re: [Coq-Club] [Agda] Re: [HoTT] newbie questions about homotopy theory & advantage of UF/Coq, Pierre Courtieu, 03/17/2014
- Re: [Coq-Club] [Agda] Re: [HoTT] newbie questions about homotopy theory & advantage of UF/Coq, Cody Roux, 03/15/2014
Archive powered by MHonArc 2.6.18.