coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Bernard Hurley <bernard AT marcade.biz>
- To: Coq Club <coq-club AT inria.fr>
- Subject: [Coq-Club] Should this be obvious?
- Date: Sat, 21 Apr 2012 04:13:53 +0100
Hi,
I have a feeling this question might have an obvious answer, but I can't
see what it is!
After this code, which is adapted from Adam Chlipala's book:
++++++++++++++++++++++++++++++++++++++++
Inductive type : Set := Nat | Bool.
Definition tstack := list type.
Definition typeDenote (t : type) : Set :=
match t with
| Nat => nat
| Bool => bool
end.
Fixpoint vstack (ts : tstack) : Set :=
match ts with
| nil => unit
| t :: ts' => typeDenote t * vstack ts'
end%type.
++++++++++++++++++++++++++++++++++++++++
it seems logical to me that one ought to be able to construct an object
of data type [vstack (Nat :: Bool :: Nat :: nil)] that corresponds in
the "obvious" way to the sequence (2, true, 7). However I can't see how
this could be done. How could it be done?
Regards,
Bernard.
- [Coq-Club] Should this be obvious?, Bernard Hurley
- Re: [Coq-Club] Should this be obvious?,
Vilhelm Sjöberg
- Re: [Coq-Club] Should this be obvious?, Bernard Hurley
- Re: [Coq-Club] Should this be obvious?,
Vilhelm Sjöberg
Archive powered by MhonArc 2.6.16.