CicSubstitution.lift (context_of_t_len - context'_len)
with_what_in_context'
else
- with_what
- in
- t, with_what_in_context_of_t) terms)
+ with_what in
+ let _,u =
+ CicTypeChecker.type_of_aux' metasenv context_of_t with_what
+ CicUniv.empty_ugraph in
+ let b,_ =
+ CicReduction.are_convertible ~metasenv context_of_t t with_what u in
+ if b then
+ t, with_what_in_context_of_t
+ else
+ raise NotConvertible) terms)
in
ProofEngineReduction.replace ~equality:(==) ~what:terms ~with_what:terms'
~where:where in