Wave propation -- Speed variation in different indices

Homework Statement:
Speed variation in different indices
Relevant Equations:
c = λ.f
Hi,
I have this question about the variation of wavelength and frequency as light travels to an environment with a different index.
As we have learnt in class, celerity can change as light enters a different environment, however frequency and wavelenght are independent and remain constant (right?)
So if this is the case, and c = λ.f , I don't understand how celerity can change but λ and f remain constant? Are there different parameters that I have to take into account that I haven't?
Thank you so much for your help!

Doc Al
Mentor
As we have learnt in class, celerity can change as light enters a different environment, however frequency and wavelenght are independent and remain constant (right?)
Nope, not right. Frequency remains constant, not wavelength.
So if this is the case, and c = λ.f , I don't understand how celerity can change but λ and f remain constant?
Good! You knew something must be wrong somewhere. Nope, not right. Frequency remains constant, not wavelength.

Good! You knew something must be wrong somewhere. Ohh ok thank you so much!

Oh but there is still something bugging me )):.
In the electromagnetic wave spectrum, we can see that as wavelenght increases, frequency decreases and vice versa and in this case, celerity is unchanged.
So in this case, wavelenght and frequency changes due to the variation of energy and is this case what is the formula for this? I'm really struggling to see when certain variables change and when they don't...
• 