Zulip Chat Archive

Stream: maths

Topic: kronecker symbol


Sebastien Gouezel (Aug 20 2021 at 10:46):

Do we have the kronecker symbol somewhere in mathlib (I mean, δ R i j which is equal to (1 : R) if i = j, and (0 : R) otherwise)?

Scott Morrison (Aug 20 2021 at 10:50):

Pretty sure not. I was tempted to introduce it once but didn't have the enthusiasm to use it everywhere it could be.

Sebastien Gouezel (Aug 20 2021 at 10:56):

I am doing some elementary linear algebra with matrices, and it would prove pretty useful there!

Scott Morrison (Aug 20 2021 at 11:02):

I think it's a great idea.

Scott Morrison (Aug 20 2021 at 11:03):

If we had square brackets to spare I'd love if we could just write [P] for if P then 1 else 0, and then write [i = j] for the Kronecker delta. Maybe that's too hard notationally.

Scott Morrison (Aug 20 2021 at 11:04):

But I would happily endorse introducing it somewhere, and leaving it to later to use in the rest of the library.

Anne Baanen (Aug 20 2021 at 11:04):

It's sometimes spelled using docs#function.update, δ i j = function.update 0 i 1 j

Scott Morrison (Aug 20 2021 at 11:04):

Terse, but not super readable. :-)

Eric Rodriguez (Aug 20 2021 at 11:05):

I feel like if anything it could just be notation for ite, because there's enough API there

Anne Baanen (Aug 20 2021 at 11:05):

Or even docs#pi.single i 1 j, apparently


Last updated: Dec 20 2023 at 11:08 UTC