verify/table - Maple Programming Help

Home : Support : Online Help : Programming : Logic : Boolean : verify : verify/table

verify/table

verify a relation between the entries of two tables

 Calling Sequence verify(expr1, expr2, table) verify(expr1, expr2, 'table'(ver))

Parameters

 expr1, expr2 - anything, assumed to be of type table ver - verification for the table entries

Description

 • The verify(expr1, expr2, table) and verify(expr1, expr2, 'table'(ver)) calling sequences return true if it can be determined that the two tables satisfy a relation entrywise, either by testing with equality or using the verification ver.
 • Since table look-up is done with Boolean comparisons, the indices of two tables are never verified. For example, the tables table([2.0 = 3]) and table([2. = 3]) will never be verified as being equal.
 • If the two tables have unequal indexing functions, false will be automatically returned. The one exception to this is when one table is symmetric and the other has no indexing function. In this case, the tables will be declared equal if the unindexed table is symmetric and equal to the index table.
 • The verification table is symmetric and a verification 'table'(ver) is symmetric if and only if the verification ver is symmetric.
 • Because table is a Maple function, it must be enclosed in single quotes to prevent evaluation.
 • If either expr1 or expr2 is not of type table, then false is returned.
 • The special verifications %NULL, seq, and &, can be used to verify an expression sequence in a table. See verify/exprseq.

Examples

 > $A≔\mathrm{table}\left(\mathrm{symmetric},\left[\left(a,b\right)=3\right]\right)$
 ${A}{≔}{table}{}\left({\mathrm{symmetric}}{,}\left[\left({a}{,}{b}\right){=}{3}\right]\right)$ (1)
 > $B≔\mathrm{table}\left(\left[\left(a,b\right)=3\right]\right)$
 ${B}{≔}{table}{}\left(\left[\left({a}{,}{b}\right){=}{3}\right]\right)$ (2)
 > $C≔\mathrm{table}\left(\left[\left(a,b\right)=3,\left(b,a\right)=3\right]\right)$
 ${C}{≔}{table}{}\left(\left[\left({b}{,}{a}\right){=}{3}{,}\left({a}{,}{b}\right){=}{3}\right]\right)$ (3)
 > $\mathrm{verify}\left(A,B,\mathrm{table}\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{verify}\left(A,C,\mathrm{table}\right)$
 ${\mathrm{true}}$ (5)
 > $A≔\mathrm{table}\left(\left[a=\frac{{x}^{2}-{y}^{2}}{{\left(x-y\right)}^{3}}\right]\right)$
 ${A}{≔}{table}{}\left(\left[{a}{=}\frac{{{x}}^{{2}}{-}{{y}}^{{2}}}{{\left({x}{-}{y}\right)}^{{3}}}\right]\right)$ (6)
 > $B≔\mathrm{table}\left(\left[a=\frac{{x}^{2}-{y}^{2}}{{\left(x-y\right)}^{3}}\right]\right)$
 ${B}{≔}{table}{}\left(\left[{a}{=}\frac{{{x}}^{{2}}{-}{{y}}^{{2}}}{{\left({x}{-}{y}\right)}^{{3}}}\right]\right)$ (7)
 > $C≔\mathrm{table}\left(\left[a=\frac{y+x}{{\left(-x+y\right)}^{2}}\right]\right)$
 ${C}{≔}{table}{}\left(\left[{a}{=}\frac{{y}{+}{x}}{{\left({-}{x}{+}{y}\right)}^{{2}}}\right]\right)$ (8)
 > $\mathrm{evalb}\left(A=B\right)$
 ${\mathrm{false}}$ (9)
 > $\mathrm{verify}\left(A,B,'\mathrm{table}'\right)$
 ${\mathrm{true}}$ (10)
 > $\mathrm{verify}\left(A,C,'\mathrm{table}'\right)$
 ${\mathrm{false}}$ (11)
 > $\mathrm{verify}\left(A,C,'\mathrm{table}\left(\mathrm{normal}\right)'\right)$
 ${\mathrm{true}}$ (12)

Compatibility

 • The verify/table command was updated in Maple 2015.