Geometric Algebra in Swift?

I wonder if Swift's type system is powerful enough to be (mis)used in order to implement for example the 2D projective geometric algebra R*(2,0,1) (with e02 = 0 and e12 = e22 = 1) so that there are types

  • Scalar
  • E0, E1, E2
  • E01, E02, E12
  • E012
    (These could be typealiases for some recursive generic type constructs.)

and that eg the product of

  • an E0 and an E0 is of type Scalar  (e0*e0 = 0)
  • an E1 and an E1 is of type Scalar  (e1*e1 = 1)
  • an E2 and an E2 is of type Scalar  (e2*e2 = 1)
  • an E0 and an E2 is of type E02  (e0*e2 = e02)
  • an E1 and an E0 is of type E01  (e1*e0 = -e0*e1 = -e01)
  • an E2, E0 and an E1 is of type E012  (e2*e0*e1 = -e0*e2*e1 = e0*e1*e2 = e012)
  • an E2 and an E02 is of type E0  (e2*e02 = e2*e0*e2 = -e2*e2*e0 = -(1)*e0 = -e0)

That is, is it possible to encode the rules of the algebra at the type level, without resorting to hard coding everything / code generation?

I guess it might be intentionally impossible in Swift / require the type system to be Turing complete or something?