coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Zhaohui Li <lizhaohui1991 AT gmail.com>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] feature wish: Supporting redefining(overloading?) of Ltac functions
- Date: Wed, 18 May 2016 17:00:24 +0800
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=lizhaohui1991 AT gmail.com; spf=Pass smtp.mailfrom=lizhaohui1991 AT gmail.com; spf=None smtp.helo=postmaster AT mail-io0-f194.google.com
- Ironport-phdr: 9a23:14tv5ReJfQE4UGxfGhSCuaqmlGMj4u6mDksu8pMizoh2WeGdxc65Yx7h7PlgxGXEQZ/co6odzbGG4ua7ASdYsd6oizMrTt9lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9HOnpAIma153xjLDjvcaLKF0YzBOGIppMbzyO5T3LsccXhYYwYo0Q8TDu5kVyRuJN2GlzLkiSlRuvru25/Zpk7jgC86l5r50IAu3GePEzSqUdBzA7OUg04tfqvF/NV1ih/HwZB1cWmx1IHgmNyBCyCpPwoCvzsepg2XDLbJTeQrU9WDDk5KBuHky7wBwbPiI0pTmEwvd7i7hW9Uqs
For example, I have two tactics:
Ltac tryfalse :=
(** solve contradictions in context **)
match goal with
| H: true = false |- _ =>
inversion H
| _ => idtac
end.
Ltac crush :=
(** misc solver **)
try subst;
tryfalse;
eauto 2;
try tauto.
(** solve contradictions in context **)
match goal with
| H: true = false |- _ =>
inversion H
| _ => idtac
end.
Ltac crush :=
(** misc solver **)
try subst;
tryfalse;
eauto 2;
try tauto.
Ltac tryfalse1 :=
(** solve contradictions in context **)
match goal with
| H: true = false |- _ =>
inversion H
| H: Some _ = None |- _ =>
inversion H
| _ => idtac
end.
Ltac crush1 :=
(** misc solver **)
try subst;
tryfalse1;
eauto 2;
try tauto.
This is very ugly and wastes time.(** solve contradictions in context **)
match goal with
| H: true = false |- _ =>
inversion H
| H: Some _ = None |- _ =>
inversion H
| _ => idtac
end.
Ltac crush1 :=
(** misc solver **)
try subst;
tryfalse1;
eauto 2;
try tauto.
Ltac tryfalse :=
(** solve contradictions in context **)
match goal with
| H: true = false |- _ =>
inversion H
| H: Some _ = None |- _ =>
inversion H
| _ => idtac
end.
and Coq redefining tryfalse to this new definition, (** solve contradictions in context **)
match goal with
| H: true = false |- _ =>
inversion H
| H: Some _ = None |- _ =>
inversion H
| _ => idtac
end.
- [Coq-Club] feature wish: Supporting redefining(overloading?) of Ltac functions, Zhaohui Li, 05/18/2016
- Re: [Coq-Club] feature wish: Supporting redefining(overloading?) of Ltac functions, Pierre Courtieu, 05/18/2016
- Re: [Coq-Club] feature wish: Supporting redefining(overloading?) of Ltac functions, Zhaohui Li, 05/18/2016
- Re: [Coq-Club] feature wish: Supporting redefining(overloading?) of Ltac functions, Pierre Courtieu, 05/18/2016
Archive powered by MHonArc 2.6.18.