-
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
ruleOfProp is a bit clunky #1261
Comments
My comment from #110 is relevant: #110 (comment)
This is exactly the same idea proposed above, so yes, of course I support it completely. To facilitate implementation, it would be nice to have some combinators for composing theorems with resolution/modus ponens, sort of like the Also I would not hard-code a special exception for
along with some axioms (or proved theorems) stating that the various |
I missed that discussion before. Yeah, it sounds like we are largely in agreement. We could have the |
Putting the correctness property inside the dictionary would be pretty handy. Are there any potential drawbacks to doing that? The only thing I can think of is that putting a dependent type like that inside |
I suppose that might be a problem if we wanted to target HOL or something, although I think we're already in pretty big trouble if we want to do that. I forgot that saw-core records are necessarily non-dependent. That might be a little inconvenient. I think there are a few places where |
I guess the other problem is that we wouldn't be able to have any law-breaking |
I think it actually is an issue for floats, isn't it? We have |
I had a go at implementing some validity rules for equality predicates, which you can see on the |
Yes, you're right. I was only thinking about NaN, but issue with signed 0 goes the other way. |
This is a band-aid pending a proper solution for #1261.
This is a band-aid pending a proper solution for #1261.
The
ruleOfProp
operation examines the statement of a proposition and attempts to determine if it can be used as a rewrite rule. However, it is has a number of problems we should find some way to address.vecEq n a f x y
it will assume this proves the equality ofx
andy
regardless of what functionf
is supplied. Similar forpairEq
.intEq
,intModEq
), so these will not be recognized as rewrites.ruleOfProp
must be updated as we add new equality predicates on new types, and that hasn't been done yet.Possible solution:
I think we would be better off restricting the class of theorems that are accepted as rewrite rules to address soundness. E.g., we should only accept statements of the form
Eq a x y
orecEq a peq x y
. Then, add axioms for convertingEq a
into the various primitive equality tests, and apply them when proving the equations to start with. E.g.The text was updated successfully, but these errors were encountered: