Zulip Chat Archive
Stream: mathlib4
Topic: Coercion for `WithBot` and `WithTop`
Brendan Seamas Murphy (Jun 10 2024 at 04:47):
Hi @Jon Eugster , do you remember why the coercion for WithBot
was changed to coe
from coeTC
during the port? I was wondering why the coercion types are different for WithTop
and WithBot
and from the git blame I figure it was an oversight
Kevin Buzzard (Jun 10 2024 at 06:56):
The whole coercion machinery changed quite a bit from lean 3 to lean 4 and there was no obvious bijection between the way to do things in lean 3 and in Lean 4 (did coeTC
even exist in lean 3?)
Brendan Seamas Murphy (Jun 10 2024 at 06:57):
(deleted)
Brendan Seamas Murphy (Jun 10 2024 at 06:57):
Sorry, misread
Brendan Seamas Murphy (Jun 10 2024 at 06:57):
I don't really understand the hierarchy, although I haven't had cause to. This inconsistency just stood out to me
Brendan Seamas Murphy (Jun 10 2024 at 06:59):
It seems like WithTop and WithBot should have entirely synced APIs (even have everything done through an automatic dualization like to_additive
, but that seems like a big project to implement)
Jon Eugster (Jun 10 2024 at 08:51):
I don't think that's a deliberate difference, and as Kevin said, I think it wasn't always obvious what to do with coersions in the port, especially if there were weird errors afterwards.
You should see if you can create a PR that aligns WithBot
and WithTop
Last updated: May 02 2025 at 03:31 UTC