this is one of the key concepts people have to grasp when it comes to chronic pain:
If the expectation or "mental representation" is that moving will cause pain, then it will. But.. if another idea is supplied, i.e., "Find a way to move without causing pain", then different mental representations could be built, learned, attended to, become an endogenous "stimulus".Alain Berthoz - in his excellent book "The Brains Sense of Movement" writes something along these lines:
if the brain "decides" to move the body - it produces so-called pre-sensations which are based on a copy of the motor command it sends to the muscles.
That way the brain is able to anticipate the consequences of the intended action - and we can already "feel" something - even if there is no actual sensory feedback (proprioception, touch, etc.) yet.
The data/feedback that is sent back to the brain from the periphery is only checked sporadically and only to alter the existing pre-sensation.
That's why - in chronic pain at least - movements can hurt before they have been carried out. The brain remembers that the movement hurt last time - and so pain is produced as an anticipatory effect.
By re-training movements by imagining them being carried out pain-free the virtual body/virtual movement program can be re-wired and re-trained.
This is something that Moshe Feldenkrais has built on in his Awareness through Movement method - you do the movement with one side of your body and mentally rehearse it for the other side before actually moving it.
It's very difficult to do this when you are starting out - training mentally is the same as doing it for real: you get better through repeated practice.
Our mental skills, tools, ... also need constant training - otherwise they waste away as fast as our muscles do when we stop exercising.