]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/ng_kernel/nCicReduction.ml
Appl case in is_really_smaller fixed as in the old kernel
[helm.git] / helm / software / components / ng_kernel / nCicReduction.ml
index 64133384d5f9a511efa91439f8e3ae970bb53f64..db19c9c9617dd13d237c99bb941daa19ed351d87 100644 (file)
@@ -419,11 +419,11 @@ module Reduction(RS : Strategy) =
      | (_, _, NCic.Const
             (NReference.Ref (_,_,NReference.Def) as refer), s) as config ->
          let _,_,body,_,_,height = NCicEnvironment.get_checked_def refer in
-         if delta >= height then config else aux (0, [], body, s) 
+         if delta > height then config else aux (0, [], body, s) 
      | (_, _, NCic.Const (NReference.Ref 
-               (_,_,NReference.Fix (_,recindex)) as refer),s) as config ->
-        let _,_,body,_, _, height = NCicEnvironment.get_checked_fix refer in
-        if delta >= height then config else
+               (_,_,NReference.Fix (fixno,recindex)) as refer),s) as config ->
+        let fixes,_, height = NCicEnvironment.get_checked_fixes refer in
+        if delta > height then config else
         (match
           try Some (RS.from_stack (List.nth s recindex))
           with Failure _ -> None
@@ -435,13 +435,15 @@ module Reduction(RS : Strategy) =
                let new_s =
                  replace recindex s (RS.compute_to_stack ~reduce:aux ~unwind c)
                in
+               let _,_,_,_,body = List.nth fixes fixno in
                aux (0, [], body, new_s)
            | _ -> config)
      | (_, _, NCic.Const _, _) as config -> config
      | (k, e, NCic.Match (_,_,term,pl),s) as config ->
         let decofix = function
-          | (_,_,NCic.Const(NReference.Ref(_,_,NReference.CoFix _)as refer),s)->
-             let _,_,body,_,_,_ = NCicEnvironment.get_checked_cofix refer in
+          | (_,_,NCic.Const(NReference.Ref(_,_,NReference.CoFix c)as refer),s)->
+             let cofixes,_,_ = NCicEnvironment.get_checked_cofixes refer in
+             let _,_,_,_,body = List.nth cofixes c in
              reduce ~delta:0 ~subst context (0,[],body,s)
           | config -> config
         in