It depends a little on what coefficients you want. If you're happy with rational numbers then this should do the trick:
G = diagonal_matrix(QQ,4,[-1,1,1,1])lorentz_group = GO(4,QQ,invariant_form=G)which just constructs the group of (in this case QQ-valued) matrices that preserve the quadratic form -t^2+x^2+y^2+z^2. Depending on what you actually want to do with it, you may be more interested in SO
or perhaps the construction of its lie group/algebra.
The "GO" mentioned here should correspond to the O(3;1) (or perhaps O(1;3) ) mentioned in the wikipedia article.
The problem with the "real numbers" is that representing many elements exactly in it is complicated. For many algebraic questions, you can probably get away with considering the group over Q (or some finite extensions).
I'm not entirely sure if the connected component SO^+ is readily implemented in sage."creation" of a mathematical object (particularly an infinite one) is a rather relative notion anyway: technically speakingclass LorentzGroup:passcan be passed off as a class whose instances represent the Lorentz group: there are just many features that haven't been implemented (yet). It's probably worth checking if the object described above meets your needs.
If not, then describing a little more about what you need might help an expert in giving you further tips.
On Wednesday, June 1, 2022 at 1:55:45 AM UTC+8 Nils Bruin wrote:The "GO" mentioned here should correspond to the O(3;1) (or perhaps O(1;3) ) mentioned in the wikipedia article.Do you mean that these two ways of writing are a matter of convention?