Zulip Chat Archive

Stream: lean4

Topic: How to name this lemma?


François G. Dorais (Nov 20 2023 at 20:59):

What would be a good name for this lemma?

import Std
open Ordering

theorem name_me {x y : Ordering} : swap x = y  swap y = x := sorry

Kyle Miller (Nov 20 2023 at 21:03):

I think this would usually be phrased as swap x = y ↔ x = swap y and be named something like swap_eq_iff

Kyle Miller (Nov 20 2023 at 21:05):

That's shorting the longer name swap_eq_iff_eq_swap. An analogue in mathlib is docs#inv_eq_iff_eq_inv

Kyle Miller (Nov 20 2023 at 21:05):

Then there's also swap x = swap y ↔ x = y, which would be named swap_inj

François G. Dorais (Nov 20 2023 at 21:14):

Ah! Yes, it's like an adjunction. I like this!


Last updated: Dec 20 2023 at 11:08 UTC