<jupyter_start><jupyter_text>This example is kindly contributed by [FreddyBaudine](https://github.com/FreddyBaudine) for reproducing [pygae/galgebra15](https://github.com/pygae/galgebra/issues/15) with modifications by [utensil](https://github.com/utensil).<jupyter_code>import sys
from galgebra.printer import  Format, xpdf, Fmt
Format()
from sympy import symbols, Rational, latex
from galgebra.ga import Ga
# st4: Spacetime Algebra I
st4coords = (t,x,y,z) = symbols('t x y z', real=True) 
st4 = Ga('e_t e_x e_y e_z', g=[1,-1,-1,-1], coords=st4coords)
(e_t,e_x,e_y,e_z) = st4.mv()
(e__t,e__x,e__y,e__z) = st4.mvr(norm = False) 
Format(Fmode = True, Dmode = True)
(grad,rgrad) = st4.grads()
s = st4.mv('s','scalar',f = True)
a = st4.mv('a','vector',f = True)
b = st4.mv('b','vector',f = True)
B = st4.mv('B','bivector',f = True)
C = st4.mv('C',3)
I = st4.mv('I','pseudo')
S = st4.mv('S','spinor',f = True)
M = st4.mv('M','mv',f = True)

M1inv = M.grade(1).inv()
M3inv = M.grade(3).inv()
a.Fmt(1,r'\mathbf{a}')
(a*a).Fmt(2,r'\mathbf{a} \mathbf{a}')
a.inv().Fmt(3,r'\mathbf{a}^{-1}')
(M.grade(1) * M.grade(1)).\
 Fmt(1,r'\langle \mathbf{M} \rangle _1 \langle \mathbf{M} \rangle _1')
M1inv.Fmt(3,r'\langle \mathbf{M} \rangle _1 ^{-1}')
M.grade(3).Fmt(2,r'\langle \mathbf{M} \rangle _3')
(M.grade(3) * M.grade(3)).\
 Fmt(1,r'\langle \mathbf{M} \rangle _3 \langle \mathbf{M} \rangle _3')
M3inv.Fmt(3,r'\langle \mathbf{M} \rangle _3^{-1}')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.23581681476418317, 'fraction_numerical': 0.036226930963773066, 'mean_word_length': 5.125523012552302, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '247016', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 689, 'n_tokens_neox': 678, 'n_words': 124, 'path': 'examples/ipython/st4.ipynb', 'repo_name': 'EAR-Development/galgebra', 'size': '1463'}