Open MatthiasHu opened 1 year ago
Thank you, nice spot! Wish these weren't necessary and we had editor support...
I wonder if it could be best here to change the actual type signatures of x≤y⊔x
and x≤y⇒x≤z⊔y
(and similar cases) to reflect the order in which the variables x, y, z appear in the name.
In your "I wonder", do you mean that the rename
; x⊓y≤y to x≤y⊔x
should instead be
; x⊓y≤y to y≤x⊔y
?
No, I meant that there should be this:
x≤y⊔x : ∀ x y → x ≤ y ⊔ x
This can not be achieved by a renaming-reexport of x⊓y≤y
, one would need a separate definition to flip the arguments.
Also, n≤m⊔n
was deprecated and m≤n⊔m
was introduced -
Should I just update the type signature in the comments?
We bumped this from v2.0 to v2.1... suggest we do so again to v2.2 unless someone feels like tackling this before the end of June?
When reexporting things, there are sometimes type signatures stated in comments. I think I found a few places where these type signatures are inaccurate, for example:
https://github.com/agda/agda-stdlib/blob/ebfb8814b4330b314da8fb9cae527e6a6fab01aa/src/Data/Nat/Properties.agda#L1196
This function actually takes the
n
argument first and them
argument second, becausex≤y⊔x
is a renaming ofx⊓y≤y
which of course takes thex
argument first: https://github.com/agda/agda-stdlib/blob/ebfb8814b4330b314da8fb9cae527e6a6fab01aa/src/Algebra/Construct/NaturalChoice/MinOp.agda#L43The same issue is present in all four places where
x≤y⊔x
is re-exported:The same thing happens for example for
x≤y⇒x≤z⊔y
(which is a renaming ofx≤y⇒z⊓x≤y
), but here only the order of the implicit arguments is flipped: