From 82311da10ee3dfa6f29ddfb9225f9f05c29dca31 Mon Sep 17 00:00:00 2001 From: Erik Martin-Dorel Date: Wed, 21 Apr 2021 00:23:00 +0200 Subject: Document the "Proof using" requirement for 'proof-omit-proofs-option --- CHANGES | 6 +++++- doc/ProofGeneral.texi | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index e1f63e82..59566881 100644 --- a/CHANGES +++ b/CHANGES @@ -156,7 +156,11 @@ and the PG Trac http://proofgeneral.inf.ed.ac.uk/trac letting errors in these proofs go unnoticed. Configure `proof-omit-proofs-option' or select "Proof-General -> Quick Options -> Processing -> Omit Proofs". See also section - "11.5 Omitting proofs for speed" in the manual + "11.5 Omitting proofs for speed" in the manual. + + Beware that if lemmas are proved in a section, these lemmas should + start with a "Proof using" annotation, otherwise Coq would compute + a wrong type for them when this omitting-proofs feature is enabled. *** bug fixes - avoid leaving partial files behind when compilation fails diff --git a/doc/ProofGeneral.texi b/doc/ProofGeneral.texi index 43f3ccb0..bbd2515d 100644 --- a/doc/ProofGeneral.texi +++ b/doc/ProofGeneral.texi @@ -5225,6 +5225,16 @@ If a nested proof is detected while searching for opaque proofs to omit, a warning is displayed and the complete remainder of the asserted region is sent unmodified to Coq. +If the proof script relies on sections, it is highly recommended to use +a @code{Proof using} annotation for all lemmas contained in a Section, +otherwise @code{Coq} will compute a wrong type for these lemmas when +this omitting-proofs feature is enabled. + +To automate this, we recall that ProofGeneral provides a dedicated +feature to generate these @code{Proof using} annotations (a defective +form being e.g. @code{Proof using Type} if no section hypothesis is +used), see the menu command @code{Coq > "Proof using" mode} and +@ref{Proof using annotations} for details. @node Editing multiple proofs @section Editing multiple proofs -- cgit v1.2.3