]> gitweb.michael.orlitzky.com - sage.d.git/log
sage.d.git
5 years agoeja: separate out the operator class and rename both files.
Michael Orlitzky [Sun, 28 Jul 2019 16:56:46 +0000 (12:56 -0400)]
eja: separate out the operator class and rename both files.

Let's start organizing. It's also time to get the test suite
working. I've added stupid SETUP blocks to each docstring to load the
stuff being tested.

5 years agoeja: add algebra constructors to the global namespace.
Michael Orlitzky [Sun, 28 Jul 2019 16:37:06 +0000 (12:37 -0400)]
eja: add algebra constructors to the global namespace.

5 years agoeja: whitespace fix.
Michael Orlitzky [Sun, 28 Jul 2019 15:41:23 +0000 (11:41 -0400)]
eja: whitespace fix.

5 years agoeja: add minimal_polynomial() for operators.
Michael Orlitzky [Sun, 28 Jul 2019 15:35:08 +0000 (11:35 -0400)]
eja: add minimal_polynomial() for operators.

5 years agoeja: replace element operator_matrix() entirely.
Michael Orlitzky [Sun, 28 Jul 2019 15:24:49 +0000 (11:24 -0400)]
eja: replace element operator_matrix() entirely.

5 years agoeja: use FreeModules() category for operators instead of VectorSpaces().
Michael Orlitzky [Sun, 28 Jul 2019 15:21:00 +0000 (11:21 -0400)]
eja: use FreeModules() category for operators instead of VectorSpaces().

This allows our characteristic polynomial algorithm to use real
operators and not matrices.

5 years agoeja: convert another operator_matrix() test to operator().
Michael Orlitzky [Sun, 28 Jul 2019 15:15:48 +0000 (11:15 -0400)]
eja: convert another operator_matrix() test to operator().

5 years agoeja: suggest operator().matrix() to replace element matrix().
Michael Orlitzky [Sun, 28 Jul 2019 15:15:12 +0000 (11:15 -0400)]
eja: suggest operator().matrix() to replace element matrix().

5 years agoeja: move a bunch of operator_matrix() tests to operator().
Michael Orlitzky [Sun, 28 Jul 2019 15:05:40 +0000 (11:05 -0400)]
eja: move a bunch of operator_matrix() tests to operator().

5 years agoeja: implement element powers in terms of operator().
Michael Orlitzky [Sun, 28 Jul 2019 15:03:51 +0000 (11:03 -0400)]
eja: implement element powers in terms of operator().

5 years agoeja: implement operator_commutes_with() in terms of operator().
Michael Orlitzky [Sun, 28 Jul 2019 14:53:15 +0000 (10:53 -0400)]
eja: implement operator_commutes_with() in terms of operator().

5 years agoeja: rewrite the operator class again to eliminate VectorSpaceMorphisms.
Michael Orlitzky [Sun, 28 Jul 2019 04:36:43 +0000 (00:36 -0400)]
eja: rewrite the operator class again to eliminate VectorSpaceMorphisms.

Wherever possible, I'd like to eliminate row-vector APIs from sneaking
into userland. There's no reason for us to subclass VectorSpaceMorphism,
because left-multiplication by a scalar doesn't work anyway. So, just
drop it, and keep our own matrix variable around instead.

5 years agoeja: replace the Hom stuff with a custom EJA operator class.
Michael Orlitzky [Sat, 27 Jul 2019 15:05:42 +0000 (11:05 -0400)]
eja: replace the Hom stuff with a custom EJA operator class.

Implementing homsets as linear operators was always a hack, since
linear operators will in general not be algebra homomorphisms. We
wound up re-implementing addition, subtraction, etc. of operators
anyway, so in hindsight, there is no extra difficulty in creating our
own EJA operator class as a subclass of VectorSpaceMorphism.

This commit throws out the EJA morphism stuff, and replaces it with
an equivalent EJA operator class to remain mathematically sound.

5 years agoeja: add vector_space() method for EJAs to get the ambient space.
Michael Orlitzky [Sat, 27 Jul 2019 13:30:08 +0000 (09:30 -0400)]
eja: add vector_space() method for EJAs to get the ambient space.

