Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Pattern matching against forall / arbitrary arity functions

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Pattern matching against forall / arbitrary arity functions


chronological Thread 
  • From: "Edward Z. Yang" <ezyang AT mit.edu>
  • To: coq-club <coq-club AT inria.fr>
  • Subject: [Coq-Club] Pattern matching against forall / arbitrary arity functions
  • Date: Thu, 08 Dec 2011 18:09:33 -0500

I recently found myself writing the following tactic:

(**)
Ltac exbamf := match goal with
                 | [ H : _ -> exists _, _ |- exists _, _ ] => destruct H
                 | [ H : forall _, _ -> exists _, _ |- exists _, _ ] => 
edestruct H
                 | [ H : forall _ _, _ -> exists _, _ |- exists _, _ ] => 
edestruct H
                 | [ H : forall _ _ _, _ -> exists _, _ |- exists _, _ ] => 
edestruct H
               end.
(**)

Is there a way to write this more cleanly?

Edward



Archive powered by MhonArc 2.6.16.

Top of Page