Zulip Chat Archive

Stream: Is there code for X?

Topic: retract to the unit ball


Jireh Loreaux (Feb 14 2024 at 22:47):

Do we have in Mathlib the retract of a normed space over onto the closed unit ball (x ↦ ‖x‖⁻¹ • x for 1 ≤ ‖x‖)?

Eric Wieser (Feb 14 2024 at 23:18):

Best I can do is

/-- Auxiliary construction; an element of norm 1 such that `a * unitOf a = ‖a‖`. -/
private def unitOf (a : α) : α := by classical exact if a = 0 then 1 else a  a⁻¹

Eric Wieser (Feb 14 2024 at 23:18):

(which I can't link since it was a local private def)

Yaël Dillies (Feb 14 2024 at 23:22):

I wrote the existence of the image as a lemma somewhere

Yury G. Kudryashov (Feb 15 2024 at 00:23):

We have docs#inv_norm_smul_mem_closed_unit_ball

Yury G. Kudryashov (Feb 15 2024 at 00:24):

Ah, you want a piecewise function, sorry.

Jireh Loreaux (Feb 15 2024 at 00:24):

I've already written it myself, I just wanted to make sure we didn't already have it.


Last updated: May 02 2025 at 03:31 UTC