5 years agoeja: fix a busted operator inverse test.
Michael Orlitzky [Sat, 27 Jul 2019 12:54:31 +0000 (08:54 -0400)]
eja: fix a busted operator inverse test.

5 years agoeja: fix an erroneous test case.
Michael Orlitzky [Sat, 27 Jul 2019 00:46:25 +0000 (20:46 -0400)]
eja: fix an erroneous test case.

5 years agoeja: fix powers of zero for operators.
Michael Orlitzky [Sat, 27 Jul 2019 00:44:42 +0000 (20:44 -0400)]
eja: fix powers of zero for operators.

When you raise a morphism to the power of zero, it returns an object
(the identity morphism) in a much more general and useless space. We
need to be able to add/subtract these things. So now we have our own
one() method for the Homset, and our own __pow__ for morphisms.

5 years agoeja: fix the element inverse() implementation and some failing tests.
Michael Orlitzky [Fri, 26 Jul 2019 23:57:30 +0000 (19:57 -0400)]
eja: fix the element inverse() implementation and some failing tests.

5 years agoeja: finally get scalar-morphism multiplication working with the new homsets.
Michael Orlitzky [Fri, 26 Jul 2019 23:57:04 +0000 (19:57 -0400)]
eja: finally get scalar-morphism multiplication working with the new homsets.

5 years agoeja: create our own Homset class for EJAs (ugh).
Michael Orlitzky [Fri, 26 Jul 2019 23:56:33 +0000 (19:56 -0400)]
eja: create our own Homset class for EJAs (ugh).

5 years agoeja: use single-underscore method names for morphisms.
Michael Orlitzky [Fri, 26 Jul 2019 20:58:23 +0000 (16:58 -0400)]
eja: use single-underscore method names for morphisms.

5 years agoeja: use sexier FiniteDimensionalAlgebrasWithBasis category.
Michael Orlitzky [Fri, 26 Jul 2019 20:58:01 +0000 (16:58 -0400)]
eja: use sexier FiniteDimensionalAlgebrasWithBasis category.

5 years agoeja: rework the quadratic representation tests in terms of morphisms.
Michael Orlitzky [Fri, 26 Jul 2019 17:41:38 +0000 (13:41 -0400)]
eja: rework the quadratic representation tests in terms of morphisms.

Just saving this WIP, because I'm starting to suspect that my
implementation of morphisms might be stupid.

5 years agoeja: add negation/subtraction for morphisms.
Michael Orlitzky [Fri, 26 Jul 2019 17:41:25 +0000 (13:41 -0400)]
eja: add negation/subtraction for morphisms.

5 years agoeja: add composition (multiplication) for morphisms.
Michael Orlitzky [Fri, 26 Jul 2019 17:03:37 +0000 (13:03 -0400)]
eja: add composition (multiplication) for morphisms.

The whatever-superclass composition of morphisms returned a formal
composition, which can't be treated like a morphism itself. Since all
of our morphisms are represented by matrices, we can simply perform
the composition ourself via matrix multiplication to return something
useful.

5 years agoeja: add __invert__ method for morphisms.
Michael Orlitzky [Fri, 26 Jul 2019 16:45:19 +0000 (12:45 -0400)]
eja: add __invert__ method for morphisms.

5 years agoeja: improve tests for morphism addition.
Michael Orlitzky [Fri, 26 Jul 2019 16:44:15 +0000 (12:44 -0400)]
eja: improve tests for morphism addition.

5 years agoeja: allow addition of EJA morphisms.
Michael Orlitzky [Fri, 26 Jul 2019 16:31:01 +0000 (12:31 -0400)]
eja: allow addition of EJA morphisms.

5 years agoeja: add new operator() method for elements that returns a morphism.
Michael Orlitzky [Fri, 26 Jul 2019 16:13:14 +0000 (12:13 -0400)]
eja: add new operator() method for elements that returns a morphism.

5 years agoeja: new class FiniteDimensionalEuclideanJordanAlgebraMorphism.
Michael Orlitzky [Fri, 26 Jul 2019 16:12:41 +0000 (12:12 -0400)]
eja: new class FiniteDimensionalEuclideanJordanAlgebraMorphism.

This is the first step towards implementing left-multiplication
operators and quadratic-representations properly.

