Folly 0.1.1.0 → 0.1.2.0
raw patch · 2 files changed
+10/−2 lines, 2 files
Files
- Folly.cabal +1/−1
- src/Folly/Formula.hs +9/−1
Folly.cabal view
@@ -2,7 +2,7 @@ -- see http://haskell.org/cabal/users-guide/ name: Folly-version: 0.1.1.0+version: 0.1.2.0 synopsis: A first order logic library in Haskell description: An implementation of first order logic in Haskell that includes a library of modules for incorporating first
src/Folly/Formula.hs view
@@ -268,7 +268,15 @@ type Clause = [Formula] toClausalForm :: Formula -> [Clause]-toClausalForm = splitClauses . removeUniversals . toSkolemForm+toClausalForm = splitClauses . removeUniversals . distributeDisjunction . toSkolemForm++distributeDisjunction :: Formula -> Formula+distributeDisjunction f = transformFormula distrDis f++distrDis :: Formula -> Formula+distrDis (B "|" (B "&" l r) f) = (B "&" (B "|" l f) (B "|" r f))+distrDis (B "|" f (B "&" l r)) = (B "&" (B "|" f l) (B "|" f r))+distrDis f = f removeUniversals :: Formula -> Formula removeUniversals (Q "V" v f) = removeUniversals f