kostka SciMax Toolbox kronecker_product

SciMax Toolbox >> kron_delta

kron_delta

Maxima Function

Calling Sequence

kron_delta (x, y)

Description

Represents the Kronecker delta function.

kron_delta simplifies to 1 when x and y are identical or demonstrably equivalent, and it simplifies to 0 when x and y are demonstrably not equivalent. Otherwise, it is not certain whether x and y are equivalent, and kron_delta simplifies to a noun expression. kron_delta implements a cautious policy with respect to floating point expressions: if the difference x - y is a floating point number, kron_delta simplifies to a noun expression when x is apparently equivalent to y.

Specifically, kron_delta(x, y) simplifies to 1 when is(x = y) is true. kron_delta also simplifies to 1 when sign(abs(x - y)) is zero and x - y is not a floating point number (neither an ordinary float nor a bigfloat). kron_delta simplifies to 0 when sign(abs(x - y)) is pos.

Otherwise, sign(abs(x - y)) is something other than pos or zero, or it is zero and x - y is a floating point number. In these cases, kron_delta returns a noun expression.

kron_delta is declared to be symmetric. That is, kron_delta(x, y) is equal to kron_delta(y, x).

Examples:

The arguments of kron_delta are identical. kron_delta simplifies to 1.

(%i1) kron_delta (a, a);
(%o1)                           1
(%i2) kron_delta (x^2 - y^2, x^2 - y^2);
(%o2)                           1
(%i3) float (kron_delta (1/10, 0.1));
(%o3)                           1

The arguments of kron_delta are equivalent, and their difference is not a floating point number. kron_delta simplifies to 1.

(%i1) assume (equal (x, y));
(%o1)                     [equal(x, y)]
(%i2) kron_delta (x, y);
(%o2)                           1

The arguments of kron_delta are not equivalent. kron_delta simplifies to 0.

(%i1) kron_delta (a + 1, a);
(%o1)                           0
(%i2) assume (a > b)$
(%i3) kron_delta (a, b);
(%o3)                           0
(%i4) kron_delta (1/5, 0.7);
(%o4)                           0

The arguments of kron_delta might or might not be equivalent. kron_delta simplifies to a noun expression.

(%i1) kron_delta (a, b);
(%o1)                   kron_delta(a, b)
(%i2) assume(x >= y)$
(%i3) kron_delta (x, y);
(%o3)                   kron_delta(x, y)

The arguments of kron_delta are equivalent, but their difference is a floating point number. kron_delta simplifies to a noun expression.

(%i1) 1/4 - 0.25;
(%o1)                          0.0
(%i2) 1/10 - 0.1;
(%o2)                          0.0
(%i3) 0.25 - 0.25b0;
Warning:  Float to bigfloat conversion of 0.25
(%o3)                         0.0b0
(%i4) kron_delta (1/4, 0.25);
                                  1
(%o4)                  kron_delta(-, 0.25)
                                  4
(%i5) kron_delta (1/10, 0.1);
                                  1
(%o5)                  kron_delta(--, 0.1)
                                  10
(%i6) kron_delta (0.25, 0.25b0);
Warning:  Float to bigfloat conversion of 0.25
(%o6)               kron_delta(0.25, 2.5b-1)

kron_delta is symmetric.

(%i1) kron_delta (x, y);
(%o1)                   kron_delta(x, y)
(%i2) kron_delta (y, x);
(%o2)                   kron_delta(x, y)
(%i3) kron_delta (x, y) - kron_delta (y, x);
(%o3)                           0
(%i4) is (equal (kron_delta (x, y), kron_delta (y, x)));
(%o4)                         true
(%i5) is (kron_delta (x, y) = kron_delta (y, x));
(%o5)                         true
kostka SciMax Toolbox kronecker_product