+/** Specialization of is_exactly_a<matrix>(obj) for matrix objects. */
+template<> inline bool is_exactly_a<matrix>(const basic & obj)
+{
+ return obj.tinfo()==TINFO_matrix;
+}
+
+/** Convert list of lists to matrix. */
+extern ex lst_to_matrix(const lst & l);
+
+/** Convert list of diagonal elements to matrix. */
+extern ex diag_matrix(const lst & l);