Also available:

how to simplify this logic?...

would like to return K map of P1

Summation expression for logic only consider 1 but how about wildcard x ?

if consider wildcard x as 1 too, then will use below

source = [[0,0,1,0],[0,0,1,1],[0,1,0,1],[0,1,1,0],[0,1,1,1],[1,0,0,0],[1,0,0,1],[1,0,1,0],[1,0,1,1],[1,1,0,0],[1,1,0,1],[1,1,1,0],[1,1,1,1]];
i use Quine Mccluskey algorithm

got result below

wildcard is 5 or x
[[0, 5, 1, 5], [5, 0, 1, 5], [5, 5, 1, 0], [1, 0, 5, 5], [1, 5, 0, 5], [1, 5, 5, 0], [5, 5, 1, 1], [5, 1, 5, 1], [5, 1, 1, 5], [1, 5, 5, 1], [1, 5, 1, 5], [1, 1, 5, 5]]
A'C + B'C + CD' + AB' + AC' + AD' + CD + BD + BC + AD + AC + AB

table1 = [[0,0,0,0],
[0,0,0,1],
[0,0,1,0],
[0,0,1,1],
[0,1,0,0],
[0,1,0,1],
[0,1,1,0],
[0,1,1,1],
[1,0,0,0],
[1,0,0,1],
[1,0,1,0],
[1,0,1,1],
[1,1,0,0],
[1,1,0,1],
[1,1,1,0],
[1,1,1,1]];

loand(lonot(tt[0]),tt[2])
loand(lonot(tt[1]),tt[2])
loand(lonot(tt[3]),tt[2])
loand(lonot(tt[1]),tt[0])
loand(lonot(tt[2]),tt[0])
loand(lonot(tt[3]),tt[0])
loand(tt[2],tt[3])
loand(tt[1],tt[3])
loand(tt[1],tt[2])
loand(tt[0],tt[3])
loand(tt[0],tt[2])
loand(tt[0],tt[1])

loor(loor(loor(loor(loor(loor(loor(loor(loor(loor(loor(loand(lonot(tt[0]),tt[2]),
loand(lonot(tt[1]),tt[2])),
loand(lonot(tt[3]),tt[2])),
loand(lonot(tt[1]),tt[0])),
loand(lonot(tt[2]),tt[0])),
loand(lonot(tt[3]),tt[0])),
loand(tt[2],tt[3])),
loand(tt[1],tt[3])),
loand(tt[1],tt[2])),
loand(tt[0],tt[3])),
loand(tt[0],tt[2])),
loand(tt[0],tt[1]));
def lonot(z):
if z == 1:
return 0
else:
return 1
def loand(a, b):
if a == 1 and b == 1:
return 1
else:
return 0
def loor(a, b):
if a == 0 and b == 0:
return 0
else:
return 1
#A'C + B'C + AB' + CD + A'BD
for tt in table1:
print loor(loor(loor(loor(loor(loor(loor(loor(loor(loor(loor(loand(lonot(tt[0]),tt[2]),
loand(lonot(tt[1]),tt[2])),
loand(lonot(tt[3]),tt[2])),
loand(lonot(tt[1]),tt[0])),
loand(lonot(tt[2]),tt[0])),
loand(lonot(tt[3]),tt[0])),
loand(tt[2],tt[3])),
loand(tt[1],tt[3])),
loand(tt[1],tt[2])),
loand(tt[0],tt[3])),
loand(tt[0],tt[2])),
loand(tt[0],tt[1]));

finally i use python to verify
return
0
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1

seems correct if wildcard is 1 too, but
can boolean simplify function simplify this
A'C + B'C + CD' + AB' + AC' + AD' + CD + BD + BC + AD + AC + AB

to

C + A + B.D   which is
P1 = D + Q0 + Q1.N in png file ?

how to calculate implication logic result directly...

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

A possible bug with(Logic)...

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.

Set Theory, how to create 'set functions' in Maple...

Typically sets are created like:

A:={a,b,c};

B:={c,q,w,e};

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.

Logic[Tautology] : differences of behaviour betwee...

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 :
Logic:-Tautology(true);
true

Maple 2016.0
Logic:-Tautology(true);
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 ?

How to find a "smart" form of the converse of a bo...

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

How to draw state machines?...

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

how to convert variable x into a formula which exp...

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

how to convert integer or decimal number into any ...

1. for example how to convert decimal or integer number into base 3 number, base 5 number etc.

2.how to do logical operation with custom logic table for example,

120 special operator 235

01111000

11101011

special operator according to logical table is

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

01111000

11101011

=00010100 = 20

how to construct a table for base 10 for this logi...

for base 10

1 op1 5 =

01

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?

how to classify topological space which a poset is...

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?

Algebraic normal form of boolean function...

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.

How to reduce the need to keep using evalf() to ma...

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.
y:=Pi/3;
if x<y then
print("x<y");
else
print("x>=y");
fi;

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 ...

1.

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,

2.

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