X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Facic_procedural%2FproceduralMode.ml;h=e13846fc85a3ddee2b6dbb4f805be0ab7fac1de6;hb=04c05cf08605156ba8c6fa7225b4a90496c03698;hp=bd2c3a438c9fce26563f6eb04a6917dad5246a0d;hpb=977e819edc19f6c25d9f05c2fafe72c63ad301fd;p=helm.git diff --git a/helm/software/components/acic_procedural/proceduralMode.ml b/helm/software/components/acic_procedural/proceduralMode.ml index bd2c3a438..e13846fc8 100644 --- a/helm/software/components/acic_procedural/proceduralMode.ml +++ b/helm/software/components/acic_procedural/proceduralMode.ml @@ -23,9 +23,16 @@ * http://cs.unibo.it/helm/. *) -module C = Cic +module C = Cic +module PEH = ProofEngineHelpers + module Cl = ProceduralClassify +let is_eliminator = function + | _ :: (_, C.MutInd _) :: _ -> true + | _ :: (_, C.Appl (C.MutInd _ :: _)) :: _ -> true + | _ -> false + let is_const = function | C.Sort _ | C.Const _ @@ -41,5 +48,10 @@ let rec is_appl b = function | _ -> false let bkd c t = - let ts, _ = Cl.split c t in - is_appl true (List.hd ts) + let classes, rc = Cl.classify 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 + | _ -> + let _, conclusion = List.hd premises in + is_appl true conclusion