coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: "Soegtrop, Michael" <michael.soegtrop AT intel.com>
- To: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Subject: RE: [Coq-Club] How to print state of SFLib Case, SCase?
- Date: Fri, 13 Dec 2013 11:56:43 +0000
- Accept-language: de-DE, en-US
Dear Coq users,
with the kind help from Laurent Théry, I came up with the below solution for
printing the "Case stack" of the SF Case, SCase, ... tacticals.
This solution has the flaw that it prints all local string variables, but I
guess such variables are not widely used in the context of a proof, so I
think this solution is preferable over a solution with modified Case, SCase
tactics.
Best regards,
Michael
(* Print the name and value of all local string variables.
When using teh SF Case, SCase, ... tacticals, this prints the current
"Case stack".
This is usefull whane using automated tactics which solve many goals.
"description" is an arbitrary descriptive string *)
Ltac print_cases description:=
try (
match goal with
| Case : String.string |- _ =>
(let v := eval lazy delta[Case] in Case in idtac description ":" Case
":=" v );
revert Case;
print_cases;
intro Case
end
).
(* duplicate the current goal *)
Theorem duplicate_goal : forall A, A -> True -> A.
intros; assumption.
Qed.
(* Same as print_cases, but also works if the tactic solves the current goal
*)
Ltac print_cases_solve tactic description :=
apply duplicate_goal; [tactic; fail | print_cases description; trivial].
- [Coq-Club] How to print state of SFLib Case, SCase?, michael.soegtrop, 12/12/2013
- Re: [Coq-Club] How to print state of SFLib Case, SCase?, Laurent Théry, 12/12/2013
- Re: [Coq-Club] How to print state of SFLib Case, SCase?, Laurent Théry, 12/12/2013
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- RE: [Coq-Club] How to print state of SFLib Case, SCase?, Soegtrop, Michael, 12/13/2013
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
Archive powered by MHonArc 2.6.18.