File: tests.cdb

package info (click to toggle)
cadabra2 2.4.3.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 78,796 kB
  • sloc: ansic: 133,450; cpp: 92,064; python: 1,530; javascript: 203; sh: 184; xml: 182; objc: 53; makefile: 51
file content (39 lines) | stat: -rw-r--r-- 747 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

tst1:= (b/4)*(a^{i} + a^{j} - a^{j} );

# The Redberry authors claim we cannot do the following:

def testRB():
    ex:= K_a (A^{a b} - A^{b a});
    rl:= K_c (A^{c d} - A^{d c}) -> F^{d};
    substitute(ex, rl)
    tst:= F^{b} - @(ex);
    assert(tst==0)

testRB()




ex:= C B A D;
order(ex, 'A, B, C, D', anticommuting=True)

ex:= A B C D;
sym(ex, 'A, B, D')

ex:=     


def test04():
    \diff{#}::PartialDerivative.
    obj6:= \diff{g^{\mu \kappa} * \diff{g_{\kappa \nu}}_{\rho}}_{\sigma};
    product_rule(_)
    tst6:= \diff{g^{\mu \kappa}}_{\sigma} * \diff{g_{\kappa \nu}}_{\rho}
        +g^{\mu \kappa} * \diff{g_{\kappa \nu}}_{\rho \sigma} - @(obj6);
    collect_terms(_);

test04()

ctest([1,2,3])
ex:=a+b+c+d;
keep_terms(_, [1,2,3])