always dependent (to avoid the ugly compatibility code with Coq).
(shift + 1, b :: branches))
constructors (1, [])
in
+ let shiftno = conslen + rightno + 2 + recshift in
+ let outtype =
+ if dependent then
+ Cic.Rel shiftno
+ else
+ let head =
+ if rightno = 0 then
+ CicSubstitution.lift 1 (Cic.Rel shiftno)
+ else
+ Cic.Appl
+ ((CicSubstitution.lift (rightno + 1) (Cic.Rel shiftno)) ::
+ mk_rels 1 rightno)
+ in
+ add_right_lambda true leftno shiftno 1 rightno indty head ty
+ in
let mutcase =
- Cic.MutCase (uri, typeno, Cic.Rel (conslen + rightno + 2 + recshift),
- Cic.Rel 1, branches)
+ Cic.MutCase (uri, typeno, outtype, Cic.Rel 1, branches)
in
let body =
if is_recursive then