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
@kckennylausays: Was there any point in time where list.prod [t] was definitionally equivalent to t * 1? and was there any point in time where list.prod (x :: L) = x * list.prod L was rfl?
@johoelzlsays: I traced it back, it was always foldl. I ported the definition from Lean2's library. I think we should change it to foldr then we get the expected equalities.
The text was updated successfully, but these errors were encountered:
I remember now why we use foldl: a * b * c = (a * b) * c and [a, b, c].foldl (*) 1 = (((1 * a) * b) * c while [a, b, c].foldr (*) 1 = a * (b * (c * 1)), so the product is associated in the wrong direction.
But I think the definitional equalities are more important.
@kckennylau says: Was there any point in time where
list.prod [t]
was definitionally equivalent tot * 1
? and was there any point in time wherelist.prod (x :: L) = x * list.prod L
wasrfl
?@johoelzl says: I traced it back, it was always
foldl
. I ported the definition from Lean2's library. I think we should change it tofoldr
then we get the expected equalities.The text was updated successfully, but these errors were encountered: