diff options
| -rw-r--r-- | test-suite/bugs/closed/shouldsucceed/808_2411.v | 27 | ||||
| -rw-r--r-- | toplevel/vernacentries.ml | 3 |
2 files changed, 27 insertions, 3 deletions
diff --git a/test-suite/bugs/closed/shouldsucceed/808_2411.v b/test-suite/bugs/closed/shouldsucceed/808_2411.v new file mode 100644 index 0000000000..1c13e74547 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/808_2411.v @@ -0,0 +1,27 @@ +Section test. +Variable n:nat. +Lemma foo: 0 <= n. +Proof. +(* declaring an Axiom during a proof makes it immediatly + usable, juste as a full Definition. *) +Axiom bar : n = 1. +rewrite bar. +now apply le_S. +Qed. + +Lemma foo' : 0 <= n. +Proof. +(* Declaring an Hypothesis during a proof is ok, + but this hypothesis won't be usable by the current proof(s), + only by later ones. *) +Hypothesis bar' : n = 1. +Fail rewrite bar'. +Abort. + +Lemma foo'' : 0 <= n. +Proof. +rewrite bar'. +now apply le_S. +Qed. + +End test.
\ No newline at end of file diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml index 2b298f2ac3..2def852aab 100644 --- a/toplevel/vernacentries.ml +++ b/toplevel/vernacentries.ml @@ -376,9 +376,6 @@ let vernac_exact_proof c = save_named true let vernac_assumption kind l nl= - if Pfedit.refining () then - errorlabstrm "" - (str "Cannot declare an assumption while in proof editing mode."); let global = fst kind = Global in List.iter (fun (is_coe,(idl,c)) -> if Dumpglob.dump () then |
