Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Lack of functionality for the Pattern tactic.

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Lack of functionality for the Pattern tactic.


chronological Thread 
  • From: Yves Bertot <Yves.Bertot AT sophia.inria.fr>
  • To: coq-club AT pauillac.inria.fr
  • Subject: [Coq-Club] Lack of functionality for the Pattern tactic.
  • Date: Fri, 04 Apr 2003 14:46:47 +0200
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Here is a simple example of proof where I have to do something
manually that is cumbersome.  I would expect the Pattern tactic to do
it for me, but I did not find the right combination of arguments.

Does anybody know a way to use the Pattern tactic so that the
goal is naturally replace by a goal of the form:

(P intzero (int_discr' intzero))

where P is the proposition given below?

If not, could Coq be extend in such a way that this would be possible?

====================
Variables int : Set; intone : int; intzero : int.
Hypothesis I0_neq_I1 : ~intzero = intone.

Inductive int_discr_type : int -> Set :=
  is_zero : (int_discr_type intzero) 
| is_one : (int_discr_type intone)
| is_other : (x:int)~x=intzero->~x=intone->(int_discr_type x).

Theorem intone_eq : intone = Cases (discr_int' intzero) of
                                is_zero => intone
                             | is_one => intzero
                             | (is_other _ _ _) => intzero
                             end.
Cut intzero=intzero.
Apply
 int_discr_type_ind
                    with
                    P:=
                     [x:int; v:(int_discr_type x)]
                       x=intzero
                       ->intone
                          =Cases v of
                             is_zero => intone
                           | is_one => intzero
                           | (is_other x _ _) => intzero
                           end;Intuition.
Intuition.
Qed.




Archive powered by MhonArc 2.6.16.

Top of Page