BetaAt.appR doesn't require LC N, weakening BetaAt.lc_r, not consistent with FullBeta

Open
#1,243 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Digger-Rockwell is already working on this.

Since Nov 18, 2026.

  • #3 by @Digger-Rockwell — open
  • #1247 by @Digger-Rockwell — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Domain
compilers

Research direction

Read BetaAt.lean around the appR constructor and BetaAt.lc_r at line 195, then compare the local-closure constraints with FullBeta.lean and step_lc_r at line 77. Determine what change would make BetaAt consistent with FullBeta while preserving the intended reduction relation, and check the relevant Lean proofs; done means the local-closure guarantee matches the full-step result.

Written by the indexing model from the issue text.

Description

The appR constructor of BetaAt does not require N to be locally closed (LC N):
| appR : BetaAt i M M' → BetaAt (i + countRedexes N + if IsAbs N then 1 else 0) (app N M) (app N M')

Because appR can take a non-locally-closed N, the consequent lemma BetaAt.lc_r is much weaker than the corresponding result in FullBeta.lean:

  • BetaAt.lc_r : BetaAt i M M' → LC M → LC M' (BetaAt.lean:195) — only gives LC M' from LC M, and only for the redex position step.
  • FullBeta.step_lc_r : M ⭢βᶠ M' → LC M' (FullBeta.lean:77) — the full-step relation already guarantees local closure of the result.

Since FullBeta properly enforces local closure throughout, BetaAt should be consistent with it.

@m-ow @weiscadence @chenson2018

Dominant language
Lean
Stars
862
Forks
242
Avg merge
1d 4h
Merged PRs (30d)
55

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from leanprover/cslib

All issues in leanprover/cslib

Similar issues

More Compilers issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.