sage.d.git
5 months agomjo/cone: drop is_symmetric_p{s,}d() methods. master
Michael Orlitzky [Sat, 1 May 2021 00:48:45 +0000 (20:48 -0400)]
mjo/cone: drop is_symmetric_p{s,}d() methods.

These are now redundant since the sage is_positive_definite() and
is_positive_semidefinite() methods exist and work on inexact rings.

6 months agoeja: factor out the operator polynomial-matrix construction.
Michael Orlitzky [Fri, 23 Apr 2021 15:59:05 +0000 (11:59 -0400)]
eja: factor out the operator polynomial-matrix construction.

6 months agomjo/cone/symmetric_pd.py: add a missing set_random_seed().
Michael Orlitzky [Sun, 4 Apr 2021 12:34:59 +0000 (08:34 -0400)]
mjo/cone/symmetric_pd.py: add a missing set_random_seed().

6 months agomjo/cone/symmetric_pd.py: drop inverse_symmetric_pd().
Michael Orlitzky [Sun, 4 Apr 2021 12:31:10 +0000 (08:31 -0400)]
mjo/cone/symmetric_pd.py: drop inverse_symmetric_pd().

This function is now available in SageMath:

  sage: A = matrix.identity(QQ,2)
  sage: A.inverse_positive_definite()
  [1 0]
  [0 1]

7 months agoeja: update the DESIGN doc.
Michael Orlitzky [Tue, 16 Mar 2021 12:26:28 +0000 (08:26 -0400)]
eja: update the DESIGN doc.

7 months agoeja: further micro-optimize gram_schmidt().
Michael Orlitzky [Tue, 16 Mar 2021 01:19:27 +0000 (21:19 -0400)]
eja: further micro-optimize gram_schmidt().

7 months agoeja: try to speed up gram_schmidt(), but all my sages are broken.
Michael Orlitzky [Mon, 15 Mar 2021 22:16:17 +0000 (18:16 -0400)]
eja: try to speed up gram_schmidt(), but all my sages are broken.

7 months agoeja: remove unused variable in gram_schmidt.
Michael Orlitzky [Mon, 15 Mar 2021 21:54:43 +0000 (17:54 -0400)]
eja: remove unused variable in gram_schmidt.

7 months agoeja: renumber coordinate variables from zero.
Michael Orlitzky [Sun, 14 Mar 2021 21:38:53 +0000 (17:38 -0400)]
eja: renumber coordinate variables from zero.

7 months agoeja: add more TODOs, which are thankfully getting easier.
Michael Orlitzky [Sun, 14 Mar 2021 17:44:19 +0000 (13:44 -0400)]
eja: add more TODOs, which are thankfully getting easier.

7 months agoeja: speed up det() for Cartesian product elements.
Michael Orlitzky [Sun, 14 Mar 2021 01:46:54 +0000 (20:46 -0500)]
eja: speed up det() for Cartesian product elements.

7 months agoeja: add another TODO item.
Michael Orlitzky [Sat, 13 Mar 2021 20:57:08 +0000 (15:57 -0500)]
eja: add another TODO item.

7 months agoeja: append to an existing TODO.
Michael Orlitzky [Sat, 13 Mar 2021 20:50:44 +0000 (15:50 -0500)]
eja: append to an existing TODO.

7 months agoeja: fix cartesian_factors() for EJA elements.
Michael Orlitzky [Sat, 13 Mar 2021 20:49:32 +0000 (15:49 -0500)]
eja: fix cartesian_factors() for EJA elements.

7 months agoeja: drop obsolete _vec2mat and _mat2vec helpers.
Michael Orlitzky [Sat, 13 Mar 2021 20:27:02 +0000 (15:27 -0500)]
eja: drop obsolete _vec2mat and _mat2vec helpers.

7 months agoeja: remove unused import.
Michael Orlitzky [Sat, 13 Mar 2021 19:55:47 +0000 (14:55 -0500)]
eja: remove unused import.

