Zulip Chat Archive

Stream: Is there code for X?

Topic: canonically_linear_ordered_monoid.to_linear_ordered_comm_...


Junyan Xu (Sep 11 2022 at 21:24):

Does the second example below exist in mathlib as a def? Apparently it doesn't exist as an instance. Does it cause any problem to make it an instance? (Same for the additive versions)

import data.nat.basic

example {α} [canonically_ordered_monoid α] : ordered_comm_monoid α :=
by apply_instance /- succeeds -/

example {α} [canonically_linear_ordered_monoid α] : linear_ordered_comm_monoid α :=
by apply_instance /- fails -/

example {α} [m : canonically_linear_ordered_monoid α] : linear_ordered_comm_monoid α :=
{..m} /- succeeds -/

Last updated: Dec 20 2023 at 11:08 UTC