coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Pierre Casteran <pierre.casteran AT labri.fr>
- To: xiang sen <xiangsen AT ustc.edu>
- Cc: coq-club AT pauillac.inria.fr
- Subject: Re: [Coq-Club] How to match several hypo. in Ltac
- Date: Sun, 26 Jun 2005 17:27:19 +0200
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Hi,
Are you looking for a tactic which keeps only one hypothesis of
type heap ?
If so, it seems that a tactic like that works :
Parameter heap:Prop.
Ltac clearheap :=
match goal with |
[h1 : heap |- _] =>
(clear h1 ;
match goal with | [h1 : heap |- _] => clearheap
| _ => fail 1 end)
|| idtac
end.
Goal heap -> heap -> nat -> heap -> heap ->nat.
intros.
clearheap.
auto.
Qed.
Pierre
Selon xiang sen
<xiangsen AT ustc.edu>:
> Hi, everyone!
>
> (*I define indom as :*)
> Ltac indom :=
> match goal with
> | [h1 : heap |- _] => clear h1
> end.
>
> (*This is ok.*)
> (*but *)
> Ltac indom :=
> match goal with
> | [h1 : heap; h2 : heap] |- ] => clear h1
> end.
> (** doesn't work **)
>
> How to resolve?
> Thanks
>
> All the best
> Sen
>
>
> --------------------------------------------------------
> Bug reports: http://coq.inria.fr/bin/coq-bugs
> Archives: http://pauillac.inria.fr/pipermail/coq-club
> http://pauillac.inria.fr/bin/wilma/coq-club
> Info: http://pauillac.inria.fr/mailman/listinfo/coq-club
>
--
Pierre Casteran
http://www.labri.fr/Perso/~casteran/
(+33) 540006931
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
- [Coq-Club] How to match several hypo. in Ltac, xiang sen
- Re: [Coq-Club] How to match several hypo. in Ltac, Pierre Casteran
- Re: [Coq-Club] How to match several hypo. in Ltac,
Pierre Casteran
- Re: [Coq-Club] How to match several hypo. in Ltac,
xiang sen
- Re: [Coq-Club] How to match several hypo. in Ltac,
Pierre Casteran
- Re: [Coq-Club] How to match several hypo. in Ltac,
xiang sen
- Re: [Coq-Club] How to match several hypo. in Ltac, Pierre Casteran
- Re: [Coq-Club] How to match several hypo. in Ltac,
xiang sen
- Re: [Coq-Club] How to match several hypo. in Ltac,
Pierre Casteran
- Re: [Coq-Club] How to match several hypo. in Ltac,
xiang sen
- Re: [Coq-Club] How to match several hypo. in Ltac,
Pierre Casteran
- Re: [Coq-Club] How to match several hypo. in Ltac, Pierre Casteran
Archive powered by MhonArc 2.6.16.