

When he activated it, it got locked to the "wrong" provider. I can prove that, because I intentionally gave him the wrong SIM to see if I accidentally get an unlocked replacement phone.

The employee at the Genius Bar locked it with my SIM. It is also noteworthy that my iPhone 4 had a model number MC605FD/A (locked) and it was warranty-exchanged in a Swiss Apple retail store to a MC605B/A. It is not possible to see to what carrier the phone is locked (or not) by just looking at the model number, but it gives you an idea where the phone was intended to be sold. The region codes are probably used to separate the same device by region (different charger, packaging language, etc.). The following list gives an overview of all these region codes. The two letters behind it, LL in this case, specify the region code. You can find these numbers on the Models page.

All Apple iOS devices have a model number which looks something like this: MC605LL/A.
