This file is indexed.

/usr/share/doc/maxima-doc/html/maxima_26.html is in maxima-doc 5.32.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   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
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on January, 10 2014 by texi2html 1.76 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>

-->
<head>
<title>Maxima 5.32.1 Manual: 26. ctensor</title>

<meta name="description" content="Maxima 5.32.1 Manual: 26. ctensor">
<meta name="keywords" content="Maxima 5.32.1 Manual: 26. ctensor">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.76">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
body
{
    color: black;
    background: white; 
    margin-left: 8%;
    margin-right: 13%;
}

h1
{
    margin-left: +8%;
    font-size: 150%;
    font-family: sans-serif
}

h2
{
    font-size: 125%;
    font-family: sans-serif
}

h3
{
    font-size: 100%;
    font-family: sans-serif
}

h2,h3,h4,h5,h6 { margin-left: +4%; }

div.textbox
{
    border: solid;
    border-width: thin;
    /* width: 100%; */
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 2em;
    padding-right: 2em
}

div.titlebox
{
    border: none;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 2em;
    padding-right: 2em;
    background: rgb(200,255,255);
    font-family: sans-serif
}

div.synopsisbox
{
    border: none;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 2em;
    padding-right: 2em;
     background: rgb(255,220,255);
    /*background: rgb(200,255,255); */
    /* font-family: fixed */
}

pre.example
{
    border: 1px solid gray;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 1em;
    padding-right: 1em;
    /* background: rgb(247,242,180); */ /* kind of sandy */
    /* background: rgb(200,255,255); */ /* sky blue */
    background-color: #F1F5F9; /* light blue-gray */
    /* font-family: "Lucida Console", monospace */
}

div.spacerbox
{
    border: none;
    padding-top: 2em;
    padding-bottom: 2em
}

div.image
{
    margin: 0;
    padding: 1em;
    text-align: center;
}

div.categorybox
{
    border: 1px solid gray;
    padding-top: 0px;
    padding-bottom: 0px;
    padding-left: 1em;
    padding-right: 1em;
    background: rgb(247,242,220);
}


-->
</style>

<link rel="icon" href="http://maxima.sourceforge.net/favicon.ico"/>
</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="ctensor"></a>
<a name="SEC137"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="maxima_25.html#SEC136" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC138" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima_25.html#SEC122" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_27.html#SEC151" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 26. ctensor </h1>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC138">26.1 Introduction to ctensor</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC139">26.2 Functions and Variables for ctensor</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<p><a name="Item_003a-Introduction-to-ctensor"></a>
</p><hr size="6">
<a name="Introduction-to-ctensor"></a>
<a name="SEC138"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC137" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC139" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC137" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC137" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_27.html#SEC151" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 26.1 Introduction to ctensor </h2>

<p><code>ctensor</code> is a component tensor manipulation package.  To use the <code>ctensor</code>
package, type <code>load(ctensor)</code>.
To begin an interactive session with <code>ctensor</code>, type <code>csetup()</code>.  You are
first asked to specify the dimension of the manifold. If the dimension
is 2, 3 or 4 then the list of coordinates defaults to <code>[x,y]</code>, <code>[x,y,z]</code>
or <code>[x,y,z,t]</code> respectively.
These names may be changed by assigning a new list of coordinates to
the variable <code>ct_coords</code> (described below) and the user is queried about
this. Care must be taken to avoid the coordinate names conflicting
with other object definitions.
</p>
<p>Next, the user enters the metric either directly or from a file by
specifying its ordinal position.
The metric is stored in the matrix
<code>lg</code>. Finally, the metric inverse is computed and stored in the matrix
<code>ug</code>. One has the option of carrying out all calculations in a power
series.
</p>
<p>A sample protocol is begun below for the static, spherically symmetric
metric (standard coordinates) which will be applied to the problem of
deriving Einstein's vacuum equations (which lead to the Schwarzschild
solution) as an example. Many of the functions in <code>ctensor</code> will be
displayed for the standard metric as examples.
</p>
<pre class="example">(%i1) load(ctensor);
(%o1)      /share/tensor/ctensor.mac
(%i2) csetup();
Enter the dimension of the coordinate system:
4;
Do you wish to change the coordinate names?
n;
Do you want to
1. Enter a new metric?

2. Enter a metric from a file?

3. Approximate a metric with a Taylor series?
1;

Is the matrix  1. Diagonal  2. Symmetric  3. Antisymmetric  4. General
Answer 1, 2, 3 or 4
1;
Row 1 Column 1:
a;
Row 2 Column 2:
x^2;
Row 3 Column 3:
x^2*sin(y)^2;
Row 4 Column 4:
-d;

Matrix entered.
Enter functional dependencies with the DEPENDS function or 'N' if none
depends([a,d],x);
Do you wish to see the metric?
y;
                          [ a  0       0        0  ]
                          [                        ]
                          [     2                  ]
                          [ 0  x       0        0  ]
                          [                        ]
                          [         2    2         ]
                          [ 0  0   x  sin (y)   0  ]
                          [                        ]
                          [ 0  0       0       - d ]
(%o2)                                done
(%i3) christof(mcs);
                                            a
                                             x
(%t3)                          mcs        = ---
                                  1, 1, 1   2 a

                                             1
(%t4)                           mcs        = -
                                   1, 2, 2   x

                                             1
(%t5)                           mcs        = -
                                   1, 3, 3   x

                                            d
                                             x
(%t6)                          mcs        = ---
                                  1, 4, 4   2 d

                                              x
(%t7)                          mcs        = - -
                                  2, 2, 1     a

                                           cos(y)
(%t8)                         mcs        = ------
                                 2, 3, 3   sin(y)

                                               2
                                          x sin (y)
(%t9)                      mcs        = - ---------
                              3, 3, 1         a

(%t10)                   mcs        = - cos(y) sin(y)
                            3, 3, 2

                                            d
                                             x
(%t11)                         mcs        = ---
                                  4, 4, 1   2 a
(%o11)                               done

</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Tensors} &middot;
@ref{Category: Share packages} &middot;
@ref{Category: Package ctensor}
</div>
</p>
<p><a name="Item_003a-Functions-and-Variables-for-ctensor"></a>
</p><hr size="6">
<a name="Functions-and-Variables-for-ctensor"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC138" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC140" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC137" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC137" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_27.html#SEC151" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>

<a name="SEC139"></a>
<h2 class="section"> 26.2 Functions and Variables for ctensor </h2>

<hr size="6">
<a name="SEC140"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC139" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC141" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC137" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC139" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_27.html#SEC151" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 26.2.1 Initialization and setup </h3>

<p><a name="Item_003a-csetup"></a>
</p><dl>
<dt><u>Function:</u> <b>csetup</b><i> ()</i>
<a name="IDX1137"></a>
</dt>
<dd><p>A function in the <code>ctensor</code> (component tensor) package
which initializes the package and allows the user to enter a metric
interactively. See <code>ctensor</code> for more details.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-cmetric"></a>
</p><dl>
<dt><u>Function:</u> <b>cmetric</b><i> (<var>dis</var>)</i>
<a name="IDX1138"></a>
</dt>
<dt><u>Function:</u> <b>cmetric</b><i> ()</i>
<a name="IDX1139"></a>
</dt>
<dd><p>A function in the <code>ctensor</code> (component tensor) package
that computes the metric inverse and sets up the package for
further calculations.
</p>
<p>If <code>cframe_flag</code> is <code>false</code>, the function computes the inverse metric
<code>ug</code> from the (user-defined) matrix <code>lg</code>. The metric determinant is
also computed and stored in the variable <code>gdet</code>. Furthermore, the
package determines if the metric is diagonal and sets the value
of <code>diagmetric</code> accordingly. If the optional argument <var>dis</var>
is present and not equal to <code>false</code>, the user is prompted to see
the metric inverse.
</p>
<p>If <code>cframe_flag</code> is <code>true</code>, the function expects that the values of
<code>fri</code> (the inverse frame matrix) and <code>lfg</code> (the frame metric) are
defined. From these, the frame matrix <code>fr</code> and the inverse frame
metric <code>ufg</code> are computed.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-ct_005fcoordsys"></a>
</p><dl>
<dt><u>Function:</u> <b>ct_coordsys</b><i> (<var>coordinate_system</var>, <var>extra_arg</var>)</i>
<a name="IDX1140"></a>
</dt>
<dt><u>Function:</u> <b>ct_coordsys</b><i> (<var>coordinate_system</var>)</i>
<a name="IDX1141"></a>
</dt>
<dd><p>Sets up a predefined coordinate system and metric. The argument
<var>coordinate_system</var> can be one of the following symbols:
</p>
<pre class="example">
 SYMBOL             Dim Coordinates     Description/comments
 ------------------------------------------------------------------
 cartesian2d           2  [x,y]             Cartesian 2D coordinate
                                            system
 polar                 2  [r,phi]           Polar coordinate system
 elliptic              2  [u,v]             Elliptic coord. system
 confocalelliptic      2  [u,v]             Confocal elliptic
                                            coordinates
 bipolar               2  [u,v]             Bipolar coord. system
 parabolic             2  [u,v]             Parabolic coord. system
 cartesian3d           3  [x,y,z]           Cartesian 3D coordinate
                                            system
 polarcylindrical      3  [r,theta,z]       Polar 2D with
                                            cylindrical z
 ellipticcylindrical   3  [u,v,z]           Elliptic 2D with
                                            cylindrical z
 confocalellipsoidal   3  [u,v,w]           Confocal ellipsoidal
 bipolarcylindrical    3  [u,v,z]           Bipolar 2D with
                                            cylindrical z
 paraboliccylindrical  3  [u,v,z]           Parabolic 2D with
                                            cylindrical z
 paraboloidal          3  [u,v,phi]         Paraboloidal coords.
 conical               3  [u,v,w]           Conical coordinates
 toroidal              3  [u,v,phi]         Toroidal coordinates
 spherical             3  [r,theta,phi]     Spherical coord. system
 oblatespheroidal      3  [u,v,phi]         Oblate spheroidal
                                            coordinates
 oblatespheroidalsqrt  3  [u,v,phi]
 prolatespheroidal     3  [u,v,phi]         Prolate spheroidal
                                            coordinates
 prolatespheroidalsqrt 3  [u,v,phi]
 ellipsoidal           3  [r,theta,phi]     Ellipsoidal coordinates
 cartesian4d           4  [x,y,z,t]         Cartesian 4D coordinate
                                            system
 spherical4d           4  [r,theta,eta,phi] Spherical 4D coordinate
                                            system
 exteriorschwarzschild 4  [t,r,theta,phi]   Schwarzschild metric
 interiorschwarzschild 4  [t,z,u,v]         Interior Schwarzschild
                                            metric
 kerr_newman           4  [t,r,theta,phi]   Charged axially
                                            symmetric metric
</pre>
<p><code>coordinate_system</code> can also be a list of transformation functions,
followed by a list containing the coordinate variables. For instance,
you can specify a spherical metric as follows:
</p>
<pre class="example">
(%i1) load(ctensor);
(%o1)       /share/tensor/ctensor.mac
(%i2) ct_coordsys([r*cos(theta)*cos(phi),r*cos(theta)*sin(phi),
      r*sin(theta),[r,theta,phi]]);
(%o2)                                done
(%i3) lg:trigsimp(lg);
                           [ 1  0         0        ]
                           [                       ]
                           [     2                 ]
(%o3)                      [ 0  r         0        ]
                           [                       ]
                           [         2    2        ]
                           [ 0  0   r  cos (theta) ]
(%i4) ct_coords;
(%o4)                           [r, theta, phi]
(%i5) dim;
(%o5)                                  3

</pre>
<p>Transformation functions can also be used when <code>cframe_flag</code> is <code>true</code>:
</p>
<pre class="example">
(%i1) load(ctensor);
(%o1)       /share/tensor/ctensor.mac
(%i2) cframe_flag:true;
(%o2)                                true
(%i3) ct_coordsys([r*cos(theta)*cos(phi),r*cos(theta)*sin(phi),
      r*sin(theta),[r,theta,phi]]);
(%o3)                                done
(%i4) fri;
(%o4)
 [cos(phi)cos(theta) -cos(phi) r sin(theta) -sin(phi) r cos(theta)]
 [                                                                ]
 [sin(phi)cos(theta) -sin(phi) r sin(theta)  cos(phi) r cos(theta)]
 [                                                                ]
 [    sin(theta)           r cos(theta)                0          ]

(%i5) cmetric();
(%o5)                                false
(%i6) lg:trigsimp(lg);
                           [ 1  0         0        ]
                           [                       ]
                           [     2                 ]
(%o6)                      [ 0  r         0        ]
                           [                       ]
                           [         2    2        ]
                           [ 0  0   r  cos (theta) ]

</pre>
<p>The optional argument <var>extra_arg</var> can be any one of the following:
</p>
<p><code>cylindrical</code> tells <code>ct_coordsys</code> to attach an additional cylindrical coordinate.
</p>
<p><code>minkowski</code> tells <code>ct_coordsys</code> to attach an additional coordinate with negative metric signature.
</p>
<p><code>all</code> tells <code>ct_coordsys</code> to call <code>cmetric</code> and <code>christof(false)</code> after setting up the metric.
</p>
<p>If the global variable <code>verbose</code> is set to <code>true</code>, <code>ct_coordsys</code> displays the values of <code>dim</code>, <code>ct_coords</code>, and either <code>lg</code> or <code>lfg</code> and <code>fri</code>, depending on the value of <code>cframe_flag</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-init_005fctensor"></a>
</p><dl>
<dt><u>Function:</u> <b>init_ctensor</b><i> ()</i>
<a name="IDX1142"></a>
</dt>
<dd><p>Initializes the <code>ctensor</code> package.
</p>
<p>The <code>init_ctensor</code> function reinitializes the <code>ctensor</code> package. It removes all arrays and matrices used by <code>ctensor</code>, resets all flags, resets <code>dim</code> to 4, and resets the frame metric to the Lorentz-frame.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>


<hr size="6">
<a name="SEC141"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC140" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC142" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC137" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC139" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_27.html#SEC151" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 26.2.2 The tensors of curved space </h3>

<p>The main purpose of the <code>ctensor</code> package is to compute the tensors
of curved space(time), most notably the tensors used in general
relativity.
</p>
<p>When a metric base is used, <code>ctensor</code> can compute the following tensors:
</p>
<pre class="example">
 lg  -- ug
   \      \
    lcs -- mcs -- ric -- uric
              \      \       \
               \      tracer - ein -- lein
                \
                 riem -- lriem -- weyl
                     \
                      uriem


</pre>
<p><code>ctensor</code> can also work using moving frames. When <code>cframe_flag</code> is
set to <code>true</code>, the following tensors can be calculated:
</p>
<pre class="example">
 lfg -- ufg
     \
 fri -- fr -- lcs -- mcs -- lriem -- ric -- uric
      \                       |  \      \       \
       lg -- ug               |   weyl   tracer - ein -- lein
                              |\
                              | riem
                              |
                              \uriem

</pre>
<p><a name="Item_003a-christof"></a>
</p><dl>
<dt><u>Function:</u> <b>christof</b><i> (<var>dis</var>)</i>
<a name="IDX1143"></a>
</dt>
<dd><p>A function in the <code>ctensor</code> (component tensor)
package.  It computes the Christoffel symbols of both
kinds.  The argument <var>dis</var> determines which results are to be immediately
displayed.  The Christoffel symbols of the first and second kinds are
stored in the arrays <code>lcs[i,j,k]</code> and <code>mcs[i,j,k]</code> respectively and
defined to be symmetric in the first two indices. If the argument to
<code>christof</code> is <code>lcs</code> or <code>mcs</code> then the unique non-zero values of <code>lcs[i,j,k]</code>
or <code>mcs[i,j,k]</code>, respectively, will be displayed. If the argument is <code>all</code>
then the unique non-zero values of <code>lcs[i,j,k]</code> and <code>mcs[i,j,k]</code> will be
displayed.  If the argument is <code>false</code> then the display of the elements
will not occur. The array elements <code>mcs[i,j,k]</code> are defined in such a
manner that the final index is contravariant.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-ricci"></a>
</p><dl>
<dt><u>Function:</u> <b>ricci</b><i> (<var>dis</var>)</i>
<a name="IDX1144"></a>
</dt>
<dd><p>A function in the <code>ctensor</code> (component tensor)
package. <code>ricci</code> computes the covariant (symmetric)
components <code>ric[i,j]</code> of the Ricci tensor.  If the argument <var>dis</var> is <code>true</code>,
then the non-zero components are displayed.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-uricci"></a>
</p><dl>
<dt><u>Function:</u> <b>uricci</b><i> (<var>dis</var>)</i>
<a name="IDX1145"></a>
</dt>
<dd><p>This function first computes the
covariant components <code>ric[i,j]</code> of the Ricci tensor.
Then the mixed Ricci tensor is computed using the
contravariant metric tensor.  If the value of the argument <var>dis</var>
is <code>true</code>, then these mixed components, <code>uric[i,j]</code> (the
index <code>i</code> is covariant and the index <code>j</code> is contravariant), will be displayed
directly.  Otherwise, <code>ricci(false)</code> will simply compute the entries
of the array <code>uric[i,j]</code> without displaying the results.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-scurvature"></a>
</p><dl>
<dt><u>Function:</u> <b>scurvature</b><i> ()</i>
<a name="IDX1146"></a>
</dt>
<dd><p>Returns the scalar curvature (obtained by contracting
the Ricci tensor) of the Riemannian manifold with the given metric.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-einstein"></a>
</p><dl>
<dt><u>Function:</u> <b>einstein</b><i> (<var>dis</var>)</i>
<a name="IDX1147"></a>
</dt>
<dd><p>A function in the <code>ctensor</code> (component tensor)
package.  <code>einstein</code> computes the mixed Einstein tensor
after the Christoffel symbols and Ricci tensor have been obtained
(with the functions <code>christof</code> and <code>ricci</code>).  If the argument <var>dis</var> is
<code>true</code>, then the non-zero values of the mixed Einstein tensor <code>ein[i,j]</code>
will be displayed where <code>j</code> is the contravariant index.
The variable <code>rateinstein</code> will cause the rational simplification on
these components. If <code>ratfac</code> is <code>true</code> then the components will
also be factored.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-leinstein"></a>
</p><dl>
<dt><u>Function:</u> <b>leinstein</b><i> (<var>dis</var>)</i>
<a name="IDX1148"></a>
</dt>
<dd><p>Covariant Einstein-tensor. <code>leinstein</code> stores the values of the covariant Einstein tensor in the array <code>lein</code>. The covariant Einstein-tensor is computed from the mixed Einstein tensor <code>ein</code> by multiplying it with the metric tensor. If the argument <var>dis</var> is <code>true</code>, then the non-zero values of the covariant Einstein tensor are displayed.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-riemann"></a>
</p><dl>
<dt><u>Function:</u> <b>riemann</b><i> (<var>dis</var>)</i>
<a name="IDX1149"></a>
</dt>
<dd><p>A function in the <code>ctensor</code> (component tensor)
package.  <code>riemann</code> computes the Riemann curvature tensor
from the given metric and the corresponding Christoffel symbols. The following
index conventions are used:
</p>
<pre class="example">                l      _l       _l       _l   _m    _l   _m
 R[i,j,k,l] =  R    = |      - |      + |    |   - |    |
                ijk     ij,k     ik,j     mk   ij    mj   ik
</pre>
<p>This notation is consistent with the notation used by the <code>itensor</code>
package and its <code>icurvature</code> function.
If the optional argument <var>dis</var> is <code>true</code>,
the unique non-zero components <code>riem[i,j,k,l]</code> will be displayed.
As with the Einstein tensor, various switches set by the user
control the simplification of the components of the Riemann tensor.
If <code>ratriemann</code> is <code>true</code>, then
rational simplification will be done. If <code>ratfac</code>
is <code>true</code> then
each of the components will also be factored.
</p>
<p>If the variable <code>cframe_flag</code> is <code>false</code>, the Riemann tensor is
computed directly from the Christoffel-symbols. If <code>cframe_flag</code> is
<code>true</code>, the covariant Riemann-tensor is computed first from the
frame field coefficients.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-lriemann"></a>
</p><dl>
<dt><u>Function:</u> <b>lriemann</b><i> (<var>dis</var>)</i>
<a name="IDX1150"></a>
</dt>
<dd><p>Covariant Riemann-tensor (<code>lriem[]</code>).
</p>
<p>Computes the covariant Riemann-tensor as the array <code>lriem</code>. If the
argument <var>dis</var> is <code>true</code>, unique non-zero values are displayed.
</p>
<p>If the variable <code>cframe_flag</code> is <code>true</code>, the covariant Riemann
tensor is computed directly from the frame field coefficients. Otherwise,
the (3,1) Riemann tensor is computed first.
</p>
<p>For information on index ordering, see <code>riemann</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-uriemann"></a>
</p><dl>
<dt><u>Function:</u> <b>uriemann</b><i> (<var>dis</var>)</i>
<a name="IDX1151"></a>
</dt>
<dd><p>Computes the contravariant components of the Riemann
curvature tensor as array elements <code>uriem[i,j,k,l]</code>.  These are displayed
if <var>dis</var> is <code>true</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-rinvariant"></a>
</p><dl>
<dt><u>Function:</u> <b>rinvariant</b><i> ()</i>
<a name="IDX1152"></a>
</dt>
<dd><p>Forms the Kretchmann-invariant (<code>kinvariant</code>) obtained by
contracting the tensors
</p>
<pre class="example">lriem[i,j,k,l]*uriem[i,j,k,l].
</pre>
<p>This object is not automatically simplified since it can be very large.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-weyl"></a>
</p><dl>
<dt><u>Function:</u> <b>weyl</b><i> (<var>dis</var>)</i>
<a name="IDX1153"></a>
</dt>
<dd><p>Computes the Weyl conformal tensor.  If the argument <var>dis</var> is
<code>true</code>, the non-zero components <code>weyl[i,j,k,l]</code> will be displayed to the
user.  Otherwise, these components will simply be computed and stored.
If the switch <code>ratweyl</code> is set to <code>true</code>, then the components will be
rationally simplified; if <code>ratfac</code> is <code>true</code> then the results will be
factored as well.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<hr size="6">
<a name="SEC142"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC141" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC143" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC137" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC139" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_27.html#SEC151" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 26.2.3 Taylor series expansion </h3>

<p>The <code>ctensor</code> package has the ability to truncate results by assuming
that they are Taylor-series approximations. This behavior is controlled by
the <code>ctayswitch</code> variable; when set to true, <code>ctensor</code> makes use
internally of the function <code>ctaylor</code> when simplifying results.
</p>
<p>The <code>ctaylor</code> function is invoked by the following <code>ctensor</code> functions:
</p>
<pre class="example">
    Function     Comments
    ---------------------------------
    christof()   For mcs only
    ricci()
    uricci()
    einstein()
    riemann()
    weyl()
    checkdiv()
</pre>
<p><a name="Item_003a-ctaylor"></a>
</p><dl>
<dt><u>Function:</u> <b>ctaylor</b><i> ()</i>
<a name="IDX1154"></a>
</dt>
<dd><p>The <code>ctaylor</code> function truncates its argument by converting
it to a Taylor-series using <code>taylor</code>, and then calling
<code>ratdisrep</code>. This has the combined effect of dropping terms
higher order in the expansion variable <code>ctayvar</code>. The order
of terms that should be dropped is defined by <code>ctaypov</code>; the
point around which the series expansion is carried out is specified
in <code>ctaypt</code>.
</p>
<p>As an example, consider a simple metric that is a perturbation of
the Minkowski metric. Without further restrictions, even a diagonal
metric produces expressions for the Einstein tensor that are far too
complex:
</p>
<pre class="example">
(%i1) load(ctensor);
(%o1)       /share/tensor/ctensor.mac
(%i2) ratfac:true;
(%o2)                                true
(%i3) derivabbrev:true;
(%o3)                                true
(%i4) ct_coords:[t,r,theta,phi];
(%o4)                         [t, r, theta, phi]
(%i5) lg:matrix([-1,0,0,0],[0,1,0,0],[0,0,r^2,0],
                [0,0,0,r^2*sin(theta)^2]);
                        [ - 1  0  0         0        ]
                        [                            ]
                        [  0   1  0         0        ]
                        [                            ]
(%o5)                   [          2                 ]
                        [  0   0  r         0        ]
                        [                            ]
                        [              2    2        ]
                        [  0   0  0   r  sin (theta) ]
(%i6) h:matrix([h11,0,0,0],[0,h22,0,0],[0,0,h33,0],[0,0,0,h44]);
                            [ h11   0    0    0  ]
                            [                    ]
                            [  0   h22   0    0  ]
(%o6)                       [                    ]
                            [  0    0   h33   0  ]
                            [                    ]
                            [  0    0    0   h44 ]
(%i7) depends(l,r);
(%o7)                               [l(r)]
(%i8) lg:lg+l*h;
      [ h11 l - 1      0          0                 0            ]
      [                                                          ]
      [     0      h22 l + 1      0                 0            ]
      [                                                          ]
(%o8) [                        2                                 ]
      [     0          0      r  + h33 l            0            ]
      [                                                          ]
      [                                    2    2                ]
      [     0          0          0       r  sin (theta) + h44 l ]
(%i9) cmetric(false);
(%o9)                                done
(%i10) einstein(false);
(%o10)                               done
(%i11) ntermst(ein);
[[1, 1], 62]
[[1, 2], 0]
[[1, 3], 0]
[[1, 4], 0]
[[2, 1], 0]
[[2, 2], 24]
[[2, 3], 0]
[[2, 4], 0]
[[3, 1], 0]
[[3, 2], 0]
[[3, 3], 46]
[[3, 4], 0]
[[4, 1], 0]
[[4, 2], 0]
[[4, 3], 0]
[[4, 4], 46]
(%o12)                               done

</pre>
<p>However, if we recompute this example as an approximation that is
linear in the variable <code>l</code>, we get much simpler expressions:
</p>
<pre class="example">
(%i14) ctayswitch:true;
(%o14)                               true
(%i15) ctayvar:l;
(%o15)                                 l
(%i16) ctaypov:1;
(%o16)                                 1
(%i17) ctaypt:0;
(%o17)                                 0
(%i18) christof(false);
(%o18)                               done
(%i19) ricci(false);
(%o19)                               done
(%i20) einstein(false);
(%o20)                               done
(%i21) ntermst(ein);
[[1, 1], 6]
[[1, 2], 0]
[[1, 3], 0]
[[1, 4], 0]
[[2, 1], 0]
[[2, 2], 13]
[[2, 3], 2]
[[2, 4], 0]
[[3, 1], 0]
[[3, 2], 2]
[[3, 3], 9]
[[3, 4], 0]
[[4, 1], 0]
[[4, 2], 0]
[[4, 3], 0]
[[4, 4], 9]
(%o21)                               done
(%i22) ratsimp(ein[1,1]);
                         2      2  4               2     2
(%o22) - (((h11 h22 - h11 ) (l )  r  - 2 h33 l    r ) sin (theta)
                              r               r r

                            2               2      4    2
              - 2 h44 l    r  - h33 h44 (l ) )/(4 r  sin (theta))
                       r r                r



</pre>
<p>This capability can be useful, for instance, when working in the weak
field limit far from a gravitational source.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>


<hr size="6">
<a name="SEC143"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC142" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC144" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC137" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC139" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_27.html#SEC151" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 26.2.4 Frame fields </h3>

<p>When the variable <code>cframe_flag</code> is set to true, the <code>ctensor</code> package
performs its calculations using a moving frame.
</p>
<p><a name="Item_003a-frame_005fbracket"></a>
</p><dl>
<dt><u>Function:</u> <b>frame_bracket</b><i> (<var>fr</var>, <var>fri</var>, <var>diagframe</var>)</i>
<a name="IDX1155"></a>
</dt>
<dd><p>The frame bracket (<code>fb[]</code>).
</p>
<p>Computes the frame bracket according to the following definition:
</p>
<pre class="example">   c          c         c        d     e
ifb   = ( ifri    - ifri    ) ifr   ifr
   ab         d,e       e,d      a     b
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<hr size="6">
<a name="SEC144"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC143" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC145" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC137" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC139" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_27.html#SEC151" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 26.2.5 Algebraic classification </h3>

<p>A new feature (as of November, 2004) of <code>ctensor</code> is its ability to
compute the Petrov classification of a 4-dimensional spacetime metric.
For a demonstration of this capability, see the file
<code>share/tensor/petrov.dem</code>.
</p>
<p><a name="Item_003a-nptetrad"></a>
</p><dl>
<dt><u>Function:</u> <b>nptetrad</b><i> ()</i>
<a name="IDX1156"></a>
</dt>
<dd><p>Computes a Newman-Penrose null tetrad (<code>np</code>) and its raised-index
counterpart (<code>npi</code>). See <code>petrov</code> for an example.
</p>
<p>The null tetrad is constructed on the assumption that a four-dimensional
orthonormal frame metric with metric signature (-,+,+,+) is being used.
The components of the null tetrad are related to the inverse frame matrix
as follows:
</p>
<pre class="example">
np  = (fri  + fri ) / sqrt(2)
  1       1      2

np  = (fri  - fri ) / sqrt(2)
  2       1      2

np  = (fri  + %i fri ) / sqrt(2)
  3       3         4

np  = (fri  - %i fri ) / sqrt(2)
  4       3         4

</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>


<dl>
<dt><u>Function:</u> <b>psi</b><i> (<var>dis</var>)</i>
<a name="IDX1157"></a>
</dt>
<dd><p>Computes the five Newman-Penrose coefficients <code>psi[0]</code>...<code>psi[4]</code>.
If <code>dis</code> is set to <code>true</code>, the coefficients are displayed.
See <code>petrov</code> for an example.
</p>
<p>These coefficients are computed from the Weyl-tensor in a coordinate base.
If a frame base is used, the Weyl-tensor is first converted to a coordinate
base, which can be a computationally expensive procedure. For this reason,
in some cases it may be more advantageous to use a coordinate base in the
first place before the Weyl tensor is computed. Note however, that
constructing a Newman-Penrose null tetrad requires a frame base. Therefore,
a meaningful computation sequence may begin with a frame base, which
is then used to compute <code>lg</code> (computed automatically by <code>cmetric</code>)
and then <code>ug</code>. See <code>petrov</code> for an example. At this point, you can switch back to a coordinate base
by setting <code>cframe_flag</code> to false before beginning to compute the
Christoffel symbols. Changing to a frame base at a later stage could yield
inconsistent results, as you may end up with a mixed bag of tensors, some
computed in a frame base, some in a coordinate base, with no means to
distinguish between the two.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-petrov"></a>
</p><dl>
<dt><u>Function:</u> <b>petrov</b><i> ()</i>
<a name="IDX1158"></a>
</dt>
<dd><p>Computes the Petrov classification of the metric characterized by <code>psi[0]</code>...<code>psi[4]</code>.
</p>
<p>For example, the following demonstrates how to obtain the Petrov-classification
of the Kerr metric:
</p>
<pre class="example">(%i1) load(ctensor);
(%o1)       /share/tensor/ctensor.mac
(%i2) (cframe_flag:true,gcd:spmod,ctrgsimp:true,ratfac:true);
(%o2)                                true
(%i3) ct_coordsys(exteriorschwarzschild,all);
(%o3)                                done
(%i4) ug:invert(lg)$
(%i5) weyl(false);
(%o5)                                done
(%i6) nptetrad(true);
(%t6) np =

[ sqrt(r - 2 m)           sqrt(r)                                 ]
[---------------   ---------------------    0            0        ]
[sqrt(2) sqrt(r)   sqrt(2) sqrt(r - 2 m)                          ]
[                                                                 ]
[ sqrt(r - 2 m)            sqrt(r)                                ]
[---------------  - ---------------------   0            0        ]
[sqrt(2) sqrt(r)    sqrt(2) sqrt(r - 2 m)                         ]
[                                                                 ]
[                                          r      %i r sin(theta) ]
[       0                    0          -------   --------------- ]
[                                       sqrt(2)       sqrt(2)     ]
[                                                                 ]
[                                          r       %i r sin(theta)]
[       0                    0          -------  - ---------------]
[                                       sqrt(2)        sqrt(2)    ]

                             sqrt(r)         sqrt(r - 2 m)
(%t7) npi = matrix([- ---------------------,---------------, 0, 0],
                      sqrt(2) sqrt(r - 2 m) sqrt(2) sqrt(r)

          sqrt(r)            sqrt(r - 2 m)
[- ---------------------, - ---------------, 0, 0],
   sqrt(2) sqrt(r - 2 m)    sqrt(2) sqrt(r)

           1               %i
[0, 0, ---------, --------------------],
       sqrt(2) r  sqrt(2) r sin(theta)

           1                 %i
[0, 0, ---------, - --------------------])
       sqrt(2) r    sqrt(2) r sin(theta)

(%o7)                                done
(%i7) psi(true);
(%t8)                              psi  = 0
                                      0

(%t9)                              psi  = 0
                                      1

                                          m
(%t10)                             psi  = --
                                      2    3
                                          r

(%t11)                             psi  = 0
                                      3

(%t12)                             psi  = 0
                                      4
(%o12)                               done
(%i12) petrov();
(%o12)                                 D

</pre>
<p>The Petrov classification function is based on the algorithm published in
&quot;Classifying geometries in general relativity: III Classification in practice&quot;
by Pollney, Skea, and d'Inverno, Class. Quant. Grav. 17 2885-2902 (2000).
Except for some simple test cases, the implementation is untested as of
December 19, 2004, and is likely to contain errors.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>


<hr size="6">
<a name="SEC145"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC144" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC146" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC137" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC139" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_27.html#SEC151" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 26.2.6 Torsion and nonmetricity </h3>

<p><code>ctensor</code> has the ability to compute and include torsion and nonmetricity
coefficients in the connection coefficients.
</p>
<p>The torsion coefficients are calculated from a user-supplied tensor
<code>tr</code>, which should be a rank (2,1) tensor. From this, the torsion
coefficients <code>kt</code> are computed according to the following formulae:
</p>
<pre class="example">
              m          m      m
       - g  tr   - g   tr   - tr   g
          im  kj    jm   ki     ij  km
kt   = -------------------------------
  ijk                 2


  k     km
kt   = g   kt
  ij         ijm

</pre>
<p>Note that only the mixed-index tensor is calculated and stored in the
array <code>kt</code>.
</p>
<p>The nonmetricity coefficients are calculated from the user-supplied
nonmetricity vector <code>nm</code>. From this, the nonmetricity coefficients
<code>nmc</code> are computed as follows:
</p>
<pre class="example">
             k    k        km
       -nm  D  - D  nm  + g   nm  g
   k      i  j    i   j         m  ij
nmc  = ------------------------------
   ij                2

</pre>
<p>where D stands for the Kronecker-delta.
</p>
<p>When <code>ctorsion_flag</code> is set to <code>true</code>, the values of <code>kt</code>
are subtracted from the mixed-indexed connection coefficients computed by
<code>christof</code> and stored in <code>mcs</code>. Similarly, if <code>cnonmet_flag</code>
is set to <code>true</code>, the values of <code>nmc</code> are subtracted from the
mixed-indexed connection coefficients.
</p>
<p>If necessary, <code>christof</code> calls the functions <code>contortion</code> and
<code>nonmetricity</code> in order to compute <code>kt</code> and <code>nm</code>.
</p>
<p><a name="Item_003a-contortion"></a>
</p><dl>
<dt><u>Function:</u> <b>contortion</b><i> (<var>tr</var>)</i>
<a name="IDX1159"></a>
</dt>
<dd><p>Computes the (2,1) contortion coefficients from the torsion tensor <var>tr</var>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-nonmetricity"></a>
</p><dl>
<dt><u>Function:</u> <b>nonmetricity</b><i> (<var>nm</var>)</i>
<a name="IDX1160"></a>
</dt>
<dd><p>Computes the (2,1) nonmetricity coefficients from the nonmetricity
vector <var>nm</var>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>



<hr size="6">
<a name="SEC146"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC145" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC147" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC137" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC139" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_27.html#SEC151" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 26.2.7 Miscellaneous features </h3>

<p><a name="Item_003a-ctransform"></a>
</p><dl>
<dt><u>Function:</u> <b>ctransform</b><i> (<var>M</var>)</i>
<a name="IDX1161"></a>
</dt>
<dd><p>A function in the <code>ctensor</code> (component tensor)
package which will perform a coordinate transformation
upon an arbitrary square symmetric matrix <var>M</var>. The user must input the
functions which define the transformation.  (Formerly called <code>transform</code>.)
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-findde"></a>
</p><dl>
<dt><u>Function:</u> <b>findde</b><i> (<var>A</var>, <var>n</var>)</i>
<a name="IDX1162"></a>
</dt>
<dd><p>returns a list of the unique differential equations (expressions)
corresponding to the elements of the <var>n</var> dimensional square
array <var>A</var>. Presently, <var>n</var> may be 2 or 3. <code>deindex</code> is a global list
containing the indices of <var>A</var> corresponding to these unique
differential equations. For the Einstein tensor (<code>ein</code>), which
is a two dimensional array, if computed for the metric in the example
below, <code>findde</code> gives the following independent differential equations:
</p>

<pre class="example">(%i1) load(ctensor);
(%o1)       /share/tensor/ctensor.mac
(%i2) derivabbrev:true;
(%o2)                                true
(%i3) dim:4;
(%o3)                                  4
(%i4) lg:matrix([a, 0, 0, 0], [ 0, x^2, 0, 0],
                              [0, 0, x^2*sin(y)^2, 0], [0,0,0,-d]);
                          [ a  0       0        0  ]
                          [                        ]
                          [     2                  ]
                          [ 0  x       0        0  ]
(%o4)                     [                        ]
                          [         2    2         ]
                          [ 0  0   x  sin (y)   0  ]
                          [                        ]
                          [ 0  0       0       - d ]
(%i5) depends([a,d],x);
(%o5)                            [a(x), d(x)]
(%i6) ct_coords:[x,y,z,t];
(%o6)                            [x, y, z, t]
(%i7) cmetric();
(%o7)                                done
(%i8) einstein(false);
(%o8)                                done
(%i9) findde(ein,2);
                                            2
(%o9) [d  x - a d + d, 2 a d d    x - a (d )  x - a  d d  x
        x                     x x         x        x    x

                                              2          2
                          + 2 a d d   - 2 a  d , a  x + a  - a]
                                   x       x      x
(%i10) deindex;
(%o10)                     [[1, 1], [2, 2], [4, 4]]
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-cograd"></a>
</p><dl>
<dt><u>Function:</u> <b>cograd</b><i> ()</i>
<a name="IDX1163"></a>
</dt>
<dd><p>Computes the covariant gradient of a scalar function allowing the
user to choose the corresponding vector name as the example under
<code>contragrad</code> illustrates.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-contragrad"></a>
</p><dl>
<dt><u>Function:</u> <b>contragrad</b><i> ()</i>
<a name="IDX1164"></a>
</dt>
<dd><p>Computes the contravariant gradient of a scalar function allowing
the user to choose the corresponding vector name as the example
below for the Schwarzschild metric illustrates:
</p>
<pre class="example">(%i1) load(ctensor);
(%o1)       /share/tensor/ctensor.mac
(%i2) derivabbrev:true;
(%o2)                                true
(%i3) ct_coordsys(exteriorschwarzschild,all);
(%o3)                                done
(%i4) depends(f,r);
(%o4)                               [f(r)]
(%i5) cograd(f,g1);
(%o5)                                done
(%i6) listarray(g1);
(%o6)                            [0, f , 0, 0]
                                      r
(%i7) contragrad(f,g2);
(%o7)                                done
(%i8) listarray(g2);
                               f  r - 2 f  m
                                r        r
(%o8)                      [0, -------------, 0, 0]
                                     r
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>


<dl>
<dt><u>Function:</u> <b>dscalar</b><i> ()</i>
<a name="IDX1165"></a>
</dt>
<dd><p>computes the tensor d'Alembertian of the scalar function once
dependencies have been declared upon the function. For example:
</p>
<pre class="example">(%i1) load(ctensor);
(%o1)       /share/tensor/ctensor.mac
(%i2) derivabbrev:true;
(%o2)                                true
(%i3) ct_coordsys(exteriorschwarzschild,all);
(%o3)                                done
(%i4) depends(p,r);
(%o4)                               [p(r)]
(%i5) factor(dscalar(p));
                          2
                    p    r  - 2 m p    r + 2 p  r - 2 m p
                     r r           r r        r          r
(%o5)               --------------------------------------
                                       2
                                      r
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-checkdiv"></a>
</p><dl>
<dt><u>Function:</u> <b>checkdiv</b><i> ()</i>
<a name="IDX1166"></a>
</dt>
<dd><p>computes the covariant divergence of the mixed second rank tensor
(whose first index must be covariant) by printing the
corresponding n components of the vector field (the divergence) where
n = <code>dim</code>. If the argument to the function is <code>g</code> then the
divergence of the Einstein tensor will be formed and must be zero.
In addition, the divergence (vector) is given the array name <code>div</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-cgeodesic"></a>
</p><dl>
<dt><u>Function:</u> <b>cgeodesic</b><i> (<var>dis</var>)</i>
<a name="IDX1167"></a>
</dt>
<dd><p>A function in the <code>ctensor</code> (component tensor)
package.  <code>cgeodesic</code> computes the geodesic equations of
motion for a given metric.  They are stored in the array <code>geod[i]</code>.  If
the argument <var>dis</var> is <code>true</code> then these equations are displayed.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>


<p><a name="Item_003a-bdvac"></a>
</p><dl>
<dt><u>Function:</u> <b>bdvac</b><i> (<var>f</var>)</i>
<a name="IDX1168"></a>
</dt>
<dd><p>generates the covariant components of the vacuum field equations of
the Brans- Dicke gravitational theory. The scalar field is specified
by the argument <var>f</var>, which should be a (quoted) function name
with functional dependencies, e.g., <code>'p(x)</code>.
</p>
<p>The components of the second rank covariant field tensor are
represented by the array <code>bd</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-invariant1"></a>
</p><dl>
<dt><u>Function:</u> <b>invariant1</b><i> ()</i>
<a name="IDX1169"></a>
</dt>
<dd><p>generates the mixed Euler- Lagrange tensor (field equations) for the
invariant density of R^2. The field equations are the components of an
array named <code>inv1</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-invariant2"></a>
</p><dl>
<dt><u>Function:</u> <b>invariant2</b><i> ()</i>
<a name="IDX1170"></a>
</dt>
<dd><p>*** NOT YET IMPLEMENTED ***
</p>
<p>generates the mixed Euler- Lagrange tensor (field equations) for the
invariant density of <code>ric[i,j]*uriem[i,j]</code>. The field equations are the
components of an array named <code>inv2</code>.
</p>

<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>
<p><a name="Item_003a-bimetric"></a>
</p><dl>
<dt><u>Function:</u> <b>bimetric</b><i> ()</i>
<a name="IDX1171"></a>
</dt>
<dd><p>*** NOT YET IMPLEMENTED ***
</p>
<p>generates the field equations of Rosen's bimetric theory. The field
equations are the components of an array named <code>rosen</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<hr size="6">
<a name="SEC147"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC146" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC148" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC137" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC139" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_27.html#SEC151" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 26.2.8 Utility functions </h3>

<p><a name="Item_003a-diagmatrixp"></a>
</p><dl>
<dt><u>Function:</u> <b>diagmatrixp</b><i> (<var>M</var>)</i>
<a name="IDX1172"></a>
</dt>
<dd><p>Returns <code>true</code> if <var>M</var> is a diagonal matrix or (2D) array.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor} &middot;
@ref{Category: Predicate functions}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-symmetricp"></a>
</p><dl>
<dt><u>Function:</u> <b>symmetricp</b><i> (<var>M</var>)</i>
<a name="IDX1173"></a>
</dt>
<dd><p>Returns <code>true</code> if <var>M</var> is a symmetric matrix or (2D) array.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor} &middot;
@ref{Category: Predicate functions}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-ntermst"></a>
</p><dl>
<dt><u>Function:</u> <b>ntermst</b><i> (<var>f</var>)</i>
<a name="IDX1174"></a>
</dt>
<dd><p>gives the user a quick picture of the &quot;size&quot; of the doubly subscripted
tensor (array) <var>f</var>.  It prints two element lists where the second
element corresponds to NTERMS of the components specified by the first
elements.  In this way, it is possible to quickly find the non-zero
expressions and attempt simplification.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-cdisplay"></a>
</p><dl>
<dt><u>Function:</u> <b>cdisplay</b><i> (<var>ten</var>)</i>
<a name="IDX1175"></a>
</dt>
<dd><p>displays all the elements of the tensor <var>ten</var>, as represented by
a multidimensional array. Tensors of rank 0 and 1, as well as other types
of variables, are displayed as with <code>ldisplay</code>. Tensors of rank 2 are
displayed as 2-dimensional matrices, while tensors of higher rank are displayed
as a list of 2-dimensional matrices. For instance, the Riemann-tensor of
the Schwarzschild metric can be viewed as:
</p>
<pre class="example">(%i1) load(ctensor);
(%o1)       /share/tensor/ctensor.mac
(%i2) ratfac:true;
(%o2)                                true
(%i3) ct_coordsys(exteriorschwarzschild,all);
(%o3)                                done
(%i4) riemann(false);
(%o4)                                done
(%i5) cdisplay(riem);
          [ 0               0                   0           0     ]
          [                                                       ]
          [                              2                        ]
          [      3 m (r - 2 m)   m    2 m                         ]
          [ 0  - ------------- + -- - ----      0           0     ]
          [            4          3     4                         ]
          [           r          r     r                          ]
          [                                                       ]
riem    = [                                m (r - 2 m)            ]
    1, 1  [ 0               0              -----------      0     ]
          [                                     4                 ]
          [                                    r                  ]
          [                                                       ]
          [                                           m (r - 2 m) ]
          [ 0               0                   0     ----------- ]
          [                                                4      ]
          [                                               r       ]

                                [    2 m (r - 2 m)       ]
                                [ 0  -------------  0  0 ]
                                [          4             ]
                                [         r              ]
                     riem     = [                        ]
                         1, 2   [ 0        0        0  0 ]
                                [                        ]
                                [ 0        0        0  0 ]
                                [                        ]
                                [ 0        0        0  0 ]

                                [         m (r - 2 m)    ]
                                [ 0  0  - -----------  0 ]
                                [              4         ]
                                [             r          ]
                     riem     = [                        ]
                         1, 3   [ 0  0        0        0 ]
                                [                        ]
                                [ 0  0        0        0 ]
                                [                        ]
                                [ 0  0        0        0 ]

                                [            m (r - 2 m) ]
                                [ 0  0  0  - ----------- ]
                                [                 4      ]
                                [                r       ]
                     riem     = [                        ]
                         1, 4   [ 0  0  0        0       ]
                                [                        ]
                                [ 0  0  0        0       ]
                                [                        ]
                                [ 0  0  0        0       ]

                               [       0         0  0  0 ]
                               [                         ]
                               [       2 m               ]
                               [ - ------------  0  0  0 ]
                    riem     = [    2                    ]
                        2, 1   [   r  (r - 2 m)          ]
                               [                         ]
                               [       0         0  0  0 ]
                               [                         ]
                               [       0         0  0  0 ]

             [     2 m                                         ]
             [ ------------  0        0               0        ]
             [  2                                              ]
             [ r  (r - 2 m)                                    ]
             [                                                 ]
             [      0        0        0               0        ]
             [                                                 ]
  riem     = [                         m                       ]
      2, 2   [      0        0  - ------------        0        ]
             [                     2                           ]
             [                    r  (r - 2 m)                 ]
             [                                                 ]
             [                                         m       ]
             [      0        0        0         - ------------ ]
             [                                     2           ]
             [                                    r  (r - 2 m) ]

                                [ 0  0       0        0 ]
                                [                       ]
                                [            m          ]
                                [ 0  0  ------------  0 ]
                     riem     = [        2              ]
                         2, 3   [       r  (r - 2 m)    ]
                                [                       ]
                                [ 0  0       0        0 ]
                                [                       ]
                                [ 0  0       0        0 ]

                                [ 0  0  0       0       ]
                                [                       ]
                                [               m       ]
                                [ 0  0  0  ------------ ]
                     riem     = [           2           ]
                         2, 4   [          r  (r - 2 m) ]
                                [                       ]
                                [ 0  0  0       0       ]
                                [                       ]
                                [ 0  0  0       0       ]

                                      [ 0  0  0  0 ]
                                      [            ]
                                      [ 0  0  0  0 ]
                                      [            ]
                           riem     = [ m          ]
                               3, 1   [ -  0  0  0 ]
                                      [ r          ]
                                      [            ]
                                      [ 0  0  0  0 ]

                                      [ 0  0  0  0 ]
                                      [            ]
                                      [ 0  0  0  0 ]
                                      [            ]
                           riem     = [    m       ]
                               3, 2   [ 0  -  0  0 ]
                                      [    r       ]
                                      [            ]
                                      [ 0  0  0  0 ]

                               [   m                      ]
                               [ - -   0   0       0      ]
                               [   r                      ]
                               [                          ]
                               [        m                 ]
                               [  0   - -  0       0      ]
                    riem     = [        r                 ]
                        3, 3   [                          ]
                               [  0    0   0       0      ]
                               [                          ]
                               [              2 m - r     ]
                               [  0    0   0  ------- + 1 ]
                               [                 r        ]

                                    [ 0  0  0    0   ]
                                    [                ]
                                    [ 0  0  0    0   ]
                                    [                ]
                         riem     = [            2 m ]
                             3, 4   [ 0  0  0  - --- ]
                                    [             r  ]
                                    [                ]
                                    [ 0  0  0    0   ]

                                [       0        0  0  0 ]
                                [                        ]
                                [       0        0  0  0 ]
                                [                        ]
                     riem     = [       0        0  0  0 ]
                         4, 1   [                        ]
                                [      2                 ]
                                [ m sin (theta)          ]
                                [ -------------  0  0  0 ]
                                [       r                ]

                                [ 0        0        0  0 ]
                                [                        ]
                                [ 0        0        0  0 ]
                                [                        ]
                     riem     = [ 0        0        0  0 ]
                         4, 2   [                        ]
                                [         2              ]
                                [    m sin (theta)       ]
                                [ 0  -------------  0  0 ]
                                [          r             ]

                              [ 0  0          0          0 ]
                              [                            ]
                              [ 0  0          0          0 ]
                              [                            ]
                   riem     = [ 0  0          0          0 ]
                       4, 3   [                            ]
                              [                2           ]
                              [         2 m sin (theta)    ]
                              [ 0  0  - ---------------  0 ]
                              [                r           ]

           [        2                                             ]
           [   m sin (theta)                                      ]
           [ - -------------         0                0         0 ]
           [         r                                            ]
           [                                                      ]
           [                         2                            ]
           [                    m sin (theta)                     ]
