Delete Ternary directory

This commit is contained in:
Gregory Bednov 2025-01-10 20:50:49 +03:00 committed by GitHub
commit 3c9c68e54e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 0 additions and 154 deletions

View file

@ -1,22 +0,0 @@
module Ternary.Universum (Universum(..), universum, aFromStatements) where
import Data.List (nub)
import Ternary.Term (Item (..), Term (..), Vee)
data Universum = Aristotle
| Empty
| Default
universum :: (Eq a) => Universum -> [Vee a] -> [Vee a]
universum Aristotle facts =
[Term True (Item [Term x v])
| v <- aFromStatements facts,
x <- [False, True]]
universum Empty _ = []
universum Default xs = xs
aFromStatements :: (Eq a) => [Vee a] -> [a]
aFromStatements = nub . concatMap (extract . getItem . getVee)
where
getItem (Item x) = x
getVee (Term _ i) = i
extract terms = [v | (Term _ v) <- terms]