I'm taking a course in topology and we just defined the connected sum of connected surfaces (2-manifolds) as follows:
Given $S_1,S_2$ surfaces and $D_i\subseteq S_i$ open disks with $\varphi : \partial D_1 \rightarrow \partial D_2$ a homeomorphism the connected sum of $S_1,S_2$ is $S_1\#S_2=(S_1-D_1\cup S_2-D_2)/\varphi$
This definition is said to be independent of the choice of $D_1,D_2,\varphi$ (up to homeomorphism) but I can't find an explanation besides the ones that tackle this in the general case (n-varieties). I'm quite sure there exist one since in every one of the explanations I found they were remarking that the complications arise for the case $n\geq 3$
Do you have a source or an explanation?