Mathematics for large scale tensor computations

Similar documents
xact Efficient manipulation of tensor expressions Laboratoire Univers et Théories, Meudon & Institut d Astrophysique de Paris

Math for Liberal Studies

Set Notation and Axioms of Probability NOT NOT X = X = X'' = X

Lecture 3 : Probability II. Jonathan Marchini

Do in calculator, too.

Chapter 1 Problem Solving: Strategies and Principles

Lecture 2 31 Jan Logistics: see piazza site for bootcamps, ps0, bashprob

Finding extremal voting games via integer linear programming

9/2/2009 Comp /Comp Fall

Lecture 4: DNA Restriction Mapping

Lecture 4: DNA Restriction Mapping

8/29/13 Comp 555 Fall

Discrete Probability Distributions

Discrete Probability Distributions

arxiv: v1 [math.ra] 11 Aug 2010

10.1. Randomness and Probability. Investigation: Flip a Coin EXAMPLE A CONDENSED LESSON

12.1. Randomness and Probability

Identities relating the Jordan product and the associator in the free nonassociative algebra

discrete probability distributions

Dragan Mašulović. The Discrete Charm of Discrete Mathematics

CS 484 Data Mining. Association Rule Mining 2

xtras Teake Nutma Max-Planck-Institut für Gravitationsphysik (Albert Einstein Institut) Am Mühlenberg 1, Golm, Germany

secretsaremadetobefoundoutwithtime UGETGVUCTGOCFGVQDGHQWPFQWVYKVJVKOG Breaking the Code

arxiv: v1 [math-ph] 18 May 2017

Noncommutative Schur P -functions and the shifted plactic monoid

ALGEBRAS, DIALGEBRAS, AND POLYNOMIAL IDENTITIES. Murray R. Bremner

arxiv: v1 [physics.chem-ph] 1 May 2018

Data Mining Concepts & Techniques

Some Structural Properties of AG-Groups

GROUP THEORY BY THE SPMPS 2013 GROUP THEORY CLASS

Abstract Algebra Homework 6: 1, 2, 9.5, 9.6, 9.7

DATA MINING - 1DL360

Root-Patterns to Algebrising Partitions

MATH 1823 Honors Calculus I Permutations, Selections, the Binomial Theorem

12 th Marcel Grossman Meeting Paris, 17 th July 2009

Stat 198 for 134 Instructor: Mike Leong

Citation Osaka Journal of Mathematics. 43(2)

GRE Subject test preparation Spring 2016 Topic: Abstract Algebra, Linear Algebra, Number Theory.

DATA MINING LECTURE 3. Frequent Itemsets Association Rules

arxiv: v1 [q-bio.pe] 27 Oct 2011

DATA MINING - 1DL360

Combinatorics for algebraic geometers

An Algorithm to Simplify Tensor Expressions

Lecture Notes for Chapter 6. Introduction to Data Mining

COMP 5331: Knowledge Discovery and Data Mining

Reference Material /Formulas for Pre-Calculus CP/ H Summer Packet

Dragan Mašulović. Introduction to Discrete Mathematics

REPRESENTATIONS OF S n AND GL(n, C)

Littlewood Richardson polynomials

(1.1) In particular, ψ( q 1, m 1 ; ; q N, m N ) 2 is the probability to find the first particle

Modern Geometric Structures and Fields

SageManifolds. A free tool for differential geometry and tensor calculus

Planck blackbody function

ENTRY GROUP THEORY. [ENTRY GROUP THEORY] Authors: started Mark Lezama: October 2003 Literature: Algebra by Michael Artin, Mathworld.

Foundations of tensor algebra and analysis (composed by Dr.-Ing. Olaf Kintzel, September 2007, reviewed June 2011.) Web-site:

The Littlewood-Richardson Rule

Math 343 Midterm I Fall 2006 sections 002 and 003 Instructor: Scott Glasgow

MATH 433 Applied Algebra Lecture 22: Review for Exam 2.

CBPF-NF-016/98 1. R. Portugal 1. Abstract. The problem of simplifying tensor expressions is addressed in two parts. The rst part presents

Multiplicity-Free Products of Schur Functions

General tensors. Three definitions of the term V V. q times. A j 1...j p. k 1...k q

b c a Permutations of Group elements are the basis of the regular representation of any Group. E C C C C E C E C E C C C E C C C E

(Ref: Schensted Part II) If we have an arbitrary tensor with k indices W i 1,,i k. we can act on it 1 2 k with a permutation P = = w ia,i b,,i l

Identities for the Associator in Alternative Algebras

Matrix Approach to Petrov Classification

14 Higher order forms; divergence theorem

Symmetries in Physics

Part III Symmetries, Fields and Particles

Note that a unit is unique: 1 = 11 = 1. Examples: Nonnegative integers under addition; all integers under multiplication.

Association Rules Information Retrieval and Data Mining. Prof. Matteo Matteucci

7 Curvature of a connection

Conservation of energy and Gauss Bonnet gravity

MATH 106 LINEAR ALGEBRA LECTURE NOTES

Symmetries, Groups, and Conservation Laws

Coxeter-Knuth Classes and a Signed Little Bijection

1 The distributive law

Invariant differential operators and the Karlhede classification of type N vacuum solutions

ALGORITHMS FOR COMPUTING QUARTIC GALOIS GROUPS OVER FIELDS OF CHARACTERISTIC 0

Introduction to Data Mining, 2 nd Edition by Tan, Steinbach, Karpatne, Kumar

Lorentz transformation

Chapter Summary. Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations on Functions Computability

Self Organization and Coordination

REPRESENTATION THEORY OF THE SYMMETRIC GROUP (FOLLOWING [Ful97])

Resonance in orbits of plane partitions and increasing tableaux. Jessica Striker North Dakota State University

MATH 3030, Abstract Algebra FALL 2012 Toby Kenney Midyear Examination Friday 7th December: 7:00-10:00 PM

The Einstein field equations

Week 6: Differential geometry I

Cylindric Young Tableaux and their Properties

