I might be a little off but let me say what little I know about this. I will use as an example the package
nvidia-313 with version
At the basic level, when a package is created for a specific Ubuntu version it hold:
- Architecture to which it was made for (eg: 32 Bit, 64 Bit)
- For what release it was made for (eg: 12.04, 12.10, raring, oneric..)
- What specific version that package is (In my example above you can see raring2, which would mean is either the 3rd version of it if starting from 0 or the 2nd one if starting from 1. This of course depends on the PPA I used and what the maintainer had in mind)
What does all of this guarantee. It guarantees that:
The package will work "correctly" for that specific Ubuntu version, with that specific architecture. This is assuming the libraries that might be used by the package were not manually changed or otherwise tampered with in a clean environment.
The package will know for what architectures an version it is. If it is used in another different one, it will give you a warning or simply fail to install.
Most PPA developers and main repositories of Ubuntu will have a version of a package. It might be the same version (Like an Nvidia 313 for 13.04, 12.10, 12.04...) but when it was packaged, it used specific versions of some other packages (Dependencies or pre-depends) and some specific versions of some libraries it needed for that version of Ubuntu. Hence seeing the same package for different Ubuntu versions.
Will it work if used on a future or older version to the one it was made for, most like not. Some cases it will but at least it will give you a warning. In most of this cases it really depends on the dependencies of said package, since, if it used some libraries for example in 12.04 that have not changed or changed a little when 13.04, this package might even still work correctly on 13.04 (Even if it was made for 12.04), assuming of course it is at least the same architecture to avoid other problems.
To get to a specific question you are making:
if a binary in a package is built on 10.04 LTS and the same libraries
exist in Ubuntu 12.04 LTS, does Ubuntu guarantee compatibility?
If the same libraries exist in both, 10.04 and 12.04, with the same version, same architecture (And same pre-dependencies, versions of it, etc..), then it is my believe the package will work in both versions of Ubuntu. Now, this is not very likely since the speed at which any Linux distro changes over a period of a couple of months is huge.
Many libraries change, many updates are made, many improvements are added. So something that did not exist in 10.04 for example, might exist in 12.04 that will eliminate the need for, for example, using less libraries (Like if a packaged used 12 libraries in 10.04, but in 12.04 it would only need 2 to accomplish the same objective). This is also taking into consideration, changes made to the tools that compile and package each app. Many new techniques appear every year, many ways to optimize packages, compress them, read them, etc..
So, basing all of this on my little knowledge, I would guess, the more time exists between a package on different versions of Ubuntu, the less probable a guarantee will exist that the package will work between both Ubuntu versions.