On Wednesday, February 27, 2019 at 3:14:53 PM UTC-8, Nils Bruin wrote: > > On Wednesday, February 27, 2019 at 2:17:06 PM UTC-8, John H Palmieri wrote: >> >> Why does Sage allow inequalities in Z/nZ? >> > > I'm pretty sure that it's a historical artifact from Python 2, where > inequality relations exist between nearly all objects, because "cmp" is > 3-valued. None of the usual axioms are required or enforced. It had a nice > consequence that "sort" would work on almost every list; possibly with > deterministic results. > > Python 3 remedied this horrible wart in Python 2, setting a nice example > for sage to move away from having mathematically unmotivated inequalities. > With "cmp" stamped out, and the only mechanism for implementing relations > being "richcmp", where "==" and "<" use different code paths, we can reopen > https://trac.sagemath.org/ticket/3936 and fix this stuff (gradually). Yay! >
Okay, I thought it came from the Python 2 philosophy. It would be nice to change this. See https://stackoverflow.com/questions/54894845/how-to-fix-an-error-with-function-mod-in-sagemath for a case with < in Z/nZ which confused at least one user. -- John -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.