273 (* formulas *) |
273 (* formulas *) |
274 (* ------------------------------------------------------------------------- *) |
274 (* ------------------------------------------------------------------------- *) |
275 |
275 |
276 (* prop_formula list -> prop_formula *) |
276 (* prop_formula list -> prop_formula *) |
277 |
277 |
278 fun exists xs = foldl SOr (False, xs); |
278 fun exists xs = Library.foldl SOr (False, xs); |
279 |
279 |
280 (* ------------------------------------------------------------------------- *) |
280 (* ------------------------------------------------------------------------- *) |
281 (* all: computes the conjunction over a list 'xs' of propositional formulas *) |
281 (* all: computes the conjunction over a list 'xs' of propositional formulas *) |
282 (* ------------------------------------------------------------------------- *) |
282 (* ------------------------------------------------------------------------- *) |
283 |
283 |
284 (* prop_formula list -> prop_formula *) |
284 (* prop_formula list -> prop_formula *) |
285 |
285 |
286 fun all xs = foldl SAnd (True, xs); |
286 fun all xs = Library.foldl SAnd (True, xs); |
287 |
287 |
288 (* ------------------------------------------------------------------------- *) |
288 (* ------------------------------------------------------------------------- *) |
289 (* dot_product: ([x1,...,xn], [y1,...,yn]) -> x1*y1+...+xn*yn *) |
289 (* dot_product: ([x1,...,xn], [y1,...,yn]) -> x1*y1+...+xn*yn *) |
290 (* ------------------------------------------------------------------------- *) |
290 (* ------------------------------------------------------------------------- *) |
291 |
291 |