Debian Codegraph @

test-suite/success/CumulInd.v

raw
1
2 (* variances other than Invariant are forbidden for non-cumul inductives *)
3 Fail Inductive foo@{+u} : Prop := .
4 Fail Polymorphic Inductive foo@{*u} : Prop := .
5 Inductive foo@{=u} : Prop := .
6
7 (* Cumulative attr forbidden without univ poly on *)
8 Fail Cumulative Inductive bar@{u} : Prop := .
9
10 (* option allowed but does nothing until univ poly is on *)
11 Set Polymorphic Inductive Cumulativity.
12
13 Fail Inductive bar@{*u} : Prop := .
14 Succeed Polymorphic Inductive bar@{*u} : Prop := .
15
16 Set Universe Polymorphism.
17 Set Polymorphic Inductive Cumulativity.
18
19 Inductive force_invariant@{=u} : Prop := .
20 Fail Definition lift@{u v | u < v} (x:force_invariant@{u}) : force_invariant@{v} := x.
21
22 Inductive force_covariant@{+u} : Prop := .
23 Fail Definition lift@{u v | v < u} (x:force_covariant@{u}) : force_covariant@{v} := x.
24 Definition lift@{u v | u < v} (x:force_covariant@{u}) : force_covariant@{v} := x.
25
26 Fail Inductive not_irrelevant@{*u} : Prop := nirr (_ : Type@{u}).
27 Inductive check_covariant@{+u} : Prop := cov (_ : Type@{u}).
28
29 Fail Inductive not_covariant@{+u} : Prop := ncov (_ : Type@{u} -> nat).
30
31 Inductive must_unfold@{+u *v} : Prop := cmust (_ : @id Type@{v} Type@{u}).
32
33 Inductive actually_default_unfold@{u v} : Prop := cnodef (_ : @id Type@{v} Type@{u}).
34 Inductive actually_default_unfold_check@{+u *v} : Prop
35 := cnodef_check (_ : actually_default_unfold@{u v}).
36
37
38 Inductive irrelevant@{*u} : Prop := .
39
40 (* weak constraints help minimization *)
41 Definition irrelevant_with_weak@{u} : irrelevant@{u} -> irrelevant := fun x => x.
42
43 Unset Cumulativity Weak Constraints.
44 Fail Definition irrelevant_without_weak@{u} : irrelevant@{u} -> irrelevant := fun x => x.
45 Definition irrelevant_without_weak@{u+} : irrelevant@{u} -> irrelevant := fun x => x.
46 Check irrelevant_without_weak@{_ _}.