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
This might be due to overeager normalization of arithmetic in Agda? The standard library has a fix with some record prefixes and no-eta-equality, but this isn't the case for Cubical.
Also Cubical's rationals-as-a-set-quotient representation has arithmetic defined in a way that has some undesired usage of recursors that make computation clunky. The details are abstracted to try and reduce the problem, but it's still there until the implementation is updated to avoid calling the recursor entirely. Better to pattern-match so that the associativity proof doesn't get dragged around with every computational step, abstracted or otherwise.
The stdlib Data.Rational is fast. The follwing code compute instanrtly.
But the same code using Cubical's rational lib falis to compute. Even multiplication of two numbers -1/√2 * 1/√2 is slow. See the following code.
For cubical, I use Agda version 2.6.4.3 + cubical-0.7 ;
for std lib, I use Agda version 2.6.5-422b932 + Version 2.0.
Also, the infixity of ℚ.- in cubical is problematic, I have to put extra parenthes to get the correct result.
Thanks.
The text was updated successfully, but these errors were encountered: