Zulip Chat Archive

Stream: Is there code for X?

Topic: Real.mod


Casavaca (Jun 11 2024 at 06:42):

Is there Real.mod? how can I do something like

abbrev Rad : Type := { x :  // 0  x  x < 2*π }
def ofReal :   Rad := fun x  Real.mod x (2 * π)

Yuyang Zhao (Jun 11 2024 at 06:46):

docs#Real.Angle.toReal might help.

Yuyang Zhao (Jun 11 2024 at 06:51):

import Mathlib

open Set Real

abbrev Rad : Type := Ico 0 (2*π)
noncomputable def Rad.ofReal :   Rad :=
  fun x  toIcoMod two_pi_pos _ x, toIcoMod_mem_Ico' two_pi_pos _⟩

Yaël Dillies (Jun 11 2024 at 09:36):

You are looking for docs#toIcoMod


Last updated: May 02 2025 at 03:31 UTC