coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Wilayat Khan <wilayatk AT gmail.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] How to represent tabular data in Coq
- Date: Tue, 9 May 2017 12:08:32 +0500
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=wilayatk AT gmail.com; spf=Pass smtp.mailfrom=wilayatk AT gmail.com; spf=None smtp.helo=postmaster AT mail-wm0-f41.google.com
- Ironport-phdr: 9a23:diyKTRH9UjAC/+/yDcp9NZ1GYnF86YWxBRYc798ds5kLTJ79oMuwAkXT6L1XgUPTWs2DsrQf2raQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbQhFgDWwbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjDQhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/VDK/5KlpVRDokj8KODw38G/XhMJ+j79Vrgy9qBFk2YHYfJuYOeBicq/Bf94XQ3dKUMZLVyxGB4Oxd4sAD+sFPelCr4jyvUcOpga7CwmsHuzvzCJDi3j43K071+QuCwHH0xY8H9INq3nUo9D1O70TUeCx1qXH0TLDb/ZP1Dr79YPGcQghrOmOUL9/a8bd1FcjGgPfgliTt4DpJTyY2vkLvmOG9eRvT/ivhHQiqwxpojig2MMsio7Ri4IQ0F/E9CF5zJ87JN29VEJ3eNCkHZRNuy2AOIt2RcQiQ25suCkk0LEJpZm7fC0SxJQmwR7QdeCHfpCK7x/sTuqdPCl0iXJ/dL+8mRq+60etxvDkWsmxyllKry5FktfWtnAK0hze8saGSvp5/ki72TeAzRzT6uJfLEA7kKrUMZ8hwroqmpUPtkTDGzf6mF/qg6+OakUk5u+o5vz7bbXhv5+QLpN7igXjMqs1gcG/GuQ5Mg0WX2eB4+i81bvj/Vf4QLpQlPE2nLPZ49jmIpEQobf8CAtI2K4i7Qy+BnGoyoc2h34CeW1EfBuWhpShGFHHJrisEva7ikWljDRDyPXPP7mnCZLIeCuQ2Iz9dKpwvhYPgDE4yspSsspZ
Hello Klaus
Have you looked into Coq libraries FMapList and FMapFacts?
Best,
Wilayat
On Mon, May 8, 2017 at 8:14 PM, Klaus Ostermann <klaus.ostermann AT uni-tuebingen.de> wrote:
I have data that one would write down on a piece of paper as a table
with row and column headers.
The type of the headers is not "nat", though (otherwise I could use
nested vectors).
Let's call them R and C for the type of row headers and column headers,
respectively.
The type of the table elements is A.
Let's say I have finite sets r and c of R's and C's, respectively. r and
c are the labels
of a particular table.
Such a table should feature a function to look up an entry in the table,
which should
have a type similar to this:
lookup: Table R C r c A -> x in r -> y in c -> A
where "x in r" means a label x that is in the label set r.
In particular, the lookup function should not return an "option A".
Is there something like this in a standard library? How would I go about
this?
As a starter, is there something that is to standard finite maps as
vectors are to lists?
That is, finite maps where the type system keeps track of the available
keys?
Klaus
- [Coq-Club] How to represent tabular data in Coq, Klaus Ostermann, 05/08/2017
- Re: [Coq-Club] How to represent tabular data in Coq, Wilayat Khan, 05/09/2017
- <Possible follow-up(s)>
- Re: [Coq-Club] How to represent tabular data in Coq, Ben Sherman, 05/10/2017
- Re: [Coq-Club] How to represent tabular data in Coq, Klaus Ostermann, 05/10/2017
- Re: [Coq-Club] How to represent tabular data in Coq, Ben Sherman, 05/17/2017
- Re: [Coq-Club] How to represent tabular data in Coq, Jason Gross, 05/17/2017
Archive powered by MHonArc 2.6.18.