@@ -296,19 +296,21 @@ mk-sort-coercion-aux _ Structure P Args Clause :-
296
296
std.rev Args ArgsRev,
297
297
Clause =
298
298
(pi ctx v t e r argsAll w\ (coercion ctx v (app [Structure | ArgsRev]) e r :-
299
+ coq.say "try sort coercion",
299
300
std.append ArgsRev [v] argsAll,
300
301
coq.mk-app P argsAll w,
302
+ coq.say "find coercion from sort",
301
303
coq.elaborate-skeleton w e r ok,
302
- coq.ltac.collect-goals r [] [])).
304
+ coq.ltac.collect-goals r [] [],
305
+ coq.say "sort coercion succeeds")).
303
306
304
307
pred mk-sort-coercion i:term, i:term, o:prop.
305
308
mk-sort-coercion Structure P Clause :-
306
- coq.typecheck Structure T ok ,
309
+ std.assert-ok! ( coq.typecheck Structure T) "anomaly: mk-sort-coercion" ,
307
310
mk-sort-coercion-aux T Structure P [] Clause.
308
311
309
312
pred mk-reverse-coercion-aux i:term, i:term, i:term, i:list term, o:prop.
310
- mk-reverse-coercion-aux (prod _N _T Body) Structure G Args Clause :-
311
- Clause = (pi x\ C x),
313
+ mk-reverse-coercion-aux (prod _N _T Body) Structure G Args (pi x\ C x) :-
312
314
pi x\ mk-reverse-coercion-aux (Body x) Structure G [x | Args] (C x).
313
315
314
316
mk-reverse-coercion-aux _ Structure G Args Clause :-
@@ -322,7 +324,7 @@ mk-reverse-coercion-aux _ Structure G Args Clause :-
322
324
323
325
pred mk-reverse-coercion i:gref, o:prop.
324
326
mk-reverse-coercion Structure Clause :-
325
- coq.typecheck (global Structure) T ok ,
327
+ coq.env.typeof Structure T ,
326
328
get-constructor Structure G,
327
329
mk-reverse-coercion-aux T (global Structure) (global G) [] Clause.
328
330
0 commit comments