diff --git a/CoAlgLogicUtils.ml b/CoAlgLogicUtils.ml
index a9e4604dfe0053f3d66717d1e435ea8b80bf965a..26b76fc45f23547d807f3c19ff473dad213b957a 100644
--- a/CoAlgLogicUtils.ml
+++ b/CoAlgLogicUtils.ml
@@ -11,7 +11,7 @@ module TArray = struct
             else if f arr.(idx) then true
             else g (idx + 1)
         in g 0
-    let all f = any (fun x -> not (f x))
+    let all f arr = not (any (fun x -> not (f x)) arr)
     let elem (x: 'a) (arr: 'a array) =
         any (fun y -> x == y) arr
     let included sub sup = all (fun x -> elem x sup) sub