Debian Codegraph @

test-suite/bugs/bug_3783.v

raw
1 (* -*- coq-prog-args: ("-native-compiler" "no"); -*- *)
2 Require Import TestSuite.admit.
3
4 Fixpoint exp (n : nat) (T : Set) :=
5 match n with
6 | 0 => T
7 | S n' => exp n' (T * T)
8 end.
9
10 Definition big := Eval compute in exp 13 nat.
11
12 Module NonPrim.
13 Unset Primitive Projections.
14
15 Record sigT {A} (P : A -> Type) := existT { projT1 : A ; projT2 : P projT1 }.
16
17 Definition x : sigT (fun x => x).
18 Proof.
19 exists big; admit.
20 Defined.
21
22 Goal True.
23 pose ((fun y => y = y) (projT1 _ x)) as y.
24 Time cbv beta in y. (* 0s *)
25 admit.
26 Defined.
27 End NonPrim.
28 Module Prim.
29 Set Primitive Projections.
30
31 Record sigT {A} (P : A -> Type) := existT { projT1 : A ; projT2 : P projT1 }.
32
33 Definition x : sigT (fun x => x).
34 Proof.
35 exists big; admit.
36 Defined.
37
38 Goal True.
39 pose ((fun y => y = y) (projT1 _ x)) as y.
40 Timeout 1 cbv beta in y. (* takes around 2s. Grows with the value passed to [exp] above *)
41 admit.
42 Defined.
43 End Prim.