Remove implications on predicate logic

Hi guys! this is a simple but honest question. I’m trying to remove all implications on a predicate logic expression, as it goes:

(A->B)
equals
(~A.B)

this one is pretty simple, and i used regex to solve it. However, my problem is to do something more generic, that could convert something like this:

((A->B)->(B->(C->D))
equals
(~(~A.B).(~B.(~C.D))

any ideas? :slight_smile:

You have some tools to do this…

The first is like lex/yacc while both last are PEG Parser I think.

Here is a blog post about leex/yecc usage
http://relops.com/blog/2014/01/13/leex_and_yecc/

And what is really nice… all of them have been done by members of this forum :slight_smile:

great! I’ll take a look at them, thank you.