Zulip Chat Archive

Stream: general

Topic: New segment notation


Yaël Dillies (Sep 06 2021 at 12:08):

I'm redefining everything in analysis.convex.basic to take in k, the underlying ordered_semiring, as an argument (it's currently always ). So the notation [x, y] for segment x y needs changing to mention k.

What do you think of [x -[k] y]? This has also the advantage to make sure Lean isn't confused with list notation.

Johan Commelin (Sep 06 2021 at 12:30):

I think I could learn to like it (-;

Yaël Dillies (Sep 06 2021 at 12:31):

Would you even go to the extent of liking ]x -[k] y[ for open_segment k x y? :innocent:

Johan Commelin (Sep 06 2021 at 12:38):

I personally have never liked the inverted brackets notation. And I'm sure that syntax highlighters will also start crying (-;

Oliver Nash (Sep 06 2021 at 12:38):

Speaking only for myself, ]x -[k] y[ is a stretch too far.

Eric Wieser (Sep 06 2021 at 12:53):

How about [x, y][k]?

Oliver Nash (Sep 06 2021 at 12:53):

Or even [x,y:k] (if that's possible) or [x,y;k] etc?

Eric Wieser (Sep 06 2021 at 12:53):

Also you can likely keep the notation as [x, y] for places where k can be inferred

Eric Wieser (Sep 06 2021 at 12:56):

Maybe k ⬝ [x, y] to resemble the singleton span notation?

Yaël Dillies (Sep 06 2021 at 12:58):

Oliver Nash said:

Or even [x,y:k] (if that's possible) or [x,y;k] etc?

That's probably very bad considering type annotations.

Oliver Nash (Sep 06 2021 at 12:58):

Even with the semicolon?

Yaël Dillies (Sep 06 2021 at 12:58):

No, with the semicolon it should be fine.

Oliver Nash (Sep 06 2021 at 12:59):

Eric Wieser said:

Maybe k ⬝ [x, y] to resemble the singleton span notation?

This could be the best option but it slightly bothers me that this notation sort-of suggests [x, y] has a meaning on its own.

Yaël Dillies (Sep 06 2021 at 12:59):

My notation tries to look like the betweenness operator [a - b - c]

Johan Commelin (Sep 06 2021 at 13:00):

I think I like [x,y;k]. It's concise, which is good.

Yaël Dillies (Sep 06 2021 at 13:02):

Yaël Dillies said:

My notation tries to look like the betweenness operator [a - b - c]

and also like the linear_map and continuous_linear_map notation E →ₗ[k] F and E →L[k] F

Patrick Massot (Sep 06 2021 at 19:15):

Yaël, are you resurrecting #4787? In any case I wouldn't recognize any of the proposed notations, and I really hope the plain [x,y][x, y] notation will be kept for the real case.

Yaël Dillies (Sep 06 2021 at 19:22):

Yes, but that's not what this PR is doing. #4787 generalizes to arbitrary affine spaces. I'm first generalizing to arbitrary vector spaces, then I will have a follow-up PR to generalize to affine spaces.

Yaël Dillies (Sep 06 2021 at 19:23):

[x,y][x, y] notation is local anyway. So you can define it when needed for the real case, sure.


Last updated: Dec 20 2023 at 11:08 UTC