Zulip Chat Archive

Stream: Is there code for X?

Topic: Derive is_antisymm


Marcus Rossel (Jun 03 2021 at 14:47):

Is there an easy way to get is_antisymm for tag's here?

@[derive has_le, derive has_lt]
def tag := lex  

Gabriel Ebner (Jun 03 2021 at 14:50):

I would just derive linear_order directly and avoid the is_antisymm type class:

import order.lexicographic
import order.rel_classes

@[derive linear_order]
def tag := lex  

example : is_antisymm tag () := by apply_instance

Last updated: Dec 20 2023 at 11:08 UTC