Debian Codegraph @

test-suite/bugs/HoTT_coq_050.v

raw
1 Set Implicit Arguments.
2 Generalizable All Variables.
3 Set Asymmetric Patterns.
4 Set Universe Polymorphism.
5 Set Printing Universes.
6
7 Set Printing All.
8
9 Record PreCategory :=
10 {
11 Object :> Type;
12 Morphism : Object -> Object -> Type
13 }.
14
15 Inductive paths A (x : A) : A -> Type := idpath : @paths A x x.
16 Inductive Unit : Prop := tt. (* Changing this to [Set] fixes things *)
17 Inductive Bool : Set := true | false.
18
19 Definition DiscreteCategory X : PreCategory
20 := @Build_PreCategory X
21 (@paths X).
22
23 Definition IndiscreteCategory X : PreCategory
24 := @Build_PreCategory X
25 (fun _ _ => Unit).
26
27 Check (IndiscreteCategory Unit).
28 Check (DiscreteCategory Bool).
29 Definition NatCategory (n : nat) :=
30 match n with
31 | 0 => IndiscreteCategory Unit
32 | _ => DiscreteCategory Bool
33 end. (* Error: Universe inconsistency (cannot enforce Set <= Prop). *)