ufmg-smite / lean-smt

Tactics for discharging Lean goals into SMT solvers.
Apache License 2.0
89 stars 18 forks source link

Use constant exprs instead of constant strings. #6

Closed abdoo8080 closed 2 years ago

abdoo8080 commented 2 years ago

Currently, we match against the name of type classes like LE.le and replace them with corresponding SMT names like <. However, that is not always accurate as operators like < are overloaded for many types in Lean. Whereas = is the only overloaded operator in SMT-LIB. Other operators are not overloaded. For example, less than is represented by < for integers and str.< for strings. This PR addresses this issue by matching against the type class and its type arguments and maps that to the appropriate SMT-LIB function symbol.