Showing content from http://mail.python.org/pipermail/python-dev/attachments/20150912/3755b82e/attachment.html below:
<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 12, 2015 at 1:20 AM, Terry Reedy <span dir="ltr"><<a href="mailto:tjreedy@udel.edu" target="_blank">tjreedy@udel.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> A mathematician has no problem with 'a'+'b' != 'b'+'a'.</blockquote><div><br></div><div>I doubt it. A binary operation denoted + (and called addition) is almost universally a commutative operation. A non-commutative binary operation is usually denoted * (and called multiplication).</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> After closure,</blockquote><div><br></div><div>Do you refer to "set closure" operation [1] here? I am not sure why it is relevant nor why it is "basic."</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> associativity is the most 'basic' operation, but non-associative operations are studied.<br></blockquote><div><br></div><div>I think you have missed the words "property of" before "operation" above.  "Closure", "commutativity", "associativity", etc. are properties of operations, not operations.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
The equality relation, mapping pairs of members of a set to True or False is a different matter. Being an equivalence relation is fundamental to both normal logic, algebraic proofs, and the definition of sets.</blockquote><div><br></div><div>Agree, and we have a solution for PEP 495 which preserves == as and equivalence (symmetric, reflexive and transitive) relationship. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">
<br></span>
Datetime members, are rather unusual beasts. They are triples consisting of a member of a discrete sequence (with some odd gaps),</blockquote><div><br></div><div>I assume you are using a word "member" to refer to class instances. There are no gaps in datetimes: there are instances that don't correspond to any valid local time and (pre-PEP 495) there are local times that don't correspond to any instances with a given tzinfo. The unrepresentable times can still be represented using a different tzinfo.  PEP 495 adds a way to represent all times using instances with any tzinfo, but on the flip side adds many more instances that are not "canonical" representations (e.g. fold=1 instances for regular times.)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> a tz tag, and a 0/1 fold tag. The tz tags divide datetimes into equivalence classes.</blockquote><div><br></div><div>That I don't understand. Local t and u = t.astimezone(UTC) are equal (t == u evaluates to True), so u and t belong to the same equivalence class.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> The '-' operation is also unusual in being defined differently for pairs in the same or different equivalence classes.</blockquote><div><br></div><div>I am not concerned about '-'. My main concern is about order operations. I am happy with the solution I have for ==, but I am still struggling with the non-transitivity of <.</div><div><br></div><div>Comparison operations are special because they are used implicitly in other operations. The < operator is used implicitly in bisect. If it does not satisfy the (partial?) order properties, bisect may enter an infinite loop.</div><div><br></div><div>[1]: <a href="http://mathworld.wolfram.com/SetClosure.html">http://mathworld.wolfram.com/SetClosure.html</a></div></div></div></div>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4