Items tagged with logic logic Tagged Items Feed

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) ?

 

(Observeration, Hypothesis) = (then,if)

I want to use all logic with just a custom logic MP(A,B), simply notation as (A,B)

and convert all basic logics into above definition

A -> B = (B,A)  --- implication
(not (not A)) v B = (B,not A) -- Disj
not (not (A ^ B)) = not( (not A) v (not B) ) = not(not B, A) -- Conj

when i meet Disj and Conj

Is not(not B, A) = (B, not A) ?

if so, i am confused as it conclude Disj = Conj ?!

the reason i ask this is that Not logic make pattern not match

i have thought to make not(Prop("Go")) to become Prop("not Go") if not logic can move into proposition

if not logic has distributivity

i design this

(Observeration, Hypothesis) = (then,if)

because convenient of calculation

however, i do not understand not applied in not(Observeration, Hypothesis) if it can not move into bracket to become (not Observeration, not Hypothesis)

or 

should it not(Observeration, Hypothesis) = (Observeration, not Hypothesis) ?correct?

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? 

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

such as 

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

We have 12 sets S[1], S[2], ..., S[12] and the listlist LL:=[[2, 4, 5, 8, 10], [1, 3, 6, 7, 11], [2, 5, 6, 9, 10],
 [1, 5, 6, 9, 11], [1, 3, 4, 7, 12], [2, 3, 4, 8, 12], [2, 5, 10, 11, 12], [1, 6, 10, 11, 12], [3, 4, 10, 11, 12], [1, 3, 7, 8, 9], [2, 4, 7, 8, 9], [5, 6, 7, 8, 9]] which means that the set S[1] does not intersect with the sets
S[2], S[4], S[5], S[8], and S[10] (PS. but S[1] intersects with S[1], S[3], S[6], S[7], S[9], S[11], S[12]) and so on. What...

May I obtain, with Maple, an answer, true or false, about general questions of Logic and Set Theory?

i.e. Without constructing a Set, I want to know if is it true or false, that "if A is a subset of B and B is a subset of C then A is a subset of C".

 

Thanks in advance

 

Angelos58

Hello everyone,

I have been trying to use MAPLE 16 for Boolean algebra computations. BooleanSimplify( ) command in Logic-Mathematics is giving me incorrect results, in the following code:

with(Logic):

f:=(not(x1)and not(x2) and not(x3)) or (x1 and x2 and x4);   #Create a 4 variable function f

g:=((x1 and x2) or (x2 and x3)) or (x3 and x4);    #Create another 4 variable function g

f2:=f &or g;

f3:=Canonicalize(f2,{x1,x2,x3,x4},form=DNF...

Hi,

I would like to have logical operator which will spit out true if my variables are proportional to each other, something like:

a:= A*some*other*stuff;

b:=A;

evalb(a ~ b);

gives true

 

Is there an easy way to do this? 

Hi, Can Maples Logic package solve these problems?

How can they be formulated and solved in Maple? rgds

Let's say that the following arguments are true: Some gatekeepers are warriors. Some warriors are cowards. Therefore, we can conclude that some gatekeepers must be cowards. Is this conclusion true or false? answer: F

 Let's say that the following arguments are true: All Parkers are Franks. All Franks are smart. Therefore, we can conclude...

Hello,

it's my first utilisation of MAPLE, and I want to determine the max of a function y(x). I have this differentiel equation with 2 variables :

a*diff(y(x),x,x) + b*(diff(y(x),x)-diff(z(x),x)) + c*diff(y(x),x) + d*y(x) + e*(y(x)-z(x))= 0;

I resolve it whith the function "dsolve", and now and I want to calculat the max of the function y(x).

can any body help me ??!!!

thanks

 

Augh, this is hurting my brain.  This homework assignment (still the same one as before) is my first experience with Maple.  I'm trying to learn the semantics of the language as I go, and that's been going well for the most part, but there's this one thing that has been bugging me to absolutely NO END:  Logical operators.

Here's what I understand after a lot of internet searching and Help browsing:
-There's two sets of very similar operators. ...

In particular, Maple contains the Logic package, which is useful in teaching. But I do not understand the outputs of the Normalize command. Here is an example:

>with(Logic);

[`&and`, `&iff`, `&implies`, `&nand`, `&nor`, `&not`, `&or`, `&xor`, BooleanSimplify, Canonicalize, Contradiction, Dual, Environment, Equivalent, Export, Implies, Import, Normalize,
 Random, Satisfy, Tautology, TruthTable]

>f := Random({A, B, C});

Dear Maple Experts,

  I'm fairly new to Maple.  I've been trying to compute Gaussian tail probabilities accurately.  As I understand it, Maple has an "erf" function, but not an inverse erf.  Other posts have suggested doing something like:

  inv_erf := x->solve(erf(y/sqrt(2.0))=x,y);

At first ; for instance, about 68% of a Gaussian's probability is within 1 standard deviation, so:

> erf(1/sqrt(2))

    0.6826894920

> evalf(inv_erf(0.6826894920));

I think Maple should emphasize occupational and problem specific packages, like its TA software for teachers. Maple should have a package or set of packages for each type of engineer: electrical,hydrological, etc. Actually, Maple should promote packages for all professions that tend to need it. An abundance of packages would enable many new users to benefit from the power of maple with the experience of the advanced users who helped develop the packages.

1 2 3 4 Page 1 of 4