Q3. Embedding codimension (sometimes simply codimension). Q1. Yes. We can assume that $R$ is complete since embedding dimension and dimension do not change by completion. Choose a regular local ring $S$ with the same embedding dimension of $R$ such that $R=S/I$ and localize. Q2. For excellent rings. An indirect proof, but short enough to be written here, is as follows. Embedding dimension is the diference between the invariant $\delta_2$ in ["Ragusa, On Opennes ..."][1] which is upper semicontinuous by Proposition 3.6 in that paper, and the complete intersection defect which is upper semicontinuous by the main theorem in ["Alonso-Rodicio, On the upper ..."][2]. [1]: http://www.ams.org/journals/proc/1980-080-02/S0002-9939-1980-0577744-1/S0002-9939-1980-0577744-1.pdf [2]: http://www.mscand.dk/article/view/12275/10291