  Let $G$ be a group and let $k$ be a field. Kaplansky's direct finiteness
conjecture states that every one-sided unit of the group ring $k[G]$ must be a
two-sided unit. In this paper, we establish a geometric direct finiteness
theorem for endomorphisms of symbolic algebraic varieties. Whenever $G$ is a
sofic group or more generally a surjunctive group, our result implies a
generalization of Kaplansky's direct finiteness conjecture for the near ring
$R(k, G)$ which is $k[X_g\colon g \in G]$ as a group and which contains
naturally $k[G]$ as the subring of homogeneous polynomials of degree one. We
also prove that Kaplansky's stable finiteness conjecture is a consequence of
Gottschalk's Surjunctivity conjecture.
