# Manual pages

Every algorithm and every property has a manual page with examples,
which you can view online, or by pressing `F1`

in the
Cadabra notebook interface.

For a description of the basics of Cadabra, you may be better off first reading or skimming through the reference guide.

## Packages

Cadabra comes with various add-on packages, which can be imported in
the usual Python way with `import`

. Their content is
listed below.

### cdb.core.component

Simple access to component expressions

get_component | Extract a single component from an expression. | ||

remove_zero_components | Remove all components of an expression that are equal to zero. |

### cdb.core.manip

Manipulating equations, inequalities and similar expressions

eq_to_subrule | Create substitution rule from an equation. | ||

multiply_through | Multiply all terms by the same factor. | ||

get_lhs | Return left-hand side of an expression | ||

get_rhs | Return right-hand side of an expression | ||

swap_sides | Swap the left and right-hand sides of an expression. | ||

get_factor | Get all multiplicative factors of term in node | ||

to_rhs | Move the indicated term of the expression to the right-hand side. | ||

to_lhs | Move the indicated term of the expression to the left-hand side. | ||

isolate | Isolates a term on the left hand side of an equation or inequality |

### cdb.relativity.abstract

Core general relativity package, mainly a library of various standard expressions.

riemann_from_christoffel | Generates an equality which determines the Riemann tensor in terms of the Christoffel symbols. | ||

christoffel_from_metric | Generates an equality which determines the Christoffel symbols in terms of the metric. | ||

riemann_to_ricci | Convert contractions of Riemann tensors to Ricci tensors or scalars. |

### cdb.sympy.solvers

Access to Sympy solver functions.

dsolve | Solve a single ordinary differential equation. | ||

linsolve | Solve a linear system for unknowns. | ||

nonlinsolve | Solve a system of non-linear equations. |

## Core algorithms

A | asym | Anti-symmetrise or symmetrise an expression in indicated indices or arguments | |

C | canonicalise | Bring a tensorial expression to canonical form by re-ordering indices. | |

collect_factors | Collect identical factors in a product. | ||

collect_terms | Collect identical terms in a sum. | ||

combine | Combine two consecutive indexbracket objects | ||

complete | Complete a set of substitution rules to cover related objects. | ||

D | decompose | Decompose a tensor monomial on a given basis of monomials. | |

decompose_product | Decompose a product of tensors by using Young projectors. | ||

distribute | Distribute factors over sums. | ||

drop_weight | Drop terms with given weight | ||

E | einsteinify | Raise or lower indices of pairs which are both upper or lower. | |

eliminate_kronecker | Eliminate Kronecker delta symbols. | ||

eliminate_metric | Eliminate metrics by raising or lowering indices. | ||

eliminate_vielbein | Eliminates vielbein objects. | ||

epsilon_to_delta | Replace a product of two epsilon tensors with a generalised delta | ||

evaluate | Evaluate components of a tensor expression. | ||

expand | Write out products of objects with implicit indices. | ||

expand_delta | Expand generalised Kronecker delta symbols | ||

expand_diracbar | Simplify the Dirac bar of a composite object. | ||

expand_power | Expand powers into repeated products | ||

explicit_indices | Make indices explicit on an expression with implicit indices. | ||

F | factor_in | Collect terms in a sum that differ only by given pre-factors. | |

factor_out | Isolate common factors in a sum of products | ||

fierz | Perform a Fierz transformation on a product of four spinors | ||

I | integrate_by_parts | Integrate by parts away from the indicated expression | |

J | join_gamma | Work out the product of two generalised Dirac gamma matrices. | |

K | keep_weight | Keep terms with indicated weight | |

L | lower_free_indices | Make all free indices in an expression subscripts. | |

lr_tensor | Compute the tensor project of two Young tableaux | ||

M | map_sympy | Map Sympy algorithms to Cadabra expressions | |

P | product_rule | Apply the Leibnitz rule to a derivative of a product | |

R | raise_free_indices | Make all free indices in an expression superscripts. | |

reduce_delta | Simplify a self-contracted generalised delta. | ||

rename_dummies | Rename dummy indices, within a set or from one set to another. | ||

replace_match | Put the result of a sub-computation back into the original expression | ||

rewrite_indices | Rewrite indices by contracting with vielbein or metric. | ||

S | simplify | Simplify the scalar part of an expression. | |

sort_product | Sort factors in a product | ||

sort_spinors | Sort Majorana spinor bilinears | ||

sort_sum | Sort terms in a sum. | ||

split_gamma | Split a Dirac gamma matrix off a generalised product of gamma matrices. | ||

split_index | Split the range of an index into two subsets | ||

substitute | Generic substitution algorithm. | ||

T | take_match | Select a subset of terms in a sum for further computations. | |

U | unwrap | Move objects out of derivatives, accents or exterior products. | |

V | vary | Generic variation algorithm for functional derivatives. | |

Y | young_project_product | Project all tensors in a product with their Young tableau projector. | |

young_project_tensor | Project tensors with their Young projector. | ||

Z | zoom | Only show selected terms in a sum, and restrict subsequent algorithms to these terms. |

## Core properties

A | Accent | Turn a symbol into an accent. | |

AntiCommuting | Make objects anti-commuting. | ||

AntiSymmetric | Make an object anti-symmetric in all indices. | ||

C | Commuting | Make components commuting. | |

CommutingAsProduct | Makes an object behave as a product when commuting. | ||

CommutingAsSum | Makes an object behave as a sum when commuting. | ||

Coordinate | Declare a symbol to be a coordinate label. | ||

D | DAntiSymmetric | Gives object the symmetries of the derivative of a fully antisymmetric tensor. | |

Depends | Makes an object implicitly dependent on other objects. | ||

Derivative | Declare an operator to satisfy the Leibnitz rule. | ||

Determinant | Declares an object to be the determinant of a matrix or metric. | ||

Diagonal | Declares a tensor to only have non-zero diagonal entries. | ||

DiracBar | An accent representing the Dirac conjugation operation. | ||

E | EpsilonTensor | A fully anti-symmetric tensor with constant components. | |

F | FilledTableau | A Young tableau with labelled boxes. | |

G | GammaMatrix | A generalised generator of a Clifford algebra. | |

I | ImplicitIndex | Indicates that an object carries indices which are not written out. | |

IndexInherit | Make an object inherit all indices from its child objects. | ||

Indices | Declare names to be used as indices. | ||

Integer | Indicates that an object takes integer values. | ||

InverseMetric | Make a two-tensor an inverse metric. | ||

K | KroneckerDelta | Turns an object into a generalised Kronecker delta symbol. | |

L | LaTeXForm | Changes the way in which symbols are displayed. | |

M | Metric | Makes a two-tensor a metric. | |

N | NonCommuting | Makes components non-commuting. | |

P | PartialDerivative | Makes an object a partial derivative. | |

R | RiemannTensor | Make an object a Riemann curvature tensor. | |

S | SatisfiesBianchi | Make an object satisfy the generalised Bianchi identity. | |

SelfAntiCommuting | Make components of tensors anti-commute. | ||

SelfCommuting | Make tensor components commute. | ||

SelfNonCommuting | Make tensor components non-commuting. | ||

SortOrder | Set sorting order of objects. | ||

Spinor | Declares an object to transform as a spinor. | ||

Symbol | Make an object not count as index when it is a sub- or super-script | ||

Symmetric | Make an object symmetric in all indices. | ||

T | Tableau | Make object a Young tableau | |

TableauSymmetry | Gives a tensor a generic Young tableau symmetry. | ||

W | WeightInherit | Make object inherit weights from child nodes |