Zulip Chat Archive
Stream: new members
Topic: multiset to function
Adam Topaz (Jan 24 2022 at 00:36):
@Mario Carneiro iirc lean4's list.get is a function on fin L.length
. Do we have that in mathlib somewhere?
Adam Topaz (Jan 24 2022 at 00:36):
Of course it's trivial to build using list.nth_le, but still...
Mario Carneiro (Jan 24 2022 at 01:02):
Are you sure? https://github.com/leanprover/lean4/blob/master/src/Init/Prelude.lean#L1103-L1108
Mario Carneiro (Jan 24 2022 at 01:08):
Mathlib does use this function in a few places (1, 2, 3, 4) but it is always spelled \lam i, l.nth_le i i.2
Adam Topaz (Jan 24 2022 at 01:38):
@Mario Carneiro , Sorry, I was thinking of Array.get
Last updated: Dec 20 2023 at 11:08 UTC