You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
This function actually takes the n argument first and the m argument second, because x≤y⊔x is a renaming of x⊓y≤y which of course takes the x argument first:
The same issue is present in all four places where x≤y⊔x is re-exported:
src/Data/Integer/Properties.agda: ; x≤y⊔x to i≤j⊔i -- : ∀ i j → i ≤ j ⊔ i
src/Data/Nat/Properties.agda: ; x≤y⊔x to m≤n⊔m -- : ∀ m n → m ≤ n ⊔ m
src/Data/Rational/Properties.agda: ; x≤y⊔x to p≤q⊔p -- : ∀ p q → p ≤ q ⊔ p
src/Data/Rational/Unnormalised/Properties.agda: ; x≤y⊔x to p≤q⊔p -- : ∀ p q → p ≤ q ⊔ p
The same thing happens for example for x≤y⇒x≤z⊔y (which is a renaming of x≤y⇒z⊓x≤y), but here only the order of the implicit arguments is flipped:
src/Data/Integer/Properties.agda: ; x≤y⇒x≤z⊔y to i≤j⇒i≤k⊔j -- : ∀ {i j} k → i ≤ j → i ≤ k ⊔ j
src/Data/Nat/Properties.agda: ; x≤y⇒x≤z⊔y to m≤n⇒m≤o⊔n -- : ∀ {m n} o → m ≤ n → m ≤ o ⊔ n
src/Data/Rational/Properties.agda: ; x≤y⇒x≤z⊔y to p≤q⇒p≤r⊔q -- : ∀ {p q} r → p ≤ q → p ≤ r ⊔ q
src/Data/Rational/Unnormalised/Properties.agda: ; x≤y⇒x≤z⊔y to p≤q⇒p≤r⊔q -- : ∀ {p q} r → p ≤ q → p ≤ r ⊔ q
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.
Activity
MatthewDaggitt commentedon Sep 20, 2022
Thank you, nice spot! Wish these weren't necessary and we had editor support...
MatthiasHu commentedon Sep 20, 2022
I wonder if it could be best here to change the actual type signatures of
x≤y⊔xandx≤y⇒x≤z⊔y(and similar cases) to reflect the order in which the variables x, y, z appear in the name.JacquesCarette commentedon Sep 29, 2022
In your "I wonder", do you mean that the rename
should instead be
?
MatthiasHu commentedon Sep 29, 2022
No, I meant that there should be this:
This can not be achieved by a renaming-reexport of
x⊓y≤y, one would need a separate definition to flip the arguments.Saransh-cpp commentedon Aug 19, 2023
Also,
n≤m⊔nwas deprecated andm≤n⊔mwas introduced -agda-stdlib/src/Data/Nat/Properties.agda
Lines 2261 to 2264 in 0661b59
Should I just update the type signature in the comments?
jamesmckinna commentedon Jun 6, 2024
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?
jamesmckinna commentedon Jul 9, 2026
And we should solve this together with any solution to #1664 ?