How to recognize a conformally Kähler metric

Basic Algorithms for Permutation Groups

Algorithms for Permutation groups

Spherical varieties and arc spaces

On the singular elements of a semisimple Lie algebra and the generalized Amitsur-Levitski Theorem

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

Permutations and Polynomials Sarah Kitchen February 7, 2006

MTH 411 Lecture Notes Based on Hungerford, Abstract Algebra

Coxeter-Knuth Graphs and a signed Little Bijection

REPRESENTATION THEORY WEEK 5. B : V V k

Computational Statistics and Data Analysis. Mixtures of weighted distance-based models for ranking data with applications in political studies

Representation Theory

Transcription:

Mathematics for large scale tensor computations José M. Martín-García Institut d Astrophysique de Paris, Laboratoire Universe et Théories Meudon, October 2, 2009

What we consider Tensors in a single vector space V (general. to several spaces). Use indexed notations. Numeric component indices (general. to several frames). Einstein convention for contractions. T b 1b 1a There is a single invertible metric g ab, symmetric or antisymmetric (spinor calculus). Indices can always be raised and lowered. Beware of non-compatible derivatives: g ab c v b c v a, g ab ( v) bc = ( v) a c Tensors have symmetries. Most general expression we consider: an arbitrary polynomial in any number of tensors, with homogeneous free indices. + F abc T bd T c d 7F ef f T ad u e v d +

What we consider Tensors in a single vector space V (general. to several spaces). Use indexed notations. Numeric component indices (general. to several frames). Einstein convention for contractions. T b 1b 1a There is a single invertible metric g ab, symmetric or antisymmetric (spinor calculus). Indices can always be raised and lowered. Beware of non-compatible derivatives: g ab c v b c v a, g ab ( v) bc = ( v) a c Tensors have symmetries. Most general expression we consider: an arbitrary polynomial in any number of tensors, with homogeneous free indices. + F abc T bd T c d 7F ef f T ad u e v d +

What we consider Tensors in a single vector space V (general. to several spaces). Use indexed notations. Numeric component indices (general. to several frames). Einstein convention for contractions. T b 1b 1a There is a single invertible metric g ab, symmetric or antisymmetric (spinor calculus). Indices can always be raised and lowered. Beware of non-compatible derivatives: g ab c v b c v a, g ab ( v) bc = ( v) a c Tensors have symmetries. Most general expression we consider: an arbitrary polynomial in any number of tensors, with homogeneous free indices. + F abc T bd T c d 7F ef f T ad u e v d +

What we consider Tensors in a single vector space V (general. to several spaces). Use indexed notations. Numeric component indices (general. to several frames). Einstein convention for contractions. T b 1b 1a There is a single invertible metric g ab, symmetric or antisymmetric (spinor calculus). Indices can always be raised and lowered. Beware of non-compatible derivatives: g ab c v b c v a, g ab ( v) bc = ( v) a c Tensors have symmetries. Most general expression we consider: an arbitrary polynomial in any number of tensors, with homogeneous free indices. + F abc T bd T c d 7F ef f T ad u e v d +

What we consider Tensors in a single vector space V (general. to several spaces). Use indexed notations. Numeric component indices (general. to several frames). Einstein convention for contractions. T b 1b 1a There is a single invertible metric g ab, symmetric or antisymmetric (spinor calculus). Indices can always be raised and lowered. Beware of non-compatible derivatives: g ab c v b c v a, g ab ( v) bc = ( v) a c Tensors have symmetries. Most general expression we consider: an arbitrary polynomial in any number of tensors, with homogeneous free indices. + F abc T bd T c d 7F ef f T ad u e v d +

What we consider Tensors in a single vector space V (general. to several spaces). Use indexed notations. Numeric component indices (general. to several frames). Einstein convention for contractions. T b 1b 1a There is a single invertible metric g ab, symmetric or antisymmetric (spinor calculus). Indices can always be raised and lowered. Beware of non-compatible derivatives: g ab c v b c v a, g ab ( v) bc = ( v) a c Tensors have symmetries. Most general expression we consider: an arbitrary polynomial in any number of tensors, with homogeneous free indices. + F abc T bd T c d 7F ef f T ad u e v d +

Tensor canonicalization 0. Key question in computer algebra: How do we know whether two tensor expressions are equal? Convert expressions into a canonical form and then compare. 1. Simplification: F antisym(1 2) (F abc u a + F b d c u d )v b 1) Expand all parenthesis F abc u a v b + F b d c u d v b 2) Rename dummies p,q,... F pqc u p v q + F p q c u q v p 3) Canonicalize terms separately F pqc u p v q F pqc u p v q 4) Add equal terms 0 Need only canonicalization of tensor monomials.

Tensor canonicalization 0. Key question in computer algebra: How do we know whether two tensor expressions are equal? Convert expressions into a canonical form and then compare. 1. Simplification: F antisym(1 2) (F abc u a + F b d c u d )v b 1) Expand all parenthesis F abc u a v b + F b d c u d v b 2) Rename dummies p,q,... F pqc u p v q + F p q c u q v p 3) Canonicalize terms separately F pqc u p v q F pqc u p v q 4) Add equal terms 0 Need only canonicalization of tensor monomials.

Tensor canonicalization 0. Key question in computer algebra: How do we know whether two tensor expressions are equal? Convert expressions into a canonical form and then compare. 1. Simplification: F antisym(1 2) (F abc u a + F b d c u d )v b 1) Expand all parenthesis F abc u a v b + F b d c u d v b 2) Rename dummies p,q,... F pqc u p v q + F p q c u q v p 3) Canonicalize terms separately F pqc u p v q F pqc u p v q 4) Add equal terms 0 Need only canonicalization of tensor monomials.

2. Simplification: Reorder tensors in a monomial using names and ranks; form an equivalent tensor with inherited properties. T ad F abc T be FTT abc adbe antisym(1 2), sym(4 6,5 7). Anticommuting objects? Need only canonicalization of single tensors. 3. Tensor properties ( symmetries ): Slot-syms: relations among slots, independently of indices. Index-syms: relations among indices, independently of slots. Contractions, metric and components Dimension-dependent identities.

