Comments (11)
Thanks @RalfJung !
I know the Proof term.
vernacular and use it sometimes, it's true that you found a workaround with the exact
tactic but this is definitely something to fix!
Don't have the time to investigate, Cc-ing @ProofGeneral/core just in case… if another maintainer can take a look sooner.
Thanks again!
from pg.
Hi.
Proof term
is more or less supported (even indentation-wise), but this is indeed yet another instance of the known bug #568 that the goals buffer sometimes do not updated (here it should become empty).
from pg.
No I think this is not just a stale goal buffer issue. If I step all the way to the end of the file, I get an error: "Attempt to save an incomplete proof", even though the script completes when run via coqc. I also get warnings about nested proofs. So it does seem like PG is actually confused and got Coq into a wrong state. It seems as if only Proof.
is sent to Coq, and the term is omitted.
from pg.
I can't reproduce. Can you check your pg version and also if the coqtop pg is using is the one you think? It seems to work with coq-8.15.
from pg.
This is with PG 8416875, Coq 8.16.1.
To reproduce:
- open a file with the example script
- C-c C-b
Then it prints two warnings:
Warning (comp): pg-user.el:489:41: Warning: docstring wider than 80 characters Disable showing Disable logging
Warning (proof-script): found second proof start at line 4 - are there nested proofs? Disable showing Disable logging
(the first warning disappears when I repeat this; I had quite a few such warnings the last weeks but they all seem to show up only once)
and an error
Error: (in proof sth_1): Attempt to save an incomplete proof
My custom settings are
'(coq-compile-before-require t)
'(coq-compile-parallel-in-background t)
'(coq-compile-quick 'no-quick)
'(coq-compile-vos 'vos)
'(coq-one-command-per-line nil)
'(proof-follow-mode 'followdown)
'(proof-next-command-insert-space nil)
'(proof-omit-proofs-configured t)
'(proof-omit-proofs-option t)
'(proof-splash-enable nil)
'(proof-three-window-enable t)
'(proof-three-window-mode-policy 'hybrid)
from pg.
OK. I can reproduce. This is rather strange. The following coqtop text session produces the error.
- Notice that from
Lemma sth_0
I paste each command one after the other. - Notice that I insert
Set Silent
/Unset Silent.
at some points and that the error doe not occur if I don't.
Is this a coq bug? Why would Set Silent change the semantics?
Welcome to Coq 8.16.1
Coq < Definition sth (n : nat) := True.
sth is defined
Coq < Lemma sth_all n : sth n. Proof. exact I. Qed.
1 goal
n : nat
============================
sth n
No more goals.
Coq < Set Silent.
Coq < Lemma sth_0 : sth 0.
sth_0 < Proof sth_all 0.
Coq < Lemma sth_1 : sth 1.
sth_1 < Unset Silent.
sth_1 < Proof sth_all 1.
Toplevel input, characters 0-16:
> Proof sth_all 1.
> ^^^^^^^^^^^^^^^^
Error: (in proof sth_1): Attempt to save an incomplete proof
sth_1 <
from pg.
Or is it that the Proof
command must happen exactly after the Lemma
?
from pg.
Or is it that the
Proof
command must happen exactly after theLemma
?
Yeah that's what it looks like to me.
from pg.
Mmh that is a strange semantics. How is it even checked by Coq?
I don't see any easy fix to this. Even a Print
command between the 2 commands breaks the script.
from pg.
Ho this is a known problem, even in Coq documentation. See #498. This coq feature is deprecated in coq's documentation.
I think we can close this bug report as duplicate of won't fix known bug.
from pg.
For reference to the deprecation of Proof term
: https://coq.inria.fr/distrib/current/refman/proofs/writing-proofs/proof-mode.html?highlight=proof#coq:cmd.Proof-%60term%60
from pg.
Related Issues (20)
- Interference with org-mode leads to buffer-save prompt of ephemeral buffers HOT 4
- Feedback from Coq Community Survey 2022. HOT 1
- Proof General overrides Emacs icon HOT 3
- Update https://proofgeneral.github.io/ HOT 2
- `coq-accept-proof-using-suggestion 'always` incorrectly believes that `proof` is a proof directive HOT 4
- Hitting 'tab' to indent just throws an error HOT 6
- Broken link in Ch. 11 of User's Manual
- Feature request: sparate commands for jumping to current point with/without omitting proofs HOT 7
- *response* buffer only showing last output HOT 3
- Tons of warnings when using certain PG features HOT 11
- "Omit proof" on a Let in a section leads to warning HOT 14
- "Omit proofs" breaks other proofs because it also skips hints HOT 14
- whitelist for admissible commands inside proofs HOT 17
- PG incorrectly interprets `}.` as a single token, which results in incorrectly accepting files that coqc rejects
- test_wholefile.v incompatible with 8.17 HOT 1
- Scheme ... with is indented improperly HOT 1
- Merging the Abella fork of PG HOT 10
- Automatic indenting for Easycrypt HOT 1
- generic/pg-goals.el shouldn't be executable HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pg.