-
Notifications
You must be signed in to change notification settings - Fork 63
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
Internal consistency of saw-core typechecking #1264
Comments
That is very strange. Here is the line that computes the sort of a pi type: https://github.com/GaloisInc/saw-core/blob/master/saw-core/src/Verifier/SAW/SCTypeCheck.hs#L402 It looks like it is checking whether the output type is a Prop, and, if so, is returning Prop. |
I am guessing that |
Interesting. Looks like that doesn't agree with the |
Doh! I guess I can claim some of the fault there. I wrote the current version of |
Looks like it. Easy enough to fix, I think. Ensuring these functions stay in sync somehow... that's not so easy. |
Yeah, I was just thinking about how one would do that. I could imagine modifying the |
The core issue was solved in GaloisInc/saw-core#190, but maybe we should keep this ticket open to discuss ways to keep the type-checking code in sync. |
It's hard for me to track things through the typechecker, but it doesn't appear that
Pi
types collapse intoProp
when the conclusion is inProp
, as I would expect. Instead it seems to follow the same rules as the predicativesort
tower.For example, the type assigned to
(x : Bool) -> Eq Bool x x
issort 0
even thoughEq
is inProp
. Likewise the type of(A:sort 0) -> (x:A) -> Eq A x x
issort 1
.Related question regarding
EqTrue
. Why is it defined insort 1
?The text was updated successfully, but these errors were encountered: