Instantaneous Galilean invariance is used to derive from first princip
les the expression for the Hamiltonian of an electron with a position-
dependent effective mass, as well as the adequate boundary conditions
for the wave function in the case of abrupt heterojunctions. A very el
ementary model sustaining these results in the envelope-function appro
ximation is also proposed.