Collecting things together we can give a formal definition of the mapping (distribution group and ranges) of a general array section.

If the th dimension of array is non-sequential, an integer
section subscript, , in this dimension behaves like a location-valued
subscript,
. Suppose
any such integer subscripts are replaced by their equivalent location
subscripts in this way. If the set of all location subscripts is now , the distribution group of the section is

where is the distribution group of the parent array. For a shifted index, as a matter of definition,

This makes sense--a shifted index is supposed to find an array element in the same process as the original location, albeit that the element could be in a ghost region.

The th range of the section is determined by the th triplet-valued subscript. If the th triplet-valued subscript is in dimension , the th range of the section is .

Because, as noted in section 4.4 non-trivial subranges are never considered to have ghost extensions, a section constructed with non-trivial triplet subscripts in some dimensions is not be considered to have accessible ghost extensions in those dimensions, even if its parent array did.

It shouldn't come as a surprise that subranges and restricted groups can be
used in array constructors, on the same footing as the ranges and
groups described in earlier sections. This means that
temporary arrays can be constructed with identical mapping to any
given section. This facility is useful when writing generic library
functions, like the `matmul()` of Figure 3.18,
which must accept complete distributed arrays or distributed array
sections without discrimination^{4.2}.

In the last three sections we introduced some new pieces of syntax but did not give any full example programs that use them. The reason is that restricted groups and subranges largely exist ``below the surface'' in HPJava. The new notations are mainly needed to add a kind of closure to the language. In our experience it is fairly uncommon to see subgroups or subranges used explicitly in HPJava programs.