return cls(n, **kwargs)
def __init__(self, n, **kwargs):
+ # We know this is a valid EJA, but will double-check
+ # if the user passes check_axioms=True.
+ if "check_axioms" not in kwargs: kwargs["check_axioms"] = False
+
super(RealSymmetricEJA, self).__init__(self._denormalized_basis(n),
self.jordan_product,
self.trace_inner_product,
def __init__(self, n, **kwargs):
+ # We know this is a valid EJA, but will double-check
+ # if the user passes check_axioms=True.
+ if "check_axioms" not in kwargs: kwargs["check_axioms"] = False
+
super(ComplexHermitianEJA, self).__init__(self._denormalized_basis(n),
self.jordan_product,
self.trace_inner_product,
def __init__(self, n, **kwargs):
+ # We know this is a valid EJA, but will double-check
+ # if the user passes check_axioms=True.
+ if "check_axioms" not in kwargs: kwargs["check_axioms"] = False
+
super(QuaternionHermitianEJA, self).__init__(self._denormalized_basis(n),
self.jordan_product,
self.trace_inner_product,
def inner_product(x,y):
return x.inner_product(y)
- # Don't orthonormalize because our basis is already
- # orthonormal with respect to our inner-product.
- if not 'orthonormalize' in kwargs:
- kwargs['orthonormalize'] = False
+ # New defaults for keyword arguments. Don't orthonormalize
+ # because our basis is already orthonormal with respect to our
+ # inner-product. Don't check the axioms, because we know this
+ # is a valid EJA... but do double-check if the user passes
+ # check_axioms=True. Note: we DON'T override the "check_field"
+ # default here, because the user can pass in a field!
+ if "orthonormalize" not in kwargs: kwargs["orthonormalize"] = False
+ if "check_axioms" not in kwargs: kwargs["check_axioms"] = False
+
- # But also don't pass check_field=False here, because the user
- # can pass in a field!
standard_basis = FreeModule(ZZ, n).basis()
super(HadamardEJA, self).__init__(standard_basis,
jordan_product,
inner_product,
- check_axioms=False,
**kwargs)
self.rank.set_cache(n)
zbar = y0*xbar + x0*ybar
return P((z0,) + tuple(zbar))
+ # We know this is a valid EJA, but will double-check
+ # if the user passes check_axioms=True.
+ if "check_axioms" not in kwargs: kwargs["check_axioms"] = False
+
n = B.nrows()
standard_basis = FreeModule(ZZ, n).basis()
super(BilinearFormEJA, self).__init__(standard_basis,
# Don't orthonormalize because our basis is already
# orthonormal with respect to our inner-product.
- if not 'orthonormalize' in kwargs:
- kwargs['orthonormalize'] = False
+ if "orthonormalize" not in kwargs: kwargs["orthonormalize"] = False
# But also don't pass check_field=False here, because the user
# can pass in a field!
- super(JordanSpinEJA, self).__init__(B,
- check_axioms=False,
- **kwargs)
+ super(JordanSpinEJA, self).__init__(B, **kwargs)
@staticmethod
def _max_random_instance_size():
jordan_product = lambda x,y: x
inner_product = lambda x,y: 0
basis = ()
+
+ # New defaults for keyword arguments
+ if "orthonormalize" not in kwargs: kwargs["orthonormalize"] = False
+ if "check_axioms" not in kwargs: kwargs["check_axioms"] = False
+
super(TrivialEJA, self).__init__(basis,
jordan_product,
inner_product,