coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: "Gyesik Lee" <gyesik.lee AT aist.go.jp>
- To: coq-club AT pauillac.inria.fr
- Subject: [Coq-Club] About dependent elimination or inversion?
- Date: Thu, 31 Jul 2008 20:04:46 +0900
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition:x-google-sender-auth; b=gWdJWI5OJWZzbNR5CRTTEirpJ2g3xXPW3fUGZna+cpegJxI2c6qr8Yx1+vY/AeovwK rrnGlXZ8yORng0uUUpDckJjoGy9RwQAuWQ84D2KUPLReLQs5E5MNFG/dswkgzCFSsMja n4ikNEF/6kga8Fpt937oUnweSr+T60uJXWaAM=
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Hello,
in case of representing the semantics of a language, it is sometimes
necessary to have the uniqueness of the term constructions. But since
terms are usually of dependent types, it is not so simple to prove the
uniqueness because of heterogeneous equality or dependency.
Here is one simple example.
Inductive P : nat -> bool -> Set :=
T : forall n, P n true.
Goal forall (n : nat) (x : P n true), x = T n.
(* one would try *)
intros n x.
destruct x.
But the tactic destruct fails with the warning (using Coq 8.2beta3)
Error: Abstracting over the terms "n", "b" and "x" leads to a term
"fun (n : nat) (b : bool) (x : P n b) => x = T n" which is ill-typed.
Maybe one has to use first the tactic of the following form
pattern n at nums, true at nums , x at nums
to get a well-typed application term, and then use "destruct". But I
don't understand exactly the process.
Could you explain a more general approach to such problems? Or are
there different and simpler solutions?
- [Coq-Club] About dependent elimination or inversion?, Gyesik Lee
- Re: [Coq-Club] About dependent elimination or inversion?, Adam Chlipala
Archive powered by MhonArc 2.6.16.