5 years agoeja: improve a comment.
Michael Orlitzky [Fri, 26 Jul 2019 16:11:32 +0000 (12:11 -0400)]
eja: improve a comment.

5 years agoeja: use an insane hack to hide the (left_)matrix methods for elements.
Michael Orlitzky [Fri, 26 Jul 2019 16:10:48 +0000 (12:10 -0400)]
eja: use an insane hack to hide the (left_)matrix methods for elements.

5 years agoeja: use the quadratic representation for the element inverse.
Michael Orlitzky [Fri, 26 Jul 2019 14:05:45 +0000 (10:05 -0400)]
eja: use the quadratic representation for the element inverse.

5 years agoeja: add tests for more quadratic representation properties.
Michael Orlitzky [Fri, 26 Jul 2019 00:41:40 +0000 (20:41 -0400)]
eja: add tests for more quadratic representation properties.

5 years agoeja: randomize and fix a bug in the subalgebra_idempotent() test.
Michael Orlitzky [Fri, 26 Jul 2019 00:41:12 +0000 (20:41 -0400)]
eja: randomize and fix a bug in the subalgebra_idempotent() test.

5 years agoeja: ensure that the element inverse() always lives back in the EJA.
Michael Orlitzky [Fri, 26 Jul 2019 00:40:21 +0000 (20:40 -0400)]
eja: ensure that the element inverse() always lives back in the EJA.

5 years agoeja: add back the charpoly basis trickery needed for the theory.
Michael Orlitzky [Wed, 24 Jul 2019 16:37:08 +0000 (12:37 -0400)]
eja: add back the charpoly basis trickery needed for the theory.

5 years agoeja: add an implementation warning for characteristic_polynomial().
Michael Orlitzky [Wed, 24 Jul 2019 03:23:02 +0000 (23:23 -0400)]
eja: add an implementation warning for characteristic_polynomial().

5 years agoeja: finally enable tests for the trace inner product.
Michael Orlitzky [Tue, 23 Jul 2019 04:51:18 +0000 (00:51 -0400)]
eja: finally enable tests for the trace inner product.

5 years agoeja: use charpoly coefficients to implement det() for elements.
Michael Orlitzky [Tue, 23 Jul 2019 04:48:07 +0000 (00:48 -0400)]
eja: use charpoly coefficients to implement det() for elements.

5 years agoeja: implement element trace in terms of charpoly coefficients.
Michael Orlitzky [Tue, 23 Jul 2019 04:38:48 +0000 (00:38 -0400)]
eja: implement element trace in terms of charpoly coefficients.

5 years agoeja: refactor the charpoly implementation... it's magically faster?
Michael Orlitzky [Tue, 23 Jul 2019 04:22:06 +0000 (00:22 -0400)]
eja: refactor the charpoly implementation... it's magically faster?

5 years agoeja: use the @cached_method decorator for characteristic_polynomial().
Michael Orlitzky [Tue, 23 Jul 2019 03:31:44 +0000 (23:31 -0400)]
eja: use the @cached_method decorator for characteristic_polynomial().

5 years agoeja: use the standard basis in characteristic_polynomial().
Michael Orlitzky [Tue, 23 Jul 2019 03:17:04 +0000 (23:17 -0400)]
eja: use the standard basis in characteristic_polynomial().

I couldn't see a reason why we needed to do a change-of-basis in the
characteristic_polynomial() function (a la Faraut and Koranyi), so I
tried it with the standard basis. And, everything seems to work? Cool.

5 years agoeja: switch to the "real" element characteristic_polynomial() implementation.
Michael Orlitzky [Mon, 22 Jul 2019 20:50:50 +0000 (16:50 -0400)]
eja: switch to the "real" element characteristic_polynomial() implementation.

5 years agoeja: get the characteristic_polynomial() for EJAs working.
Michael Orlitzky [Mon, 22 Jul 2019 20:50:28 +0000 (16:50 -0400)]
eja: get the characteristic_polynomial() for EJAs working.

5 years agoeja: add apply_univariate_polynomial() for elements and use it in a test.
Michael Orlitzky [Mon, 22 Jul 2019 20:38:37 +0000 (16:38 -0400)]
eja: add apply_univariate_polynomial() for elements and use it in a test.

