Do not cache the result of reduced_form_with_sign,
semi_pos_def_matarices and _semi_pos_def_matarices_less_than.
Added a test for semi_pos_def_matarices.