Zulip Chat Archive
Stream: general
Topic: equality of multisets
Johan Commelin (Jun 19 2019 at 10:13):
How is one supposed to prove
lemma test {σ : Type*} (s t : σ) : ([s, s, t] : multiset σ) = [t, s, s] := _
Mario Carneiro (Jun 19 2019 at 10:14):
by simp [insert_comm]
?
Mario Carneiro (Jun 19 2019 at 10:16):
alternatively, apply quotient.sound
and then use perm.swap
and friends
Johan Commelin (Jun 19 2019 at 10:19):
Aha... ok.
Johan Commelin (Jun 19 2019 at 10:19):
I didn't know about insert_comm
.
Mario Carneiro (Jun 19 2019 at 10:19):
I actually just guessed it existed
Mario Carneiro (Jun 19 2019 at 10:20):
thanks yesterday mario
Kevin Buzzard (Jun 19 2019 at 10:26):
When I look at files like multiset.lean
I honestly think "golly, I'm glad I didn't take up Lean about 18 months earlier than I did"
Kevin Buzzard (Jun 19 2019 at 10:27):
Those files are so huge, and so complete, and because everything is a quotient the proofs are often extremely cryptic and would be very hard indeed for a beginner to generate.
Kenny Lau (Jun 19 2019 at 10:28):
maybe we should write a tactic that will sort the elements
Mario Carneiro (Jun 19 2019 at 10:34):
there is a function for that, multiset.sort
Mario Carneiro (Jun 19 2019 at 10:35):
as for sorting it syntactically, that's what simp
does
Last updated: Dec 20 2023 at 11:08 UTC