Zulip Chat Archive

Stream: Is there code for X?

Topic: Reals modulo period


suhr (Jan 31 2026 at 09:43):

Is there a type of reals quotiented by addition of period?

Violeta Hernández (Jan 31 2026 at 09:45):

Isn't this docs#AddCircle ?

suhr (Jan 31 2026 at 09:51):

I believe it is. Thanks.

suhr (Jan 31 2026 at 15:11):

But now I wonder if there's something like % for reals.

suhr (Jan 31 2026 at 15:55):

It's Int.fract for mod 1. Very confusing naming by the way.

Yury G. Kudryashov (Jan 31 2026 at 17:16):

See docs#toIcoMod and nearby definitions.

Violeta Hernández (Jan 31 2026 at 18:49):

suhr said:

It's Int.fract for mod 1. Very confusing naming by the way.

What do you find confusing? The Int namespace or the fract name?

suhr (Jan 31 2026 at 19:59):

Int namespace.

Eric Wieser (Jan 31 2026 at 21:22):

The Int is to match Int.floor which it is defined in terms of, but that's admittedly not a great reason

Ruben Van de Velde (Jan 31 2026 at 21:24):

It's "taking off the integer", but yeah

Violeta Hernández (Feb 01 2026 at 00:04):

Would anything break if we just moved this to the root namespace? It's not like we have to disambiguate, like with docs#Nat.floor and docs#Int.floor.

Yury G. Kudryashov (Feb 01 2026 at 00:12):

I think that we can move it, if we preserve the old names as protected deprecated aliases for those who have Int.fract in their code.

Yury G. Kudryashov (Feb 01 2026 at 00:13):

OTOH, a definition in the root namespace causes a minor conflict with docs#ZSpan.fract.

Snir Broshi (Feb 01 2026 at 00:30):

We can be trend-setters and move it to namespace Mathlib :sunglasses:


Last updated: Feb 28 2026 at 14:05 UTC