2. Simplification: Reorder tensors in a monomial using names and ranks; form an equivalent tensor with inherited properties. T ad F abc T be FTT abc adbe antisym(1 2), sym(4 6,5 7). Anticommuting objects? Need only canonicalization of single tensors. 3. Tensor properties ( symmetries ): Slot-syms: relations among slots, independently of indices. Index-syms: relations among indices, independently of slots. Contractions, metric and components Dimension-dependent identities.

2. Simplification: Reorder tensors in a monomial using names and ranks; form an equivalent tensor with inherited properties. T ad F abc T be FTT abc adbe antisym(1 2), sym(4 6,5 7). Anticommuting objects? Need only canonicalization of single tensors. 3. Tensor properties ( symmetries ): Slot-syms: relations among slots, independently of indices. Index-syms: relations among indices, independently of slots. Contractions, metric and components Dimension-dependent identities.

4. Two types of slot-symmetries: Permutation (or monoterm) symmetries: R bacd = R abcd R cdba = R abcd Need permutation group theory. Multiterm symmetries: R abcd + R acdb + R adbc = 0 Need permutation group algebra. 5. Canonical ordering of indices: First symbolic free indices, alphabetically. Then symbolic dummy pairs, alphabetically. Up-indices first. Then component indices, numerically. Up-indices first. Example: T a1d b 2b 1ac3 [c, d, a, a, b, b, 1, 1, 2, 3] Rough idea: Approach this as much as possible, unless 0.

4. Two types of slot-symmetries: Permutation (or monoterm) symmetries: R bacd = R abcd R cdba = R abcd Need permutation group theory. Multiterm symmetries: R abcd + R acdb + R adbc = 0 Need permutation group algebra. 5. Canonical ordering of indices: First symbolic free indices, alphabetically. Then symbolic dummy pairs, alphabetically. Up-indices first. Then component indices, numerically. Up-indices first. Example: T a1d b 2b 1ac3 [c, d, a, a, b, b, 1, 1, 2, 3] Rough idea: Approach this as much as possible, unless 0.

4. Two types of slot-symmetries: Permutation (or monoterm) symmetries: R bacd = R abcd R cdba = R abcd Need permutation group theory. Multiterm symmetries: R abcd + R acdb + R adbc = 0 Need permutation group algebra. 5. Canonical ordering of indices: First symbolic free indices, alphabetically. Then symbolic dummy pairs, alphabetically. Up-indices first. Then component indices, numerically. Up-indices first. Example: T a1d b 2b 1ac3 [c, d, a, a, b, b, 1, 1, 2, 3] Rough idea: Approach this as much as possible, unless 0.

4. Two types of slot-symmetries: Permutation (or monoterm) symmetries: R bacd = R abcd R cdba = R abcd Need permutation group theory. Multiterm symmetries: R abcd + R acdb + R adbc = 0 Need permutation group algebra. 5. Canonical ordering of indices: First symbolic free indices, alphabetically. Then symbolic dummy pairs, alphabetically. Up-indices first. Then component indices, numerically. Up-indices first. Example: T a1d b 2b 1ac3 [c, d, a, a, b, b, 1, 1, 2, 3] Rough idea: Approach this as much as possible, unless 0.

Permutation Symmetries

Permutation slot-symmetries Riemann tensor R abcd. Three equivalence classes: R abcd = R bacd = R abdc = R badc = R cdab = R dcab = R cdba = R dcba R acbd = R cabd = R acdb = R cadb = R bdac = R dbac = R bdca = R dbca R adbc = R dabc = R adcb = R dacb = R bcad = R cbad = R bcda = R cbda Symmetry group S of order 8 of permutations of slots: (1234), (2134), (1243), (2143), (3412), (4312), (3421), (4321) and two left cosets gs, with g=(1324) or g=(1423). Canonical representatives (choose a permutation ordering) (1234), (1324), (1423) Algorithm: given T with slot-symmetry S and a configuration g find the canonical representative of the left coset gs.

Permutation slot-symmetries Riemann tensor R abcd. Three equivalence classes: R abcd = R bacd = R abdc = R badc = R cdab = R dcab = R cdba = R dcba R acbd = R cabd = R acdb = R cadb = R bdac = R dbac = R bdca = R dbca R adbc = R dabc = R adcb = R dacb = R bcad = R cbad = R bcda = R cbda Symmetry group S of order 8 of permutations of slots: (1234), (2134), (1243), (2143), (3412), (4312), (3421), (4321) and two left cosets gs, with g=(1324) or g=(1423). Canonical representatives (choose a permutation ordering) (1234), (1324), (1423) Algorithm: given T with slot-symmetry S and a configuration g find the canonical representative of the left coset gs.

Permutation slot-symmetries Riemann tensor R abcd. Three equivalence classes: R abcd = R bacd = R abdc = R badc = R cdab = R dcab = R cdba = R dcba R acbd = R cabd = R acdb = R cadb = R bdac = R dbac = R bdca = R dbca R adbc = R dabc = R adcb = R dacb = R bcad = R cbad = R bcda = R cbda Symmetry group S of order 8 of permutations of slots: (1234), (2134), (1243), (2143), (3412), (4312), (3421), (4321) and two left cosets gs, with g=(1324) or g=(1423). Canonical representatives (choose a permutation ordering) (1234), (1324), (1423) Algorithm: given T with slot-symmetry S and a configuration g find the canonical representative of the left coset gs.

Index-symmetries Tensor T abcd with no slot-symmetries. T a a b ab b = T a b = T a ab b a = T b a b = T b b a ba a = T b a = T b ba a b a = T b a New group D of permutations of indices (in canonical order). We need (start from [a,a,b,b]): Exchange dummies: (3412) Swap metric (2134) and (1243). Add sign with spinors Symmetry under exchange of repeated components T 111 D = S 3 These three groups do not intersect and always commute.

