X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=components%2Facic_procedural%2FproceduralMode.ml;h=2b233a4bf358e4fc18d9f2de8bc6cb265b0b42e8;hb=a2f9236b189b39bb5e7d864991cae29c9f9cb67f;hp=bd2c3a438c9fce26563f6eb04a6917dad5246a0d;hpb=8f5b25b6091f1e240f37de5355e7a99b756e98e8;p=helm.git diff --git a/components/acic_procedural/proceduralMode.ml b/components/acic_procedural/proceduralMode.ml index bd2c3a438..2b233a4bf 100644 --- a/components/acic_procedural/proceduralMode.ml +++ b/components/acic_procedural/proceduralMode.ml @@ -24,8 +24,15 @@ *) module C = Cic + +module P = ProceduralPreprocess 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, _ = P.split c t in + match rc with + | 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)