7 months agoeja: remove redundant kwargs mangling from MatrixEJA subclasses.
Michael Orlitzky [Sat, 13 Mar 2021 19:23:18 +0000 (14:23 -0500)]
eja: remove redundant kwargs mangling from MatrixEJA subclasses.

7 months agoeja: don't allow creation of invalid RationalBasisEJAs.
Michael Orlitzky [Sat, 13 Mar 2021 19:17:20 +0000 (14:17 -0500)]
eja: don't allow creation of invalid RationalBasisEJAs.

Prior to this, a Cartesian product taken in the "wrong order" could
result in a subclass of RationalBasisEJA that did not actually have
a corresponding rational algebra.

7 months agoeja: remove an impossible TODO.
Michael Orlitzky [Sat, 13 Mar 2021 15:44:51 +0000 (10:44 -0500)]
eja: remove an impossible TODO.

We can't use the _rational_algebra to get minimal polynomials like we
do with characteristic ones. The secret with the charpolys is that the
(irrational) coordinates of the element are hidden behind polynomial
variables. With the minimal polynomial, we'd need to operate on them
directly... but we can't, in a rational algebra.

7 months agoeja: remove two completed TODOs.
Michael Orlitzky [Sat, 13 Mar 2021 15:38:13 +0000 (10:38 -0500)]
eja: remove two completed TODOs.

7 months agoeja: speed up _all2list().
Michael Orlitzky [Sat, 13 Mar 2021 15:37:44 +0000 (10:37 -0500)]
eja: speed up _all2list().

7 months agoeja: delete obsolete method override.
Michael Orlitzky [Sat, 13 Mar 2021 13:42:14 +0000 (08:42 -0500)]
eja: delete obsolete method override.

7 months agoeja: skip FDEJA constructor in CartesianProductEJA.
Michael Orlitzky [Sat, 13 Mar 2021 13:14:33 +0000 (08:14 -0500)]
eja: skip FDEJA constructor in CartesianProductEJA.

7 months agoeja: add a TODO for tomorrow.
Michael Orlitzky [Sat, 13 Mar 2021 02:12:10 +0000 (21:12 -0500)]
eja: add a TODO for tomorrow.

7 months agoeja: factor a few things out of the FDEJA constructor.
Michael Orlitzky [Fri, 12 Mar 2021 20:16:54 +0000 (15:16 -0500)]
eja: factor a few things out of the FDEJA constructor.

7 months agoeja: add a TODO.
Michael Orlitzky [Fri, 12 Mar 2021 19:51:16 +0000 (14:51 -0500)]
eja: add a TODO.

7 months agoeja: fix trivial subalgebra element constructor.
Michael Orlitzky [Fri, 12 Mar 2021 15:42:43 +0000 (10:42 -0500)]
eja: fix trivial subalgebra element constructor.

Some recent performance improvemenets necessitate a special case
for trivial subalgebras.

7 months agoeja: fix recent hasattr() commit.
Michael Orlitzky [Fri, 12 Mar 2021 14:29:33 +0000 (09:29 -0500)]
eja: fix recent hasattr() commit.

7 months agoeja: use hasattr() to avoid a try/except.
Michael Orlitzky [Fri, 12 Mar 2021 13:11:47 +0000 (08:11 -0500)]
eja: use hasattr() to avoid a try/except.

7 months agoeja: allow subalgebra elemenents to be coerced into the superalgebra.
Michael Orlitzky [Fri, 12 Mar 2021 13:10:11 +0000 (08:10 -0500)]
eja: allow subalgebra elemenents to be coerced into the superalgebra.

7 months agoeja: add superalgebra_embedding() for subalgebras.
Michael Orlitzky [Fri, 12 Mar 2021 12:48:59 +0000 (07:48 -0500)]
eja: add superalgebra_embedding() for subalgebras.

7 months agoeja: add another performance TODO.
Michael Orlitzky [Fri, 12 Mar 2021 02:59:23 +0000 (21:59 -0500)]
eja: add another performance TODO.

7 months agoeja: cache the span of the matrix basis when written out as long vectors.
Michael Orlitzky [Fri, 12 Mar 2021 02:57:16 +0000 (21:57 -0500)]
eja: cache the span of the matrix basis when written out as long vectors.

This GREATLY improves the speed of the _element_constructor_(), and
therefore of Cartesian products.

7 months agoeja: fix random_eja() dimension bounds, for real.
Michael Orlitzky [Fri, 12 Mar 2021 02:37:08 +0000 (21:37 -0500)]
eja: fix random_eja() dimension bounds, for real.

7 months agoeja: delete an unused statement.
Michael Orlitzky [Fri, 12 Mar 2021 02:36:55 +0000 (21:36 -0500)]
eja: delete an unused statement.

7 months agoeja: add missing transpose() to deortho matrix.
Michael Orlitzky [Thu, 11 Mar 2021 21:35:38 +0000 (16:35 -0500)]
eja: add missing transpose() to deortho matrix.

7 months agoeja: fix a deorthonormalization bug.
Michael Orlitzky [Thu, 11 Mar 2021 20:03:14 +0000 (15:03 -0500)]
eja: fix a deorthonormalization bug.

7 months agoeja: add a performance TODO for Cartesian products with trivial factors.
Michael Orlitzky [Thu, 11 Mar 2021 19:36:40 +0000 (14:36 -0500)]
eja: add a performance TODO for Cartesian products with trivial factors.

7 months agoeja: add randomness to a test.
Michael Orlitzky [Thu, 11 Mar 2021 19:36:30 +0000 (14:36 -0500)]
eja: add randomness to a test.

7 months agoeja: update the TODO with a bug example.
Michael Orlitzky [Thu, 11 Mar 2021 19:02:14 +0000 (14:02 -0500)]
eja: update the TODO with a bug example.

7 months agoeja: add more introductory documentation.
Michael Orlitzky [Thu, 11 Mar 2021 18:56:23 +0000 (13:56 -0500)]
eja: add more introductory documentation.

7 months agoeja: remove more completed TODO items.
Michael Orlitzky [Thu, 11 Mar 2021 00:47:29 +0000 (19:47 -0500)]
eja: remove more completed TODO items.

7 months agoeja: fix tests for new random_eja() structure.
Michael Orlitzky [Thu, 11 Mar 2021 00:40:26 +0000 (19:40 -0500)]
eja: fix tests for new random_eja() structure.

7 months agoeja: rework the random_eja() bounds in terms of dimension.
Michael Orlitzky [Thu, 11 Mar 2021 00:06:46 +0000 (19:06 -0500)]
eja: rework the random_eja() bounds in terms of dimension.

7 months agoeja: more cached charpoly coefficients.
Michael Orlitzky [Wed, 10 Mar 2021 23:04:25 +0000 (18:04 -0500)]
eja: more cached charpoly coefficients.

7 months agoeja: fix missing test import.
Michael Orlitzky [Wed, 10 Mar 2021 19:30:40 +0000 (14:30 -0500)]
eja: fix missing test import.

7 months agoeja: more charpoly coefficient caching.
Michael Orlitzky [Wed, 10 Mar 2021 19:01:48 +0000 (14:01 -0500)]
eja: more charpoly coefficient caching.

7 months agoeja: cache the charpoly coefficients for the AlbertEJA.
Michael Orlitzky [Wed, 10 Mar 2021 18:31:53 +0000 (13:31 -0500)]
eja: cache the charpoly coefficients for the AlbertEJA.

7 months agoeja: remove the cached product_on_basis() TODO.
Michael Orlitzky [Wed, 10 Mar 2021 00:08:47 +0000 (19:08 -0500)]
eja: remove the cached product_on_basis() TODO.

Storing the multiplication table in a list is actually faster than the
@cached_method dict lookup. I tried it. In general, l[i][j] is about
twice as fast as d[(i,j)] for a nested list "l" and dict "d".

7 months agoeja: factor out MatrixEJA initialization.
Michael Orlitzky [Tue, 9 Mar 2021 23:51:29 +0000 (18:51 -0500)]
eja: factor out MatrixEJA initialization.

7 months agoeja: remove a completed TODO.
Michael Orlitzky [Tue, 9 Mar 2021 21:52:57 +0000 (16:52 -0500)]
eja: remove a completed TODO.

7 months agoeja: optionally pass matrix space into FDEJA instead of guessing it.
Michael Orlitzky [Tue, 9 Mar 2021 21:22:16 +0000 (16:22 -0500)]
eja: optionally pass matrix space into FDEJA instead of guessing it.

7 months agomatrix_algebra: use "[]" for trivial matrices and fix a test.
Michael Orlitzky [Tue, 9 Mar 2021 21:21:40 +0000 (16:21 -0500)]
matrix_algebra: use "[]" for trivial matrices and fix a test.

7 months agoeja: fix representation of "zero" in MatrixAlgebra.
Michael Orlitzky [Tue, 9 Mar 2021 19:59:20 +0000 (14:59 -0500)]
eja: fix representation of "zero" in MatrixAlgebra.

7 months agoeja: fix some tests, speed improvements.
Michael Orlitzky [Tue, 9 Mar 2021 17:04:37 +0000 (12:04 -0500)]
eja: fix some tests, speed improvements.

7 months agoeja: remove completed TODO.
Michael Orlitzky [Tue, 9 Mar 2021 16:02:23 +0000 (11:02 -0500)]
eja: remove completed TODO.

7 months agomatrix_algebra: fix element construction.
Michael Orlitzky [Tue, 9 Mar 2021 16:02:04 +0000 (11:02 -0500)]
matrix_algebra: fix element construction.

7 months agomatrix_algebra: add _entry_algebra_element_to_vector() method.
Michael Orlitzky [Tue, 9 Mar 2021 15:15:48 +0000 (10:15 -0500)]
matrix_algebra: add _entry_algebra_element_to_vector() method.

7 months agomatrix_algebra: put basis in the usual (row,column) order.
Michael Orlitzky [Tue, 9 Mar 2021 06:23:48 +0000 (01:23 -0500)]
matrix_algebra: put basis in the usual (row,column) order.

7 months agoeja: add a TODO for the morning.
Michael Orlitzky [Tue, 9 Mar 2021 05:37:13 +0000 (00:37 -0500)]
eja: add a TODO for the morning.

7 months agoeja: refactor all matrix classes upwards (note: everything broken).
Michael Orlitzky [Tue, 9 Mar 2021 04:58:39 +0000 (23:58 -0500)]
eja: refactor all matrix classes upwards (note: everything broken).

7 months agoeja: eliminate remaining real-embeddings.
Michael Orlitzky [Tue, 9 Mar 2021 03:31:07 +0000 (22:31 -0500)]
eja: eliminate remaining real-embeddings.

7 months agoeja: undo overzealous hack in _all2list; the bug was elsewhere.
Michael Orlitzky [Tue, 9 Mar 2021 03:04:15 +0000 (22:04 -0500)]
eja: undo overzealous hack in _all2list; the bug was elsewhere.

7 months agohurwitz: fix Hurwitz matrix algebra generators.
Michael Orlitzky [Tue, 9 Mar 2021 03:02:25 +0000 (22:02 -0500)]
hurwitz: fix Hurwitz matrix algebra generators.

7 months agohurwitz: make entry algebras "configurable."
Michael Orlitzky [Tue, 9 Mar 2021 02:43:34 +0000 (21:43 -0500)]
hurwitz: make entry algebras "configurable."

7 months agohurwitz: add ComplexMatrixAlgebra.
Michael Orlitzky [Tue, 9 Mar 2021 02:21:28 +0000 (21:21 -0500)]
hurwitz: add ComplexMatrixAlgebra.

