<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 This notebook is part of the clifford documentation
Step1:  The Space Time Split
To two algebras can be related by the spacetime-split.
First, we create a BladeMap which relates the bivectors in $\mathbb{D}$ to the vectors/bivectors in $\mathbb{P}$.
The scalars and pseudo-scalars in each algebra are equated.
Step2:  Splitting a space-time vector (an event)
A vector in $\mathbb{D}$, represents a unique place in space and time, i.e.  an event.
To illustrate the split, create a random event  $X$.
Step3:  This can be split into time and space components by multiplying with the time-vector $d_0$,
Step4:  and applying the BladeMap, which results in a scalar+vector in $\mathbb{P}$
Step5:  The space and time components can be separated by grade projection,
Step6:  We therefor define a split() function, which has a simple condition allowing it to act on a vector or a multivector in $\mathbb{D}$.
Splitting a spacetime bivector will be treated in the next section.
Step7:  The split can be inverted by  applying the BladeMap again, and multiplying by $d_0$
Step8:  Splitting a Bivector
Given a random bivector  $F$ in $\mathbb{D}$,
Step9:  $F$ splits into a vector/bivector in $\mathbb{P}$
Step10:  If $F$ is interpreted as the electromagnetic bivector, the Electric and Magnetic fields can be separated by grade
Step11:  Lorentz Transformations
Lorentz Transformations are rotations in $\mathbb{D}$, which are implemented with Rotors.
A rotor in G4 will, in general, have scalar, bivector, and quadvector components.
Step12:  In this way, the effect of a lorentz transformation on the electric and magnetic fields can be  computed by rotating the bivector with  $F \rightarrow RF\tilde{R}$
Step13:  Then splitting into $E$ and $B$ fields
Step14:  Lorentz Invariants
Since lorentz rotations in $\mathbb{D}$, the magnitude of elements of $\mathbb{D}$ are invariants of the  lorentz transformation.
For example, the magnitude of electromagnetic bivector $F$ is invariant, and it can be related to $E$ and $B$ fields in  $\mathbb{P}$ through the split,
<ASSISTANT_TASK:>
Python Code:
from clifford import Cl, pretty
pretty(precision=1)
# Dirac Algebra  `D`
D, D_blades = Cl(1,3, firstIdx=0, names='d')
# Pauli Algebra  `P`
P, P_blades = Cl(3, names='p')
# put elements of each in namespace
locals().update(D_blades)
locals().update(P_blades)
Explanation: This notebook is part of the clifford documentation: https://clifford.readthedocs.io/.
Space Time Algebra
Intro
This notebook demonstrates how to use clifford to work with Space Time Algebra.
The Pauli algebra of space  $\mathbb{P}$, and Dirac algebra of space-time $\mathbb{D}$, are related using the spacetime split.
The split is implemented by using a BladeMap (docs), which maps a subset of blades in $\mathbb{D}$ to the blades in $\mathbb{P}$.
This split allows a spacetime bivector $F$ to be broken up into relative electric and magnetic fields in space.
Lorentz transformations are implemented as rotations in  $\mathbb{D}$, and the effects on the relative fields are computed with the split. 
Setup
First we import clifford, instantiate the two algebras, and populate the namespace with the blades of each algebra.
The elements of $\mathbb{D}$ are prefixed with $d$, while the elements of $\mathbb{P}$ are prefixed with $p$.
Although unconventional, it is easier to read and to translate into code.
End of explanation
from clifford import BladeMap
bm = BladeMap([(d01,p1),
               (d02,p2),
               (d03,p3),
               (d12,p12),
               (d23,p23),
               (d13,p13),
               (d0123, p123)])
Explanation: The Space Time Split
To two algebras can be related by the spacetime-split.
First, we create a BladeMap which relates the bivectors in $\mathbb{D}$ to the vectors/bivectors in $\mathbb{P}$.
The scalars and pseudo-scalars in each algebra are equated.
End of explanation
X = D.randomV()*10
X
Explanation: Splitting a space-time vector (an event)
A vector in $\mathbb{D}$, represents a unique place in space and time, i.e.  an event.
To illustrate the split, create a random event  $X$.
End of explanation
X*d0
Explanation: This can be split into time and space components by multiplying with the time-vector $d_0$,
End of explanation
bm(X*d0)
Explanation: and applying the BladeMap, which results in a scalar+vector in $\mathbb{P}$
End of explanation
x = bm(X*d0)
x(0) # the time component
x(1) # the space component
Explanation: The space and time components can be separated by grade projection,
End of explanation
def split(X):
    return bm(X.odd*d0+X.even)
split(X)
Explanation: We therefor define a split() function, which has a simple condition allowing it to act on a vector or a multivector in $\mathbb{D}$.
Splitting a spacetime bivector will be treated in the next section.
End of explanation
x = split(X)
bm(x)*d0
Explanation: The split can be inverted by  applying the BladeMap again, and multiplying by $d_0$
End of explanation
F = D.randomMV()(2)
F
Explanation: Splitting a Bivector
Given a random bivector  $F$ in $\mathbb{D}$,
End of explanation
split(F)
Explanation: $F$ splits into a vector/bivector in $\mathbb{P}$
End of explanation
E = split(F)(1)
iB = split(F)(2)
E
iB
Explanation: If $F$ is interpreted as the electromagnetic bivector, the Electric and Magnetic fields can be separated by grade
End of explanation
R = D.randomRotor()
R
Explanation: Lorentz Transformations
Lorentz Transformations are rotations in $\mathbb{D}$, which are implemented with Rotors.
A rotor in G4 will, in general, have scalar, bivector, and quadvector components.
End of explanation
F_ = R*F*~R
F_
Explanation: In this way, the effect of a lorentz transformation on the electric and magnetic fields can be  computed by rotating the bivector with  $F \rightarrow RF\tilde{R}$
End of explanation
E_ = split(F_)(1)
E_
iB_ = split(F_)(2)
iB_
Explanation: Then splitting into $E$ and $B$ fields
End of explanation
i = p123 
E = split(F)(1)
B = -i*split(F)(2)
F**2
split(F**2) == E**2 - B**2 + (2*E|B)*i
Explanation: Lorentz Invariants
Since lorentz rotations in $\mathbb{D}$, the magnitude of elements of $\mathbb{D}$ are invariants of the  lorentz transformation.
For example, the magnitude of electromagnetic bivector $F$ is invariant, and it can be related to $E$ and $B$ fields in  $\mathbb{P}$ through the split,
End of explanation
<END_TASK>