diff options
| author | Hugo Herbelin | 2017-09-03 21:04:12 +0200 |
|---|---|---|
| committer | Hugo Herbelin | 2017-09-03 21:10:03 +0200 |
| commit | 5241a3f69a0ff8c9d33a02d1cf3ebc7bcead8819 (patch) | |
| tree | 9d54ef73fcea4c4aa61be4525ba75f6ec588b31d | |
| parent | 3072bd9d080984833f5eb007bf15c6e9305619e3 (diff) | |
Addressing BZ#5713 (classical_left/classical_right artificially restricted).
As explained in BZ#5713 report, the requirement for a non-empty
context is not needed, so we remove it.
| -rw-r--r-- | test-suite/bugs/closed/5713.v | 15 | ||||
| -rw-r--r-- | theories/Logic/Classical_Prop.v | 6 |
2 files changed, 18 insertions, 3 deletions
diff --git a/test-suite/bugs/closed/5713.v b/test-suite/bugs/closed/5713.v new file mode 100644 index 0000000000..9daf9647fc --- /dev/null +++ b/test-suite/bugs/closed/5713.v @@ -0,0 +1,15 @@ +(* Checking that classical_right/classical_left work in an empty context *) + +Require Import Classical. + +Parameter A:Prop. + +Goal A \/ ~A. +classical_right. +assumption. +Qed. + +Goal ~A \/ A. +classical_left. +assumption. +Qed. diff --git a/theories/Logic/Classical_Prop.v b/theories/Logic/Classical_Prop.v index f7b53f1dc2..a5ae07b64c 100644 --- a/theories/Logic/Classical_Prop.v +++ b/theories/Logic/Classical_Prop.v @@ -97,12 +97,12 @@ Proof proof_irrelevance_cci classic. (* classical_left transforms |- A \/ B into ~B |- A *) (* classical_right transforms |- A \/ B into ~A |- B *) -Ltac classical_right := match goal with - | _:_ |-?X1 \/ _ => (elim (classic X1);intro;[left;trivial|right]) +Ltac classical_right := match goal with +|- ?X \/ _ => (elim (classic X);intro;[left;trivial|right]) end. Ltac classical_left := match goal with -| _:_ |- _ \/?X1 => (elim (classic X1);intro;[right;trivial|left]) +|- _ \/ ?X => (elim (classic X);intro;[right;trivial|left]) end. Require Export EqdepFacts. |
