Waldek Hebisch
unread,Jul 29, 2026, 9:18:10 PM (6 days ago) Jul 29Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to fricas...@googlegroups.com
We have previously disscussed Comparable and proposal for
ComparableRepresentation. I have now a patch that introduces
ComparableRepresentation and uses it for Expression. Attached
is a small patch that defines ComparableRepresentation and
a text giving background and theory. In short, Comparable
as it is now is unsound. ComparableRepresentation asserts
weaker property, but can be sound.
I have the second, much bigger patch that is needed to compile
algebra when argument to Expression only have ComparableRepresentation.
Actually, this covers majority of current uses of Comparable.
But Comparable is kept for cases where we need mathematical
linear order but do not want to assert OrderedSet. FYI,
in my patched tree there are 42 use of Comparable and 104 uses
of ComparableRepresentation.
The second patch is mostly machanical, so in this sense
non interesting. In attached 'compar.txt' at the end I
indicate some possible changes to make ComparableRepresentation
really sound. My second patch compiles, but currently keeps
unchanged code of 'smaller?', which even with new documentation
probably still fails to deliver what is promised in obscure
corner cases. But small changes to code should make it
sound.
--
Waldek Hebisch