I wonder if the sentences below are equivalent.
They arrived home to discover they had been robbed.
On arriving home they discovered they had been robbed.
The second sentence strongly suggests that immediately upon arriving home, they discovered that they had been robbed.
The first sentence doesn't have that strong suggestion of immediate discovery of the robbery.