Most typed programming languages will allow you to form a pair of type (Integer, Integer), and reject programs which try to return something like (Integer, Float).
Dependently typed languages might allow you to declare a type (n, m) where n and m are integers, and n < m, and will reject programs which attempt to return pairs with n > m.
The key step here is that this rejection is done during compilation, and so while your program is running you can be absolutely sure that n < m.
Dependently typed languages might allow you to declare a type (n, m) where n and m are integers, and n < m, and will reject programs which attempt to return pairs with n > m.
The key step here is that this rejection is done during compilation, and so while your program is running you can be absolutely sure that n < m.