static private String requireIdentifier(String name) {
            if (name == null)
                throw new IllegalArgumentException("A dimension name cannot be null");
            if ( ! TensorType.labelMatcher.matches(name))
                throw new IllegalArgumentException("A dimension name must be an identifier or integer, not '" + name + "'");
            return name;
        }
Returns the dimension resulting from combining two dimensions having the same name but possibly different
types:

[N] + [M] = [ min(N, M) ]
[N] + [] = []
[] + {} = {}
vespajlib/src/main/java/com/yahoo/tensor/TensorType.java