order-preserving pair
nounUK /ˈɔː.də prɪˌzɜː.vɪŋ peə/
US /ˈɔːr.dɚ prɪˌzɝː.vɪŋ per/
An order-preserving pair is two things that stay in the same order when you change them in the same way.
In the list, the order-preserving pair (2, 5) becomes (4, 10) after doubling, so the smaller number is still first.
RELATED WORDS
OTHER MEANINGS
2. A pair of elements whose relative order is kept by a function applied to both.
The function is increasing, so every order-preserving pair stays in the same order.
3. Two values that compare the same way before and after a transformation.
Checking an order-preserving pair helps confirm the transformation does not flip values.
4. In sorting, a pair of items that keeps its original position relative to each other.
A stable sort keeps each order-preserving pair in its original order.