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

GHC ghc-devs at haskell.org
Thu Jan 12 19:20:22 UTC 2017


#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 vanto):

 I have rewrite the two functions.[[BR]]
 Here are simpler and concise functions.[[BR]]
 We understand better the rules of inference.[[BR]]

 {{{
 mod_ponens :: Bool -> Bool -> Bool
 mod_ponens a b = a && implies a b

 mod_tollens :: Bool -> Bool -> Bool
 mod_tollens a b = not b && implies a b
 }}}

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


More information about the ghc-tickets mailing list