The theory of functions of a complex variable is a hybrid of vector algebra and ordinary algebra. It makes it possible to work with vector quantities as with algebraic ones. The modern theory of functions of a complex variable was created by the French mathematician Augustin Cauchy (1789-1857), later it was rapidly developed and found its application in solving various problems of physics - in aerodynamics, hydrodynamics, elasticity theory, etc. However, this theory is used exclusively for solving problems on the plane. Therefore, the next natural step is to extend this theory into space, so that we can obtain the solution of physical problems directly in space. The creation of such a theory is associated with some serious problems, for example, the appearance of so-called zero divisors, spatial complex numbers that are not equal to zero but when multiplying for some reason give zero. There is also a Frobenius theorem which prohibits the propagation of complex numbers into a space without abandoning some ordinary algebraic operations (for example, commutative multiplication). In this article an attempt is made to construct a theory of spatial complex functions (shortly, tunnel mathematics) in which zero divisors do not appear and all the usual algebraic operations are preserved. The possibility of applying this theory to some problems of the theory of elasticity and hydrodynamics (the steady Lamé and Navier-Stokes equations) is also considered.