This lets us use the existing nice gmap/gset infrastructure even for total functions when the domain type is finite.
gmap
gset