Skip to content

feat(realizability): prove admissibility of scoped term interpretations - #510

Merged
dtumad merged 6 commits into
mainfrom
dtumad/review-scoped-admissibility
Nov 25, 2026
Merged

dtumad merged 6 commits into
mainfrom
dtumad/review-scoped-admissibility

Conversation

@dtumad

@dtumad dtumad commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

A scoped program can reuse a variable or bind a fresh one before interpreting an argument.
Term.denote_admissible proves that a fixed term denotes an admissible map whenever the
variables of its context are admissible and its constructors preserve admissibility under
fresh bindings computed from the same input. In a class with products,
Binary.denote_admissible applies this to terms in two variables whose operations are
admissible on a represented pair.

A test interprets the same binding under subtraction and addition and gets 5 and 13 on
inputs 9 and 4. Negative tests give an operation, a free variable and a binder for which the
hypotheses fail.

Downstream, the one-time pad in Verified-zkEVM/VCVio#1206 uses the binary theorem through
wordTerm_polyTime of #511, for key xor msg, for key xor (key xor msg) and for the
machine that computes a single XOR. Beyond the projections and pairing of the step class,
the bound on such a term needs only the machine bound of the primitive word operation.
Pad terms

./scripts/validate.sh --lint --test --axioms passed at f1aaeda1, which includes main at 6c9cf976. The language tracker is #374.

Prove the result under admissible assignments to bound and free variables. For binary operations, derive admissibility of a whole fixed term on a represented pair, including nested uses of either variable.

Co-Authored-By: Codex <noreply@openai.com>
@dtumad
dtumad force-pushed the dtumad/review-scoped-admissibility branch from 31d85f2 to 42fa858 Compare November 24, 2026 21:14
dtumad and others added 5 commits November 25, 2026 16:31
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ssibility

Make the sort of Env.Admissible strict-implicit, so that Env.Admissible.empty elaborates at
its stated type, and build the empty and pair environments from empty and cons. Remove
Binary.denote_term_admissible, which is Binary.denote_admissible at one term and has no use.
State in the docstring which assignments a constructor's premise covers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re needed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ayering

State the hypotheses of Binary.denote_admissible, and add the edge from scoped syntax to
realizability.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The theorem asks for every variable of the context, not only the free variables of the term.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dtumad
dtumad added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 03aeb99 Nov 25, 2026
11 checks passed
@dtumad
dtumad deleted the dtumad/review-scoped-admissibility branch November 25, 2026 23:29
dtumad added a commit that referenced this pull request Nov 26, 2026
#487 landed on main as squash e688823, which carries the same tree as its
head b46e02c merged above. The conflicts in PolyFun.lean, cost.md,
repo-map.md and the documentation consumer were both sides adding #487's
text; keep this branch's text and add #510's lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

1 participant