add square matrix predicate