coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jonathan Leivent <jonikelee AT gmail.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Some questions on interface with coqtop
- Date: Sat, 12 Dec 2015 20:08:17 -0500
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jonikelee AT gmail.com; spf=Pass smtp.mailfrom=jonikelee AT gmail.com; spf=None smtp.helo=postmaster AT mail-qg0-f43.google.com
- Ironport-phdr: 9a23:b/jCYBfxjG05tmFPWflEwFQDlGMj4u6mDksu8pMizoh2WeGdxc65Zx7h7PlgxGXEQZ/co6odzbGG7ea4ASQp2tWojjMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpQAbFhi3DwdpPOO9QteU1JTpkbjqs7ToICx2xxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cY6Lod8JtLVry/dKAlR5RZCi4nOiY7/p7Frx7GGCmI4HIAUmwQ2j5FAhbI6g2yCpX2tCr5u+5w1QGVOMT3SfY/XjH0vPQjcwPhlCpSb21xy2rQkMEl1K8=
On 12/12/2015 07:24 PM, Épiphanie wrote:
Oki, I'll post on this then.
See: https://coq.inria.fr/bugs/show_bug.cgi?id=3945
Ltac is actually quite a bit more powerful than one might expect - than even its developers anticipated. For example, it is possible to write an Ltac tactic that can know the number of subgoals. It is even possible to write an Ltac tactic that can label the subgoals with their relative numbers.Could you show the syntax for this or a link I have missed? I checked again the official tutorial, and 2 others that were fully detailed but found nothing about this
To determine the number of goals, use the numgoals tactical available in Coq version 8.5. For instance, in a proof, if you execute the following line:
all: let n:=numgoals in idtac n.
Coq will print the number of subgoals in focus. There is no easy way to do it prior to 8.5.
For actually labeling goals with their relative numbers, this requires a rather complex tactic containing several Ltac hacks, which I wrote once, but don't have immediately available. If you really need this, I can try to find it.
-- Jonathan
- [Coq-Club] Some questions on interface with coqtop, Epiphanie, 12/11/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Jonathan Leivent, 12/11/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Gregory Malecha, 12/11/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Jonathan Leivent, 12/12/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Gregory Malecha, 12/12/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Épiphanie, 12/13/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Jonathan Leivent, 12/13/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Épiphanie, 12/13/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Gregory Malecha, 12/12/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Jonathan Leivent, 12/12/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Gregory Malecha, 12/11/2015
- Re: [Coq-Club] Some questions on interface with coqtop, Jonathan Leivent, 12/11/2015
Archive powered by MHonArc 2.6.18.