  Take an open domain $\Omega \subset \mathbb R^n$ whose boundary may be
composed of pieces of different dimensions. For instance, $\Omega$ can be a
ball on $\mathbb R^3$, minus one of its diameters $D$, or $\Omega \subset
\mathbb R^3$ could be a so-called saw-tooth domain, with a boundary consisting
of pieces of 1-dimensional curves intercepted by 2-dimensional spheres. Under
appropriate geometric assumptions, such as the existence of doubling measures
on $\Omega$ and $\partial \Omega$ with appropriate size conditions, we
construct a class of degenerate elliptic operators $L$ adapted to the geometry,
and establish key estimates of elliptic theory associated to those operators.
This includes boundary Poincar\'e and Harnack inequalities, maximum principle,
and H\"older continuity of solutions at the boundary. We introduce Hilbert
spaces naturally associated to the geometry, construct appropriate trace and
extension operators, and use them to define weak solutions to $Lu=0$. Then we
prove De Giorgi-Nash-Moser estimates inside $\Omega$ and on the boundary, solve
the Dirichlet problem and thus construct an elliptic measure $\omega_L$
associated to $L$. At last, we introduce Green functions, and use them to prove
a comparison principle. Since our theory emphasizes measures, rather than the
geometry per se, the results are new even in the classical setting of a
half-plane $\mathbb R^2_+$ when the boundary $\partial \mathbb R^2_+= \mathbb
R$ is equipped with a doubling measure $\mu$ singular with respect to the
Lebesgue measure on $\mathbb R$. Finally, the present paper provides a
generalization of the celebrated Caffarelli-Sylvestre extension operator from
its classical setting of $\mathbb R^{n+1}_+$ to general open sets, and hence,
an extension of the concept of fractional Laplacian to Ahlfors regular
boundaries and beyond.
