docs: def part(f, ii):
      '''
      part(u, ii) for constant or constant potential u yields a constant-potential form of u[ii].
      part(f, ii) for potential function f yields a potential function g(x) that is equivalent to
        f(x[ii]).
      '''
      f = to_potential(f)
      if is_const_potential(f): return PotentialConstant(f.c[ii])
      else:                     return compose(PotentialPart(ii), to_potential(f))