Zulip Chat Archive

Stream: mathlib4

Topic: SignType.sign vs Real.sign


Yury G. Kudryashov (Oct 22 2023 at 19:36):

We have docs#SignType.sign and docs#Real.sign. Should we deduplicate?

Yury G. Kudryashov (Oct 22 2023 at 19:36):

(and expand API about SignType.sign if needed)

Yaël Dillies (Oct 22 2023 at 19:58):

and docs#Int.sign

Yaël Dillies (Oct 22 2023 at 19:59):

And yes please do! I tried deduplicating SignType.sign and Int.sign before but didn't get to the end.

Yury G. Kudryashov (Oct 22 2023 at 20:02):

I'll open an issue for now.

Eric Wieser (Oct 22 2023 at 20:42):

Yaël Dillies said:

And yes please do! I tried deduplicating SignType.sign and Int.sign before but didn't get to the end.

This is now much harder because the latter is in Std and the former in mathlib

Eric Wieser (Oct 22 2023 at 20:42):

But we can at least lose Real.sign without that problem

Scott Morrison (Oct 22 2023 at 21:55):

Yes, we won't be able to get rid of Int.sign because it is extensively used in programming and so needs to be there directly, not mediated by a typeclass.

Eric Wieser (Oct 22 2023 at 21:56):

If we relaxed PreOrder to LT on docs#SignType.sign then I don't see the typeclasses being an obstacle for Std


Last updated: Dec 20 2023 at 11:08 UTC