Debian Codegraph @

test-suite/bugs/bug_3661.v

raw
1 (* File reduced by coq-bug-finder from original input, then from 11218 lines to 438 lines, then from 434 lines to 202 lines, then from 140 lines to 94 lines *)
2 (* coqc version trunk (September 2014) compiled on Sep 25 2014 2:53:46 with OCaml 4.01.0
3 coqtop version cagnode16:/afs/csail.mit.edu/u/j/jgross/coq-trunk,trunk (bec7e0914f4a7144cd4efa8ffaccc9f72dbdb790) *)
4 Inductive paths {A : Type} (a : A) : A -> Type := idpath : paths a a.
5 Set Implicit Arguments.
6 Delimit Scope morphism_scope with morphism.
7 Record PreCategory := { object :> Type ; morphism : object -> object -> Type }.
8 Bind Scope category_scope with PreCategory.
9 Local Open Scope morphism_scope.
10 Record Functor (C D : PreCategory) :=
11 { object_of :> C -> D;
12 morphism_of : forall s d, morphism C s d -> morphism D (object_of s) (object_of d) }.
13 Set Primitive Projections.
14 Class IsIsomorphism {C : PreCategory} {s d} (m : morphism C s d) := { morphism_inverse : morphism C d s }.
15 Record NaturalTransformation C D (F G : Functor C D) := { components_of :> forall c, morphism D (F c) (G c) }.
16 Unset Primitive Projections.
17 Class Isomorphic {C : PreCategory} s d :=
18 { morphism_isomorphic :: morphism C s d;
19 isisomorphism_isomorphic :: IsIsomorphism morphism_isomorphic }.
20 Arguments morphism_inverse {C s d} m {_} / .
21 Local Notation "m ^-1" := (morphism_inverse m) (at level 3, format "m '^-1'") : morphism_scope.
22 Definition functor_category (C D : PreCategory) : PreCategory.
23 exact (@Build_PreCategory (Functor C D)
24 (@NaturalTransformation C D)).
25 Defined.
26 Local Notation "C -> D" := (functor_category C D) : category_scope.
27 Generalizable All Variables.
28 Definition isisomorphism_components_of `{@IsIsomorphism (C -> D) F G T} x : IsIsomorphism (T x).
29 Proof.
30 constructor.
31 exact (T^-1 x).
32 Defined.
33 #[export] Hint Immediate isisomorphism_components_of : typeclass_instances.
34 Goal forall (x3 x9 : PreCategory) (x12 f0 : Functor x9 x3)
35 (x35 : @Isomorphic (@functor_category x9 x3) f0 x12)
36 (x37 : object x9)
37 (H3 : morphism x3 (@object_of x9 x3 f0 x37)
38 (@object_of x9 x3 f0 x37))
39 (x34 : @Isomorphic (@functor_category x9 x3) x12 f0)
40 (m : morphism x3 (x12 x37) (f0 x37) ->
41 morphism x3 (f0 x37) (x12 x37) ->
42 morphism x3 (f0 x37) (f0 x37)),
43 @paths
44 (morphism x3 (@object_of x9 x3 f0 x37) (@object_of x9 x3 f0 x37))
45 H3
46 (m
47 (@components_of x9 x3 x12 f0
48 (@morphism_inverse (@functor_category x9 x3) f0 x12
49 (@morphism_isomorphic (@functor_category x9 x3) f0 x12 x35)
50 (@isisomorphism_isomorphic (@functor_category x9 x3) f0 x12
51 x35)) x37)
52 (@components_of x9 x3 f0 x12
53 (@morphism_inverse (@functor_category x9 x3) x12 f0
54 (@morphism_isomorphic (@functor_category x9 x3) x12 f0 x34)
55 (@isisomorphism_isomorphic (@functor_category x9 x3) x12 f0
56 x34)) x37)).
57 Unset Printing All.
58 intros.
59 match goal with
60 | [ |- context[components_of ?T^-1 ?x] ]
61 => progress let T1 := constr:(T^-1 x) in
62 let T2 := constr:((T x)^-1) in
63 change T1 with T2 || fail 1 "too early"
64 end.
65
66 Undo.
67
68 match goal with
69 | [ |- context[components_of ?T^-1 ?x] ]
70 => progress let T1 := constr:(T^-1 x) in
71 change T1 with ((T x)^-1) || fail 1 "too early 2"
72 end.
73
74 Undo.
75
76 match goal with
77 | [ |- context[components_of ?T^-1 ?x] ]
78 => progress let T2 := constr:((T x)^-1) in
79 change (T^-1 x) with T2
80 end. (* not convertible *)
81
82 (*
83
84 (@components_of x9 x3 x12 f0
85 (@morphism_inverse _ _ _
86 (@morphism_isomorphic (functor_category x9 x3) f0 x12 x35) _) x37)
87
88 *)
89 Abort.