Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Lambda-calculus in coq

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Lambda-calculus in coq


Chronological Thread 
  • From: Thorsten Altenkirch <Thorsten.Altenkirch AT nottingham.ac.uk>
  • To: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Lambda-calculus in coq
  • Date: Fri, 13 Mar 2020 13:35:02 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=exmail.nottingham.ac.uk; dmarc=pass action=none header.from=exmail.nottingham.ac.uk; dkim=pass header.d=exmail.nottingham.ac.uk; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kSkI9lvOxnxZND+oaQ9CtHbnU1Ck9IMFNwpaXumTVBU=; b=HKQ6Pv31sA1IvPqRzpGykvGfjtEP3x8BVRPh0bq1ihBH6HkIas9JSI9EGwVrVKGZLRw9QkqVZQMHWnnRKNyO1P/bGvF5LixaP86F/FQqpMrd/W6Of/gzPZBmeJRKmAUdtJn8oFaFKyhgrAQzI/TCpqtGAa+mb1x6xSvOtYsSEArNKBX30JfhTJhWc8xxhiS2PPmymr93yNQoWIbbYTcTzuICnJcz5AmeIImJHfb5bwj+MvvXl+KMAlFYQrHCkgMcNdTvLv7Ip8qGeUcFq8DyQZ6ahEPcpgLX5RI/nhMtGr1VMy0b51cBhe8P+vISXd4DSsYHyy8eHXEREweJ/W9bJg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dCuw70urpiJVrQ6bDspekPDmSxicJShu8sD66cmH9PNT+VsNRxEOSl8McQCf/Q0X4f9/9ypblKhjNEQ9dBJ6v5l+js3QfX/NlT2yZkyzwMqb3oo20FnihVBHJWf/gsH5g74JfqKn58P7G16VBjrGYhiuWb0yrXMcX24YwmwzD9/wIXepomfOI/0BqoN6DHS9+gzVKD+jZXj9loIYmqb8WVdniVGFYcEuEYBL2ksEs6Uyq2jlFB4NuvTo/AXNsJhwKAaREU9YbkyoEtBmFNvH7gsumHM/a7OJskdFGq05NkCX3aMurjO8Vhcaip5omWx2XO/y0eI5JQkFe+TwtPbM4Q==
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=Thorsten.Altenkirch AT nottingham.ac.uk; spf=Pass smtp.mailfrom=Thorsten.Altenkirch AT nottingham.ac.uk; spf=None smtp.helo=postmaster AT uidappmx01.nottingham.ac.uk
  • Ironport-phdr: 9a23:cns5WRBP4iz/5/zUIS/TUyQJP3N1i/DPJgcQr6AfoPdwSP77psbcNUDSrc9gkEXOFd2Crakb26yL6+jJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6i760TlHUB74LE9+Ivn/Mo/UlcW+ke6osdWHaAJRwTG5fLlaLROsrAyXuNNA0qV4LaNk9hvOuGBUduIe7Gd0KFSQngz35o/kwJ5k6T9MtvRn3spcXKP5fr4zTZReCyg6MmY65MTu8xDICxaMsChPGl4KmwZFVlCWpCrxWY3853Oj57hNnRKCNMizdogaHDGr7qNlUhjt0XdVMTkl7GDRhcx5ieRSq1S8pE4mmtOGUMSuLPN7O5jlU5YaSG5GBJcDSi1NC5ukaptXVqwHOvpEro/yp1IL6xK1QxSvVru2lm14w0Tu1Kh/6NwPVBnc1VVwTdQJrGjVqtr1PaJUWOvz0aqalTg=

Why do you use strings for variables? Why isn't term dependent on the scope?

Is this how people still work in coq?

Thorsten

On 13/03/2020, 13:27,
"coq-club-request AT inria.fr
on behalf of Louis Noizet"
<coq-club-request AT inria.fr
on behalf of
louis.noizet AT irisa.fr>
wrote:

Sorry for hitting send too fast !


Hi, I'm trying to implement some kind of non-deterministic λ-calculus.
Anyway, the terms are something like that

Inductive term :=
| var: string -> term
| func: var -> body -> term
with body :=
| choose: list body -> body
| ret: term -> body
| apply: var -> term -> body
| letin: var -> body -> body -> body

And now I'm trying to define the type of values.
So a functional value is a relation between values, because it takes a
value and produces some number of values.

I would like to write something like that :

Inductive value : Type :=
| base: forall t: Type, t -> value
| func: (value -> value -> Prop) -> value.


Of course, this is not working because of non-positivity.

The obvious solution would be to use closures, but we want to be able to
externally define functions (directly in gallina, via a relation) without
having to explicitly define a body for it.

I thought for sure somebody must have already had a similar issue.

By the way, we did a version using step-indexing, but it's not entirely
satisfactory, because it makes the definition hard to use to make a proof.

Thanks in advance !

--
Louis






This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please contact the sender and delete the email and
attachment.

Any views or opinions expressed by the author of this email do not
necessarily reflect the views of the University of Nottingham. Email
communications with the University of Nottingham may be monitored
where permitted by law.







Archive powered by MHonArc 2.6.18.

Top of Page