Yes, that is a good point. I think you can totally write a program that checks given two lists as input, xs and xs’, that xs’ is sorted and also contains exactly all the elements from xs. That allows us to specify in code what it means that a list xs’ is what I get when I sort xs.
And yes I can do this without talking about how to sort a list. I nearly give a property such that there is only one function that is implied by this property: the sorting function. I can constrain what the program can be totally (at least if we ignore runtime and memory stuff).
Yes, that is a good point. I think you can totally write a program that checks given two lists as input, xs and xs’, that xs’ is sorted and also contains exactly all the elements from xs. That allows us to specify in code what it means that a list xs’ is what I get when I sort xs.
And yes I can do this without talking about how to sort a list. I nearly give a property such that there is only one function that is implied by this property: the sorting function. I can constrain what the program can be totally (at least if we ignore runtime and memory stuff).