I have a bike. I got it as a gift from my (then) girlfriend.
I have absolutely no papers from it.
However, in the case of a later legal dispute, I may need to somehow prove it is mine, both in a criminal and a civil law sense.
What could I do?
You say "That's my bike."
That will be enough in 99.999% of situations.
In the remaining 0.001% you add the details about who gave it to you and approximately when and where you normally keep it and that amusing (in retrospect) yet alarming (at the time) situation where you got it hooked to the nice lady's bag on the train and nearly missed your stop. And then you show the photos you have of you with your bike.
If someone is claiming that it isn't yours, its theirs then they will need to provide evidence of that. Whoever is judging whose bike it is will decide on the balance of the evidence who has proved their claim.
It sounds like you are anticipating a future legal dispute because either you suspect that your ex-girlfriend acquired it illegally or you suspect she may want it back and will deny that it was a gift.
If the former, perhaps you should consider contacting the police to run the serial number and find out if it has been reported stolen. In many jurisdictions, you can do this online anonymously. If it is, you should give it back to the rightful owner. It cost you nothing after all.
If the latter, do you have ANY contemporaneous evidence that at least shows your interpretation of the gift at the time? Did you even send a text that said "Thanks for the bike!"?
If it wound up in court, the judge would have to decide who is more credible, who has a better recollection of the events, and whose story makes more sense. For example, if she bought a bike that would only fit you, and you had exclusive use of the bike for the remainder of your relationship, then it doesn't make much sense for her to argue that she was just lending you the bike. On the other hand, if she had had the bike for a long time or if it was her brother's bike and he was out of the country for a year, then she could make a sensible argument that you were only given the bike to use temporarily.
I am living in Germany, and 6 months ago I bought a bike from someone (without papers of course) that I found in one ads website.
Few weeks later, someone came and said that is his bike, and he wants it back (in Germany, alot of bikes are stolen everyday), and as I refused, he went to police !
Luckly, before I buy anything used from people I don't know (sometimes even the people I know), I make always some screenshots from the ad, and I save some records (if for example the negotiation was done in a social network, or even a mobile).
So the moment the police was by me, I showed them everything, and that was really helpful (of course it was not done in some minutes, but it took some weeks).