gebner / hott3

HoTT in Lean 3
Apache License 2.0
75 stars 11 forks source link

same definition with different names #3

Closed fpvandoorn closed 7 years ago

fpvandoorn commented 7 years ago

In the HoTT library we have many definitions which mean the same thing. This is done usually for shortening a name, or for making version where some arguments implicit. Examples:

It is important that they mean the same, and that it doesn't matter much which of these we used in a definition. In Lean 2 this worked well enough when making all the variants [reducible]. However, hsimp doesn't seem to treat all these variants as the same (which I think is why you added these lines https://github.com/gebner/hott3/blob/master/init/path.lean#L567-L568). What is the best solution to this? Should we add hsimp rules saying that these things are the same, so that it will reduce to the "canonical" one?

fpvandoorn commented 7 years ago

Ah, I now also see what you've done in simp_attr. Should we try to minimize the amount of these duplicate definitions?

gebner commented 7 years ago

Ok, the idp_tr' and idp_tr'' are superfluous (at least now, maybe I forget the reducible attribute at first). I have removed them.

The story for equivalent names is two-fold:

fpvandoorn commented 7 years ago

Ok, let's try to make all these duplicates reducible, and we'll see whether we need add_key_equivalence. Thanks for the explanation.