Matrix eqn

Added solve_discrete_lyapunov and solve_discrete_riccati.
use `if isinf(current_min)`