sage: (L^2).is_isomorphism()
True
- Likewise for the isomorphisms of the real symmetric algebra::
+ Likewise for the isomorphisms of the real symmetric
+ algebra. We can check these for much larger ``n`` if we work
+ over the rationals::
- sage: J = RealSymmetricEJA.random_instance()
+ sage: J = RealSymmetricEJA.random_instance(field=QQ,
+ ....: orthonormalize=False,
+ ....: max_dimension=15)
sage: n = J.one().to_matrix().nrows()
sage: U = random_unitary_matrix(J.base_ring(), n)
sage: L = lambda X: J(U.conjugate_transpose()*X*U)
sage: (L^2).is_isomorphism()
True
+ If we use the algebraic field, though, only small examples are
+ checkable in a reasonable amount of time::
+
+ sage: J = RealSymmetricEJA(3)
+ sage: U = random_unitary_matrix(J.base_ring(), 3)
+ sage: L = lambda X: J(U.conjugate_transpose()*X*U)
+ sage: columns = ( L(b).to_vector() for b in J.matrix_basis() )
+ sage: MS = MatrixSpace(J.base_ring(), J.dimension(), J.dimension())
+ sage: M = MS(columns).transpose() # long time
+ sage: L = EJAOperator(J,J,M) # long time
+ sage: L.is_isomorphism() # long time
+ True
+ sage: L.inverse().is_isomorphism() # long time
+ True
+ sage: (L^2).is_isomorphism() # long time
+ True
+
And the complex hermitian algebra. This starts to get tricky
because we need to coerce the unitary matrix into the correct
space (with real scalars)::
- sage: J = ComplexHermitianEJA.random_instance()
+ sage: J = ComplexHermitianEJA.random_instance(field=QQ,
+ ....: orthonormalize=False,
+ ....: max_dimension=16)
sage: n = J.one().to_matrix().nrows()
- sage: U = random_unitary_matrix(QQbar, n)
+ sage: F = QuadraticField(-1, 'I')
+ sage: U = random_unitary_matrix(F, n)
sage: UU = J.matrix_space().from_list(U.rows())
sage: L = lambda X: J((UU.conjugate_transpose()*X*UU))
sage: (L^2).is_isomorphism()
True
+ Again we repeat with a _specific_ example whose scalars are
+ algebraic; anything larger than this takes too long (though
+ `n=3` is doable if you're willing to wait five minutes)::
+
+ sage: J = ComplexHermitianEJA(2)
+ sage: U = random_unitary_matrix(QQbar, 2)
+ sage: UU = J.matrix_space().from_list(U.rows())
+
+ sage: L = lambda X: J((UU.conjugate_transpose()*X*UU))
+ sage: columns = ( L(b).to_vector() for b in J.matrix_basis() )
+ sage: MS = MatrixSpace(J.base_ring(), J.dimension(), J.dimension())
+ sage: M = MS(columns).transpose()
+ sage: L = EJAOperator(J,J,M)
+ sage: L.is_isomorphism()
+ True
+ sage: L.inverse().is_isomorphism()
+ True
+ sage: (L^2).is_isomorphism()
+ True
+
+ sage: L = lambda X: J((UU.conjugate_transpose()*X.conjugate()*UU))
+ sage: columns = ( L(b).to_vector() for b in J.matrix_basis() )
+ sage: MS = MatrixSpace(J.base_ring(), J.dimension(), J.dimension())
+ sage: M = MS(columns).transpose()
+ sage: L = EJAOperator(J,J,M)
+ sage: L.is_isomorphism()
+ True
+ sage: L.inverse().is_isomorphism()
+ True
+ sage: (L^2).is_isomorphism()
+ True
+
TESTS:
The identity operator is always a Jordan isomorphism::