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: [Coq-Club] Simplification of terms generated with tactics
- Date: Mon, 19 Jan 2015 11:06:15 +0000
- Accept-language: de-DE, en-US
Dear Coq Users,
using Jonathan Leivant's ideas on the split tactic, I created a tactic which
produces for simple enumeration style inductive types a list of all values
(see attached Coq script). It works fine, just the returned "proof term"
contains some unnecessary overhead (a function definition which is never
used). I wonder if there is a way to modify the tactic such that the
resulting "proof term" is just the list, without the overhead.
E.g. what I want is the term:
ValList1b = a :: b :: c :: nil
: list Test1
but what I get is the equivalent but much longer term:
ValList1 =
let result := a :: b :: c :: nil in
(fun _ : forall x : Test1, x = x => result)
(fun x : Test1 =>
match x as t return (t = t) with
| a => let tmp := b :: c :: nil in eq_refl
| b => let tmp := c :: nil in eq_refl
| c => let tmp := nil in eq_refl
end)
: list Test1
Thanks & best regards,
Michael
Attachment:
MakeValList.v
Description: MakeValList.v
- [Coq-Club] Simplification of terms generated with tactics, Soegtrop, Michael, 01/19/2015
- Re: [Coq-Club] Simplification of terms generated with tactics, Jonathan Leivent, 01/19/2015
- RE: [Coq-Club] Simplification of terms generated with tactics, Soegtrop, Michael, 01/19/2015
- Re: [Coq-Club] Simplification of terms generated with tactics, Jonathan Leivent, 01/19/2015
- Re: [Coq-Club] Simplification of terms generated with tactics, Pierre Courtieu, 01/19/2015
- RE: [Coq-Club] Simplification of terms generated with tactics, Soegtrop, Michael, 01/20/2015
- Re: [Coq-Club] Simplification of terms generated with tactics, Pierre Courtieu, 01/20/2015
- RE: [Coq-Club] Simplification of terms generated with tactics, Soegtrop, Michael, 01/20/2015
- Re: [Coq-Club] Simplification of terms generated with tactics, Pierre Courtieu, 01/20/2015
- RE: [Coq-Club] Simplification of terms generated with tactics, Soegtrop, Michael, 01/20/2015
- Re: [Coq-Club] Simplification of terms generated with tactics, Pierre Courtieu, 01/19/2015
- Re: [Coq-Club] Simplification of terms generated with tactics, Jonathan Leivent, 01/19/2015
- RE: [Coq-Club] Simplification of terms generated with tactics, Soegtrop, Michael, 01/19/2015
- Re: [Coq-Club] Simplification of terms generated with tactics, Jonathan Leivent, 01/19/2015
Archive powered by MHonArc 2.6.18.