Incomplete reasoning about exponentiation: 2^^h + 2^^h - 2^^h
does not always simplify to 2^^h
#1812
Labels
feature request
Asking for new or improved functionality
typechecker
Issues related to type-checking Cryptol code.
Consider:
This is seeing if Cryptol can successfully conclude that
2^^h + 2^^h - 2^^h == 2^^h
with different groupings of the(+)
operator. Surprisingly, Cryptol succeeds in the first case (2^^h + (2^^h - 2^^h) == 2^^h
), but fails in the second case ((2^^h + 2^^h) - 2^^h == 2^^h
):Normally, Cryptol's typechecker has no problem concluding that
(x + x) - x == x
. As the error message above indicates, however, I think Cryptol's typechecker is getting confused because it first rewrites(2^^h + 2^^h)
to2 ^^ (1 + h)
, which imperils the typechecker's ability to cancel out2^^h
terms.The text was updated successfully, but these errors were encountered: