X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql_interpreter%2Fsub.ml;h=5bc3d5b92b18aebdc8ae0cd356a675fffcca83e4;hb=869706b3ab84bed5e463735dab717867b76ea766;hp=17804c75412420393dad856322272262583d046b;hpb=6802617e5354dc6a854ac18c70f3c7fe17ab21f1;p=helm.git diff --git a/helm/ocaml/mathql_interpreter/sub.ml b/helm/ocaml/mathql_interpreter/sub.ml index 17804c754..5bc3d5b92 100644 --- a/helm/ocaml/mathql_interpreter/sub.ml +++ b/helm/ocaml/mathql_interpreter/sub.ml @@ -26,7 +26,9 @@ let rec sub_ex v1 v2 = match v1,v2 with - [],_ + [],_ -> true | _,[] -> false - | s::tl,l -> if (List.mem s l) then sub_ex tl l - else false + | s1::tl1, s2::_ when s1 < s2 -> sub_ex tl1 v2 + | s1::_, s2::_ when s2 < s1 -> false + | s1::tl1, s2::tl2 -> sub_ex tl1 tl2 +;;