coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Guillaume Melquiond <guillaume.melquiond AT inria.fr>
- To: Dmitry Grebeniuk <gdsfh1 AT gmail.com>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] "named" goals with refine
- Date: Wed, 16 Jan 2013 10:38:26 +0100
Le mercredi 16 janvier 2013 à 11:06 +0200, Dmitry Grebeniuk a écrit :
> So I want something like this pseudocode:
>
> Goal myrec.
> refine ( {| n := 7 ; n_lt_10 := ?goal_nat? ; b := true ; b_tf :=
> ?goal_bool? |} ).
> for ?goal_nat? : omega.
> for ?goal_bool? : apply bool_tf.
> Qed.
>
> (of course I understand that solution may be not so pretty as
> the pseudocode, but aesthetics is not a my target.)
Here is a small suggestion, by adding meaningless arguments.
Require Import String.
Definition named (A : Type) (s : string) := A.
Notation _as s := (_ : named _ s).
Goal myrec.
refine ( {| n := 7 ; n_lt_10 := _as "goal_nat" ; b := true ; b_tf := _as
"goal_bool" |} ).
match goal with
| |- named _ "goal_nat" => unfold named ; omega
| |- named _ "goal_bool" => unfold named ; apply bool_tf
| _ => idtac
end.
Best regards,
Guillaume
- [Coq-Club] "named" goals with refine, Dmitry Grebeniuk, 01/16/2013
- Re: [Coq-Club] "named" goals with refine, Guillaume Melquiond, 01/16/2013
- Re: [Coq-Club] "named" goals with refine, Dmitry Grebeniuk, 01/16/2013
- Re: [Coq-Club] "named" goals with refine, AUGER Cédric, 01/16/2013
- Re: [Coq-Club] "named" goals with refine, Dmitry Grebeniuk, 01/16/2013
- Re: [Coq-Club] "named" goals with refine, AUGER Cédric, 01/16/2013
- Re: [Coq-Club] "named" goals with refine, Dmitry Grebeniuk, 01/16/2013
- Re: [Coq-Club] "named" goals with refine, AUGER Cédric, 01/16/2013
- Re: [Coq-Club] "named" goals with refine, Gabriel Scherer, 01/16/2013
- Re: [Coq-Club] "named" goals with refine, Guillaume Melquiond, 01/16/2013
Archive powered by MHonArc 2.6.18.