Index-symmetries Tensor T abcd with no slot-symmetries. T a a b ab b = T a b = T a ab b a = T b a b = T b b a ba a = T b a = T b ba a b a = T b a New group D of permutations of indices (in canonical order). We need (start from [a,a,b,b]): Exchange dummies: (3412) Swap metric (2134) and (1243). Add sign with spinors Symmetry under exchange of repeated components T 111 D = S 3 These three groups do not intersect and always commute.

Both together A tensor configuration R ab ba will be given by g = (1342): [a,a,b,b] g [a,b,b,a] being equivalent to the double coset DgS: [a,a,b,b] d [a,a,b,b] g [a,b,b,a] s [a,b,a,b] Algorithm: given T with slot-symmetry S and index-symmetry D, and a configuration g, find the representative of the double coset DgS. If there is p such that p, p DgS, then rep=0.

Both together A tensor configuration R ab ba will be given by g = (1342): [a,a,b,b] g [a,b,b,a] being equivalent to the double coset DgS: [a,a,b,b] d [a,a,b,b] g [a,b,b,a] s [a,b,a,b] Algorithm: given T with slot-symmetry S and index-symmetry D, and a configuration g, find the representative of the double coset DgS. If there is p such that p, p DgS, then rep=0.

Example 1 R Riemann and T symmetric. Canonical index order: [a,d,e,g, b,b,c,c,f,f ] b c R a b c d R e f T f g

Example 1 R Riemann and T symmetric. Canonical index order: [a,d,e,g, b,b,c,c,f,f ] b c R a b c d R e f T f g

Example 1 R Riemann and T symmetric. Canonical index order: [a,d,e,g, b,b,c,c,f,f ] b c R a b c d R e f T f g

Example 1 R Riemann and T symmetric. Canonical index order: [a,d,e,g, b,b,c,c,f,f ] b c R a b c d R e f T f g

Example 1 R Riemann and T symmetric. Canonical index order: [a,d,e,g, b,b,c,c,f,f ] b c R a b c d R e f T f g

Example 1 R Riemann and T symmetric. Canonical index order: [a,d,e,g, b,b,c,c,f,f ] b c R a b c d R e f T f g

Example 1 R Riemann and T symmetric. Canonical index order: [a,d,e,g, b,b,c,c,f,f ] b c R a b c d R e f T R b c f a d R e b c T f g g f

Example 2 Antisymmetric tensor F ba = F ab. F ab F b c symmetric F a bf b c... n F h a = 0 if number n of tensors is odd. Timings (in seconds)

Example 2 Antisymmetric tensor F ba = F ab. F ab F b c symmetric F a bf b c... n F h a = 0 if number n of tensors is odd. Timings (in seconds) n D, S MathTensor xact 1 2 0 0 3 48 0.01 0.01 5 3840 0.02 0.03 100000 Day 7 645120 1.12 0.05 10000 9 185794560 350 0.07 1000 Hour 11 8.2 10 10 100 107745 0.09 Minute 19 6.4 10 22? 0.28 10 29 4.7 10 39? 0.94 1 Second 39 1.1 10 58 0.1? 2.7 49 3.4 10 77 0.01? 6.5 59 8.0 10 97? 13.7 0.001 10 20 30 40 50

Example 3 Random Riemann scalar monomials. Example R 7 : c R bjdk R n el R hg ia R k g de R l f j c R maf h R n m ib Takes 19596s in MathTensor, and 0.031s in xtensor. 1000 100 Minute 1000 100 timings in seconds 10 1 0.1 0.01 0.001 o o o o o o o o ooo o oo oo o o o ooo Second 0 10 20 30 40 50 number of Riemann tensors 10 1 0.1 0.01 0.001

A million random Riemann scalar monomials R 10. Timings histogram: 15 000 CPU 1.7 GHz bin: 0.0001 s 10 000 Zero: 424108 Nonzero: 575892 5000 0 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10 timings in seconds All but 7 below 1s, 6 in 1-2s, and 1 with 4.9s. Worst case: R a 1b 1a2 b 2 R a 2b 2a3 b 3 R anbn a 1 b 1

Working with permutation groups: strong generators Describe a group G through generators. S = {s 1,...,s m } generating set: G = S. Example: S n = {(2134... n),(234... n1)}. Difficult to extract information from S. Direct algorithms are exponential in n. Better idea: use strong generators (Sims 1960 s). Take a group G acting on the points Ω = {1,...,n}. We need three definitions: Orbit p G of a point p: {p g, g G}. Ω partitioned into disjoing orbits. Stabilizer Gp of a point p: {g G, p g = p} subgroup of G. G partitioned into disjoint cosets of G p. Base of G: B = [b1,..., b k ], none of the permutations of G fixes all points of B. That is, G b1...b k = {id}. Examples: for S n we need n 1 points in the base. For the slot-symmetries of Riemann [1, 3] is a base, but [1, 2] is not.

Working with permutation groups: strong generators Describe a group G through generators. S = {s 1,...,s m } generating set: G = S. Example: S n = {(2134... n),(234... n1)}. Difficult to extract information from S. Direct algorithms are exponential in n. Better idea: use strong generators (Sims 1960 s). Take a group G acting on the points Ω = {1,...,n}. We need three definitions: Orbit p G of a point p: {p g, g G}. Ω partitioned into disjoing orbits. Stabilizer Gp of a point p: {g G, p g = p} subgroup of G. G partitioned into disjoint cosets of G p. Base of G: B = [b1,..., b k ], none of the permutations of G fixes all points of B. That is, G b1...b k = {id}. Examples: for S n we need n 1 points in the base. For the slot-symmetries of Riemann [1, 3] is a base, but [1, 2] is not.

Working with permutation groups: strong generators Describe a group G through generators. S = {s 1,...,s m } generating set: G = S. Example: S n = {(2134... n),(234... n1)}. Difficult to extract information from S. Direct algorithms are exponential in n. Better idea: use strong generators (Sims 1960 s). Take a group G acting on the points Ω = {1,...,n}. We need three definitions: Orbit p G of a point p: {p g, g G}. Ω partitioned into disjoing orbits. Stabilizer Gp of a point p: {g G, p g = p} subgroup of G. G partitioned into disjoint cosets of G p. Base of G: B = [b1,..., b k ], none of the permutations of G fixes all points of B. That is, G b1...b k = {id}. Examples: for S n we need n 1 points in the base. For the slot-symmetries of Riemann [1, 3] is a base, but [1, 2] is not.

