From 968c8af13deaa3871aca7fc7086f1a5dc5769fde Mon Sep 17 00:00:00 2001 From: Matthieu Sozeau Date: Thu, 9 Apr 2015 17:34:09 +0200 Subject: Add test-suite file for bug #4120. --- test-suite/bugs/closed/4120.v | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test-suite/bugs/closed/4120.v (limited to 'test-suite/bugs') diff --git a/test-suite/bugs/closed/4120.v b/test-suite/bugs/closed/4120.v new file mode 100644 index 0000000000..4164d86dc1 --- /dev/null +++ b/test-suite/bugs/closed/4120.v @@ -0,0 +1,6 @@ +Definition id {T} (x : T) := x. +Goal sigT (fun x => id x)%type. + change (fun x => ?f x) with f. + Unshelve. + exists Type. exact Set. +Defined. (* Error: Attempt to save a proof with shelved goals (in proof Unnamed_thm) *) \ No newline at end of file -- cgit v1.2.3 From 6158ec51adc31814fde0293f54151c19a5f3b1e4 Mon Sep 17 00:00:00 2001 From: Matthieu Sozeau Date: Thu, 9 Apr 2015 17:49:42 +0200 Subject: Fix declarations of instances to perform restriction of universe instances as definitions and lemmas do (fixes bug# 4121). --- test-suite/bugs/closed/4121.v | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test-suite/bugs/closed/4121.v (limited to 'test-suite/bugs') diff --git a/test-suite/bugs/closed/4121.v b/test-suite/bugs/closed/4121.v new file mode 100644 index 0000000000..5f8c411ca8 --- /dev/null +++ b/test-suite/bugs/closed/4121.v @@ -0,0 +1,15 @@ +(* -*- coq-prog-args: ("-emacs" "-nois") -*- *) +(* File reduced by coq-bug-finder from original input, then from 830 lines to 47 lines, then from 25 lines to 11 lines *) +(* coqc version 8.5beta1 (March 2015) compiled on Mar 11 2015 18:51:36 with OCaml 4.01.0 + coqtop version cagnode15:/afs/csail.mit.edu/u/j/jgross/coq-8.5,v8.5 (8dbfee5c5f897af8186cb1bdfb04fd4f88eca677) *) + +Set Universe Polymorphism. +Class Contr_internal (A : Type) := BuildContr { center : A }. +Arguments center A {_}. +Class Contr (A : Type) : Type := Contr_is_trunc : Contr_internal A. +Hint Extern 0 => progress change Contr_internal with Contr in * : typeclass_instances. +Definition contr_paths_contr0 {A} `{Contr A} : Contr A := {| center := center A |}. +Instance contr_paths_contr1 {A} `{Contr A} : Contr A := {| center := center A |}. +Check @contr_paths_contr0@{i}. +Check @contr_paths_contr1@{i}. (* Error: Universe instance should have length 2 *) +(** It should have length 1, just like contr_paths_contr0 *) \ No newline at end of file -- cgit v1.2.3 From 33650e275a4b3f00541ea87ee4b39892be5fdb2f Mon Sep 17 00:00:00 2001 From: Matthieu Sozeau Date: Thu, 9 Apr 2015 18:33:07 +0200 Subject: Better test-suite files, removing reliance on admit. --- test-suite/bugs/closed/3590.v | 7 ++----- test-suite/bugs/closed/4120.v | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'test-suite/bugs') diff --git a/test-suite/bugs/closed/3590.v b/test-suite/bugs/closed/3590.v index 3440f0e806..3ef9270d40 100644 --- a/test-suite/bugs/closed/3590.v +++ b/test-suite/bugs/closed/3590.v @@ -1,13 +1,10 @@ -Require Import TestSuite.admit. -(* Set Primitive Projections. *) Set Implicit Arguments. Record prod A B := pair { fst : A ; snd : B }. Definition idS := Set. -Goal forall x y : prod Set Set, fst x = fst y. +Goal forall x y : prod Set Set, forall H : fst x = fst y, fst x = fst y. intros. change (@fst _ _ ?z) with (@fst Set idS z) at 2. - Unshelve. - admit. + apply H. Qed. (* Toplevel input, characters 20-58: diff --git a/test-suite/bugs/closed/4120.v b/test-suite/bugs/closed/4120.v index 4164d86dc1..00db8f7f3c 100644 --- a/test-suite/bugs/closed/4120.v +++ b/test-suite/bugs/closed/4120.v @@ -1,6 +1,5 @@ Definition id {T} (x : T) := x. Goal sigT (fun x => id x)%type. change (fun x => ?f x) with f. - Unshelve. exists Type. exact Set. Defined. (* Error: Attempt to save a proof with shelved goals (in proof Unnamed_thm) *) \ No newline at end of file -- cgit v1.2.3 From 07d63e1333dc73eda3e49e904ff8df6e7f62fa79 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Fri, 10 Apr 2015 16:14:09 +0200 Subject: Test for bug #3199. --- test-suite/bugs/closed/3199.v | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test-suite/bugs/closed/3199.v (limited to 'test-suite/bugs') diff --git a/test-suite/bugs/closed/3199.v b/test-suite/bugs/closed/3199.v new file mode 100644 index 0000000000..08bf62493d --- /dev/null +++ b/test-suite/bugs/closed/3199.v @@ -0,0 +1,18 @@ +Axiom P : nat -> Prop. +Axiom admit : forall n : nat, P n -> P n -> n = S n. +Axiom foo : forall n, P n. + +Create HintDb bar. +Hint Extern 3 => symmetry : bar. +Hint Resolve admit : bar. +Hint Immediate foo : bar. + +Lemma qux : forall n : nat, n = S n. +Proof. +intros n. +eauto with bar. +Defined. + +Goal True. +pose (e := eq_refl (qux 0)); unfold qux in e. +match type of e with context [eq_sym] => fail 1 | _ => idtac end. -- cgit v1.2.3