Get[FileNameJoin[{NotebookDirectory[],"Packages","SpacetimeAlgebra.wl"}]]

HeadingColor=RGBColor["#A7D6ED"];
NonzeroColor=RGBColor["#A0FFE0"];
WedgeColor=RGBColor["#D0FFE0"];
TranswedgeColor1=RGBColor["#FFFFC0"];
TranswedgeColor2=RGBColor["#FFE0B0"];
TranswedgeColor3=RGBColor["#F7B89C"];
TranswedgeColor4=RGBColor["#CDA6E8"];MetricColor=RGBColor["#60D898"];

Complement

Grid[{Table[BasisList[[x]],{x,1,32}]//Prepend[Style["Basis element",Bold]],
Table[Comp[BasisList[[x]]],{x,1,32}]//Prepend[Style["Complement",Bold]]},
ItemSize->{{12,{3.5}},2},Spacings->{0,0.2},Dividers->{DividerList,{Thick,Thick,Thick}},Background->{None,{HeadingColor}}]//TraditionalForm

Reverse

Grid[{Table[BasisList[[x]],{x,1,32}]//Prepend[Style["Basis element",Bold]],
Table[Rev[BasisList[[x]]],{x,1,32}]//Prepend[Style["Reverse",Bold]]},
ItemSize->{{12,{3.5}},2},Spacings->{0,0.2},Dividers->{DividerList,{Thick,Thick,Thick}},Background->{None,{HeadingColor}}]//TraditionalForm

Duals

Grid[{Table[BasisList[[x]],{x,1,32}]//Prepend[Style["Basis element",Bold]],
Table[BulkDual[BasisList[[x]]],{x,1,32}]//Prepend[Style["Bulk dual",Bold]],
Table[WeightDual[BasisList[[x]]],{x,1,32}]//Prepend[Style["Weight dual",Bold]]},
ItemSize->{{12,{3.5}},2},Spacings->{0,0.2},Dividers->{DividerList,{Thick,Thick,True,Thick}},Background->{None,{HeadingColor}}]//TraditionalForm

Inner Products

DotItem[i_,j_]:=Module[{x},x=BasisList[[i]]\[Dot]BasisList[[j]];If[Coefficient[x,e[]]==0,Item[x],Item[x,Background->MetricColor]]]

AntidotItem[i_,j_]:=Module[{x},x=BasisList[[i]]\[Antidot]BasisList[[j]];If[Coefficient[x,e[0,1,2,3,4]]==0,Item[x],Item[x,Background->MetricColor]]]

Dot Product

Grid[{Table[BasisList[[k]],{k,1,32}]//Prepend[Style["",Bold]]}~Join~
Table[Table[DotItem[i,j],{j,1,32}]//Prepend[BasisList[[i]]],{i,1,32}],
ItemSize->{3.5,2},Spacings->{0,0.2},Dividers->{DividerList,DividerList},Background->{None,{HeadingColor},Table[{i,1}->HeadingColor,{i,2,33}]}]//TraditionalForm

Antidot Product

Grid[{Table[BasisList[[k]],{k,1,32}]//Prepend[Style["",Bold]]}~Join~
Table[Table[AntidotItem[i,j],{j,1,32}]//Prepend[BasisList[[i]]],{i,1,32}],
ItemSize->{3.5,2},Spacings->{0,0.2},Dividers->{DividerList,DividerList},Background->{None,{HeadingColor},Table[{i,1}->HeadingColor,{i,2,33}]}]//TraditionalForm

Exterior Products

WedgeItem[i_,j_]:=Module[{x},x=BasisList[[i]]∧BasisList[[j]];If[FreeQ[x,e],Item[x],Item[x,Background->NonzeroColor]]]

AntiwedgeItem[i_,j_]:=Module[{x},x=BasisList[[i]]∨BasisList[[j]];If[FreeQ[x,e],Item[x],Item[x,Background->NonzeroColor]]]

Wedge Product

Grid[{Table[BasisList[[k]],{k,1,32}]//Prepend[Style["",Bold]]}~Join~
Table[Table[WedgeItem[i,j],{j,1,32}]//Prepend[BasisList[[i]]],{i,1,32}],
ItemSize->{3.5,2},Spacings->{0,0.2},Dividers->{DividerList,DividerList},Background->{None,{HeadingColor},Table[{i,1}->HeadingColor,{i,2,33}]}]//TraditionalForm

Antiwedge Product

Grid[{Table[BasisList[[k]],{k,1,32}]//Prepend[Style["",Bold]]}~Join~
Table[Table[AntiwedgeItem[i,j],{j,1,32}]//Prepend[BasisList[[i]]],{i,1,32}],
ItemSize->{3.5,2},Spacings->{0,0.2},Dividers->{DividerList,DividerList},Background->{None,{HeadingColor},Table[{i,1}->HeadingColor,{i,2,33}]}]//TraditionalForm

Interior Products

BulkContractionItem[i_,j_]:=Module[{p},p=BulkContraction[BasisList[[i]],BasisList[[j]]];If[FreeQ[p,e],Item[p],If[i!=j,Item[p,Background->NonzeroColor],Item[p,Background->MetricColor]]]]

WeightContractionItem[i_,j_]:=Module[{p},p=WeightContraction[BasisList[[i]],BasisList[[j]]];If[FreeQ[p,e],Item[p],If[i!=j,Item[p,Background->NonzeroColor],Item[p,Background->MetricColor]]]]

BulkExpansionItem[i_,j_]:=Module[{p},p=BulkExpansion[BasisList[[i]],BasisList[[j]]];If[FreeQ[p,e],Item[p],If[i!=j,Item[p,Background->NonzeroColor],Item[p,Background->MetricColor]]]]

WeightExpansionItem[i_,j_]:=Module[{p},p=WeightExpansion[BasisList[[i]],BasisList[[j]]];If[FreeQ[p,e],Item[p],If[i!=j,Item[p,Background->NonzeroColor],Item[p,Background->MetricColor]]]]

Bulk Contraction

Grid[{Table[BasisList[[k]],{k,1,32}]//Prepend[Style["",Bold]]}~Join~
Table[Table[BulkContractionItem[i,j],{j,1,32}]//Prepend[BasisList[[i]]],{i,1,32}],
ItemSize->{3.5,2},Spacings->{0,0.2},Dividers->{DividerList,DividerList},Background->{None,{HeadingColor},Table[{i,1}->HeadingColor,{i,2,33}]}]//TraditionalForm

Weight Contraction

Grid[{Table[BasisList[[k]],{k,1,32}]//Prepend[Style["",Bold]]}~Join~
Table[Table[WeightContractionItem[i,j],{j,1,32}]//Prepend[BasisList[[i]]],{i,1,32}],
ItemSize->{3.5,2},Spacings->{0,0.2},Dividers->{DividerList,DividerList},Background->{None,{HeadingColor},Table[{i,1}->HeadingColor,{i,2,33}]}]//TraditionalForm

Bulk Expansion

Grid[{Table[BasisList[[k]],{k,1,32}]//Prepend[Style["",Bold]]}~Join~
Table[Table[BulkExpansionItem[i,j],{j,1,32}]//Prepend[BasisList[[i]]],{i,1,32}],
ItemSize->{3.5,2},Spacings->{0,0.2},Dividers->{DividerList,DividerList},Background->{None,{HeadingColor},Table[{i,1}->HeadingColor,{i,2,33}]}]//TraditionalForm

Weight Expansion

Grid[{Table[BasisList[[k]],{k,1,32}]//Prepend[Style["",Bold]]}~Join~
Table[Table[WeightExpansionItem[i,j],{j,1,32}]//Prepend[BasisList[[i]]],{i,1,32}],
ItemSize->{3.5,2},Spacings->{0,0.2},Dividers->{DividerList,DividerList},Background->{None,{HeadingColor},Table[{i,1}->HeadingColor,{i,2,33}]}]//TraditionalForm

Transwedge Products

TranswedgeItem[i_,j_]:=Module[{x0,x1,x2,x3,x4},x0=BasisList[[i]]∧BasisList[[j]];x1=TranswedgeProduct[BasisList[[i]],BasisList[[j]],1];x2=-TranswedgeProduct[BasisList[[i]],BasisList[[j]],2];x3=-TranswedgeProduct[BasisList[[i]],BasisList[[j]],3];
x4=TranswedgeProduct[BasisList[[i]],BasisList[[j]],4];If[FreeQ[x0,e],If[FreeQ[x1,e],If[FreeQ[x2,e],If[FreeQ[x3,e],If[FreeQ[x4,e],Item[x4],Item[x4,Background->TranswedgeColor4]],Item[x3,Background->TranswedgeColor3]],Item[x2,Background->TranswedgeColor2]],Item[x1,Background->TranswedgeColor1]],Item[x0,Background->WedgeColor]]]

AntiTranswedgeItem[i_,j_]:=Module[{x0,x1,x2,x3,x4},x0=BasisList[[i]]∨BasisList[[j]];x1=TranswedgeAntiproduct[BasisList[[i]],BasisList[[j]],1];x2=-TranswedgeAntiproduct[BasisList[[i]],BasisList[[j]],2];x3=-TranswedgeAntiproduct[BasisList[[i]],BasisList[[j]],3];
x4=TranswedgeAntiproduct[BasisList[[i]],BasisList[[j]],4];If[FreeQ[x0,e],If[FreeQ[x1,e],If[FreeQ[x2,e],If[FreeQ[x3,e],If[FreeQ[x4,e],Item[x4],Item[x4,Background->TranswedgeColor4]],Item[x3,Background->TranswedgeColor3]],Item[x2,Background->TranswedgeColor2]],Item[x1,Background->TranswedgeColor1]],Item[x0,Background->WedgeColor]]]

Transwedge Products

Grid[{Table[BasisList[[k]],{k,1,32}]//Prepend[Style["",Bold]]}~Join~
Table[Table[TranswedgeItem[i,j],{j,1,32}]//Prepend[BasisList[[i]]],{i,1,32}],
ItemSize->{3.5,2},Spacings->{0,0.2},Dividers->{DividerList,DividerList},Background->{None,{HeadingColor},Table[{i,1}->HeadingColor,{i,2,33}]}]//TraditionalForm

Transwedge Antiproducts

Grid[{Table[BasisList[[k]],{k,1,32}]//Prepend[Style["",Bold]]}~Join~
Table[Table[AntiTranswedgeItem[i,j],{j,1,32}]//Prepend[BasisList[[i]]],{i,1,32}],
ItemSize->{3.5,2},Spacings->{0,0.2},Dividers->{DividerList,DividerList},Background->{None,{HeadingColor},Table[{i,1}->HeadingColor,{i,2,33}]}]//TraditionalForm

Geometric Products

GeometricItem[i_,j_]:=Module[{g,w},g=BasisList[[i]]\[Geometric]BasisList[[j]];w=BasisList[[i]]∧BasisList[[j]];If[FreeQ[g,e],Item[g],If[FreeQ[g-w,e]&&i!=j,Item[g,Background->NonzeroColor],If[i==j,Item[g,Background->MetricColor],Item[g]]]]]

AntigeometricItem[i_,j_]:=Module[{g,w},g=BasisList[[i]]\[Antigeometric]BasisList[[j]];w=BasisList[[i]]∨BasisList[[j]];If[FreeQ[g,e],Item[g],If[FreeQ[g-w,e]&&i!=j,Item[g,Background->NonzeroColor],If[i==j,Item[g,Background->MetricColor],Item[g]]]]]

Geometric Product

Grid[{Table[BasisList[[k]],{k,1,32}]//Prepend[Style["",Bold]]}~Join~
Table[Table[GeometricItem[i,j],{j,1,32}]//Prepend[BasisList[[i]]],{i,1,32}],
ItemSize->{3.5,2},Spacings->{0,0.2},Dividers->{DividerList,DividerList},Background->{None,{HeadingColor},Table[{i,1}->HeadingColor,{i,2,33}]}]//TraditionalForm

Geometric Antiproduct

Grid[{Table[BasisList[[k]],{k,1,32}]//Prepend[Style["",Bold]]}~Join~
Table[Table[AntigeometricItem[i,j],{j,1,32}]//Prepend[BasisList[[i]]],{i,1,32}],
ItemSize->{3.5,2},Spacings->{0,0.2},Dividers->{DividerList,DividerList},Background->{None,{HeadingColor},Table[{i,1}->HeadingColor,{i,2,33}]}]//TraditionalForm

License

MIT License

Copyright (c) 2025 Eric Lengyel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.