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

Inlining of Dedekind cuts not always sound #15

Open
bmsherman opened this issue Oct 27, 2019 · 0 comments
Open

Inlining of Dedekind cuts not always sound #15

bmsherman opened this issue Oct 27, 2019 · 0 comments

Comments

@bmsherman
Copy link
Member

marshall/src/eval.ml

Lines 188 to 196 in 65f20eb

match e1' with
| S.Cut (x, i, p1, p2) ->
hnf env (S.App (S.Lambda (x, S.Ty_Real, p2), e2))
| _ ->
list_bind (hnf env e2) (fun e2' ->
match e2' with
| S.Cut (x, i, p1, p2) ->
hnf env (S.App (S.Lambda (x, S.Ty_Real, p1), e1'))
| _ -> [S.Less (e1', e2')]

This is valid if the interval of the Dedekind cut is [-inf, inf], but if the interval is smaller, that needs to be incorporated in the inlining.

See how, e.g., sqrt pi is broken because of this.

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

No branches or pull requests

1 participant