riem     = [        0         - -------------         0         0 ]
    4, 4   [                          r                           ]
           [                                                      ]
           [                                          2           ]
           [                                   2 m sin (theta)    ]
           [        0                0         ---------------  0 ]
           [                                          r           ]
           [                                                      ]
           [        0                0                0         0 ]

(%o5)                                done

</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-deleten"></a>
</p><dl>
<dt><u>Function:</u> <b>deleten</b><i> (<var>L</var>, <var>n</var>)</i>
<a name="IDX1176"></a>
</dt>
<dd><p>Returns a new list consisting of <var>L</var> with the <var>n</var>'th element
deleted.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<hr size="6">
<a name="SEC148"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC147" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC149" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC137" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC139" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_27.html#SEC151" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 26.2.9 Variables used by <code>ctensor</code> </h3>


<p><a name="Item_003a-dim"></a>
</p><dl>
<dt><u>Option variable:</u> <b>dim</b>
<a name="IDX1177"></a>
</dt>
<dd><p>Default value: 4
</p>
<p>An option in the <code>ctensor</code> (component tensor)
package.  <code>dim</code> is the dimension of the manifold with the
default 4. The command <code>dim: n</code> will reset the dimension to any other
value <code>n</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-diagmetric"></a>
</p><dl>
<dt><u>Option variable:</u> <b>diagmetric</b>
<a name="IDX1178"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>An option in the <code>ctensor</code> (component tensor)
package.  If <code>diagmetric</code> is <code>true</code> special routines compute
all geometrical objects (which contain the metric tensor explicitly)
by taking into consideration the diagonality of the metric. Reduced
run times will, of course, result. Note: this option is set
automatically by <code>csetup</code> if a diagonal metric is specified.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-ctrgsimp"></a>
</p><dl>
<dt><u>Option variable:</u> <b>ctrgsimp</b>
<a name="IDX1179"></a>
</dt>
<dd><p>Causes trigonometric simplifications to be used when tensors are computed. Presently,
<code>ctrgsimp</code> affects only computations involving a moving frame.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor} &middot;
@ref{Category: Simplification flags and variables}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-cframe_005fflag"></a>
</p><dl>
<dt><u>Option variable:</u> <b>cframe_flag</b>
<a name="IDX1180"></a>
</dt>
<dd><p>Causes computations to be performed relative to a moving frame as opposed to
a holonomic metric. The frame is defined by the inverse frame array <code>fri</code>
and the frame metric <code>lfg</code>. For computations using a Cartesian frame,
<code>lfg</code> should be the unit matrix of the appropriate dimension; for
computations in a Lorentz frame, <code>lfg</code> should have the appropriate
signature.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-ctorsion_005fflag"></a>
</p><dl>
<dt><u>Option variable:</u> <b>ctorsion_flag</b>
<a name="IDX1181"></a>
</dt>
<dd><p>Causes the contortion tensor to be included in the computation of the
connection coefficients. The contortion tensor itself is computed by
<code>contortion</code> from the user-supplied tensor <code>tr</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-cnonmet_005fflag"></a>
</p><dl>
<dt><u>Option variable:</u> <b>cnonmet_flag</b>
<a name="IDX1182"></a>
</dt>
<dd><p>Causes the nonmetricity coefficients to be included in the computation of
the connection coefficients. The nonmetricity coefficients are computed
from the user-supplied nonmetricity vector <code>nm</code> by the function
<code>nonmetricity</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-ctayswitch"></a>
</p><dl>
<dt><u>Option variable:</u> <b>ctayswitch</b>
<a name="IDX1183"></a>
</dt>
<dd><p>If set to <code>true</code>, causes some <code>ctensor</code> computations to be carried out using
Taylor-series expansions. Presently, <code>christof</code>, <code>ricci</code>,
<code>uricci</code>, <code>einstein</code>, and <code>weyl</code> take into account this
setting.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-ctayvar"></a>
</p><dl>
<dt><u>Option variable:</u> <b>ctayvar</b>
<a name="IDX1184"></a>
</dt>
<dd><p>Variable used for Taylor-series expansion if <code>ctayswitch</code> is set to
<code>true</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-ctaypov"></a>
</p><dl>
<dt><u>Option variable:</u> <b>ctaypov</b>
<a name="IDX1185"></a>
</dt>
<dd><p>Maximum power used in Taylor-series expansion when <code>ctayswitch</code> is
set to <code>true</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-ctaypt"></a>
</p><dl>
<dt><u>Option variable:</u> <b>ctaypt</b>
<a name="IDX1186"></a>
</dt>
<dd><p>Point around which Taylor-series expansion is carried out when
<code>ctayswitch</code> is set to <code>true</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-gdet"></a>
</p><dl>
<dt><u>System variable:</u> <b>gdet</b>
<a name="IDX1187"></a>
</dt>
<dd><p>The determinant of the metric tensor <code>lg</code>. Computed by <code>cmetric</code> when
<code>cframe_flag</code> is set to <code>false</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-ratchristof"></a>
</p><dl>
<dt><u>Option variable:</u> <b>ratchristof</b>
<a name="IDX1188"></a>
</dt>
<dd><p>Causes rational simplification to be applied by <code>christof</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-rateinstein"></a>
</p><dl>
<dt><u>Option variable:</u> <b>rateinstein</b>
<a name="IDX1189"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>If <code>true</code> rational simplification will be
performed on the non-zero components of Einstein tensors; if
<code>ratfac</code> is <code>true</code> then the components will also be factored.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-ratriemann"></a>
</p><dl>
<dt><u>Option variable:</u> <b>ratriemann</b>
<a name="IDX1190"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>One of the switches which controls
simplification of Riemann tensors; if <code>true</code>, then rational
simplification will be done; if <code>ratfac</code> is <code>true</code> then each of the
components will also be factored.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-ratweyl"></a>
</p><dl>
<dt><u>Option variable:</u> <b>ratweyl</b>
<a name="IDX1191"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>If <code>true</code>, this switch causes the <code>weyl</code> function
to apply rational simplification to the values of the Weyl tensor. If
<code>ratfac</code> is <code>true</code>, then the components will also be factored.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-lfg"></a>
</p><dl>
<dt><u>Variable:</u> <b>lfg</b>
<a name="IDX1192"></a>
</dt>
<dd><p>The covariant frame metric. By default, it is initialized to the 4-dimensional Lorentz frame with signature (+,+,+,-). Used when <code>cframe_flag</code> is <code>true</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-ufg"></a>
</p><dl>
<dt><u>Variable:</u> <b>ufg</b>
<a name="IDX1193"></a>
</dt>
<dd><p>The inverse frame metric. Computed from <code>lfg</code> when <code>cmetric</code> is called while <code>cframe_flag</code> is set to <code>true</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-riem"></a>
</p><dl>
<dt><u>Variable:</u> <b>riem</b>
<a name="IDX1194"></a>
</dt>
<dd><p>The (3,1) Riemann tensor. Computed when the function <code>riemann</code> is invoked. For information about index ordering, see the description of <code>riemann</code>.
</p>
<p>If <code>cframe_flag</code> is <code>true</code>, <code>riem</code> is computed from the covariant Riemann-tensor <code>lriem</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-lriem"></a>
</p><dl>
<dt><u>Variable:</u> <b>lriem</b>
<a name="IDX1195"></a>
</dt>
<dd><p>The covariant Riemann tensor. Computed by <code>lriemann</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-uriem"></a>
</p><dl>
<dt><u>Variable:</u> <b>uriem</b>
<a name="IDX1196"></a>
</dt>
<dd><p>The contravariant Riemann tensor. Computed by <code>uriemann</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-ric"></a>
</p><dl>
<dt><u>Variable:</u> <b>ric</b>
<a name="IDX1197"></a>
</dt>
<dd><p>The mixed Ricci-tensor. Computed by <code>ricci</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-uric"></a>
</p><dl>
<dt><u>Variable:</u> <b>uric</b>
<a name="IDX1198"></a>
</dt>
<dd><p>The contravariant Ricci-tensor. Computed by <code>uricci</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-lg"></a>
</p><dl>
<dt><u>Variable:</u> <b>lg</b>
<a name="IDX1199"></a>
</dt>
<dd><p>The metric tensor. This tensor must be specified (as a <code>dim</code> by <code>dim</code> matrix)
before other computations can be performed.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-ug"></a>
</p><dl>
<dt><u>Variable:</u> <b>ug</b>
<a name="IDX1200"></a>
</dt>
<dd><p>The inverse of the metric tensor. Computed by <code>cmetric</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>


