when matrix dimension constraints are caused by multiple matrices auxiliary type constraints are generated. need to deal with this problem