I think the three relation are valid, as they each describe something else. a) is the commercial routes, b) is the number of the route description for train drivers (although I cannot check because I do not have access to it), and c) is the infrastructure itself (taken from https://data.sbb.ch/explore/dataset/linie, which I also added to https://wiki.openstreetmap.org/wiki/Switzerland:Public_Transport/Railways#Liniennetz).

So I believe that c) is the relevant number for the "ref" attribute, as I did here. And I suppose that a) could indeed be corrected. 