]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/ng_tactics/nCicElim.ml
Record projections are now defined as fixpoints in order to block
[helm.git] / helm / software / components / ng_tactics / nCicElim.ml
index 0abff3a6c694727f79cc2e07eded3fd6ce48cc82..79a22b07720fa9d5a3e7b2503324653a249becd7 100644 (file)
@@ -265,16 +265,18 @@ let mk_projection leftno tyname consname consty (projname,_,_) i =
       @ names in
      let outtype = pp rels outtype in
      let outtype= CicNotationPt.Binder (`Lambda, (arg, Some arg_ty), outtype) in
-      CicNotationPt.Binder
-       (`Lambda, (arg,Some arg_ty),
-         CicNotationPt.Case (arg,None,Some outtype,[branch]))
+      [arg, Some arg_ty], CicNotationPt.Case (arg,None,Some outtype,[branch])
    | _,NCic.Prod (name,_,t) ->
       let name = mk_id name in
-       CicNotationPt.Binder
-        (`Lambda, (name,None), aux (name::names) t (leftno - 1))
+      let params,body = aux (name::names) t (leftno - 1) in
+       (name,None)::params, body
    | _,_ -> assert false
  in
- let res = aux [] consty leftno in
+ let params,bo = aux [] consty leftno in
+ let pprojname = mk_id projname in
+ let res =
+  CicNotationPt.LetRec (`Inductive,
+   [params, (pprojname,None), bo, leftno], pprojname) in
 (* prerr_endline
    (BoxPp.render_to_string
      ~map_unicode_to_tex:false