Zulip Chat Archive

Stream: general

Topic: Abbreviation for ∙?


Yury G. Kudryashov (Jul 14 2023 at 23:32):

Should we add an abbreviation for as in K ∙ v = Submodule.span K {v}?

Yury G. Kudryashov (Jul 14 2023 at 23:33):

Question to those who use this notation: what local abbreviation did you add for this symbol?

Yury G. Kudryashov (Jul 16 2023 at 23:49):

In Lean 3 it was available as \. but now it is taken by · MIDDLE DOT

Yury G. Kudryashov (Jul 16 2023 at 23:51):

@Heather Macbeth :up:

Heather Macbeth (Jul 16 2023 at 23:53):

Funny, I can't remember! Don't we have a big table of VS Code shortcuts somewhere, though?

Yury G. Kudryashov (Jul 16 2023 at 23:54):

https://raw.githubusercontent.com/leanprover/vscode-lean4/master/vscode-lean4/src/abbreviation/abbreviations.json

Yury G. Kudryashov (Jul 16 2023 at 23:55):

The problem is that \. is now taken for the "focus on the first goal" / "placeholder for a lambda function" symbol.

Yury G. Kudryashov (Jul 17 2023 at 01:12):

So, what should be the new shortcut?

Kevin Buzzard (Jul 17 2023 at 06:18):

Is cdot used? That's what I type in latex

Yury G. Kudryashov (Jul 17 2023 at 06:46):

It is used for (matrix multiplication)

Johan Commelin (Jul 17 2023 at 06:51):

I suppose we can now use * for matrix multiplication in ml4, right?

Johan Commelin (Jul 17 2023 at 06:51):

Because of HMul.

Patrick Massot (Jul 17 2023 at 07:07):

Heather Macbeth said:

Funny, I can't remember! Don't we have a big table of VS Code shortcuts somewhere, though?

In the VSCode extension you can access that table using Ctrl-shift-p Lean4: Show all abbreviations

Yury G. Kudryashov (Jul 17 2023 at 07:15):

@Johan Commelin Will Lean try to cast both sides to the same type?

Johan Commelin (Jul 17 2023 at 07:16):

No, I think we can teach it that (m x n)-matrix times (n x o) matrix is of size (m x o)

Eric Wieser (Jul 17 2023 at 07:48):

Should we change the notation to reuse • now?

Eric Wieser (Jul 17 2023 at 07:49):

instance : HSMul (Type u) M where hSMul R x := span R x

Johan Commelin (Jul 17 2023 at 07:51):

That doesn't type check, right?

Johan Commelin (Jul 17 2023 at 07:51):

span R x only makes sense if there is a semiring instance for R

Johan Commelin (Jul 17 2023 at 07:52):

And a Module R M instance

Eric Wieser (Jul 17 2023 at 08:12):

Oh, good point

Eric Wieser (Jul 17 2023 at 08:13):

Maybe we can still overload the notation in the elaborator


Last updated: Dec 20 2023 at 11:08 UTC