Skip to content

feat: add mkAppNS, mkAppRevS, betaRevS, betaS, and related Sym functions#13273

Merged
leodemoura merged 2 commits into
masterfrom
sym_S_functions
Apr 4, 2026
Merged

feat: add mkAppNS, mkAppRevS, betaRevS, betaS, and related Sym functions#13273
leodemoura merged 2 commits into
masterfrom
sym_S_functions

Conversation

@leodemoura
Copy link
Copy Markdown
Member

This PR adds a comprehensive public API for constructing maximally shared
expression applications and performing beta reduction in the Sym framework.
These functions were previously defined locally in the VC generator and cbv
tactic, and are needed by downstream SymM-based tools.

New functions in Lean.Meta.Sym.Internal (generic over MonadShareCommon):

  • mkAppS₆ through mkAppS₁₁ (higher-arity application builders)
  • mkAppRangeS, mkAppNS (forward application over arrays/ranges)
  • mkAppRevRangeS, mkAppRevS (reversed application over arrays/ranges)

New public functions in Lean.Meta.Sym (SymM):

  • betaRevS and betaS (beta reduction with max sharing)
  • mkForallFVarsS (forall abstraction with max sharing)

The AlphaShareBuilderM-specific mkAppRevRangeS in InstantiateS.lean is
replaced by the generic version from Internal, and the internal betaRevS
is renamed to betaRevS'. The Cbv.mkAppNS now delegates to Internal.mkAppNS.

…ym` functions

This PR adds a comprehensive public API for constructing maximally shared
expression applications and performing beta reduction in the `Sym` framework.
These functions were previously defined locally in the VC generator and cbv
tactic, and are needed by downstream `SymM`-based tools.

New functions in `Lean.Meta.Sym.Internal` (generic over `MonadShareCommon`):
- `mkAppS₆` through `mkAppS₁₁`
- `mkAppRangeS`, `mkAppNS`, `mkAppRevRangeS`, `mkAppRevS`

New public functions in `Lean.Meta.Sym` (`SymM`):
- `betaRevS`, `betaS`
- `mkForallFVarsS`

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ctly

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@leodemoura leodemoura enabled auto-merge April 4, 2026 02:21
@leodemoura leodemoura added this pull request to the merge queue Apr 4, 2026
Merged via the queue into master with commit 3c6ea49 Apr 4, 2026
17 checks passed
volodeyka pushed a commit that referenced this pull request Apr 16, 2026
…ym` functions (#13273)

This PR adds a comprehensive public API for constructing maximally
shared
expression applications and performing beta reduction in the `Sym`
framework.
These functions were previously defined locally in the VC generator and
cbv
tactic, and are needed by downstream `SymM`-based tools.

New functions in `Lean.Meta.Sym.Internal` (generic over
`MonadShareCommon`):
- `mkAppS₆` through `mkAppS₁₁` (higher-arity application builders)
- `mkAppRangeS`, `mkAppNS` (forward application over arrays/ranges)
- `mkAppRevRangeS`, `mkAppRevS` (reversed application over
arrays/ranges)

New public functions in `Lean.Meta.Sym` (`SymM`):
- `betaRevS` and `betaS` (beta reduction with max sharing)
- `mkForallFVarsS` (forall abstraction with max sharing)

The `AlphaShareBuilderM`-specific `mkAppRevRangeS` in
`InstantiateS.lean` is
replaced by the generic version from `Internal`, and the internal
`betaRevS`
is renamed to `betaRevS'`. The `Cbv.mkAppNS` now delegates to
`Internal.mkAppNS`.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant