Message Boards Message Boards

How to write equations in wolfram?

Posted 10 years ago

Hello, I have these equations which I need to write it Wolfram ... How to do Negate?

These equations are equal can I somehow compute one equation from another using Wolfram and boolean algebra?

Thank you

Attachments:
POSTED BY: Alon Vasago
9 Replies

Alon,

I usually use the function Equivalent together with TautologyQ to test if two logical expressions are equivalent, like this:

(* Let us prove that ((A OR B) => C) <=> (A => C) AND (B => C) *)
Equivalent[Implies[Or[A,B],C], And[Implies[A,C],Implies[B,C]]]//TautologyQ

Now, if you substitute your own expression instead of these two simple ones shown above, then it should work. Note that this is for Mathematica and not for Wolfram Alpha (I don't know if Wolfram Alpha understands the same syntax or not).

POSTED BY: Tigran Aivazian

I fixed the first link... sorry about that. The second one discusses the area of automated theorem proving--often (I think) it's in the realm of automatically generating a boolean proof (via manipulating logical expressions) of a logical equivalence. Which is that I think you are wanting to do.

POSTED BY: David Reiss
Posted 10 years ago

Hmm thx but I do not have time to learn all this stuff just for these two equations so no easy way I see :(

POSTED BY: Alon Vasago
Posted 10 years ago

First link does not work second I dont understand ... is there any software for it?

POSTED BY: Alon Vasago

Is you + sign the same as Or and your * sign the same as And? I believe so. So with this the two "sentences" corresponding to your two logial expressions would be (if I haven't made any mistakes) respectively:

(a and c) or (c and d) or (a and b and d) or (!a and !b and d) or (a and !b and !d) or (!a and !c and !d)

and

(a or !c or d) and (!a or !b or c or d) and (a or !b or c or !d) and (!a or b or c or !d)

As Mathematica expressions these are respectively:

expression1=(a && c) || (c && d) || (a && b && d) || ( ! a &&  ! b &&  d) || (a &&  ! b &&  ! d) || ( ! a &&  ! c &&  ! d)

and

 expression2= (a ||  ! c || d) && ( ! a ||  ! b || c || d) && (a ||  ! b || c ||  ! d) && ( ! a || b || c ||  ! d)

And we can see if these are the sam by using BooleanTable:

In[14]:= BooleanTable[expression1, {a, b, c, d}]

Out[14]= {True, True, True, False, True, True, False, True, True, \
False, False, True, True, False, True, True}

In[15]:= BooleanTable[expression2, {a, b, c, d}]

Out[15]= {True, True, True, False, True, True, False, True, True, \
False, False, True, True, False, True, True}

In[16]:= BooleanTable[expression2, {a, b, c, d}] === 
 BooleanTable[expression1, {a, b, c, d}]

Out[16]= True

So, what about Wolfram Alpha? One problem is that forming the And of the two word expressions is too long for the Wolfram Alpha input field... so it goes nowhere.

One possibility is to do two Wolfram Alpha calls

((a and c) or (c and d) or (a and b and d) or (!a and !b and d) or (a and !b and !d) or (!a and !c and !d)) truth table

and

((a or !c or d) and (!a or !b or c or d) and (a or !b or c or !d) and (!a or b or c or !d)) truth table

and visually compare the truth tables.

perhaps there are some other approaches in pure Wolfram Alpha that others can suggest.

POSTED BY: David Reiss
Posted 10 years ago

Wow this is amazing - thx for letting me know how to input it ... What I am trying to do is to use boolean algebra instead of truth tables for proving it is equal but I dont know how ...

By using the laws of Boolean algebra, I have to prove that both equations Ydmin and Ykmin are equivalent. Thus, I have to take as a starting point one of them, for example Ykmin and make such adjustments using the laws of BA until I come with Ydmin. It is also possible to take as the starting point Ykmin and with BA Laws "convert" it to Ydmin ...

POSTED BY: Alon Vasago
Posted 10 years ago

I mean Wolfram Alpha - I read the documentation but when I add the "symbols" there it just return me some nonsense - and yes I mean logical things with 4 variables A B C and D - these two equations should be equal but I need to find a way to create one equation from another.

POSTED BY: Alon Vasago

What do you mean by Wolfram: Mathematica or Wolfram Alpha?

Also, what do you mean by Negate? Do you mean logical negation or changing the sign of an algebraic expression?

I think you are meaning logical operations. If so, read the documentation (always read the documentation). Here are some links if you are meaning Mathematica.

http://reference.wolfram.com/language/guide/LogicAndBooleanAlgebra.html

http://reference.wolfram.com/language/howto/UseLogicalOperators.html

http://reference.wolfram.com/language/guide/TheoremProving.html

POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract