Article View: comp.lang.prolog
Article #723Re: Help on problem needed!
From: Michel BILLAUD
Date: Tue, 25 Aug 1992 07:46
Date: Tue, 25 Aug 1992 07:46
26 lines
1397 bytes
1397 bytes
In article <meskes.713709771@ulysses> meskes@ulysses.informatik.rwth-aachen.de (Michael Meskes) writes: >Can you program a IF...THEN...ELSE in Prolog without using the cut? No. a proof by contradiction: Suppose you can program IF..THEN ...ELSE, then you could also program NOT ... (negation as failure) because NOT(X) <==> IF X THEN FAIL ELSE TRUE Obviously NOT(TRUE) <=> FAIL and NOT(FAIL) <=> TRUE But every program P built from AND/OR/TRUE/FAIL only has the following property P(TRUE) "produces more solutions than" P(FAIL) (not very hard to prove) Which is not the case for NOT. ---- Also, it is not possible to replace CUT by IF...THEN..ELSE for a similar reason Michel -- Michel BILLAUD : billaud@geocub.greco-prog.fr Departement d'Informatique : phone W: 56.84.57.92 // 56.84.69.22 IUT "A", Universite Bordeaux I : "Je veux jouer de l'helicon 33405 Talence (FRANCE) : pon pon pon pon ! "
Technical Details
Message-ID:
<1992Aug25.074623.25450@greco-prog.fr>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!corton!geocub!billaudReferences:
<meskes.713709771@ulysses>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!corton!geocub!billaud From: billaud@greco-prog.fr (Michel BILLAUD) Newsgroups: comp.lang.prolog Subject: Re: Help on problem needed! Keywords: help Message-ID: <1992Aug25.074623.25450@greco-prog.fr> Date: 25 Aug 92 07:46:23 GMT References: <meskes.713709771@ulysses> Reply-To: billaud@geocub.UUCP (Michel BILLAUD) Organization: LaBRI - Universite Bordeaux I - France Lines: 26