Skip to Content.
Sympa Menu

coq-club - how to destruct l:(listn O)?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

how to destruct l:(listn O)?


chronological Thread 
  • From: Dimitri Hendriks <Dimitri.Hendriks AT phil.uu.nl>
  • To: coq-club AT pauillac.inria.fr
  • Subject: how to destruct l:(listn O)?
  • Date: Thu, 23 Mar 2000 12:23:44 +0100

Hi,

>From the following definition

Variable A : Set.

Inductive listn : nat->Set :=
  niln  : (listn O)
| consn : (n:nat)A->(listn n)->(listn (S n)).

one might expect (listn O) to be inhabited by niln only.
In other words (l:(listn O)) l = niln, but how to prove it?
Case analysis on l:(listn O) is not permitted
("Cannot solve a second-order unification problem").

Similarly, I need something like:

(n:nat;l:(listn (S n)))(EX a:A | (EX l':(listn n) | l = (consn n a l')))

Is it provable?

Best regards,
Dimitri





Archive powered by MhonArc 2.6.16.

Top of Page