Working with permutation groups: strong generators Describe a group G through generators. S = {s 1,...,s m } generating set: G = S. Example: S n = {(2134... n),(234... n1)}. Difficult to extract information from S. Direct algorithms are exponential in n. Better idea: use strong generators (Sims 1960 s). Take a group G acting on the points Ω = {1,...,n}. We need three definitions: Orbit p G of a point p: {p g, g G}. Ω partitioned into disjoing orbits. Stabilizer Gp of a point p: {g G, p g = p} subgroup of G. G partitioned into disjoint cosets of G p. Base of G: B = [b1,..., b k ], none of the permutations of G fixes all points of B. That is, G b1...b k = {id}. Examples: for S n we need n 1 points in the base. For the slot-symmetries of Riemann [1, 3] is a base, but [1, 2] is not.

Working with permutation groups: strong generators Describe a group G through generators. S = {s 1,...,s m } generating set: G = S. Example: S n = {(2134... n),(234... n1)}. Difficult to extract information from S. Direct algorithms are exponential in n. Better idea: use strong generators (Sims 1960 s). Take a group G acting on the points Ω = {1,...,n}. We need three definitions: Orbit p G of a point p: {p g, g G}. Ω partitioned into disjoing orbits. Stabilizer Gp of a point p: {g G, p g = p} subgroup of G. G partitioned into disjoint cosets of G p. Base of G: B = [b1,..., b k ], none of the permutations of G fixes all points of B. That is, G b1...b k = {id}. Examples: for S n we need n 1 points in the base. For the slot-symmetries of Riemann [1, 3] is a base, but [1, 2] is not.

Key observation 1: bijection between the orbit p G and the set of cosets G/G p. Proof: 1) g G p p g = p 2) h G p h g G p,h = g h p h = p g h = p h 3) p h = p h p = p h h 1 h h 1 G p,same coset In particular G = G p p G Key observation 2: Base images identify permutations: [b g 1,...,bg k ] = [bg 1,...,bg k ] g = g Otherwise g g 1 would fix all points of B. We want to work in the hierarchy of stabilizers G > G b1 > G b1 b 2 > > G b1...b k = id

Key observation 1: bijection between the orbit p G and the set of cosets G/G p. Proof: 1) g G p p g = p 2) h G p h g G p,h = g h p h = p g h = p h 3) p h = p h p = p h h 1 h h 1 G p,same coset In particular G = G p p G Key observation 2: Base images identify permutations: [b g 1,...,bg k ] = [bg 1,...,bg k ] g = g Otherwise g g 1 would fix all points of B. We want to work in the hierarchy of stabilizers G > G b1 > G b1 b 2 > > G b1...b k = id

Do we already have generators for the stabilizers? In general, no. Example: However, G = S 3 = {(213),(231)} with base B = [1,2] G 1 = {(132)} G 12 = {id} G = S 3 = {(213),(231)} with base B = [3,2] G 3 = {(213)} G 32 = {id} Definition: S = {s 1,...,s m } is a strong generating set of G relative to the base B = [b 1,...,b k ] if S contains generating sets for all the stabilizers G b1...b i, i = 1,...,k.

Do we already have generators for the stabilizers? In general, no. Example: However, G = S 3 = {(213),(231)} with base B = [1,2] G 1 = {(132)} G 12 = {id} G = S 3 = {(213),(231)} with base B = [3,2] G 3 = {(213)} G 32 = {id} Definition: S = {s 1,...,s m } is a strong generating set of G relative to the base B = [b 1,...,b k ] if S contains generating sets for all the stabilizers G b1...b i, i = 1,...,k.

Do we already have generators for the stabilizers? In general, no. Example: However, G = S 3 = {(213),(231)} with base B = [1,2] G 1 = {(132)} G 12 = {id} G = S 3 = {(213),(231)} with base B = [3,2] G 3 = {(213)} G 32 = {id} Definition: S = {s 1,...,s m } is a strong generating set of G relative to the base B = [b 1,...,b k ] if S contains generating sets for all the stabilizers G b1...b i, i = 1,...,k.

The Schreier-Sims algorithm constructs a strong-generating set from a generating set of G, for a freely specifiable base. Sims 1970: O(n 6 ) Knuth 1991: O(n 5 ) Today: Deterministic: O(n 2 log 3 G ) Randomized: O(n log n log 4 G ) Things which can be computed in polynomial time: Group order and membership. Coset enumeration and representatives. Things which cannot be computed in polynomial time: Intersection of groups. Double coset enumeration and representatives. General strategy: backtrack search, usually quite fast, but exponential in the worst case.

The Schreier-Sims algorithm constructs a strong-generating set from a generating set of G, for a freely specifiable base. Sims 1970: O(n 6 ) Knuth 1991: O(n 5 ) Today: Deterministic: O(n 2 log 3 G ) Randomized: O(n log n log 4 G ) Things which can be computed in polynomial time: Group order and membership. Coset enumeration and representatives. Things which cannot be computed in polynomial time: Intersection of groups. Double coset enumeration and representatives. General strategy: backtrack search, usually quite fast, but exponential in the worst case.

The Schreier-Sims algorithm constructs a strong-generating set from a generating set of G, for a freely specifiable base. Sims 1970: O(n 6 ) Knuth 1991: O(n 5 ) Today: Deterministic: O(n 2 log 3 G ) Randomized: O(n log n log 4 G ) Things which can be computed in polynomial time: Group order and membership. Coset enumeration and representatives. Things which cannot be computed in polynomial time: Intersection of groups. Double coset enumeration and representatives. General strategy: backtrack search, usually quite fast, but exponential in the worst case.