5 years agoeja: use different bounds for "n" in the random_eja() function.
Michael Orlitzky [Mon, 22 Jul 2019 20:26:51 +0000 (16:26 -0400)]
eja: use different bounds for "n" in the random_eja() function.

5 years agoeja: use 't' for the minimal polynomial variable name.
Michael Orlitzky [Mon, 22 Jul 2019 19:46:50 +0000 (15:46 -0400)]
eja: use 't' for the minimal polynomial variable name.

5 years agoeja: begin to stub out a characteristic_polynomial() for EJAs.
Michael Orlitzky [Mon, 22 Jul 2019 05:55:51 +0000 (01:55 -0400)]
eja: begin to stub out a characteristic_polynomial() for EJAs.

5 years agoeja: store the EJA multiplication table as a temporary hack.
Michael Orlitzky [Mon, 22 Jul 2019 05:55:27 +0000 (01:55 -0400)]
eja: store the EJA multiplication table as a temporary hack.

5 years agoeja: do an extra ambient_vector_space() in one method in case its a module.
Michael Orlitzky [Mon, 22 Jul 2019 05:54:41 +0000 (01:54 -0400)]
eja: do an extra ambient_vector_space() in one method in case its a module.

5 years agoeja: simplify (and cite) the minimal_polynomial() implementation.
Michael Orlitzky [Sun, 21 Jul 2019 16:00:08 +0000 (12:00 -0400)]
eja: simplify (and cite) the minimal_polynomial() implementation.

5 years agoeja: simplify is_invertible() for elements.
Michael Orlitzky [Sun, 21 Jul 2019 15:35:14 +0000 (11:35 -0400)]
eja: simplify is_invertible() for elements.

5 years agoeja: turn the eja_rn() constructor into a class too.
Michael Orlitzky [Sun, 21 Jul 2019 03:03:20 +0000 (23:03 -0400)]
eja: turn the eja_rn() constructor into a class too.

This fixes the inner product issue I created in the previous commit.
We can always get rid of this class when real Cartesian products are
supported.

5 years agoeja: drop the inner_product argument to the EJA constructor.
Michael Orlitzky [Sun, 21 Jul 2019 02:53:41 +0000 (22:53 -0400)]
eja: drop the inner_product argument to the EJA constructor.

Beware, this will make the test suite fail if we ever get R^n as our
EJA and try to take a (default trace) inner product involving an
irregular element.

5 years agoeja: turn the other simple EJA constructors into classes.
Michael Orlitzky [Sun, 21 Jul 2019 02:48:12 +0000 (22:48 -0400)]
eja: turn the other simple EJA constructors into classes.

5 years agoeja: rename JordanSpinAlgebra to JordanSpinEJA.
Michael Orlitzky [Sun, 21 Jul 2019 02:25:32 +0000 (22:25 -0400)]
eja: rename JordanSpinAlgebra to JordanSpinEJA.

5 years agoeja: turn the spin algebra constructor into a subclass.
Michael Orlitzky [Sun, 21 Jul 2019 01:53:20 +0000 (21:53 -0400)]
eja: turn the spin algebra constructor into a subclass.

5 years agoeja: test that complex/quaternion embeddings are homomorphisms.
Michael Orlitzky [Sat, 20 Jul 2019 19:25:52 +0000 (15:25 -0400)]
eja: test that complex/quaternion embeddings are homomorphisms.

5 years agoeja: get the quaternions working.
Michael Orlitzky [Sat, 20 Jul 2019 15:18:22 +0000 (11:18 -0400)]
eja: get the quaternions working.

5 years agoeja: add two more tests to ensure the Jordan product is correct.
Michael Orlitzky [Sat, 20 Jul 2019 14:41:58 +0000 (10:41 -0400)]
eja: add two more tests to ensure the Jordan product is correct.

5 years agoeja: add quaternion -> real matrix embedding.
Michael Orlitzky [Fri, 19 Jul 2019 23:11:59 +0000 (19:11 -0400)]
eja: add quaternion -> real matrix embedding.

5 years agoeja: fix complex-unembedding with respect to 5537f4534.
Michael Orlitzky [Fri, 19 Jul 2019 21:35:12 +0000 (17:35 -0400)]
eja: fix complex-unembedding with respect to 5537f4534.

