We show that every Sobolev function in W-loc(1, p) (U) on a p-quasiopen set U subset of R-n with a.e.-vanishing p-fine gradient is a.e.-constant if and only if U is p-quasiconnected. To prove this we use the theory of Newtonian Sobolev spaces on metric measure spaces, and obtain the corresponding equivalence also for complete metric spaces equipped with a doubling measure supporting a p-Poincare inequality. On unweighted R-n, we also obtain the corresponding result for p-finely open sets in terms of p-fine connectedness, using a deep result by Latvala.
Funding Agencies|Swedish Research CouncilSwedish Research Council [2016-03424, 621-2014-3974]