diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 3b39b7f20a1..b56e68f8b4d 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -4014,6 +4014,8 @@ static RegisterPrimOp primop_sort({ 1. Transitivity + If a is less than b; b is less than c. Then it follows that a is less than c + ```nix comparator a b && comparator b c -> comparator a c ``` @@ -4026,6 +4028,9 @@ static RegisterPrimOp primop_sort({ 1. Transitivity of equivalence + If a is NOT less than b; b is NOT less then a; a and b are equal according to the comparator. + If b is equal to c then it follows that a is equal to c + ```nix let equiv = a: b: (!comparator a b && !comparator b a); in equiv a b && equiv b c -> equiv a c