The Schreier-Sims algorithm constructs a strong-generating set from a generating set of G, for a freely specifiable base. Sims 1970: O(n 6 ) Knuth 1991: O(n 5 ) Today: Deterministic: O(n 2 log 3 G ) Randomized: O(n log n log 4 G ) Things which can be computed in polynomial time: Group order and membership. Coset enumeration and representatives. Things which cannot be computed in polynomial time: Intersection of groups. Double coset enumeration and representatives. General strategy: backtrack search, usually quite fast, but exponential in the worst case.

Back to tensors Canonicalization of tensor expressions with permutation symmetries entails finding double coset representatives. Permutation groups can be efficiently manipulated using strong generating sets. Butler 1984: Use of backtrack search with SGS to find double coset representatives of any two subgroups. Portugal 2001: Tensorial case: general S but special D. Implementations (both GPL free software): Portugal 2003: Maple JMM-G 2003: Mathematica and C ( 100 times faster) Solves the general case of permutation symmetries, with timings of seconds up to 100 indices (minutes in worst cases).

Back to tensors Canonicalization of tensor expressions with permutation symmetries entails finding double coset representatives. Permutation groups can be efficiently manipulated using strong generating sets. Butler 1984: Use of backtrack search with SGS to find double coset representatives of any two subgroups. Portugal 2001: Tensorial case: general S but special D. Implementations (both GPL free software): Portugal 2003: Maple JMM-G 2003: Mathematica and C ( 100 times faster) Solves the general case of permutation symmetries, with timings of seconds up to 100 indices (minutes in worst cases).

Back to tensors Canonicalization of tensor expressions with permutation symmetries entails finding double coset representatives. Permutation groups can be efficiently manipulated using strong generating sets. Butler 1984: Use of backtrack search with SGS to find double coset representatives of any two subgroups. Portugal 2001: Tensorial case: general S but special D. Implementations (both GPL free software): Portugal 2003: Maple JMM-G 2003: Mathematica and C ( 100 times faster) Solves the general case of permutation symmetries, with timings of seconds up to 100 indices (minutes in worst cases).

Back to tensors Canonicalization of tensor expressions with permutation symmetries entails finding double coset representatives. Permutation groups can be efficiently manipulated using strong generating sets. Butler 1984: Use of backtrack search with SGS to find double coset representatives of any two subgroups. Portugal 2001: Tensorial case: general S but special D. Implementations (both GPL free software): Portugal 2003: Maple JMM-G 2003: Mathematica and C ( 100 times faster) Solves the general case of permutation symmetries, with timings of seconds up to 100 indices (minutes in worst cases).

Multiterm Symmetries In particular, where is the dimension of the vector space?

Sources of multiterm symmetries Intrinsic cyclic symmetries: R abcd + R acdb + R adbc = 0 The Bianchi identity: a R bcde + b R cade + c R abde = 0 The Ricci identity (more general concept of symmetry): a b v c = b a v c + R c abd v d Crystallographic symmetries Dimensionally-dependent identities

The Cayley-Hamilton theorem 1. A square n n matrix A satisfies its own characteristic equation: with p(x) := det(x I A) = x n + c 1 x n 1 + + c n 1 x + c n p(a) = 0 c 1 = tr(a) = A a a c 2 = 1 2 (tr(a)2 tr(a 2 )) = A [a aa b] b c 3 = = A [a aa b ba c] c The Cayley-Hamilton theorem is simply A [a 1 a1 A a 2 a2 A an a n δ a] b = 0

The Cayley-Hamilton theorem 1. A square n n matrix A satisfies its own characteristic equation: with p(x) := det(x I A) = x n + c 1 x n 1 + + c n 1 x + c n p(a) = 0 c 1 = tr(a) = A a a c 2 = 1 2 (tr(a)2 tr(a 2 )) = A [a aa b] b c 3 = = A [a aa b ba c] c The Cayley-Hamilton theorem is simply A [a 1 a1 A a 2 a2 A an a n δ a] b = 0

2. This is a Lovelock-type (dimensionally-dependent) identity: A [a 1a 2 a 3b1 b 2 B a 4a 5b3 H ana n+1]a n+2bm = 0 3. Gover 1997: Lovelock identities exhaust all dim-dep tensor relations. 4. Obvious general algorithm ( brute force ): Take all possible canonical monomials appearing in a problem. Construct all possible linear multiterm relations among them. For instance, in dim 4, antisymmetrize over all subsets of 5 indices and perm-canonicalize again. Introduce an order for those canonical monomials. Solve for the largest canonical monomials in terms of the smaller monomials. Store all multiterm relations in a database. Sounds crazy but works if perm-canonicalization is fast enough, and for moderate dimension.

2. This is a Lovelock-type (dimensionally-dependent) identity: A [a 1a 2 a 3b1 b 2 B a 4a 5b3 H ana n+1]a n+2bm = 0 3. Gover 1997: Lovelock identities exhaust all dim-dep tensor relations. 4. Obvious general algorithm ( brute force ): Take all possible canonical monomials appearing in a problem. Construct all possible linear multiterm relations among them. For instance, in dim 4, antisymmetrize over all subsets of 5 indices and perm-canonicalize again. Introduce an order for those canonical monomials. Solve for the largest canonical monomials in terms of the smaller monomials. Store all multiterm relations in a database. Sounds crazy but works if perm-canonicalization is fast enough, and for moderate dimension.

2. This is a Lovelock-type (dimensionally-dependent) identity: A [a 1a 2 a 3b1 b 2 B a 4a 5b3 H ana n+1]a n+2bm = 0 3. Gover 1997: Lovelock identities exhaust all dim-dep tensor relations. 4. Obvious general algorithm ( brute force ): Take all possible canonical monomials appearing in a problem. Construct all possible linear multiterm relations among them. For instance, in dim 4, antisymmetrize over all subsets of 5 indices and perm-canonicalize again. Introduce an order for those canonical monomials. Solve for the largest canonical monomials in terms of the smaller monomials. Store all multiterm relations in a database. Sounds crazy but works if perm-canonicalization is fast enough, and for moderate dimension.

