How is it possible for the wavelength of light to change in a medium? So my physics class has just finished a long unit on optics while at the same time I've been trying to teach myself relativity. I admit my understanding is probably rudimentary, but I figured all the more reason to ask for help on this. 
So I'll start off my question just with what I know of relativity, just to see if maybe my issue is in my understanding of it. I was told that the rest mass of light is 0 based on the equation $E=pc$ adequately representing the energy of light instead of the original equation, $$E^2 ={ (m_0 c^2)^2 + (pc)^2 } \,\!.$$ Now because $E=pc$, we can then say, based on $p=mv$, that $E=(mv)c$. changing relativistic mass out for invariant mass, we can say $$E = \frac{m_0 v c}{\sqrt{1-\frac{v^2}{c^2}}}.$$ Now when we plug a photon with velocity $c$ into this equation,
we get that $\frac{1}{\sqrt{1-\frac{(c)^2}{c^2}}}=\frac{1}{0}$, and that along with the rest of the equation gives us $E=\frac{(0)(c)c}{(0)}$. We then of course say $\frac{0}{0}=undefined$, which from my basic understanding of other people showing this to me, means that E is a value, it's just that this specific equation where we use the lorentz factor and rest mass is incapable of defining what the value is, thus we rely on other equations such as $E=hf$. Please feel free to correct me if that is all wrong, it's just what I've been told thus far.
Now then, I'm going to put a bookmark in that thought above so I can talk about optics. In optics, one of the first things we learned is that the wavelength of light changes in a medium based on $c=fλ$, where $f$ is being used for frequency, because $c$ changes in a medium, as mapped by $n=\frac{c}{v}$, where $v$ is, in that equation, the speed of light in a medium, and $c$ is now defined as the constant speed of light in a vacuum. 
So based on the final equation given in my paragraph on relativity, if the speed of light $v$ (again, $v$ meaning speed of light in a medium) changes in a medium, we get this equation: $E = \frac{m_0 v c}{\sqrt{1-\frac{v^2}{c^2}}}$ where $v < c$ in a medium that is not a vacuum, meaning our lorentz factor does not equal 0 anymore. However, $E > 0$ still, and therefore it would seem that rest mass can no longer equal 0 since it is being multiplied by two real numbers, and any real number multiplied by 0 should be 0. 
Finally, on to my actual question. The issue shown in the paragraph above has already been addressed numerous times it would seem, stating that particles in the medium might absorb the photons energy and then emit them back out. The issue I'm having understanding is that this answer does not seem to show how the wavelength of light could still change in the medium. if $c$ is actually constant in that medium and only appears to change because it is being delayed by absorption, then the wavelength of light should not change because of the prior equation, $c=fλ$. This problem would seem to come up in any answer that states that the speed of light is only appearing to change, and therefore it seems to me that either the idea that the wavelength of light changes in a medium or something in relativity is inadequate. 
Does anyone have any explanation for how to reconcile this issue, or perhaps have an answer to the original problem of the speed of light changing in a medium that circumvents it? Or is the problem that just my math or understanding is incorrect and needs to be tweaked?
 A: The basic confusion comes with identifying Photons with Light, i.e. the quantum mechanical entity that a photon is, with the classical electromagnetic wave. The classical electromagnetic wave emerges  from a confluence of photons, the quantum mechanical entities, in an analogous way that a crystal symmetry emerges from the quantum mechanical entities of molecules.
