multiset - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

verify/multiset

verify a relation between two multisets

 Calling Sequence verify(expr1, expr2, multiset) verify(expr1, expr2, multiset(ver))

Parameters

 expr1, expr2 - anything ver - verification for the multiset operands

Description

 • The verify(expr1, expr2, multiset) and verify(expr1, expr2, multiset(ver)) calling sequences return true if expr1 and expr2 are lists, and it can be determined that the entries of the two lists satisfy a relation operandwise, ignoring the order but taking the multiplicity of entries into account, either by testing with equality or using the verification ver.
 • Assume for the rest of this help page that expr1 and expr2 are indeed lists. If ver is not specified, then the test is equivalent to testing if any permutation of expr1 is equal to expr2. If ver is specified, it is equivalent to testing if any permutation of expr1 is in the relation list(ver) with expr2.
 • The verification multiset is symmetric and a verification multiset(ver) is symmetric if and only if the verification ver is symmetric.
 • If either expr1 or expr2 is not of type list, then false is returned.

Examples

 > $\mathrm{verify}\left(\left[a,b,b\right],\left[b,a,b\right],'\mathrm{multiset}'\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{verify}\left(\left[a,b,b\right],\left[b,a,a\right],'\mathrm{multiset}'\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{verify}\left(\left[a,b,{x}^{2}-2x+1\right],\left[b,a,{\left(x-1\right)}^{2}\right],'\mathrm{multiset}\left(\mathrm{expand}\right)'\right)$
 ${\mathrm{true}}$ (3)