diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/inductive.ml | 3 | ||||
| -rw-r--r-- | kernel/reduction.ml | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/kernel/inductive.ml b/kernel/inductive.ml index 91c042130a..9bed598bb7 100644 --- a/kernel/inductive.ml +++ b/kernel/inductive.ml @@ -1069,6 +1069,9 @@ let inductive_of_mutfix env ((nvect,bodynum),(names,types,bodies as recdef)) = try find_inductive env a with Not_found -> raise_err env i (RecursionNotOnInductiveType a) in + let mib,_ = lookup_mind_specif env (out_punivs mind) in + if mib.mind_finite != Finite then + raise_err env i (RecursionNotOnInductiveType a); (mind, (env', b)) else check_occur env' (n+1) b else anomaly ~label:"check_one_fix" (Pp.str "Bad occurrence of recursive call.") diff --git a/kernel/reduction.ml b/kernel/reduction.ml index e9be1b35df..b3e6894143 100644 --- a/kernel/reduction.ml +++ b/kernel/reduction.ml @@ -269,8 +269,9 @@ let convert_constructors_gen cmp_instances cmp_cumul (mind, ind, cns) nargs u1 u if not (Int.equal num_cnstr_args nargs) then cmp_instances u1 u2 s else - let csts = get_cumulativity_constraints CONV cumi u1 u2 in - cmp_cumul csts s + (** By invariant, both constructors have a common supertype, + so they are convertible _at that type_. *) + s let convert_constructors ctor nargs u1 u2 (s, check) = convert_constructors_gen (check.compare_instances ~flex:false) check.compare_cumul_instances |
