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

LamTerm.betaBounded bug #38

Open
JOSHCLUNE opened this issue Nov 5, 2024 · 0 comments
Open

LamTerm.betaBounded bug #38

JOSHCLUNE opened this issue Nov 5, 2024 · 0 comments

Comments

@JOSHCLUNE
Copy link
Collaborator

Currently, LamTerm.betaBounded may not fully beta reduce an expression regardless of how large an n it is given. This interacts poorly with LamTerm.betaReduceHacky and LamTerm.betaReduceHackyIdx, making it possible for auto's preprocessing to run into an infinite loop.

One example of this occurring can be seen in this theorem:

set_option auto.smt false in
set_option auto.tptp true in
set_option auto.native true in
theorem test {f : α → β} (P : (α → γ) → Prop)
  (symbol1 : β → γ) (symbol2 : β → β)
  (h : P ((symbol1 ∘ symbol2) ∘ f)) : False := by
  auto [h, Function.comp_def] -- This should fail quickly rather than infinitely loop

There are presumably multiple ways to resolve this issue, but one simple way that I believe should work would be to change the last line of LamTerm.betaBounded from LamTerm.mkAppN fn argsb to (LamTerm.mkAppN fn argsb).betaBounded n' (and update the theorems LamTerm.maxEVarSucc_betaBounded and LamEquiv.ofBetaBounded accordingly).

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