aboutsummaryrefslogtreecommitdiff
path: root/kernel/reduction.ml
diff options
context:
space:
mode:
authorGaëtan Gilbert2017-10-27 14:03:51 +0200
committerGaëtan Gilbert2019-03-14 13:27:38 +0100
commit75508769762372043387c67a9abe94e8f940e80a (patch)
tree3f63e7790e9f3b6e7384b0a445d62cfa7edbe829 /kernel/reduction.ml
parenta0e16c9e5c3f88a8b72935dd4877f13388640f69 (diff)
Add a non-cumulative impredicative universe SProp.
Note currently it's impossible to define inductives in SProp because indtypes.ml and the pretyper aren't fully plugged.
Diffstat (limited to 'kernel/reduction.ml')
-rw-r--r--kernel/reduction.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/reduction.ml b/kernel/reduction.ml
index b583d33e29..d526b25e5b 100644
--- a/kernel/reduction.ml
+++ b/kernel/reduction.ml
@@ -701,7 +701,8 @@ let check_sort_cmp_universes env pb s0 s1 univs =
| CONV -> check_eq univs u0 u1
in
match (s0,s1) with
- | Prop, Prop | Set, Set -> ()
+ | SProp, SProp | Prop, Prop | Set, Set -> ()
+ | SProp, _ | _, SProp -> raise NotConvertible
| Prop, (Set | Type _) -> if not (is_cumul pb) then raise NotConvertible
| Set, Prop -> raise NotConvertible
| Set, Type u -> check_pb Univ.type0_univ u
@@ -749,7 +750,8 @@ let infer_cmp_universes env pb s0 s1 univs =
| CONV -> infer_eq univs u0 u1
in
match (s0,s1) with
- | Prop, Prop | Set, Set -> univs
+ | SProp, SProp | Prop, Prop | Set, Set -> univs
+ | SProp, _ | _, SProp -> raise NotConvertible
| Prop, (Set | Type _) -> if not (is_cumul pb) then raise NotConvertible else univs
| Set, Prop -> raise NotConvertible
| Set, Type u -> infer_pb Univ.type0_univ u