Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Variant of [rewrite] that ignores type universes?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Variant of [rewrite] that ignores type universes?


Chronological Thread 
  • From: Jason Gross <jasongross9 AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] Variant of [rewrite] that ignores type universes?
  • Date: Thu, 19 Jul 2012 17:12:50 -0400

Hi,
Is it a known/desired behavior that [rewrite] fails to match [Type]s in different universes?  (I'm using Coq 8.4beta2.)  Is there a way to tell [rewrite] to turn off it's universe strictness?
For example, I have the following code:
Set Printing Universes.

Goal Type = Type.
  pose Type as a.
  assert (H : Type = a) by reflexivity.
  (* rewrite H. (* "Found no subterm matching "Type (* Top.8 *)" in the current goal." *) *)
  match goal with
    | [ H : ?x = _ |- ?x = _ ] => idtac x (* Type (* Top.8 *) *)
  end.
  match goal with
    | [ H : ?x = _ |- ?y = _ ] => let H' := fresh in
      assert (H' : x = y) by reflexivity;
        rewrite <- H'; clear H';
          rewrite H (* succeeds *)
  end.
                                    
Thanks.

-Jason


  • [Coq-Club] Variant of [rewrite] that ignores type universes?, Jason Gross, 07/19/2012

Archive powered by MHonArc 2.6.18.

Top of Page