import proveit
# Prepare this notebook for defining the theorems of a theory:
%theorems_notebook # Keep this at the top following 'import proveit'.
from proveit import b, m, n, x, A, theta, rho
from proveit.logic import Forall, Equals, InSet
from proveit.numbers import NaturalPos, Real, Complex, Mult, Exp, i, exp, exp2pi_i
from proveit.linear_algebra import MatrixMult, ScalarMult, MatrixExp, Unitary, SpecialUnitary
%begin theorems
U_closure = Forall((m, n), Forall(A, InSet(MatrixExp(A, m), Unitary(n)),
domain=Unitary(n)),
domain=NaturalPos)
SU_closure = Forall((m, n), Forall(A, InSet(MatrixExp(A, m), SpecialUnitary(n)),
domain=SpecialUnitary(n)),
domain=NaturalPos)
eigen_exp_application = Forall(
m, Forall(
b, Forall((A, x), Equals(MatrixMult(MatrixExp(A, m), x), MatrixMult(Exp(b, m), x)),
condition=Equals(MatrixMult(A, x), ScalarMult(b, x))),
domain=Complex),
domain=NaturalPos)
unital_eigen_exp_application = Forall(
m, Forall(
theta, Forall((A, x), Equals(MatrixMult(MatrixExp(A, m), x), ScalarMult(exp(Mult(i, Mult(m, theta))), x)),
condition=Equals(MatrixMult(A, x), ScalarMult(exp(Mult(i, theta)), x))),
domain=Real),
domain=NaturalPos)
unital2pi_eigen_exp_application = Forall(
m, Forall(
rho, Forall((A, x), Equals(MatrixMult(MatrixExp(A, m), x), ScalarMult(exp2pi_i(Mult(m, rho)), x)),
condition=Equals(MatrixMult(A, x), ScalarMult(exp2pi_i(rho), x))),
domain=Real),
domain=NaturalPos)
%end theorems