Items tagged with logic

Also available: logic

i use

A -> B

B -> C

would like to find A -> C directly from A -> B and B -> C

but logic table show that AND(A->B, B->C) is not equal to A -> C

and (A->B) -> (B->C) is not equal to A -> C too

which logic operations can do this?

because do not want to use result to verify and because i do not know the result in the beginning

I am not sure why p is assigned to 1 when I do a logic problem.

The letter p should stay as p and not be assigned to one. I suspect it has something to do with a statement that is always true. This is annoying because sometimes I have expressions with p in a formula later on, and I didn't realize p has been assigned to 1. And I can't use p in a logical formula either since it's already been assigned to 1.

Typically sets are created like:



and then you can carryout A union B or B\A


what if  you wanted to create the set as

A:={values in some three dimensional space};

B:={volume, based on values taken from A};

Can these relationships be set up in Maple? If so, how? If there are commands that specifically handle these types of sets, what does maple call them?  I've seen the term 'set function' but what might Maple call them?

Note: I am not even sure i 'tagged' this correctly because it I am not sure the proper terms for these functions/sets.

Thanks in advance for any help.

Hi everybody,


For at least one function (I haven’t done extensive testing), the package Logic behaves differently in Maple 2015.0 and maple 2016.0

Maple 2015.0 :

Maple 2016.0
      Error, (in sprint) integer expected for integer format   ????     (??? are mine)

For information :
1)  Logic:-Contradiction(true) retruns false for both 2015.0 and 2016.0
2) OS : Windows 7


Is there some modification of the “Logic” package that  I have  missed ?


Thanks in advance

No need to hurry, esthetics is not a vital issue ... but thanks in advance.

PS : sorry for the syntax errors "waves" generated in the original Word document

Is there a library to draw state machine diagram from logic table in Maple?

is it possible?

i want to prove the injective of new custom operator based on custom logic table according to previous post

and want to see why new custom operator for integers are unordered or sometimes ordered

1. for example how to convert decimal or integer number into base 3 number, base 5 number etc. to do logical operation with custom logic table for example,


120 special operator 235 




special operator according to logical table is

1st op 2nd op output
0 0 1
0 1 0
1 0 1
1 1 0




=00010100 = 20

for base 10

1 op1 5 = 


op1   12


first digit of first number 1     = 1

first digit of second number 1 = 2

 then find 12 in logic table, it is 1, separation is 1 means move the value 1

to left 1 digit become 10

convert 10 back from base 3 to base 10, it is 3

how to construct this unknown name operator table with the custom logic table Min, Except, Diff

based on the operation described


no matter the logic table is correct or not, hope to mechanize these calculation steps for developing 3 operation table for base 10 quickly.

is it possible to develop a new kind of algebra with 3 new operators with the use of 3 operation table?



1. is module in algebraic geometry for classification of topological space which a poset is a frame

2. which invariant is for doing this classification of topological space in algebraic geometry or group cohomology?

3. if want to do full combination before classification, which kind of polynomials be a full combination

4. is poset just like function fst and snd function for meet and join in functional programming instead of using "and" and "or" logic? how a matrix group related with topological space which a poset is a frame?

5. is there any invariant function for classification of topological space in maple?

Maple has a powerful package for manipulation with logical expressions (Logic package). But it lacks for transfomation a boolean expression to algebraic normal form (ANF). In fact, this transfomation is very simple and implements by applying simple rules

to disjunctive normal form.

I suppose that this can be reached by introducing some custom operators and transfomations, if it is possible in Maple.


I find this a little frustrating as I learn Maple, so I think there is a better way to handle this.

I find myself having to keep wrapping expressions with evalf() in order to compare them, since when I use a constant such as Pi in these expressions and then compare them,  Maple complains.

In a large program, one does not know if an expression contains Pi or not beforehand, so is one really supposed to convert every expression to float just in case they might need to compare 2 expressions? 

Let me explain with simple example:

x:=1.2;  #it does not matter if this was 12/10 or 1.2, same error will result.
if x<y then

The above gives the error "Error, cannot determine if this expression is true or false: 1.2<(1/3)*Pi"

So I changed the y assignment above to y:=evalf(Pi/3); or evalf(Pi)/3; and now Maple is happy.

But this for me looks awkward. In Mathematica, I can simply write the same, using symbolic Pi, and it works as is:

x = 1.2;  #even if this is symbolic 12/10 it will also work
y = Pi/3;
If[x < y, Print["x<y"], Print["x>=y"]]

I did not have to write  y=N[Pi/3]  where N[] is the equivalent function to Maple's evalf() which converts its argument to real.

So, now in Maple, I find myself writing evalf() around so many things, since I have to anticipate I might need to compare them in some logic later on and I can't keep track which one has some symbolic constant such as Pi in them or not. While in Mathematica I never had to worry about this.

Is there a way to reduce the need to having to use evalf() so much?
It seems to me, Maple should be able to decide if  1<Pi without me having to write 1<evalf(Pi) ?



entail logic ⊨ is equivalent to what logic which in terms of conj and disj and not 

for example ⊨A <-> B, there is nothing in left hand side, 


does it mean that it should represent Entail(_, A<->B)  where _ is wildcard? 

How to write notation for logical induction programming in Maple like F# or Haskell having tuples?

such as 

Conj(A,Disj(B,C)) ...

1 2 3 4 5 Page 1 of 5