There is no legal definition in law. It's not stated in the equality act. The legal wording is exactly as this
Gender reassignment
(1)A person has the protected characteristic of gender reassignment if the person is proposing to undergo, is undergoing or has undergone a process (or part of a process) for the purpose of reassigning the person's sex by changing physiological or other attributes of sex.
(2)A reference to a transsexual person is a reference to a person who has the protected characteristic of gender reassignment.
(3)In relation to the protected characteristic of gender reassignment—
(a)a reference to a person who has a particular protected characteristic is a reference to a transsexual person;
(b)a reference to persons who share a protected characteristic is a reference to transsexual persons.
There is no guidance nor framework for demonstrating what counts as 'proposing to undergo' not what counts as 'reassigning the person's sex by changing physiological or other attributes of sex.'
Arguably the latter is actually a nonsense phrase because you can't change the attributes of sex! You can just have plastic surgery, pump yourself full of artificial drugs or change your clothes. None of which change the attributes of sex, cos that in your genes!
And hence why we are all arguing about the indefinable nebulous legally and scientifically illiterate nature of this whole debate and it's going to the Supreme Court.
It's nonsense speak that's in the eye of the beholder and therefore unfit for purpose because there is absolutely no consensus on what it means never mind an ability to take act within or to uphold the law.