2. This is a Lovelock-type (dimensionally-dependent) identity: A [a 1a 2 a 3b1 b 2 B a 4a 5b3 H ana n+1]a n+2bm = 0 3. Gover 1997: Lovelock identities exhaust all dim-dep tensor relations. 4. Obvious general algorithm ( brute force ): Take all possible canonical monomials appearing in a problem. Construct all possible linear multiterm relations among them. For instance, in dim 4, antisymmetrize over all subsets of 5 indices and perm-canonicalize again. Introduce an order for those canonical monomials. Solve for the largest canonical monomials in terms of the smaller monomials. Store all multiterm relations in a database. Sounds crazy but works if perm-canonicalization is fast enough, and for moderate dimension.

Young tableaux Schur-Weyl duality. Tensor transformation under M GL(n): (MT) a1...a k = M a1 b i M ak b k T b1...b k Tensor transformation under p S k : (pt) a1...a k = T a 1...a k, a j = a j p Both (pmt) a1...a k = M a 1 b i M a k b k T b1...b k b = M a i b 1 M a k Tb k 1...b k b = M i b a1 M k ak (pt) b1...b k = (MpT) a1...a k Linear transformations and permutations commute on tensors!

That implies the existence of a common labelling of the representations of the groups GL(n) and S k. The labels are the integer partitions of k in at most n parts, representable as Young diagrams of k boxes with at most n rows. Example: 12=4+3+3+2 This is a possible irreducible symmetry for a rank-12 tensor in dimension 4 or larger. Other examples: Lanczos Riemann Riemann

That implies the existence of a common labelling of the representations of the groups GL(n) and S k. The labels are the integer partitions of k in at most n parts, representable as Young diagrams of k boxes with at most n rows. Example: 12=4+3+3+2 This is a possible irreducible symmetry for a rank-12 tensor in dimension 4 or larger. Other examples: Lanczos Riemann Riemann

Permutation symmetry in a tableau: columns are antisymmetries symmetry under exchange of columns of equal length Dimensions of S k representation: number of standard tableaux. Riemann: a c b d a b c d but not a b d c Dimensions of GL(n) representation: number of semistandard tableaux. Riemann in n = 4: 2 2 3 3 1 1 2 2 1 2 2 4 2 2 3 4 1 1 2 3 1 2 3 3 2 2 4 4 1 1 2 4 1 2 3 4 2 3 3 4 1 1 3 3 1 2 4 4 2 3 4 4 1 1 3 4 1 3 2 4 1 1 4 4 1 3 3 4 1 2 2 3 1 3 4 4 3 3 4 4 but not 1 2 4 3

Permutation symmetry in a tableau: columns are antisymmetries symmetry under exchange of columns of equal length Dimensions of S k representation: number of standard tableaux. Riemann: a c b d a b c d but not a b d c Dimensions of GL(n) representation: number of semistandard tableaux. Riemann in n = 4: 2 2 3 3 1 1 2 2 1 2 2 4 2 2 3 4 1 1 2 3 1 2 3 3 2 2 4 4 1 1 2 4 1 2 3 4 2 3 3 4 1 1 3 3 1 2 4 4 2 3 4 4 1 1 3 4 1 3 2 4 1 1 4 4 1 3 3 4 1 2 2 3 1 3 4 4 3 3 4 4 but not 1 2 4 3

Permutation symmetry in a tableau: columns are antisymmetries symmetry under exchange of columns of equal length Dimensions of S k representation: number of standard tableaux. Riemann: a c b d a b c d but not a b d c Dimensions of GL(n) representation: number of semistandard tableaux. Riemann in n = 4: 2 2 3 3 1 1 2 2 1 2 2 4 2 2 3 4 1 1 2 3 1 2 3 3 2 2 4 4 1 1 2 4 1 2 3 4 2 3 3 4 1 1 3 3 1 2 4 4 2 3 4 4 1 1 3 4 1 3 2 4 1 1 4 4 1 3 3 4 1 2 2 3 1 3 4 4 3 3 4 4 but not 1 2 4 3

Cyclic symmetry in a tableau: Garnir hooks. Riemann: two equivalent Garnir hooks: a c b d + a b d c Symmetry of a tensor product: a b c d = 0 For different tensors, use the Littlewood-Richardson rule = + + + For equal tensors, use plethysms ˆ = + + +

Cyclic symmetry in a tableau: Garnir hooks. Riemann: two equivalent Garnir hooks: a c b d + a b d c Symmetry of a tensor product: a b c d = 0 For different tensors, use the Littlewood-Richardson rule = + + + For equal tensors, use plethysms ˆ = + + +

Each standard tableau defines a projector. For Riemann: 12P = (1234) + (2134) (3214) (1432) +(1243) (4132) (2314) (3241) (1423) (4123) + (4312) + (3421) (2341) + (2143) + (3412) + (4321) with P 2 = P. Using permutations symmetries we get R abcd = (PR) abcd = 2 3 R abcd + 1 3 R acbd 1 3 R adbc Agacy 1998, Peeters 2005: replace R abcd by this expression, and use only permutation symmetries then. That implements all symmetries of Riemann!

Each standard tableau defines a projector. For Riemann: 12P = (1234) + (2134) (3214) (1432) +(1243) (4132) (2314) (3241) (1423) (4123) + (4312) + (3421) (2341) + (2143) + (3412) + (4321) with P 2 = P. Using permutations symmetries we get R abcd = (PR) abcd = 2 3 R abcd + 1 3 R acbd 1 3 R adbc Agacy 1998, Peeters 2005: replace R abcd by this expression, and use only permutation symmetries then. That implements all symmetries of Riemann!

Riemann invariants

