Zulip Chat Archive

Stream: lean4

Topic: Implicit arguments in Equivalence


Dan Velleman (Dec 02 2022 at 21:09):

I have two questions about the implicit arguments in the definition of Equivalence in Lean.Init.Core.

  1. symm and trans use {...}. Should they be {{...}}? That's what was used in the definitions of symmetric and transitive in Lean 3.
  2. Suppose I have e : Equivalence r. Then the type of e.symm is ∀ {x y}, r x y → r y x. Suppose I want to specify the arguments explicitly. It seems like I should be able to use @e.symm, or perhaps @(e.symm), but that doesn't seem to work. What's the correct syntax to get something that acts like ∀ (x y), r x y → r y x?

Jireh Loreaux (Dec 02 2022 at 22:26):

  1. It's possible Equivalence was around before semi-implicit arguments existed in Lean 4, I'm not sure though. (Hmmm.... Interesting to note that Symmetric uses semi-implicits)
  2. fun _x _y => e.symm works.

Last updated: Dec 20 2023 at 11:08 UTC