Well, I was in practice in the law for 45 years and still know a bit about it! However I am not attempting to prove a point of law, and certainly not to someone who seems incapable of understanding it. The OP has my advice and has the choice either to take it or leave it! It is free!
I am adding this bit after re-reading Rob_TO's advice and appreciating that there may be an ambiguity in it. There is a distinction between (1) a contract which includes a term which the parties agree is to have retrospective effect and (2) a contract which bears an incorrect date, backdated by agreement between the parties to suggest that it was executed on a date earlier than that on which it was in fact executed. He may have been referring to the former whilst I understood him to mean the latter. I agree that X and Y can without acting dishonestly and without misrepresenting the facts enter into a contract (here a tenancy agreement) under which they agree that the tenancy is to take effect retrospectively (from an earlier date), though I doubt, without looking it up, whether the parties can by that means create a status (their status as tenants) retrospectively. And anyway there is no point in going to the trouble of doing it that way when it is sufficient to prove that the OP and his girlfriend were living together at her parents' house without the benefit of a tenancy, a fact which they can prove simply by producing signed statements from themselves and the parents and anyone else who knows the facts. Creating a tenancy retrospectively, even if possible by law, adds nothing to their case.