File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -174,13 +174,14 @@ let force_translate_inductive cat ind ids =
174
174
Array. fold_left fold (sigma, [] ) mib.mind_packets
175
175
in
176
176
let make_one_entry params body (sigma , bodies_ ) =
177
- (* Heuristic for the return type. Can we do better? *)
178
177
let (sigma, s) =
179
- if Sorts. family_leq Sorts. InType body.mind_kelim then
180
- let sigma, s = Evarutil. new_Type sigma in
181
- (sigma, EConstr. to_constr sigma s)
182
- else
183
- (sigma, mkProp)
178
+ match body.mind_arity with
179
+ | RegularArity {mind_sort =s } when Sorts. (is_prop s || is_sprop s) ->
180
+ (* Impredicative sorts are stable by quantification over forcing conditions *)
181
+ (sigma, mkSort s)
182
+ | _ ->
183
+ let sigma, s = Evarutil. new_Type sigma in
184
+ (sigma, EConstr. to_constr sigma s)
184
185
in
185
186
let (sigma, arity) =
186
187
(* On obtient l'arité de l'inductif en traduisant le type de chaque indice
Original file line number Diff line number Diff line change @@ -27,4 +27,7 @@ _force (fun A n (v : vect A n) =>
27
27
|consv _ _ x r => 1
28
28
end).
29
29
exact I.
30
- Qed .
30
+ Qed .
31
+
32
+ Forcing Translate and using Obj Hom.
33
+ Forcing Translate iff using Obj Hom.
You can’t perform that action at this time.
0 commit comments