/// If this domain is already ground, return a mutable reference to the underlying [GroundDomain].
/// If this domain is unresolved, return a mutable reference to the underlying [UnresolvedDomain].
/// If this is a [GroundDomain::Matrix], get immutable references to its element and index domains
/// If this is a [GroundDomain::Matrix], get mutable references to its element and index domains
/// If this is a [GroundDomain::Set], get immutable references to its attributes and inner domain