5 years agoeja: make the complex embedding agree with the docs.
Michael Orlitzky [Fri, 19 Jul 2019 21:20:49 +0000 (17:20 -0400)]
eja: make the complex embedding agree with the docs.

5 years agoeja: text the inner product axiom of an EJA.
Michael Orlitzky [Fri, 19 Jul 2019 20:15:55 +0000 (16:15 -0400)]
eja: text the inner product axiom of an EJA.

5 years agoeja: support conversion of naturally-represented elements into an EJA.
Michael Orlitzky [Fri, 19 Jul 2019 18:09:46 +0000 (14:09 -0400)]
eja: support conversion of naturally-represented elements into an EJA.

This lets us convert e.g. a symmetric 3x3 matrix to an EJA element
without having to mess with the basis/coordinates ourselves.

5 years agoeja: factor out mat2vec() and vec2mat() helper functions.
Michael Orlitzky [Fri, 19 Jul 2019 18:09:26 +0000 (14:09 -0400)]
eja: factor out mat2vec() and vec2mat() helper functions.

5 years agoeja: add matrix inner products, and factor out the two used in R^n.
Michael Orlitzky [Fri, 19 Jul 2019 17:00:05 +0000 (13:00 -0400)]
eja: add matrix inner products, and factor out the two used in R^n.

5 years agoeja: replace nonexistent ArgumentError class.
Michael Orlitzky [Fri, 19 Jul 2019 16:40:42 +0000 (12:40 -0400)]
eja: replace nonexistent ArgumentError class.

5 years agoeja: finally give Euclidean Jordan algebras an inner product.
Michael Orlitzky [Thu, 18 Jul 2019 23:44:45 +0000 (19:44 -0400)]
eja: finally give Euclidean Jordan algebras an inner product.

5 years agoeja: fix alphabetical ordering of element methods.
Michael Orlitzky [Thu, 18 Jul 2019 23:04:12 +0000 (19:04 -0400)]
eja: fix alphabetical ordering of element methods.

5 years agoeja: add natural_representation() for elements.
Michael Orlitzky [Thu, 18 Jul 2019 22:57:44 +0000 (18:57 -0400)]
eja: add natural_representation() for elements.

5 years agoeja: maintain a "natural basis" for EJAs.
Michael Orlitzky [Thu, 18 Jul 2019 22:54:43 +0000 (18:54 -0400)]
eja: maintain a "natural basis" for EJAs.

This will eventually let us see the "usual" representation of an EJA
element. In other words, we don't want to see (1,0,1) to indicate the
identity element of the 2-by-2 symmetric matrices.

5 years agoeja: rename matrix() to operator_matrix().
Michael Orlitzky [Thu, 18 Jul 2019 21:41:14 +0000 (17:41 -0400)]
eja: rename matrix() to operator_matrix().

This leaves the dangerous parent class matrix() method there, but
whatever. The tests pass.

5 years agoeja: define operator_matrix() to eventually replace matrix().
Michael Orlitzky [Thu, 18 Jul 2019 21:15:56 +0000 (17:15 -0400)]
eja: define operator_matrix() to eventually replace matrix().

5 years agoeja: add operator_commutes_with() for elements.
Michael Orlitzky [Tue, 16 Jul 2019 20:51:12 +0000 (16:51 -0400)]
eja: add operator_commutes_with() for elements.

5 years agoeja: add a test for power-operator-commutativity.
Michael Orlitzky [Tue, 16 Jul 2019 00:18:41 +0000 (20:18 -0400)]
eja: add a test for power-operator-commutativity.

5 years agoeja: remove pointless abs() calls.
Michael Orlitzky [Mon, 15 Jul 2019 23:54:01 +0000 (19:54 -0400)]
eja: remove pointless abs() calls.

5 years agoeja: add polarization-identity and power-associativity tests.
Michael Orlitzky [Sun, 14 Jul 2019 17:28:47 +0000 (13:28 -0400)]
eja: add polarization-identity and power-associativity tests.

5 years agoeja: add an inverse() example.
Michael Orlitzky [Sat, 6 Jul 2019 22:14:07 +0000 (18:14 -0400)]
eja: add an inverse() example.

5 years agoeja: add element inverse() and is_invertible().
Michael Orlitzky [Sat, 6 Jul 2019 21:53:24 +0000 (17:53 -0400)]
eja: add element inverse() and is_invertible().

