compare the value and structure of expressions
SameStructure( a, b )
The SameStructure command accepts two expressions, inert or otherwise, and compares their structure. If they are the same in value and structure then this command returns true, otherwise false.
Structural equivalence is determined by replacing all numeric constants in both a and b with variables and ensuring that the resulting expressions are equal using Maple's default data-structure normalization. Replacing constants removes the influence of most automatic simplifications like integer arithmetic and fraction reduction.
This function is part of the InertForm package, so it can be used in the short form SameStructure(..) only after executing the command with(InertForm). However, it can always be accessed through the long form of the command by using InertForm[SameStructure](..).
Equivalent fractions that are not reduced the same way return false.
Order of terms is not strict.
Factored versus expanded matters.
Separated multiplicative factors of -1 or 1 do not matter.
Inert versions of function calls match non-inert equivalents.
Evaluation is not done on inert function calls.
An expression to the -1 power matches division.
The order of right-side and left-side matters for equations.
The InertForm[SameStructure] command was introduced in Maple 2018.
For more information on Maple 2018 changes, see Updates in Maple 2018.
Download Help Document
What kind of issue would you like to report? (Optional)