Skip to Content.
Sympa Menu

coq-club - [Coq-Club] naming seems broken in inversion tactic

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] naming seems broken in inversion tactic


chronological Thread 
  • From: Aaron Bohannon <bohannon AT cis.upenn.edu>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: [Coq-Club] naming seems broken in inversion tactic
  • Date: Fri, 18 Feb 2011 14:10:26 -0500
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=TKX4GYkyKdzmAXDL6eLsLZ0iVEuueWeSrwkbO70sZVzAVckF3aEmzsTDYN4+vyIyKg gM8gqL0w9Pyrgr017RDZ8V819OcCvgFx8KiUXg6niMtEyAnPd3+iMeXPni06jgTayb8m 5G+rOL9jMhySajbqAsO7ayxd5/0U8Qlp4O8WU=

Hi,

The "inversion" tactic can take a pattern for the names of the
hypotheses it generates.  However, its treatment of names does not
seem "hygienic" to me.  Consider the following code:

<coq>

Parameter A: Set.
Parameter F: A -> Prop.

Inductive G: option A -> Prop :=
  | G_Some: forall a, F a -> G (Some a)
  | G_None: G None.

Lemma example:
  forall a, G (Some a) -> F a.
Proof.
  intros a H.
  (* tactic A:
    inversion H as [a1 J1 Heq1 | ]. *)
  (* tactic B:
    inversion H as [a1 J1 | ]. *)
  (* tactic C:
  inversion H as [a1 H1 | ]. *)
Admitted.

</coq>

In Coq 8.3, I observe the following behavior:  After tactic A, the
hypothesis I'm interested in will be named "J1".  After tactic B, the
hypothesis I'm interested in will be named "J1".  After tactic C, the
hypothesis I'm interested in will be named "H0" (because inversion
uses "H1" for the equation).  Is this something that we can agree to
call a bug?  It would at least be better for tactic C fail than have
it silently ignore the names given in the pattern, right?

 - Aaron



Archive powered by MhonArc 2.6.16.

Top of Page