(Translated by https://www.hiragana.jp/)
MaplePrimes - Questions, Posts, help, musings, answers ... all things Maple and math

MaplePrimes Announcement

VerifyTools is a package that has been available in Maple for roughly 24 years, but until now it has never been documented, as it was originally intended for internal use only. Documentation for it will be included in the next release of Maple. Here is a preview:

VerifyTools is similar to the TypeTools package. A type is essentially a predicate that a single expression can either satisfy or not. Analogously, a verification is a predicate that applies to a pair of expressions, comparing them. Just as types can be combined to produce compound types, verifications can also be combined to produce compund verifications. New types can be created, retrieved, queried, or deleted using the commands AddType, GetType (or GetTypes), Exists, and RemoveType, respectively. Similarly in the VerifyTools package we can create, retrieve, query or delete verifications using AddVerification, GetVerification (or GetVerifications), Exists, and RemoveVerification.

The package command VerifyTools:-Verify is also available as the top-level Maple command verify which should already be familiar to expert Maple users. Similarly, the command VerifyTools:-IsVerification is also available as a type, that is,

VerifyTools:-IsVerification(ver);

will return the same as

type(ver, 'verification');

The following examples show what can be done with these commands. Note that in each example where the Verify command is used, it is equivalent to the top-level Maple command verify. (Also note that VerifyTools commands shown below will be slightly different compared to the Maple2024 version):

with(VerifyTools):

Suppose we want to create a verification which will checks that the length of a result has not increased compared to the expected result. We can do this using the AddVerification command:

AddVerification(length_not_increased, (a, b) -> evalb(length(a) <= length(b)));

First, we can check the existence of our new verification and get its value:

Exists(length_not_increased);

true

GetVerification(length_not_increased);

proc (a, b) options operator, arrow; evalb(length(a) <= length(b)) end proc

For named verifications, IsVerification is equivalent to Exists (since names are only recognized as verifications if an entry exists for them in the verification database):

IsVerification(length_not_increased);

true

On the other hand, a nontrivial structured verification can be checked with IsVerification,

IsVerification(boolean = length_not_increased);

true

whereas Exists only accepts names:

Exists(boolean = length_not_increased);

Error, invalid input: VerifyTools:-Exists expects its 1st argument, x, to be of type symbol, but received boolean = length_not_increased

The preceding command using Exists is also equivalent to the following type call:

type(boolean = length_not_increased, verification);

true

Now, let's use the new verification:

Verify(x + 1/x, (x^2 + 1)/x, length_not_increased);

true

Verify((x^2 + 1)/x, x + 1/x, length_not_increased);

false

Finally, let's remove the verification:

RemoveVerification(length_not_increased);

Exists(length_not_increased);

false

GetVerification(length_not_increased);

Error, (in VerifyTools:-GetVerification) length_not_increased is not a recognized verification

GetVerifications returns the list of all verifications known to the system:

GetVerifications();

[Array, FAIL, FrobeniusGroupId, Global, Matrix, MultiSet, PermGroup, RootOf, SmallGroupId, Vector, address, after, approx, array, as_list, as_multiset, as_set, attributes, boolean, box, cbox, curve, curves, dataframe, dataseries, default, default, dummyvariable, equal, evala, evalc, expand, false, float, function, function_bounds, function_curve, function_shells, greater_equal, greater_than, in_convex_polygon, indef_int, interval, less_equal, less_than, list, listlist, matrix, member, multiset, neighborhood, neighbourhood, normal, permute_elements, plot, plot3d, plot_distance, plotthing_compile_result, polynom, procedure, ptbox, range, rational, record, relation, reverse, rifset, rifsimp, rtable, set, sign, simplify, sublist, `subset`, subtype, superlist, superset, supertype, symbol, table, table_indices, testeq, text, true, truefalse, type, undefined, units, vector, verifyfunc, wildcard, xmltree, xvm]

Download VerificationTools_blogpost.mw

Austin Roche
Software Architect
Mathematical Software
Maplesoft

Featured Post

Circles inscribed between curves can be specified by a system of equations relative to the coordinates of the center of the circle and the coordinates of the tangent points. Such a system can have 5 or 6 equations and 6 variables, which are mentioned above.
In the case of 5 equations, we can immediately obtain an infinite set of solutions by selecting the ones we need from it. 
(See the attached text for more details.)
The 1st equation is responsible for the belonging of the point of tangency to one of the curves.
The 2nd equation is responsible for the belonging of the point of tangency to another curve.
In the 3rd equation, the points of tangency on the curves belong to the inscribed circle.
In the 4th and 5th equations, the condition is satisfied that the tangents to the curves are perpendicular to the radii of the circle at the points of contact.
The 6th equation serves either to find a specific inscribed circle or to find an infinite set of solutions. It is selected based on the type of curves and their mutual arrangement.

In this example, we search for a subset of the solution set using the Draghilev method by solving the first five equations of the system: we inscribe circles in two "angles" formed by the intersection of the exponent and the ellipse.
The text of this example, its solution in the form of a picture,"big" option and pictures of similar examples.

INSCRIBED_CIRCLES.mw


 


Addition 09/01/24, 
One curve for the first two equations in coordinates x1,x2 and x3,x4
f1:=
 x1^2 - 2.5*x1*x2 + 3*x2^2 - 1;
f2:=
 x3^2 - 2.5*x3*x4 + 3*x4^2 - 1;

Featured Post

As AI becomes increasingly relevant in the tech world, Maplesoft has taken steps to integrate AI into our products. We recently launched two new features: Ask AI in Maple Learn and Word Problem Solver in Maple Calculator. 

 

Ask AI - Maple Learn

As a Math Content Creator at Maplesoft, sometimes I find myself in a creative rut. What documents would be engaging for students? How can I address certain math topics in a fun and interactive way?

I've had the pleasure of creating several collections during my time, including Extreme Value Theorem, Intermediate Value Theorem, and Polynomial Long Division. Nonetheless, each collection took a lot of storyboarding and creativity before I even began drafting them, and I've missed out on creating so many more collections because of this long idea generation process. Having a tool in my back pocket to reignite those creative juices would make it so much easier and faster to create new and exciting Maple Learn documents. 

Luckily, our new Ask AI feature in Maple Learn can help with that! 

Whenever you enter text into a Maple Learn document, a new Context Panel operation called "Ask AI" will pop up. Simply click that button to receive an AI response related to your prompt.

One of my favourite uses of Ask AI is to pick a random subject or phrase and see what the AI responds with. The Ask AI feature is designed to respond with a mathematics-centric answer so it will twist even the least mathematical of concepts into a math problem! The prompt "tacos" resulted in some formulas about sharing tacos with friends, and a prompt of "celebrity gossip" introduced statistical functions to compute the number of celebrity mentions per day

I also found that completing part of a tongue twister will result in some funny AI responses!

Here are a couple of my favorites below:

"She sells sea shells..."

Ask AI completes this tongue twister, then offers some formulas to compute the profit of selling S shells!

"How much wood..."

After relating that this tongue twister is not a mathematical problem, Ask AI then builds a simple formula for computing how much wood a woodchuck would (hypothetically) chuck.

There are many more applications of this feature, and I hope you all enjoy exploring them as you create documents on Maple Learn. If you're having trouble inputting text into your documents, or looking for a quick introduction to Maple Learn, check out the Walkthrough Tutorial. Beginner Tutorial (slide 8) addresses adding text to your document. Check out this blog post if you aren't sure how to access the Walkthrough Tutorial. 

 

Word Problem Solver - Maple Calculator

Maple Calculator now offers support for word problems by leveraging AI. Simply take a picture of your word problem and Maple Calculator will provide a solution generated by AI.

Here is a quick example:

I wrote on paper, “Alice and Bob have 17 apples total. Alice has double the number of apples as Bob plus two. How many apples does Bob have?”. Then I took a picture of this in Maple Calculator, and it gave me a breakdown of the problem using linear equations. See screenshots of my Maple Calculator below.

         

 

 

     

 

AI can be an amazing tool, but it can also make mistakes. We ensure that all our tools that incorporate AI clearly indicate its use, so that our users can know when AI is used and choose whether to use it. We're committed to remaining transparent about AI as our journey continues and we are always open to feedback. 

For our community of educators, a valuable exercise for students might be to show examples where AI makes mistakes and encourage students to find and explain the errors.

As an example, here is an algebra problem answered by Ask AI in Maple Learn – but it made a mistake! See if your students can spot where it went wrong and explain what should happen instead.

Building these skills will translate into good critical thinking skills that will benefit students inside and outside the classroom. For example, these exercises aim to help students identify their own mistakes in math and critically evaluate online sources. We would love to hear feedback about these exercises if you try them.

We hope these features will come in handy next time you use Maple Learn and Maple Calculator! 

 

 



Min is bigger than max???

Maple 2022 asked by Sotto 60 September 05

Diophantine equation

Maple 2024 asked by Alfred_F 10 September 05

Can someone help me open this file?

Maple 2022 asked by Krag 5 September 04