coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Michael Shulman <shulman AT sandiego.edu>
- To: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] mathematical function notation
- Date: Wed, 4 Nov 2015 08:05:00 -0800
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=viritrilbia AT gmail.com; spf=Pass smtp.mailfrom=viritrilbia AT gmail.com; spf=None smtp.helo=postmaster AT mail-lb0-f171.google.com
- Ironport-phdr: 9a23:dRecEBHoHGbigNaMoFZyhJ1GYnF86YWxBRYc798ds5kLTJ75oc2wAkXT6L1XgUPTWs2DsrQf27eQ6PirCTVIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/niqbpo9aDOk1hv3mUX/BbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv50IbaKvNa8/VPlTCCksG2Ez/szi8xfZB0Pb7XwFF24SjxBgAg7f7Ri8UI2n4QXgse8o/SiRPcT7SfgPWSmm6q5tAEvziDoDMjc/2HrejMBxga1c5h+tukoskMbvfIiJOa8mLevmdtQASD8ZUw==
On Wed, Nov 4, 2015 at 6:26 AM, Cedric Auger
<sedrikov AT gmail.com>
wrote:
> Inductive single (T : Type) := Single : T -> single T.
> Inductive pair (T U : Type) := Pair : T -> U -> pair T U.
> Inductive triple (T U V : Type) := Triple : T -> U -> V -> triple T U V.
>
> And so on (or even define it recursively as a "tuple : forall n, n_types n
> -> Type").
>
> And then have a (x) notation for single T type, (x, y) for pair T U type and
> so on.
I tried this, but I couldn't get it to work.
Inductive single (T : Type) := Single : T -> single T.
Notation "( x )" := (Single x).
Definition test T (f : single T -> T) (x : T) : f(x) = f(x).
(* The term "x" has type "T" while it is expected to have type "single T". *)
Did you have something different in mind?
Mike
- [Coq-Club] mathematical function notation, Michael Shulman, 11/04/2015
- Re: [Coq-Club] mathematical function notation, Clément Pit--Claudel, 11/04/2015
- Re: [Coq-Club] mathematical function notation, Cedric Auger, 11/04/2015
- Message not available
- Re: [Coq-Club] mathematical function notation, Michael Shulman, 11/04/2015
- Re: [Coq-Club] mathematical function notation, Michael Shulman, 11/04/2015
- Re: [Coq-Club] mathematical function notation, Michael Shulman, 11/04/2015
- Message not available
- Re: [Coq-Club] mathematical function notation, Michael Shulman, 11/04/2015
- Re: [Coq-Club] mathematical function notation, Cedric Auger, 11/04/2015
- Re: [Coq-Club] mathematical function notation, Pierre-Marie Pédrot, 11/05/2015
- Message not available
- Re: [Coq-Club] mathematical function notation, Michael Shulman, 11/05/2015
- Re: [Coq-Club] mathematical function notation, Michael Shulman, 11/09/2015
- Re: [Coq-Club] mathematical function notation, Michael Shulman, 11/05/2015
- Re: [Coq-Club] mathematical function notation, Cedric Auger, 11/04/2015
- Re: [Coq-Club] mathematical function notation, Michael Shulman, 11/04/2015
Archive powered by MHonArc 2.6.18.