<dl>
<dt><u>Variable:</u> <b>weyl</b>
<a name="IDX1201"></a>
</dt>
<dd><p>The Weyl tensor. Computed by <code>weyl</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-fb"></a>
</p><dl>
<dt><u>Variable:</u> <b>fb</b>
<a name="IDX1202"></a>
</dt>
<dd><p>Frame bracket coefficients, as computed by <code>frame_bracket</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-kinvariant"></a>
</p><dl>
<dt><u>Variable:</u> <b>kinvariant</b>
<a name="IDX1203"></a>
</dt>
<dd><p>The Kretchmann invariant. Computed by <code>rinvariant</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-np"></a>
</p><dl>
<dt><u>Variable:</u> <b>np</b>
<a name="IDX1204"></a>
</dt>
<dd><p>A Newman-Penrose null tetrad. Computed by <code>nptetrad</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-npi"></a>
</p><dl>
<dt><u>Variable:</u> <b>npi</b>
<a name="IDX1205"></a>
</dt>
<dd><p>The raised-index Newman-Penrose null tetrad. Computed by <code>nptetrad</code>.
Defined as <code>ug.np</code>. The product <code>np.transpose(npi)</code> is constant:
</p>
<pre class="example">(%i39) trigsimp(np.transpose(npi));
                              [  0   - 1  0  0 ]
                              [                ]
                              [ - 1   0   0  0 ]
(%o39)                        [                ]
                              [  0    0   0  1 ]
                              [                ]
                              [  0    0   1  0 ]
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-tr"></a>
</p><dl>
<dt><u>Variable:</u> <b>tr</b>
<a name="IDX1206"></a>
</dt>
<dd><p>User-supplied rank-3 tensor representing torsion. Used by <code>contortion</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-kt"></a>
</p><dl>
<dt><u>Variable:</u> <b>kt</b>
<a name="IDX1207"></a>
</dt>
<dd><p>The contortion tensor, computed from <code>tr</code> by <code>contortion</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-nm"></a>
</p><dl>
<dt><u>Variable:</u> <b>nm</b>
<a name="IDX1208"></a>
</dt>
<dd><p>User-supplied nonmetricity vector. Used by <code>nonmetricity</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p></dd></dl>

<p><a name="Item_003a-nmc"></a>
</p><dl>
<dt><u>Variable:</u> <b>nmc</b>
<a name="IDX1209"></a>
</dt>
<dd><p>The nonmetricity coefficients, computed from <code>nm</code> by <code>nonmetricity</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-tensorkill"></a>
</p><dl>
<dt><u>System variable:</u> <b>tensorkill</b>
<a name="IDX1210"></a>
</dt>
<dd><p>Variable indicating if the tensor package has been initialized. Set and used by
<code>csetup</code>, reset by <code>init_ctensor</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-ct_005fcoords"></a>
</p><dl>
<dt><u>Option variable:</u> <b>ct_coords</b>
<a name="IDX1211"></a>
</dt>
<dd><p>Default value: <code>[]</code>
</p>
<p>An option in the <code>ctensor</code> (component tensor)
package.  <code>ct_coords</code> contains a list of coordinates.
While normally defined when the function <code>csetup</code> is called,
one may redefine the coordinates with the assignment
<code>ct_coords: [j1, j2, ..., jn]</code> where the j's are the new coordinate names.
See also <code>csetup</code>.
</p>
<div class=categorybox>
&middot;
<p>@ref{Category: Package ctensor}
</div>
</p>
</dd></dl>

<hr size="6">
<a name="SEC149"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC148" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC150" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC137" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC139" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_27.html#SEC151" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 26.2.10 Reserved names </h3>

<p>The following names are used internally by the <code>ctensor</code> package and
should not be redefined:
</p>
<pre class="example">  Name         Description
  ---------------------------------------------------------------------
  _lg()        Evaluates to lfg if frame metric used, lg otherwise
  _ug()        Evaluates to ufg if frame metric used, ug otherwise
  cleanup()    Removes items drom the deindex list
  contract4()  Used by psi()
  filemet()    Used by csetup() when reading the metric from a file
  findde1()    Used by findde()
  findde2()    Used by findde()
  findde3()    Used by findde()
  kdelt()      Kronecker-delta (not generalized)
  newmet()     Used by csetup() for setting up a metric interactively
  setflags()   Used by init_ctensor()
  readvalue()
  resimp()
  sermet()     Used by csetup() for entering a metric as Taylor-series
  txyzsum()
  tmetric()    Frame metric, used by cmetric() when cframe_flag:true
  triemann()   Riemann-tensor in frame base, used when cframe_flag:true
  tricci()     Ricci-tensor in frame base, used when cframe_flag:true
  trrc()       Ricci rotation coefficients, used by christof()
  yesp()
</pre>

<hr size="6">
<a name="SEC150"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC149" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima_27.html#SEC151" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC137" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC139" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_27.html#SEC151" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 26.2.11 Changes </h3>

<p>In November, 2004, the <code>ctensor</code> package was extensively rewritten.
Many functions and variables have been renamed in order to make the
package compatible with the commercial version of Macsyma.
</p>

<pre class="example">  New Name     Old Name        Description
  ---------------------------------------------------------------------
  ctaylor()    DLGTAYLOR()     Taylor-series expansion of an expression
  lgeod[]      EM              Geodesic equations
  ein[]        G[]             Mixed Einstein-tensor
  ric[]        LR[]            Mixed Ricci-tensor
  ricci()      LRICCICOM()     Compute the mixed Ricci-tensor
  ctaypov      MINP            Maximum power in Taylor-series expansion
  cgeodesic()  MOTION          Compute geodesic equations
  ct_coords    OMEGA           Metric coordinates
  ctayvar      PARAM           Taylor-series expansion variable
  lriem[]      R[]             Covariant Riemann-tensor
  uriemann()   RAISERIEMANN()  Compute the contravariant Riemann-tensor
  ratriemann   RATRIEMAN       Rational simplif. of the Riemann-tensor
  uric[]       RICCI[]         Contravariant Ricci-tensor
  uricci()     RICCICOM()      Compute the contravariant Ricci-tensor
  cmetric()    SETMETRIC()     Set up the metric
  ctaypt       TAYPT           Point for Taylor-series expansion
  ctayswitch   TAYSWITCH       Taylor-series setting switch
  csetup()     TSETUP()        Start interactive setup session
  ctransform() TTRANSFORM()    Interactive coordinate transformation
  uriem[]      UR[]            Contravariant Riemann-tensor
  weyl[]       W[]             (3,1) Weyl-tensor

</pre>

<p><a name="Item_003a-atensor"></a>
</p><hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC137" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima_27.html#SEC151" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
 <font size="-1">
  This document was generated by <em>root</em> on <em>January, 10 2014</em> using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
 </font>
 <br>

</p>
</body>
</html>