Photons, as quantum mechanical entities, have wave functions which have real and imaginary parts which will contribute in interactions to the probability distributions. They build up the classical electric and magnetic fields of the beam in synergy of wave functions, not interacting , but by their complex wave functions being in phase with each other. In vacuum a wave front is built up having the same frequency h*nu, photon energy and light beam frequency. 
When the light beam hits a medium, if it is opaque, the photons scatter and are absorbed and turn into infrared eventually. In a transparent medium the organization of the wavefront  changes, as the photons scatter elastically, the path on each photon changes, each individual photon is not following the shortest ray path. The collective wave function built up from the scattered photon changes the velocity of the wavefront that they build up accordingly. Thus the wavelength changes because of the changed path length of the constituent photons of the beam, with respect to the ray direction.
Note that the scattering has to be elastic for phases to be retained and a coherent beam to come out. It is not a matter of absorbing and re-emission as is wrongly stated sometimes. If the photon excites an energy level the deexcitation will have arbitrary phases and direction with the original beam.
A: There are a lot of intertwined ideas here. Let me try to tackle just part of it.
When a photon interacts with a medium, it causes local polarization - that is, electrons are displaced by the E/M field of the photon. This interaction leads to a slowing down of the wave - and, as you pointed out, a shortening of the wavelength. However, at this point the wave energy is partly in the medium - the displaced electrons. The "wave" you are seeing is both the electromagnetic wave (the photon) and the "Mexican wave" of electrons along the way that move with the photon as it passes. You can't simply throw equations that relate to photons in a vacuum at such a situation and expect the result to be correct.
Reading your question, I think you know that - so really, I'm just confirming it for you.
A: Maybe the explanations you got until now were sufficient, but I would just want to add something simple. 
Let's represent a light-wave traveling in the direction $x$ as $Ae^{i\phi}$
where the phase of the wave is 
$(\text i) \ \phi = kx - \omega t = 2\pi\left(\frac {x}{\lambda} - \nu t\right).$
Consider a wave-front (a surface on which the phase is constant), and let's denote by $\Delta x$ the distance to the next wave-front with the same phase, and by $\Delta t$ the time needed for the light to travel this distance.
$(\text {ii}) \ 0 = \frac {\Delta x}{\lambda} - \nu \Delta t.$
In vacuum $\Delta x = c\Delta t$, and we can also simplify by $\Delta t$
$(\text {iii}) \  \frac {c}{\lambda} = \nu.$
However, in a medium with refraction index $n$ we are said that the velocity is $n$ times smaller. So, since the frequency doesn't change
$(\text {iv}) \ \frac {c}{n} \frac {n}{\lambda} = \nu,$
or,
$(\text {v}) \ v \frac {n}{\lambda} = \nu,$
Therefore $\lambda$ shortens, 
$(\text {vi}) \ \lambda ' = \frac {\lambda}{n}.$ 
A: The wavelength of harmonic EM wave changes in medium, but saying "the phase velocity of the wave changes in the medium, while frequency stays the same" is no explanation, since then we have the question why phase velocity changes in the medium.
The explanation is based on the wave theory of light, not photon theory. Essentially, primary EM wave from the source interacts with the electric particles in the dielectric medium in such a way that polarization $\mathbf P$ of the medium oscillates with the same frequency as the primary wave, but due to mutual interaction of the particles in the medium the spatial profile of the polarization has modified wavelength. Microscopically, the electric field of the medium adds to the primary wave and results in a complicated EM wave with same frequency but complicated spatial profile (reflecting distribution of the electric particles in the medium). This complicated field, however, has similar effect on the particles of the medium as simple harmonic wave with modified wavelength. Details can be found in advanced textbooks on wave optics and research papers; it is not a simple issue, though.
A: Yes 
There is a trivial answer:  frequency doubling crystals (KDP, BaTiO3, ...).  Changing the frequency (and hence the wavelength) is one outcome from non-linear optics.  The foundations of non-linear optics are that the media does not respond linearly to the electro-magnetic wave.
Consider that the media is not a simple harmonic oscillator.  If that is the case, a sine wave could be clipped or misshaped in some way.  This produces harmonics of the original wave.  This is a simple way to envision how non-linear optics can change the wavelength.
Another example is acousto-optics.  Phonons traveling through the material both diffract incoming light and transfer momentum.  The wave that exits the A-O material is frequency shifted by the frequency of the acoustic wave.
BTW the first green laser pointers were frequency doubled YAG lasers!
