Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Opaque in the library

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Opaque in the library


chronological Thread 
  • From: Randy Pollack <rap AT dcs.ed.ac.uk>
  • To: coq AT pauillac.inria.fr, coq-club AT pauillac.inria.fr
  • Subject: [Coq-Club] Opaque in the library
  • Date: Sat, 19 Oct 2002 19:39:21 +0100
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Consider the following natural definition of lambda terms with de
Bruijn indexes for bound variables.

Parameter id: Set.

Inductive obj: Set :=
   vg: id -> obj             (* global name *)
 | vi: nat -> obj            (* local index *)
 | vlam: obj -> obj
 | vapp: obj -> obj -> obj.

Fixpoint shift [i,d:nat; u:obj] : obj := 
  Cases i d u of
    O d u => u
  | i d (vg x) => (vg x)
  | i d (vi j) => (vi (ifdec (* j>= d *) (le_lt_dec d j) (plus j i) j))
  | i d (vlam u) => (vlam (shift i (S d) u))
  | i d (vapp u v) => (vapp (shift i d u) (shift i d v))
  end.

This function "shift" doesn't compute as I expected, because
"le_lt_dec" is Opaque in the library.  Of course, this is just one
lemma; I simply proved it again for myself, making it Transparent.

However when I had finished a small example with these lambda terms, I
had reproved 20 or 30 lemmas from the library.  (When making a library
entry into a defintion one may have to reprove everything it depends
on hereditarily.)

I also find it difficult to discover what lemmas really need to be
made transparent, as "Change", "Exact", etc give no information, and
even tiny examples blow up to thousands of lines when computed as far
as possible.

Is there something I'm missing, that relatively simple examples seem
to require reproving some of the library?

Randy





Archive powered by MhonArc 2.6.16.

Top of Page