Zulip Chat Archive

Stream: new members

Topic: Is there a built in function for function composition?


Rui Liu (Dec 09 2020 at 22:12):

Is there a built in function for function composition?

Adam Topaz (Dec 09 2020 at 22:13):

\circ ?

Rui Liu (Dec 09 2020 at 22:14):

Right!

Rui Liu (Dec 09 2020 at 22:14):

I just found out as well!

Rui Liu (Dec 09 2020 at 22:15):

The mathlib documentation is a bit hard to use... I search composition but didn't find any.

Kenny Lau (Dec 09 2020 at 22:17):

\o is shorter, and it's function.comp

Adam Topaz (Dec 09 2020 at 22:19):

But if you're like me, with years of latex-induced muscle memory, \circ works too :)

Kevin Buzzard (Dec 09 2020 at 23:09):

One of the neatest things about the shortcuts is that most of the maths symbols are either the same as LaTeX, or the same as the LaTeX shortcut I usually use to define them (e.g. \Q).

Adam Topaz (Dec 09 2020 at 23:10):

Sure, but who actually uses \McC?

Adam Topaz (Dec 09 2020 at 23:10):

I use \Ccal

Kevin Buzzard (Dec 09 2020 at 23:12):

yeah that's the exception. I always say to myself "MATHcal"

Adam Topaz (Dec 09 2020 at 23:12):

OOOH! Now I'll actually remember it!

Kevin Buzzard (Dec 09 2020 at 23:13):

Of course you can just add \Xcal to the list of shortcuts, there's just a file on github somewhere

Adam Topaz (Dec 09 2020 at 23:14):

Yeah I learned that you can do this in your emacs config from @Jesse Michael Han

(lean-input-incorporate-changed-setting
 'lean-input-user-translations
 `( ("func" "⥤")
    ("tf" "⟨╯°□°⟩╯︵┻━┻")))

Last updated: Dec 20 2023 at 11:08 UTC