[GHC] #13038: implementation of Modus ponens and Modus tollens

GHC ghc-devs at haskell.org
Sat Dec 31 17:54:59 UTC 2016


#13038: implementation of Modus ponens and Modus tollens
-------------------------------------+-------------------------------------
        Reporter:  vanto             |                Owner:
            Type:  feature request   |               Status:  infoneeded
        Priority:  normal            |            Milestone:
       Component:  libraries/base    |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 Thanks.

 You'll notice that if you examine the truth tables for `mod_ponens` and
 `mod_tollens`, you'll notice that:

 {{{#!hs
 mod_ponens = (&&)
 }}}

 and

 {{{#!hs
 mod_tollens x y = not (x || y)
 }}}

 I don't think either of these things break the Fairbairn threshold.

 The `implies` function
 [https://mail.haskell.org/pipermail/libraries/2016-January/026559.html
 Haskell has been proposed before on the libraries mailing list]. The
 consensus seemed to be that folks were generally supportive of the idea of
 introducing an `implies` function to `Data.Bool` (though the idea did have
 some detractors).

 You might wish to start a new libraries mailing list thread to see if
 that's still the case. If there's clear support, then feel free to submit
 a patch that adds `implies` to `base` via Phabricator.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13038#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list