xact paris

Upload: madhavanrajagopal

Post on 01-Jun-2018

235 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 XAct Paris

    1/114

    xAct

    Efficient manipulation of tensor expressions

    Jose M. Martn GarcaLaboratoire Univers et Theories, Meudon

    &

    Institut dAstrophysique de Paris

    LUTH, Meudon, 21 April 2009

    xAct p.1/28

  • 8/9/2019 XAct Paris

    2/114

    Computers in science

    xAct p.2/28

  • 8/9/2019 XAct Paris

    3/114

    Computers in science

    Human102 flops vs. computer109 1015 flops.

    xAct p.2/28

  • 8/9/2019 XAct Paris

    4/114

    Computers in science

    Human102 flops vs. computer109 1015 flops.

    Numerics: Approximate solutions to continuous problems.

    xAct p.2/28

  • 8/9/2019 XAct Paris

    5/114

    Computers in science

    Human102 flops vs. computer109 1015 flops.

    Numerics: Approximate solutions to continuous problems.

    Computers are discrete-calculus machines!

    xAct p.2/28

  • 8/9/2019 XAct Paris

    6/114

    Computers in science

    Human102 flops vs. computer109 1015 flops.

    Numerics: Approximate solutions to continuous problems.

    Computers are discrete-calculus machines!

    Computer algebra(CA): Exact solutions.

    xAct p.2/28

  • 8/9/2019 XAct Paris

    7/114

    Computers in science

    Human102 flops vs. computer109 1015 flops.

    Numerics: Approximate solutions to continuous problems.

    Computers are discrete-calculus machines!

    Computer algebra(CA): Exact solutions.

    Our problem:EfficientTensor Computer Algebra (TCA).

    xAct p.2/28

  • 8/9/2019 XAct Paris

    8/114

    Summary

    1. General purpose computer algebra (CA)

    Focus: the canonicalizer.

    2. Computer algebra for tensor calculus (TCA)

    Focus: types of problems.

    3. AMathematica/ C implementation: xAct

    4. Case example: scalars of the Riemann tensor

    xAct p.3/28

  • 8/9/2019 XAct Paris

    9/114

    1. Computer algebra (CA)

    xAct p.4/28

  • 8/9/2019 XAct Paris

    10/114

    1. Computer algebra (CA)

    Definition:Manipulation of symbols (even the program itself)

    No truncation of information

    In science: manipulation of symbolic mathematical expressions

    xAct p.4/28

  • 8/9/2019 XAct Paris

    11/114

    1. Computer algebra (CA)

    Definition:Manipulation of symbols (even the program itself)

    No truncation of information

    In science: manipulation of symbolic mathematical expressions

    Early history:

    1950: ALGAE (Los Alamos)1953: Kahrimanian, Nolan: differentiation systems

    1963: ALTRAN / ALPAK (Bell Labs)

    1960s: LISP: recursion, conditionals, dynamical allocation of memory,

    garbage collection, etc.

    xAct p.4/28

  • 8/9/2019 XAct Paris

    12/114

    1b. Computer algebra systems (CAS)

    xAct p.5/28

  • 8/9/2019 XAct Paris

    13/114

    1b. Computer algebra systems (CAS)

    General purpose systems:

    System Language Develop. Release Strengths

    xAct p.5/28

  • 8/9/2019 XAct Paris

    14/114

    1b. Computer algebra systems (CAS)

    General purpose systems:

    System Language Develop. Release Strengths

    Reduce LISP ? 1968

    Macsyma LISP ? 1970Derive LISP 1979 1988

    xAct p.5/28

  • 8/9/2019 XAct Paris

    15/114

    1b. Computer algebra systems (CAS)

    General purpose systems:

    System Language Develop. Release Strengths

    Reduce LISP ? 1968

    Macsyma LISP ? 1970Derive LISP 1979 1988

    Maple C 1979 1985 hashing routines

    Mathematica C 1986 1988 pattern matching

    xAct p.5/28

  • 8/9/2019 XAct Paris

    16/114

    1b. Computer algebra systems (CAS)

    General purpose systems:

    System Language Develop. Release Strengths

    Reduce LISP ? 1968

    Macsyma LISP ? 1970Derive LISP 1979 1988

    Maple C 1979 1985 hashing routines

    Mathematica C 1986 1988 pattern matchingMaxima CLISP 1982 1998Axiom Aldor 1971-91 2002 object-oriented

    xAct p.5/28

  • 8/9/2019 XAct Paris

    17/114

  • 8/9/2019 XAct Paris

    18/114

  • 8/9/2019 XAct Paris

    19/114

    1c. CA. Memory limitations

    Recursive algorithmxi+1=f(xi)with initial seedx0:Numerical: reserve fixed memory per number and

    xi+1= Truncate[f(xi)]

    CA: exact algorithm, reallocate memory. Generic memory growth Generic computing-time growth

    xAct p.6/28

  • 8/9/2019 XAct Paris

    20/114

    1c. CA. Memory limitations

    Recursive algorithmxi+1=f(xi)with initial seedx0:Numerical: reserve fixed memory per number and

    xi+1= Truncate[f(xi)]

    CA: exact algorithm, reallocate memory. Generic memory growth Generic computing-time growth

    Examples:

    det(A + B) n! 2n terms ( 4 109 forn = 10)

    xAct p.6/28

  • 8/9/2019 XAct Paris

    21/114

    1c. CA. Memory limitations

    Recursive algorithmxi+1=f(xi)with initial seedx0:Numerical: reserve fixed memory per number and

    xi+1= Truncate[f(xi)]

    CA: exact algorithm, reallocate memory. Generic memory growth Generic computing-time growth

    Examples:

    Intermediate expression swell:Simple input Complex intermediate steps Simple output

    xAct p.6/28

  • 8/9/2019 XAct Paris

    22/114

    1c. CA. Memory limitations

    Recursive algorithmxi+1=f(xi)with initial seedx0:Numerical: reserve fixed memory per number and

    xi+1= Truncate[f(xi)]

    CA: exact algorithm, reallocate memory. Generic memory growth Generic computing-time growth

    Examples:

    Linear systems with random integers |ci| 100. Timing (s):

    1 5 10 50 100 500

    0.01

    1

    100

    ExactNumerical

    xAct p.6/28

  • 8/9/2019 XAct Paris

    23/114

    1d. CA. Intrinsic limitations

    Richardsons theorem (1968):

    xAct p.7/28

  • 8/9/2019 XAct Paris

    24/114

    1d. CA. Intrinsic limitations

    Richardsons theorem (1968):

    Let beEa set of real functions such that

    IfA(x), B(x) EthenA(x)B(x), A(x)B(x), A(B(x)) E.The rational numbers are contained as constant functions.

    xAct p.7/28

  • 8/9/2019 XAct Paris

    25/114

    1d. CA. Intrinsic limitations

    Richardsons theorem (1968):

    Let beEa set of real functions such that

    IfA(x), B(x) EthenA(x)B(x), A(x)B(x), A(B(x)) E.The rational numbers are contained as constant functions.

    Then for expressionsA(x)inE,

    iflog 2, , ex, sin x EthenA(x) 0for allxis unsolvable;

    xAct p.7/28

  • 8/9/2019 XAct Paris

    26/114

    1d. CA. Intrinsic limitations

    Richardsons theorem (1968):

    Let beEa set of real functions such that

    IfA(x), B(x) EthenA(x)B(x), A(x)B(x), A(B(x)) E.The rational numbers are contained as constant functions.

    Then for expressionsA(x)inE,

    iflog 2, , ex, sin x EthenA(x) 0for allxis unsolvable;if also x2 EthenA(x) 0is unsolvable.

    xAct p.7/28

  • 8/9/2019 XAct Paris

    27/114

    1d. CA. Intrinsic limitations

    Richardsons theorem (1968):

    Let beEa set of real functions such that

    IfA(x), B(x) EthenA(x)B(x), A(x)B(x), A(B(x)) E.The rational numbers are contained as constant functions.

    Then for expressionsA(x)inE,

    iflog 2, , ex, sin x EthenA(x) 0for allxis unsolvable;if also x2 EthenA(x) 0is unsolvable.If furthermore there is a functionB(x) Ewithout primitive inEthenthe integration problem is unsolvable. Example: ex

    2

    .

    xAct p.7/28

  • 8/9/2019 XAct Paris

    28/114

    1d. CA. Intrinsic limitations

    Richardsons theorem (1968):

    Let beEa set of real functions such that

    IfA(x), B(x) EthenA(x)B(x), A(x)B(x), A(B(x)) E.The rational numbers are contained as constant functions.

    Then for expressionsA(x)inE,

    iflog 2, , ex, sin x EthenA(x) 0for allxis unsolvable;if also x2 EthenA(x) 0is unsolvable.If furthermore there is a functionB(x) Ewithout primitive inEthenthe integration problem is unsolvable. Example: ex

    2

    .

    Is Computer Algebra doomed to failure?

    xAct p.7/28

  • 8/9/2019 XAct Paris

    29/114

    1e. CA. The canonicalizer

    xAct p.8/28

  • 8/9/2019 XAct Paris

    30/114

    1e. CA. The canonicalizer

    There are families of expressions for which a canonical form can always bedefined. Example: polynomials.

    xAct p.8/28

  • 8/9/2019 XAct Paris

    31/114

  • 8/9/2019 XAct Paris

    32/114

    1e. CA. The canonicalizer

    There are families of expressions for which a canonical form can always bedefined. Example: polynomials.

    Definition: A=Biff their canonical forms coincide.

    There are different canonical forms for a family of expressions.

    The algorithm in charge of canonicalization is called the canonicalizer.

    xAct p.8/28

  • 8/9/2019 XAct Paris

    33/114

    1e. CA. The canonicalizer

    There are families of expressions for which a canonical form can always bedefined. Example: polynomials.

    Definition: A=Biff their canonical forms coincide.

    There are different canonical forms for a family of expressions.

    The algorithm in charge of canonicalization is called the canonicalizer.

    Do not confuse

    canonicalization: objective, given a canonical form

    simplification: largely subjective. More difficult. Mathematica:

    xAct p.8/28

  • 8/9/2019 XAct Paris

    34/114

    2 Computer algebra for (GR) tensors

  • 8/9/2019 XAct Paris

    35/114

    2. Computer algebra for (GR) tensors

    Motivation:Long but simple problems

    Perturbation theory

    Bel-Robinson, super energy-momentum tensors, ...

    4Babcd =CaebfCcedf+

    CaebfCcedf Babcd =B(abcd)

    Riemann polynomials:

    RabcdRaecfRbfde =RabcdRaecfRbedf 14 RabcdRabefRcdef

    Lovelock (dimension-dependent) identities

    Component expansions in numerics (code generation)[ Kranc: Husa, Hinder, Lechner 04 ]

    Manipulation and classification of metrics[ GRDB: Ishak, Lake 02; ICD: Skea 97]

    Added benefits: reproducibility, error-free, ...

    xAct p.9/28

    2b TCA Early history

  • 8/9/2019 XAct Paris

    36/114

    2b. TCA. Early history

    xAct p.10/28

    2b TCA Early history

  • 8/9/2019 XAct Paris

    37/114

    2b. TCA. Early history

    R. dInverno 1969ALAM

    xAct p.10/28

  • 8/9/2019 XAct Paris

    38/114

    2b TCA Early history

  • 8/9/2019 XAct Paris

    39/114

    2b. TCA. Early history

    R. dInverno 1969ALAM

    R.A. Russell-Clark 1971CLAM

    I. Frick 1974ILAM

    LAM

    xAct p.10/28

    2b TCA Early history

  • 8/9/2019 XAct Paris

    40/114

    2b. TCA. Early history

    R. dInverno 1969ALAM

    R.A. Russell-Clark 1971CLAM

    I. Frick 1974ILAM

    LAM

    I. Frick 1977SHEEP

    xAct p.10/28

    2b TCA Early history

  • 8/9/2019 XAct Paris

    41/114

    2b. TCA. Early history

    R. dInverno 1969ALAM

    R.A. Russell-Clark 1971CLAM

    I. Frick 1974ILAM

    LAM

    I. Frick 1977SHEEP

    dInverno & Frick 1982

    SHEEP2

    xAct p.10/28

    2b TCA Early history

  • 8/9/2019 XAct Paris

    42/114

    2b. TCA. Early history

    R. dInverno 1969ALAM

    R.A. Russell-Clark 1971CLAM

    I. Frick 1974ILAM

    LAM

    I. Frick 1977SHEEP

    dInverno & Frick 1982

    SHEEP2

    J. man 1987

    CLASSI

    L. Hrnfeldt 1988

    STENSOR

    J. E. F. Skea 1988

    RSHEEPxAct p.10/28

    2c. Classes: types of problems

  • 8/9/2019 XAct Paris

    43/114

    2c. Classes: types of problems

    xAct p.11/28

    2c. Classes: types of problems

  • 8/9/2019 XAct Paris

    44/114

    2c. Classes: types of problems

    Component computations:

    Give a metric in a coordinate system / frame.

    Compute other tensors from that metric.

    Key issues:

    Component expansions. Many terms. Memory? [ Lake 03 ]

    Symmetries. Independent components? [ Klioner 04 ]

    xAct p.11/28

    2c. Classes: types of problems

  • 8/9/2019 XAct Paris

    45/114

    2c. Classes: types of problems

    Component computations:

    Give a metric in a coordinate system / frame.

    Compute other tensors from that metric.

    Key issues:

    Component expansions. Many terms. Memory? [ Lake 03 ]

    Symmetries. Independent components? [ Klioner 04 ]

    Abstract computations:

    Define tensors with symmetries, connections, etc.

    Compute and simplify expressions.

    Key issue: canonicalization with symmetries and dummy indices.

    xAct p.11/28

  • 8/9/2019 XAct Paris

    46/114

    2c-2. Classes: sources of complexity

  • 8/9/2019 XAct Paris

    47/114

    p y

    General expression: tensor polynomial

    . . . + 3r2RabcdRaecfTbefvd + RabcdRcdefRefab+ ...

    xAct p.12/28

    2c-2. Classes: sources of complexity

  • 8/9/2019 XAct Paris

    48/114

    p y

    General expression: tensor polynomial

    . . . + 3r2RabcdRaecfTbefvd + RabcdRcdefRefab+ ...

    Expand and canonicalize terms independently (parallelism).

    xAct p.12/28

    2c-2. Classes: sources of complexity

  • 8/9/2019 XAct Paris

    49/114

    p y

    General expression: tensor polynomial

    . . . + 3r2RabcdRaecfTbefvd + RabcdRcdefRefab+ ...

    Expand and canonicalize terms independently (parallelism).

    Tensor product: sort tensors and construct equivalent single tensor withinherited symmetries [ Portugal 99 ].

    xAct p.12/28

    2c-2. Classes: sources of complexity

  • 8/9/2019 XAct Paris

    50/114

    General expression: tensor polynomial

    . . . + 3r2RabcdRaecfTbefvd + RabcdRcdefRefab+ ...

    Expand and canonicalize terms independently (parallelism).

    Tensor product: sort tensors and construct equivalent single tensor withinherited symmetries [ Portugal 99 ].

    Canonicalize tensor withnindices and arbitrary symmetry:

    Simple algorithms: timings areexponentialinn.

    Efficient algorithms: timings are effectivelypolynomialinn.

    xAct p.12/28

    2c-2. Classes: sources of complexity

  • 8/9/2019 XAct Paris

    51/114

    General expression: tensor polynomial

    . . . + 3r2RabcdRaecfTbefvd + RabcdRcdefRefab+ ...

    Expand and canonicalize terms independently (parallelism).

    Tensor product: sort tensors and construct equivalent single tensor withinherited symmetries [ Portugal 99 ].

    Canonicalize tensor withnindices and arbitrary symmetry:

    Simple algorithms: timings areexponentialinn.

    Efficient algorithms: timings are effectivelypolynomialinn.

    Arrange dummy indices in full expression.

    xAct p.12/28

    2c-3. Classes: types of symmetries

  • 8/9/2019 XAct Paris

    52/114

    xAct p.13/28

    2c-3. Classes: types of symmetries

  • 8/9/2019 XAct Paris

    53/114

    Monoterm symmetries(perm groups):

    Rbacd = Rabcd, Rcdab = +RabcdMost packages use ad hoc exponential algorithms.

    Polynomic algorithms to manipulate the Symmetric GroupSn, based onStrong Generating Set representations[ Schreier, Sims, Knuth, ... 70s, 80s ].

    Applied to tensor/spinor canonicalization: [ Portugal et al. 01 ]

    xAct p.13/28

    2c-3. Classes: types of symmetries

  • 8/9/2019 XAct Paris

    54/114

    Monoterm symmetries(perm groups):

    Rbacd = Rabcd, Rcdab = +RabcdMost packages use ad hoc exponential algorithms.

    Polynomic algorithms to manipulate the Symmetric GroupSn, based onStrong Generating Set representations[ Schreier, Sims, Knuth, ... 70s, 80s ].

    Applied to tensor/spinor canonicalization: [ Portugal et al. 01 ]

    Multiterm symmetries(perm algebras):

    Rabcd+ Racdb+ Radbc = 0

    No known efficient algorithms. Solutions?Most elegant: Young tableaux [ Fulling et al. 92; Peeters 05 ]

    Particular case: dimension-dependent identities [ Edgar et al. 02 ].

    xAct p.13/28

    2d. Tensor packages

  • 8/9/2019 XAct Paris

    55/114

    MAXIMA: itensor, stensor / ctensor

    REDUCE: atensor, RicciR, ExCalc / GRG, GRLIB, RedTen

    MAPLE: Riegeom, Canon, MapleTensor / Riemann, Atlas,GRTensorII

    MATHEMATICA: MathTensor ($$), dhPark, Tensors in Physics ($), Tensorial ($),Ricci, TTC, EinS, xTensor / GRTensorM, xCoba

    Standalone: cadabra

    Prototyping: Kranc, RNPL, TeLa

    Many other small packages for component computations.

    xAct p.14/28

    2e. Example 1

  • 8/9/2019 XAct Paris

    56/114

    Antisymmetric tensorFba = Fab.FabFbc n... F

    ha = 0 if numbernof tensors is odd.

    xAct p.15/28

  • 8/9/2019 XAct Paris

    57/114

    2e-2. Example 1

  • 8/9/2019 XAct Paris

    58/114

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    xAct p.16/28

    2e-2. Example 1

  • 8/9/2019 XAct Paris

    59/114

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    xAct p.16/28

    2e-2. Example 1

  • 8/9/2019 XAct Paris

    60/114

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    xAct p.16/28

    2e-2. Example 1

  • 8/9/2019 XAct Paris

    61/114

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    xAct p.16/28

    2e-2. Example 1

  • 8/9/2019 XAct Paris

    62/114

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    xAct p.16/28

    2e-2. Example 1

  • 8/9/2019 XAct Paris

    63/114

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    10 20 30 40 500.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    100000

    Second

    Minute

    Hour

    Day

    xAct p.16/28

    2e-3. Example 2

  • 8/9/2019 XAct Paris

    64/114

    Random monomial Riemann scalars:ga1b7 . . . gdnc5 Ra1b1c1d1. . . Ranbncndn

    oooooooo

    ooooooooo

    o

    ooooooo

    o

    ooooooo

    o

    ooooooooooooo

    o

    ooo

    o

    oooooo

    o

    ooooooooo

    o

    o

    o

    oo

    o

    oo

    o

    oooooo

    o

    oo

    Second

    Minute

    0 10 20 30 40 50

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    number of Riemann tensors

    timings

    inseconds

    The algorithm uses theintersection algorithm, which is known to beexponential in the worst case.xAct p.17/28

    2e-4. Example 2

  • 8/9/2019 XAct Paris

    65/114

    A million random monomial Riemann

    7

    scalars:

    0 0.02 0.04 0.06 0.08 0.1 0.12

    Time s

    0

    25000

    50000

    75000

    100000

    125000

    150000

    0 0.5 1 1.5 2Time s

    2

    4

    6

    A million

    Riemann^7

    3.2 GHz

    bin .005 s

    Zero: 441324

    Nonzero: 558673

    xAct p.18/28

    2e-5. Example 2

  • 8/9/2019 XAct Paris

    66/114

    A million random monomial Riemann

    10

    scalars:

    CPU 1.7 GHz

    bin: 0.0001 s

    Zero: 424108

    Nonzero: 575892

    0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.100

    5000

    10000

    15000

    timings in secondsxAct p.19/28

    3. The xAct project

  • 8/9/2019 XAct Paris

    67/114

    xAct p.20/28

    3. The xAct project

  • 8/9/2019 XAct Paris

    68/114

    xCore

    MathematicaToolsxAct p.20/28

  • 8/9/2019 XAct Paris

    69/114

    3. The xAct project

  • 8/9/2019 XAct Paris

    70/114

    xCore

    MathematicaTools

    xPermPermutation Group Theory

    xTensorAbstract tensor algebra

    xAct p.20/28

    3. The xAct project

  • 8/9/2019 XAct Paris

    71/114

    xCore

    MathematicaTools

    xPermPermutation Group Theory

    xTensorAbstract tensor algebra

    xCobaComponent tensor algebra

    [ D. Yllanes ]

    xAct p.20/28

  • 8/9/2019 XAct Paris

    72/114

  • 8/9/2019 XAct Paris

    73/114

    3. The xAct project

  • 8/9/2019 XAct Paris

    74/114

    xCore

    MathematicaTools

    xPermPermutation Group Theory

    xTensorAbstract tensor algebra

    xCobaComponent tensor algebra

    [ D. Yllanes ]

    xPertPerturbation Theory

    HarmonicsTensor spherical hars.

    [ D. Brizuela andG. Mena Marugn ]

    InvarRiemann tensor

    [ R. Portugal ]

    Spinors[ A. Garca-Parrado ]

    xAct p.20/28

    3b. Features

  • 8/9/2019 XAct Paris

    75/114

    xAct p.21/28

    3b. Features

  • 8/9/2019 XAct Paris

    76/114

    Strengths:Fast monoterm canonicalization.

    Mathematical structure, GR-oriented.

    Free software (GPL).Extensive,Mathematica-style documentation.

    xAct p.21/28

    3b. Features

  • 8/9/2019 XAct Paris

    77/114

    Strengths:Fast monoterm canonicalization.

    Mathematical structure, GR-oriented.

    Free software (GPL).Extensive,Mathematica-style documentation.

    Current weaknesses:

    Multiterm canonicalization missing.Tensor-editing interface missing.

    Incomplete development of calculus with charts.

    xAct p.21/28

    3b. Features

  • 8/9/2019 XAct Paris

    78/114

    Strengths:Fast monoterm canonicalization.

    Mathematical structure, GR-oriented.

    Free software (GPL).Extensive,Mathematica-style documentation.

    Current weaknesses:

    Multiterm canonicalization missing.Tensor-editing interface missing.

    Incomplete development of calculus with charts.

    Other data:c20022009, GPL. Version 0.7 in March 2004; currently in 0.9.817000 lines of Mathematica code + 2500 lines of C code.

    31 articles have used it:

    xAct p.21/28

  • 8/9/2019 XAct Paris

    79/114

    3d. What xTensor can do

  • 8/9/2019 XAct Paris

    80/114

    xAct p.23/28

  • 8/9/2019 XAct Paris

    81/114

    3d. What xTensor can do

  • 8/9/2019 XAct Paris

    82/114

    Define one or several manifolds, and products of them.Define (complex) vector bundles on them.

    Define tensors with arbitrary monoterm symmetries.

    Define connections of any type. Automatic Christoffel, Riemann, ...generation.

    Define one or several metrics on each manifold. Warped metrics. Inducedmetrics.

    Parametric derivatives, Lie derivatives, Poisson brackets.

    xAct p.23/28

    3d. What xTensor can do

  • 8/9/2019 XAct Paris

    83/114

    Define one or several manifolds, and products of them.Define (complex) vector bundles on them.

    Define tensors with arbitrary monoterm symmetries.

    Define connections of any type. Automatic Christoffel, Riemann, ...generation.

    Define one or several metrics on each manifold. Warped metrics. Inducedmetrics.

    Parametric derivatives, Lie derivatives, Poisson brackets.

    Single canonicalization routine (ToCanonical).

    xAct p.23/28

    3d. What xTensor can do

  • 8/9/2019 XAct Paris

    84/114

    Define one or several manifolds, and products of them.Define (complex) vector bundles on them.

    Define tensors with arbitrary monoterm symmetries.

    Define connections of any type. Automatic Christoffel, Riemann, ...generation.

    Define one or several metrics on each manifold. Warped metrics. Inducedmetrics.

    Parametric derivatives, Lie derivatives, Poisson brackets.

    Single canonicalization routine (ToCanonical).

    Transformation rules, which detect the character of the indices, the manifold of

    the indices, the symmetries of the tensors, and take into account metrics.

    xAct p.23/28

    3d. What xTensor can do

  • 8/9/2019 XAct Paris

    85/114

    Define one or several manifolds, and products of them.Define (complex) vector bundles on them.

    Define tensors with arbitrary monoterm symmetries.

    Define connections of any type. Automatic Christoffel, Riemann, ...generation.

    Define one or several metrics on each manifold. Warped metrics. Inducedmetrics.

    Parametric derivatives, Lie derivatives, Poisson brackets.

    Single canonicalization routine (ToCanonical).

    Transformation rules, which detect the character of the indices, the manifold of

    the indices, the symmetries of the tensors, and take into account metrics.Use all machinery ofMathematica.

    xAct p.23/28

    3e. xTensor notations

  • 8/9/2019 XAct Paris

    86/114

    Usealwaysabstract tensor notation. Penrose abstract-indices.

    Walds book conventions. Ashtekars approach to gauge.

    xAct p.24/28

    3e. xTensor notations

  • 8/9/2019 XAct Paris

    87/114

    Usealwaysabstract tensor notation. Penrose abstract-indices.

    Walds book conventions. Ashtekars approach to gauge.

    Symbols have a type: tensor, abstract-index, manifold, ...

    xAct p.24/28

    3e. xTensor notations

  • 8/9/2019 XAct Paris

    88/114

    Usealwaysabstract tensor notation. Penrose abstract-indices.

    Walds book conventions. Ashtekars approach to gauge.

    Symbols have a type: tensor, abstract-index, manifold, ...

    Notation forTab?

    xAct p.24/28

    3e. xTensor notations

  • 8/9/2019 XAct Paris

    89/114

    Usealwaysabstract tensor notation. Penrose abstract-indices.

    Walds book conventions. Ashtekars approach to gauge.

    Symbols have a type: tensor, abstract-index, manifold, ...

    Notation forTab?T[a,-b]

    xAct p.24/28

    3e. xTensor notations

  • 8/9/2019 XAct Paris

    90/114

    Usealwaysabstract tensor notation. Penrose abstract-indices.

    Walds book conventions. Ashtekars approach to gauge.

    Symbols have a type: tensor, abstract-index, manifold, ...

    Notation forTab?T[a,-b]

    Tensor[Name["T"], Indices[Up[a], Down[b]]]

    xAct p.24/28

    3e. xTensor notations

  • 8/9/2019 XAct Paris

    91/114

    Usealwaysabstract tensor notation. Penrose abstract-indices.

    Walds book conventions. Ashtekars approach to gauge.

    Symbols have a type: tensor, abstract-index, manifold, ...

    Notation forTab?T[a,-b]

    Tensor[Name["T"], Indices[Up[a], Down[b]]]

    Translator between internal / external notations

    xAct p.24/28

  • 8/9/2019 XAct Paris

    92/114

    3e. xTensor notations

    U l b t t t t ti P b t t i di

  • 8/9/2019 XAct Paris

    93/114

    Usealwaysabstract tensor notation. Penrose abstract-indices.

    Walds book conventions. Ashtekars approach to gauge.

    Symbols have a type: tensor, abstract-index, manifold, ...

    Notation forTab?T[a,-b]

    Tensor[Name["T"], Indices[Up[a], Down[b]]]

    Translator between internal / external notationsChoice:T[a,-b]

    Notation for covariant derivatives:(Penrose & Rindler) What are

    2 v3and2 v3 ?

    Is it e2a e3ba vb or e2aa

    e3b vb

    ?

    xAct p.24/28

    3e. xTensor notations

    U l b t t t t ti P b t t i di

  • 8/9/2019 XAct Paris

    94/114

    Usealwaysabstract tensor notation. Penrose abstract-indices.

    Walds book conventions. Ashtekars approach to gauge.

    Symbols have a type: tensor, abstract-index, manifold, ...

    Notation forTab?T[a,-b]

    Tensor[Name["T"], Indices[Up[a], Down[b]]]

    Translator between internal / external notationsChoice:T[a,-b]

    Notation for covariant derivatives:(Penrose & Rindler) What are

    2 v3and2 v3 ?

    Is it e2a e3ba vb or e2aa

    e3b vb

    ?

    Choice:aandaare operators: Cd[-a][expr]Lie derivatives: LieD[ v[i] ][ expr ]

    xAct p.24/28

    4. The Riemann invariants

    Scalar invRabcdRabefRcdef, or differential invRab

    c

    dR

    acbd.

  • 8/9/2019 XAct Paris

    95/114

    Used in the classification of spacetimes, GR Lagrangian expansions,QG renormalization, etc.

    xAct p.25/28

    4. The Riemann invariants

    Scalar invRabcdRabefRcdef, or differential invRab

    c

    dR

    acbd.

  • 8/9/2019 XAct Paris

    96/114

    Used in the classification of spacetimes, GR Lagrangian expansions,QG renormalization, etc.

    Haskins 1902: 14 independent scalar invs in 4d.

    Narlikar and Karmarkar 1948: first list of 14 scalar invs:(R, R2, W2, R3, W3, R2W, W4, R4, R2W2,

    W5, R2W3, R4W, R4W2, R4W3).

    xAct p.25/28

    4. The Riemann invariants

    Scalar invRabcdRabefRcdef, or differential invRab

    c

    dR

    acbd.

    U d i h l ifi i f i GR L i i

  • 8/9/2019 XAct Paris

    97/114

    Used in the classification of spacetimes, GR Lagrangian expansions,QG renormalization, etc.

    Haskins 1902: 14 independent scalar invs in 4d.

    Narlikar and Karmarkar 1948: first list of 14 scalar invs:(R, R2, W2, R3, W3, R2W, W4, R4, R2W2,

    W5, R2W3, R4W, R4W2, R4W3).

    Other invariants are (possibly nonpolynomial) functions of them.Completeness:polynomicbasis for all invariants. Relations?

    xAct p.25/28

    4. The Riemann invariants

    Scalar invRabcdRabefRcdef, or differential invRab

    c

    dR

    acbd.

    U d i th l ifi ti f ti GR L i i

  • 8/9/2019 XAct Paris

    98/114

    Used in the classification of spacetimes, GR Lagrangian expansions,QG renormalization, etc.

    Haskins 1902: 14 independent scalar invs in 4d.

    Narlikar and Karmarkar 1948: first list of 14 scalar invs:(R, R2, W2, R3, W3, R2W, W4, R4, R2W2,

    W5, R2W3, R4W, R4W2, R4W3).

    Other invariants are (possibly nonpolynomial) functions of them.Completeness:polynomicbasis for all invariants. Relations?

    Sneddon 1999: 38 s-invs (deg 11). Complete basis. (Rotor calculus.)

    Carminati-Lim 2007: graph-based construction of s-inv relations.

    xAct p.25/28

    4. The Riemann invariants

    Scalar invRabcdRabefRcdef, or differential invRab

    c

    dR

    acbd.

    U d i th l ifi ti f ti GR L i i

  • 8/9/2019 XAct Paris

    99/114

    Used in the classification of spacetimes, GR Lagrangian expansions,QG renormalization, etc.

    Haskins 1902: 14 independent scalar invs in 4d.

    Narlikar and Karmarkar 1948: first list of 14 scalar invs:(R, R2, W2, R3, W3, R2W, W4, R4, R2W2,

    W5, R2W3, R4W, R4W2, R4W3).

    Other invariants are (possibly nonpolynomial) functions of them.Completeness:polynomicbasis for all invariants. Relations?

    Sneddon 1999: 38 s-invs (deg 11). Complete basis. (Rotor calculus.)

    Carminati-Lim 2007: graph-based construction of s-inv relations.Fulling et al 1992: bases for d-invs up to 10 derivatives andR6.

    xAct p.25/28

    4b. Riemann invariants up to degree 7

    7 Riemann

    28 indices

    28!

    3.0

    1029 s-invs

  • 8/9/2019 XAct Paris

    100/114

    xAct p.26/28

    4b. Riemann invariants up to degree 7

    7 Riemann

    28 indices

    28!

    3.0

    1029 s-invs

    Use monoterm symmetries: 16352 invariants

  • 8/9/2019 XAct Paris

    101/114

    Use monoterm symmetries: 16352 invariants

    xAct p.26/28

    4b. Riemann invariants up to degree 7

    7 Riemann

    28 indices

    28!

    3.0

    1029 s-invs

    Use monoterm symmetries: 16352 invariants

  • 8/9/2019 XAct Paris

    102/114

    Use monoterm symmetries: 16352 invariants

    Use cyclic property: 1639 invariants

    xAct p.26/28

  • 8/9/2019 XAct Paris

    103/114

  • 8/9/2019 XAct Paris

    104/114

    4b. Riemann invariants up to degree 7

    7 Riemann

    28 indices

    28!

    3.0

    1029 s-invs

    Use monoterm symmetries: 16352 invariants

  • 8/9/2019 XAct Paris

    105/114

    y

    Use cyclic property: 1639 invariants

    Antisymmetrise over sets of 5 indices in 4d: 4311 integer equations

    Gauss elimination: Intermediate swell problem:Original integers: |ci| 384

    Final integers: |cf| 4978120

    xAct p.26/28

    4b. Riemann invariants up to degree 7

    7 Riemann

    28 indices

    28!

    3.0

    1029 s-invs

    Use monoterm symmetries: 16352 invariants

  • 8/9/2019 XAct Paris

    106/114

    Use cyclic property: 1639 invariants

    Antisymmetrise over sets of 5 indices in 4d: 4311 integer equations

    Gauss elimination: Intermediate swell problem:Original integers: |ci| 384

    Final integers: |cf| 4978120

    Largest intermediate integer:412843208881146263121056084725879635772776056596195531210903371997452212291202639383904791907983313629332658685142520797678355583630907136564045657358541395134420154091637344181884734088835920651682654

    5838550350981924166243854816386358011913196352080821446913112544207777945582431400973483457511551249

    4271650405780114863779964319571108875740447236120954785394441817343113274871351581501474081446209153

    5133993980627211654318697002059693685910102607365896788999230680327719504392651078493689021476459822

    1917466623055176060658271638645490139036389024466375930303586688550738508615214422459534528028026604

    3392962118745453989341765134526682155897073108863212658336777829476719031970391332987380834358579837

    4768508365933468022268161668651405869982994847652173877241170117828300225631267244981449350418876807

    8308059566617955048754211100127225300485494079978006577938025856377710049543176142178387315401497328

    Required 8Gb RAM and 384-bytes integers (BigNum: GMP).

    xAct p.26/28

    4b. Riemann invariants up to degree 7

    7 Riemann

    28 indices

    28!

    3.0

    1029 s-invs

    Use monoterm symmetries: 16352 invariants

  • 8/9/2019 XAct Paris

    107/114

    Use cyclic property: 1639 invariants

    Antisymmetrise over sets of 5 indices in 4d: 4311 integer equations

    Gauss elimination: Intermediate swell problem:Original integers: |ci| 384

    Final integers: |cf| 4978120

    Largest intermediate integer:412843208881146263121056084725879635772776056596195531210903371997452212291202639383904791907983313629332658685142520797678355583630907136564045657358541395134420154091637344181884734088835920651682654

    5838550350981924166243854816386358011913196352080821446913112544207777945582431400973483457511551249

    4271650405780114863779964319571108875740447236120954785394441817343113274871351581501474081446209153

    5133993980627211654318697002059693685910102607365896788999230680327719504392651078493689021476459822

    1917466623055176060658271638645490139036389024466375930303586688550738508615214422459534528028026604

    3392962118745453989341765134526682155897073108863212658336777829476719031970391332987380834358579837

    4768508365933468022268161668651405869982994847652173877241170117828300225631267244981449350418876807

    8308059566617955048754211100127225300485494079978006577938025856377710049543176142178387315401497328

    Required 8Gb RAM and 384-bytes integers (BigNum: GMP).

    We get the 27 invs of Sneddons basis up to degree 7 (6 dual), plus allpolynomial expression of any other invariant.Invarpackage: CPC 2007.

    Database of 645 625 relations up to 12 metric derivatives. CPC 2008.xAct p.26/28

  • 8/9/2019 XAct Paris

    108/114

    5. Conclusions

  • 8/9/2019 XAct Paris

    109/114

    xAct p.28/28

    5. Conclusions

    Brief review of the field of Computer Algebra, focusing on the importance ofthe canonicalizer.

  • 8/9/2019 XAct Paris

    110/114

    xAct p.28/28

    5. Conclusions

    Brief review of the field of Computer Algebra, focusing on the importance ofthe canonicalizer.

  • 8/9/2019 XAct Paris

    111/114

    There are important problems in GR and other fields which requireTensorComputer Algebra.

    xAct p.28/28

    5. Conclusions

    Brief review of the field of Computer Algebra, focusing on the importance ofthe canonicalizer.

  • 8/9/2019 XAct Paris

    112/114

    There are important problems in GR and other fields which requireTensorComputer Algebra.

    For the first time we have tensor packages with efficient canonicalizationalgorithms for monoterm symmetries,and they are free software!

    xAct p.28/28

    5. Conclusions

    Brief review of the field of Computer Algebra, focusing on the importance ofthe canonicalizer.

  • 8/9/2019 XAct Paris

    113/114

    There are important problems in GR and other fields which requireTensorComputer Algebra.

    For the first time we have tensor packages with efficient canonicalizationalgorithms for monoterm symmetries,and they are free software!

    There are multiterm algorithms, but we need something more efficient. Idea:databases of solutions (example:Invarpackage).

    xAct p.28/28

  • 8/9/2019 XAct Paris

    114/114