Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance TypeChecker with exponent rules #1713

Merged
merged 3 commits into from
Jul 30, 2024
Merged

Conversation

mccleeary-galois
Copy link
Contributor

@mccleeary-galois mccleeary-galois commented Jul 29, 2024

Closes #1489

Add (x >= 2, x^a * x^b = x^c => a + b = c) to Numeric.hs.
Add (Nat a, a * a^x = a^y => 1 + x = y) to SimpType.hs
Add (x >= 2,  x^a >= x^b => a >= b) to Numeric.hs

Start adding tests for exponent TC checks.
src/Cryptol/TypeCheck/Solver/Numeric.hs Outdated Show resolved Hide resolved
src/Cryptol/TypeCheck/Solver/Numeric.hs Outdated Show resolved Hide resolved
src/Cryptol/TypeCheck/Solver/Numeric.hs Show resolved Hide resolved
src/Cryptol/TypeCheck/Solver/Numeric.hs Outdated Show resolved Hide resolved
… EQ check in Numeric.hs to work for multiplication of exponents as well.

Clean up comments by using K for numeric constants, and move numeric constant checks to as early as possibly in Numeric.hs
@mccleeary-galois mccleeary-galois requested a review from yav July 30, 2024 19:15
@mccleeary-galois mccleeary-galois marked this pull request as ready for review July 30, 2024 20:17
tests/issues/issue1489/issue1489.cry Show resolved Hide resolved
@mccleeary-galois mccleeary-galois merged commit 25423ce into master Jul 30, 2024
48 checks passed
@mccleeary-galois mccleeary-galois deleted the rem/solver-exponents branch July 30, 2024 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Constraint fails to be proven
2 participants