Debian Codegraph @

test-suite/bugs/bug_3658.v

raw
1 Require Import TestSuite.admit.
2 (* File reduced by coq-bug-finder from original input, then from 12178 lines to 457 lines, then from 500 lines to 147 lines, then from 175 lines to 56 lines *)
3 (* coqc version trunk (September 2014) compiled on Sep 21 2014 16:34:4 with OCaml 4.01.0
4 coqtop version cagnode16:/afs/csail.mit.edu/u/j/jgross/coq-trunk,trunk (eaf864354c3fda9ddc1f03f0b1c7807b6fd44322) *)
5
6 Axiom transport : forall {A : Type} (P : A -> Type) {x y : A} (p : x = y) (u : P x), P y.
7 Axiom ap : forall {A B:Type} (f:A -> B) {x y:A} (p:x = y), f x = f y.
8 Module NonPrim.
9 Class Contr_internal (A : Type) := { center : A ; contr : (forall y : A, center = y) }.
10 Arguments center A {_} / .
11 Inductive trunc_index : Type := minus_two | trunc_S (_ : trunc_index).
12 Notation "-2" := minus_two (at level 0).
13 Fixpoint IsTrunc_internal (n : trunc_index) (A : Type) : Type :=
14 match n with
15 | -2 => Contr_internal A
16 | trunc_S n' => forall (x y : A), IsTrunc_internal n' (x = y)
17 end.
18 Class IsTrunc (n : trunc_index) (A : Type) : Type := Trunc_is_trunc : IsTrunc_internal n A.
19 Notation Contr := (IsTrunc -2).
20 #[export] Hint Extern 0 => progress change Contr_internal with Contr in * : typeclass_instances.
21 Goal forall (H : Type) (H0 : H -> H -> Type) (H1 : Type)
22 (H2 : Contr H1) (H3 : H1) (H4 : H1 -> H)
23 (H5 : H0 (H4 (center H1)) (H4 H3))
24 (H6 : H0 (H4 (center H1)) (H4 (center H1))),
25 transport (fun y : H => H0 (H4 (center H1)) y) (ap H4 (contr H3)) H6 = H5.
26 intros.
27 match goal with
28 | [ |- context[contr (center _)] ] => fail 1 "bad"
29 | _ => idtac
30 end.
31 match goal with
32 | [ H : _ |- _ ] => destruct (contr H)
33 end.
34 match goal with
35 | [ |- context[contr (center ?x)] ] => fail 1 "bad" x
36 | _ => idtac
37 end.
38 admit.
39 Defined.
40 End NonPrim.
41
42 Module Prim.
43 Set Primitive Projections.
44 Class Contr_internal (A : Type) := { center : A ; contr : (forall y : A, center = y) }.
45 Arguments center A {_} / .
46 Inductive trunc_index : Type := minus_two | trunc_S (_ : trunc_index).
47 Notation "-2" := minus_two (at level 0).
48 Fixpoint IsTrunc_internal (n : trunc_index) (A : Type) : Type :=
49 match n with
50 | -2 => Contr_internal A
51 | trunc_S n' => forall (x y : A), IsTrunc_internal n' (x = y)
52 end.
53 Class IsTrunc (n : trunc_index) (A : Type) : Type := Trunc_is_trunc : IsTrunc_internal n A.
54 Notation Contr := (IsTrunc -2).
55 #[export] Hint Extern 0 => progress change Contr_internal with Contr in * : typeclass_instances.
56 Goal forall (H : Type) (H0 : H -> H -> Type) (H1 : Type)
57 (H2 : Contr H1) (H3 : H1) (H4 : H1 -> H)
58 (H5 : H0 (H4 (center H1)) (H4 H3))
59 (H6 : H0 (H4 (center H1)) (H4 (center H1))),
60 transport (fun y : H => H0 (H4 (center H1)) y) (ap H4 (contr H3)) H6 = H5.
61 intros.
62 match goal with
63 | [ |- context[contr (center _)] ] => fail 1 "bad"
64 | _ => idtac
65 end.
66 match goal with
67 | [ H : _ |- _ ] => destruct (contr H)
68 end.
69 match goal with
70 | [ |- context[contr (center ?x)] ] => fail 1 "bad" x
71 | _ => idtac
72 end. (* Error: Tactic failure: bad H1. *)
73 admit.
74 Defined.
75 End Prim.