]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/acic_procedural/proceduralMode.ml
- some depend files :)
[helm.git] / helm / software / components / acic_procedural / proceduralMode.ml
index 2b233a4bf358e4fc18d9f2de8bc6cb265b0b42e8..e13846fc85a3ddee2b6dbb4f805be0ab7fac1de6 100644 (file)
  * http://cs.unibo.it/helm/.
  *)
 
-module C  = Cic
+module C   = Cic
+module PEH = ProofEngineHelpers
 
-module P = ProceduralPreprocess
 module Cl = ProceduralClassify
 
 let is_eliminator = function
-   | _ :: C.MutInd _ :: _               -> true
-   | _ :: C.Appl (C.MutInd _ :: _) :: _ -> true
-   | _                                  -> false
+   | _ :: (_, C.MutInd _) :: _               -> true
+   | _ :: (_, C.Appl (C.MutInd _ :: _)) :: _ -> true
+   | _                                       -> false
 
 let is_const = function
    | C.Sort _
@@ -49,9 +49,9 @@ let rec is_appl b = function
 
 let bkd c t =
    let classes, rc = Cl.classify c t in
-   let premises, _ = P.split c t in
+   let premises, _ = PEH.split_with_whd (c, t) in
    match rc with
-      | Some (i, j) when i > 1 && i <= List.length classes && is_eliminator premises -> true
+      | Some (i, j, _, _) when i > 1 && i <= List.length classes && is_eliminator premises -> true
       | _ ->
-         let ts, _ = P.split c t in
-         is_appl true (List.hd ts)
+         let _, conclusion = List.hd premises in
+         is_appl true conclusion