7 months agoeja: fix a quaternion test.
Michael Orlitzky [Mon, 8 Mar 2021 21:34:30 +0000 (16:34 -0500)]
eja: fix a quaternion test.

7 months agoeja: don't real-embed quaternion matrices.
Michael Orlitzky [Mon, 8 Mar 2021 21:00:31 +0000 (16:00 -0500)]
eja: don't real-embed quaternion matrices.

7 months agoReorganize the Hurwitz (matrix) algebra stuff.
Michael Orlitzky [Mon, 8 Mar 2021 19:51:45 +0000 (14:51 -0500)]
Reorganize the Hurwitz (matrix) algebra stuff.

7 months agooctonions: add QuaternionMatrixAlgebra; prepare for rename...
Michael Orlitzky [Mon, 8 Mar 2021 16:30:08 +0000 (11:30 -0500)]
octonions: add QuaternionMatrixAlgebra; prepare for rename...

7 months agoeja: minor update to HadamardEJA docs.
Michael Orlitzky [Mon, 8 Mar 2021 16:29:54 +0000 (11:29 -0500)]
eja: minor update to HadamardEJA docs.

7 months agoeja: make OctonionHermitianEJAs RationalBasisEJAs.
Michael Orlitzky [Sun, 7 Mar 2021 06:28:45 +0000 (01:28 -0500)]
eja: make OctonionHermitianEJAs RationalBasisEJAs.

7 months agoeja: update an existing TODO.
Michael Orlitzky [Sun, 7 Mar 2021 05:53:02 +0000 (00:53 -0500)]
eja: update an existing TODO.

7 months agoeja: add the AlbertEJA class.
Michael Orlitzky [Sun, 7 Mar 2021 05:10:07 +0000 (00:10 -0500)]
eja: add the AlbertEJA class.

7 months agoeja: remove the Octonions from the TODO.
Michael Orlitzky [Sat, 6 Mar 2021 22:41:43 +0000 (17:41 -0500)]
eja: remove the Octonions from the TODO.

7 months agoeja: enable (dimension one) Octonion algebras in random_eja().
Michael Orlitzky [Sat, 6 Mar 2021 22:40:53 +0000 (17:40 -0500)]
eja: enable (dimension one) Octonion algebras in random_eja().

7 months agoeja: add OctonionHermitianEJA to the docs.
Michael Orlitzky [Sat, 6 Mar 2021 18:40:10 +0000 (13:40 -0500)]
eja: add OctonionHermitianEJA to the docs.

7 months agoeja: add the AlbertAlgebra to the TODO.
Michael Orlitzky [Sat, 6 Mar 2021 18:39:45 +0000 (13:39 -0500)]
eja: add the AlbertAlgebra to the TODO.

7 months agoeja: remove the (completed) Cartesian product TODO.
Michael Orlitzky [Sat, 6 Mar 2021 18:35:33 +0000 (13:35 -0500)]
eja: remove the (completed) Cartesian product TODO.

7 months agoeja: remove a completed TODO.
Michael Orlitzky [Sat, 6 Mar 2021 18:34:55 +0000 (13:34 -0500)]
eja: remove a completed TODO.

7 months agoeja: add a randomly-failing test to the TODO.
Michael Orlitzky [Sat, 6 Mar 2021 18:33:58 +0000 (13:33 -0500)]
eja: add a randomly-failing test to the TODO.

7 months agoeja: fix matrix_space() with underlying MatrixAlgebras.
Michael Orlitzky [Sat, 6 Mar 2021 17:09:11 +0000 (12:09 -0500)]
eja: fix matrix_space() with underlying MatrixAlgebras.

7 months agoeja: fix gram_schmidt doctests.
Michael Orlitzky [Sat, 6 Mar 2021 16:11:38 +0000 (11:11 -0500)]
eja: fix gram_schmidt doctests.

7 months agooctonions: add a test for Cartesian products.
Michael Orlitzky [Sat, 6 Mar 2021 14:30:24 +0000 (09:30 -0500)]
octonions: add a test for Cartesian products.

7 months agoeja: disentangle RationalBasisEJA from ConcreteEJA.
Michael Orlitzky [Thu, 4 Mar 2021 23:39:36 +0000 (18:39 -0500)]
eja: disentangle RationalBasisEJA from ConcreteEJA.

7 months agoeja: improve a gram_schmidt() error message.
Michael Orlitzky [Thu, 4 Mar 2021 22:43:59 +0000 (17:43 -0500)]
eja: improve a gram_schmidt() error message.

7 months agoeja: unbreak the trace_inner_product() for MatrixEJAs.
Michael Orlitzky [Thu, 4 Mar 2021 15:20:46 +0000 (10:20 -0500)]
eja: unbreak the trace_inner_product() for MatrixEJAs.

7 months agoeja: add some more octonion tests.
Michael Orlitzky [Thu, 4 Mar 2021 02:22:02 +0000 (21:22 -0500)]
eja: add some more octonion tests.

7 months agoeja: fix an octonion EJA test.
Michael Orlitzky [Wed, 3 Mar 2021 21:42:34 +0000 (16:42 -0500)]
eja: fix an octonion EJA test.

7 months agoeja: fix the matrix EJA trace inner-product.
Michael Orlitzky [Wed, 3 Mar 2021 20:03:18 +0000 (15:03 -0500)]
eja: fix the matrix EJA trace inner-product.

7 months agoeja: fix the basis for the octonion matrix algebra.
Michael Orlitzky [Wed, 3 Mar 2021 16:27:28 +0000 (11:27 -0500)]
eja: fix the basis for the octonion matrix algebra.

7 months agomatrix_algebra: rename __repr__ to _repr_ and fix a multiplication bug.
Michael Orlitzky [Wed, 3 Mar 2021 16:22:30 +0000 (11:22 -0500)]
matrix_algebra: rename __repr__ to _repr_ and fix a multiplication bug.

7 months agoeja: change OctonionMatrixAlgebra paramater field -> scalars.
Michael Orlitzky [Wed, 3 Mar 2021 16:21:15 +0000 (11:21 -0500)]
eja: change OctonionMatrixAlgebra paramater field -> scalars.

7 months agooctonions: use Hurwitz subclass for the matrix algebra.
Michael Orlitzky [Wed, 3 Mar 2021 15:31:25 +0000 (10:31 -0500)]
octonions: use Hurwitz subclass for the matrix algebra.

7 months agomatrix_algebra: implement one() dynamically.
Michael Orlitzky [Wed, 3 Mar 2021 15:16:42 +0000 (10:16 -0500)]
matrix_algebra: implement one() dynamically.

7 months agomatrix_algebra: factor out Hurwitz subclass.
Michael Orlitzky [Wed, 3 Mar 2021 15:11:22 +0000 (10:11 -0500)]
matrix_algebra: factor out Hurwitz subclass.

7 months agoeja: begin adding OctonionHermitianEJA.
Michael Orlitzky [Wed, 3 Mar 2021 13:40:16 +0000 (08:40 -0500)]
eja: begin adding OctonionHermitianEJA.

7 months agoeja: factor out a class for real-embedded matrices.
Michael Orlitzky [Wed, 3 Mar 2021 13:38:41 +0000 (08:38 -0500)]
eja: factor out a class for real-embedded matrices.

7 months agooctonions: alias abs() to norm().
Michael Orlitzky [Wed, 3 Mar 2021 13:37:21 +0000 (08:37 -0500)]
octonions: alias abs() to norm().

7 months agomatrix_algebra: use simpler indices.
Michael Orlitzky [Wed, 3 Mar 2021 12:41:24 +0000 (07:41 -0500)]
matrix_algebra: use simpler indices.

Using cartesian_product() and FiniteEnumeratedSet for my indices was
obscuring the foo.basis() output.