ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 14 Jan 2013 04:59:09 +0100implicationhttps://ask.sagemath.org/question/9293/implication/Hello !
I wish to know how implication works in sage.
In mathematica "Implies[True, False]" gives true.
In sage I wrote "true.implies(false)" it gives attribute error : "'bool' object has no attribute implies"
May I know How I should use implies in sage ?
Thanks.Tue, 08 Jan 2013 08:28:30 +0100https://ask.sagemath.org/question/9293/implication/Answer by Eviatar Bach for <p>Hello !</p>
<p>I wish to know how implication works in sage.
In mathematica "Implies[True, False]" gives true.</p>
<p>In sage I wrote "true.implies(false)" it gives attribute error : "'bool' object has no attribute implies"</p>
<p>May I know How I should use implies in sage ?</p>
<p>Thanks.</p>
https://ask.sagemath.org/question/9293/implication/?answer=14454#post-id-14454Hello,
Shouldn't it return false if the proposition is true and the conclusion false (http://en.wikipedia.org/wiki/Material_conditional)?
Here's how to use it in Sage:
sage: f = sage.logic.propcalc.formula('p->q')
sage: f.evaluate({'p':True, 'q':False})
FalseSat, 12 Jan 2013 21:35:10 +0100https://ask.sagemath.org/question/9293/implication/?answer=14454#post-id-14454Comment by sage_learner for <p>Hello,</p>
<p>Shouldn't it return false if the proposition is true and the conclusion false (<a href="http://en.wikipedia.org/wiki/Material_conditional)">http://en.wikipedia.org/wiki/Material...</a></p>
<p>Here's how to use it in Sage:</p>
<pre><code>sage: f = sage.logic.propcalc.formula('p->q')
sage: f.evaluate({'p':True, 'q':False})
False
</code></pre>
https://ask.sagemath.org/question/9293/implication/?comment=18402#post-id-18402Thank you. Yes you are right , it is my mistake. Mathematics gives False for that implication.Mon, 14 Jan 2013 04:59:09 +0100https://ask.sagemath.org/question/9293/implication/?comment=18402#post-id-18402