Zulip Chat Archive

Stream: maths

Topic: localization.of


Johan Commelin (Feb 26 2019 at 15:11):

At some point there was some discussion about this (maybe on Github). Anyway, currently we have in ring_theory/localization.lean
https://github.com/leanprover-community/mathlib/blob/master/src/ring_theory/localization.lean#L71
a line reading

def of (r : α) (s : S) : loc α S := (r, s)

But we don't have an explicit name for the ring morphism from R to localization R S. Currently the file uses \lam x, of x 1 which is not very user friendly. I would expect that this ring morphism would be called localization.of. What are others opinions on this? Would it be OK to rename the current of to mk?

Chris Hughes (Feb 26 2019 at 15:17):

I would rename of to mk

Johan Commelin (Feb 26 2019 at 15:18):

Do you want a PR?

Johan Commelin (Feb 26 2019 at 15:18):

@Kenny Lau What is your opinion?

Kenny Lau (Feb 26 2019 at 15:21):

just PR what you want :}

Kevin Buzzard (Feb 26 2019 at 17:09):

I independently ran into this the other day. I definitely vote for a name other than of x 1.

Johan Commelin (Feb 26 2019 at 18:59):

On the other hand, should S be an explicit parameter of of? (S is the submonoid at which we localise.)

Chris Hughes (Feb 26 2019 at 19:58):

It's inferred by the type of s

Johan Commelin (Feb 26 2019 at 19:59):

s = 1

Johan Commelin (Feb 26 2019 at 19:59):

For mk I agree


Last updated: Dec 20 2023 at 11:08 UTC