5 years agoeja: add more quadratic representation tests.
Michael Orlitzky [Sat, 6 Jul 2019 17:41:42 +0000 (13:41 -0400)]
eja: add more quadratic representation tests.

5 years agoeja: fix the dimension of the complex Hermitian simple EJA.
Michael Orlitzky [Sat, 6 Jul 2019 13:29:51 +0000 (09:29 -0400)]
eja: fix the dimension of the complex Hermitian simple EJA.

5 years agoeja: add a test for the degree of Sn.
Michael Orlitzky [Sat, 6 Jul 2019 12:49:21 +0000 (08:49 -0400)]
eja: add a test for the degree of Sn.

5 years agoeja: replace eja_ln() and eja_sn() with their new names.
Michael Orlitzky [Sat, 6 Jul 2019 03:10:00 +0000 (23:10 -0400)]
eja: replace eja_ln() and eja_sn() with their new names.

5 years agoeja: add ComplexHermitianSimpleEJA to random_eja().
Michael Orlitzky [Sat, 6 Jul 2019 03:04:32 +0000 (23:04 -0400)]
eja: add ComplexHermitianSimpleEJA to random_eja().

5 years agoeja: begin implementing the complex hermitian simple EJA.
Michael Orlitzky [Sat, 6 Jul 2019 02:58:04 +0000 (22:58 -0400)]
eja: begin implementing the complex hermitian simple EJA.

5 years agoeja: pass a dimension to a matrix() constructor for an extra sanity check.
Michael Orlitzky [Sat, 6 Jul 2019 02:27:29 +0000 (22:27 -0400)]
eja: pass a dimension to a matrix() constructor for an extra sanity check.

5 years agoeja: fix screwup introduced in 5d147bd962.
Michael Orlitzky [Sat, 6 Jul 2019 02:26:58 +0000 (22:26 -0400)]
eja: fix screwup introduced in 5d147bd962.

5 years agoeja: add a function to embed complex matrices in (bigger) real ones.
Michael Orlitzky [Fri, 5 Jul 2019 23:49:58 +0000 (19:49 -0400)]
eja: add a function to embed complex matrices in (bigger) real ones.

5 years agoeja: add placeholder constructors for all simple EJAs.
Michael Orlitzky [Fri, 5 Jul 2019 23:28:08 +0000 (19:28 -0400)]
eja: add placeholder constructors for all simple EJAs.

5 years agoeja: factor out the ugly bits of constructing simple matrix EJAs.
Michael Orlitzky [Fri, 5 Jul 2019 23:27:08 +0000 (19:27 -0400)]
eja: factor out the ugly bits of constructing simple matrix EJAs.

5 years agoeja: add a TODO with some tests that fail for now.
Michael Orlitzky [Fri, 5 Jul 2019 23:19:49 +0000 (19:19 -0400)]
eja: add a TODO with some tests that fail for now.

5 years agoeja: add non-working trace_inner_product() for EJA elements.
Michael Orlitzky [Fri, 5 Jul 2019 21:35:23 +0000 (17:35 -0400)]
eja: add non-working trace_inner_product() for EJA elements.

5 years agoeja: add quadratic_representation() for elements.
Michael Orlitzky [Fri, 5 Jul 2019 21:27:39 +0000 (17:27 -0400)]
eja: add quadratic_representation() for elements.

5 years agoeja: use random_eja() where applicable in tests.
Michael Orlitzky [Fri, 5 Jul 2019 15:36:18 +0000 (11:36 -0400)]
eja: use random_eja() where applicable in tests.

5 years agoeja: don't test for element matrix() symmetry (I don't think it holds).
Michael Orlitzky [Fri, 5 Jul 2019 15:21:24 +0000 (11:21 -0400)]
eja: don't test for element matrix() symmetry (I don't think it holds).

5 years agoeja: fix the basis order for Sn.
Michael Orlitzky [Fri, 5 Jul 2019 00:22:46 +0000 (20:22 -0400)]
eja: fix the basis order for Sn.

5 years agoeja: add missing set_random_seed() call.
Michael Orlitzky [Thu, 4 Jul 2019 23:39:16 +0000 (19:39 -0400)]
eja: add missing set_random_seed() call.