How would it be possible in Haskell, to be able to solve (without using functions instead of types):
rewrite(And True False) = False
rewrite(And (And True False) True) = False
...
I tried the following
data MyLogic f a = And f a deriving Show
rewrite(And a b)
| a == False = False
| b == False = False
| otherwise = True
rewrite(And (And a b) c) = ...
But haskell compiler complains that a might not be a bool in the first rewrite.