History Algebraic inv R abcd R ab ef R cdef, or differential inv R ab c d R acbd. 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, R 2, W 2, R 3, W 3, R 2 W, W 4, R 4, R 2 W 2, W 5, R 2 W 3, R 4 W, R 4 W 2, R 4 W 3 ). Other invariants are (possibly nonpolynomial) functions of them. Completeness: polynomic basis for all invariants. Relations? Sneddon 1999: 38 a-invs (deg 11). Complete basis. (Rotor calculus.) Carminati-Lim 2007: graph-based construction of a-inv relations. Fulling et al 1992: bases for d-invs up to 10 derivatives and R 6.

History Algebraic inv R abcd R ab ef R cdef, or differential inv R ab c d R acbd. 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, R 2, W 2, R 3, W 3, R 2 W, W 4, R 4, R 2 W 2, W 5, R 2 W 3, R 4 W, R 4 W 2, R 4 W 3 ). Other invariants are (possibly nonpolynomial) functions of them. Completeness: polynomic basis for all invariants. Relations? Sneddon 1999: 38 a-invs (deg 11). Complete basis. (Rotor calculus.) Carminati-Lim 2007: graph-based construction of a-inv relations. Fulling et al 1992: bases for d-invs up to 10 derivatives and R 6.

History Algebraic inv R abcd R ab ef R cdef, or differential inv R ab c d R acbd. 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, R 2, W 2, R 3, W 3, R 2 W, W 4, R 4, R 2 W 2, W 5, R 2 W 3, R 4 W, R 4 W 2, R 4 W 3 ). Other invariants are (possibly nonpolynomial) functions of them. Completeness: polynomic basis for all invariants. Relations? Sneddon 1999: 38 a-invs (deg 11). Complete basis. (Rotor calculus.) Carminati-Lim 2007: graph-based construction of a-inv relations. Fulling et al 1992: bases for d-invs up to 10 derivatives and R 6.

History Algebraic inv R abcd R ab ef R cdef, or differential inv R ab c d R acbd. 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, R 2, W 2, R 3, W 3, R 2 W, W 4, R 4, R 2 W 2, W 5, R 2 W 3, R 4 W, R 4 W 2, R 4 W 3 ). Other invariants are (possibly nonpolynomial) functions of them. Completeness: polynomic basis for all invariants. Relations? Sneddon 1999: 38 a-invs (deg 11). Complete basis. (Rotor calculus.) Carminati-Lim 2007: graph-based construction of a-inv relations. Fulling et al 1992: bases for d-invs up to 10 derivatives and R 6.

Riemann invariants up to degree 7 7 Riemann 28 indices 28! 3.0 10 29 a-invs Use monoterm symmetries: 16352 invariants Use cyclic property: 1639 invariants Antisymmetrise over sets of 5 indices in 4d: 4311 integer equations

Riemann invariants up to degree 7 7 Riemann 28 indices 28! 3.0 10 29 a-invs Use monoterm symmetries: 16352 invariants 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:

Riemann invariants up to degree 7 7 Riemann 28 indices 28! 3.0 10 29 a-invs Use monoterm symmetries: 16352 invariants 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: 41284320888114626312105608472587963577277605659619553121090337199745221229120263938390479190798331362 9332658685142520797678355583630907136564045657358541395134420154091637344181884734088835920651682654 5838550350981924166243854816386358011913196352080821446913112544207777945582431400973483457511551249 4271650405780114863779964319571108875740447236120954785394441817343113274871351581501474081446209153 5133993980627211654318697002059693685910102607365896788999230680327719504392651078493689021476459822 1917466623055176060658271638645490139036389024466375930303586688550738508615214422459534528028026604 3392962118745453989341765134526682155897073108863212658336777829476719031970391332987380834358579837 4768508365933468022268161668651405869982994847652173877241170117828300225631267244981449350418876807 8308059566617955048754211100127225300485494079978006577938025856377710049543176142178387315401497328 Required 8Gb RAM and 384-bytes integers (BigNum: GMP).

Riemann invariants up to degree 7 7 Riemann 28 indices 28! 3.0 10 29 a-invs Use monoterm symmetries: 16352 invariants 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: 41284320888114626312105608472587963577277605659619553121090337199745221229120263938390479190798331362 9332658685142520797678355583630907136564045657358541395134420154091637344181884734088835920651682654 5838550350981924166243854816386358011913196352080821446913112544207777945582431400973483457511551249 4271650405780114863779964319571108875740447236120954785394441817343113274871351581501474081446209153 5133993980627211654318697002059693685910102607365896788999230680327719504392651078493689021476459822 1917466623055176060658271638645490139036389024466375930303586688550738508615214422459534528028026604 3392962118745453989341765134526682155897073108863212658336777829476719031970391332987380834358579837 4768508365933468022268161668651405869982994847652173877241170117828300225631267244981449350418876807 8308059566617955048754211100127225300485494079978006577938025856377710049543176142178387315401497328 Required 8Gb RAM and 384-bytes integers (BigNum: GMP). We get the 27 invs of Sneddon s basis up to degree 7 (6 dual), plus all polynomial expression of any other invariant. Invar package: CPC 2007. Database of 645625 relations up to 12 metric derivatives. CPC 2008.

Results for algebraic Riemann invariants Degree A A B B C C D D 1 1 1 1 0 1 0 1 0 2 3 4 2 1 2 1 2 1 3 9 27 5 6 3 2 3 2 4 38 232 15 40 4 1 3 1 5 204 2582 54 330 5 2 3 2 6 1613 35090 270 3159 8 2 4 2 7 16532 558323 1639 7 (1) 3 (1) 8 217395 13140 (9) (1) (2) (1) 9 3406747 (11) (1) (3) (1) 10 (9) (1) (1) (1) 11 (9) (0) (1) (0) 12 (9) (0) (0) (0) A: Permutation symmetries, B: Cyclic symmetry, C: Dim-dep identities, D: Products of duals ( ).

Conclusions 1. We have a fast algorithm for canonicalization under permutation symmetries, both of slot and index type. Based on the use of strong generating sets. 2. It is possible to use brute force to implement multiterm symmetries, in particular Lovelock identities, for moderate cases. We have shown the example of Riemann invariants. 3. It is possible to use Young tableaux to work with irreducible multiterm symmetries. Algorithm not complete, though.