feat(coinductive): let oracle machines implement OracleComp programs#482
feat(coinductive): let oracle machines implement OracleComp programs#482dtumad wants to merge 2 commits into
Conversation
|
Contains the non-TM specific portions of #481 |
🤖 PR SummaryMathematical FormalizationCoalgebraic formulation of oracle strategies and machines (
Oracle machine implementation theory (
Sequential composition of implementations (
Refactoring – UC process type parameterisationTo align with the new oracle machinery, the
These changes are purely mechanical (no new Module re-export
Discrepancy with PR bodyThe PR body summarises the new oracle constructs and mentions “update the PolyFun pin needed by this machinery, with only the corresponding UC API compatibility edits”. It does not explicitly describe the pervasive Statistics
Lean Declarations ✏️ Added: 128 declaration(s)
✏️ Affected: 4 declaration(s) (line number changed)
📋 **Additional Analysis**Diff follows project conventions: file headers, module docstrings, no ASCII banners, correct prologue layout, no local linter suppressions, and respects module layering by adding files to the intended 📄 **Per-File Summaries**
Last updated: 2026-07-13 06:48 UTC. |
Build Timing Report
Incremental Rebuild Signal
This compares a clean project build against an incremental rebuild in the same CI job; it is a lightweight variability signal, not a full cross-run benchmark. Slowest Current Clean-Build FilesShowing 20 slowest current targets, with comparison against the selected baseline when available.
|
🤖 AI ReviewOverall Summary: Errors during review:
🔗 **Cross-File Analysis**Cross-file analysis failed: 400 INVALID_ARGUMENT. {'error': {'code': 400, 'message': 'API key not valid. Please pass a valid API key.', 'status': 'INVALID_ARGUMENT', 'details': [{'@type': 'type.googleapis.com/google.rpc.ErrorInfo', 'reason': 'API_KEY_INVALID', 'domain': 'googleapis.com', 'metadata': {'service': 'generativelanguage.googleapis.com'}}, {'@type': 'type.googleapis.com/google.rpc.LocalizedMessage', 'locale': 'en-US', 'message': 'API key not valid. Please pass a valid API key.'}]}} 📄 **Review for `VCVio.lean`**An error occurred while analyzing 📄 **Review for `VCVio/Interaction/UC/AsyncRuntime.lean`**An error occurred while analyzing 📄 **Review for `VCVio/Interaction/UC/AsyncSecurity.lean`**An error occurred while analyzing 📄 **Review for `VCVio/Interaction/UC/Runtime.lean`**An error occurred while analyzing 📄 **Review for `VCVio/Interaction/UC/StdDoBridge.lean`**An error occurred while analyzing 📄 **Review for `VCVio/OracleComp/Coinductive/Composition.lean`**An error occurred while analyzing 📄 **Review for `VCVio/OracleComp/Coinductive/DynSystem.lean`**An error occurred while analyzing 📄 **Review for `VCVio/OracleComp/Coinductive/Machine.lean`**An error occurred while analyzing 📄 **Review for `lakefile.lean`**An error occurred while analyzing |
Motivation
The current PolyTime/Turing-machine draft contains a useful lower-level contribution that does
not depend on computational complexity: an operational presentation of an
OracleComp specprogram by a PolyFun dynamical system and pointed machine.This PR isolates that machinery so it can be reviewed and used independently of Cslib, Turing
machines, cost models, or polynomial-time claims.
The intended dictionary is:
OracleStrategy S specPFunctor.DynSystem S spec.toPFunctorOracleMachine spec α βPFunctor.PointedMachine spec.toPFunctor α βQueryImpl spec mPFunctor.Handler m spec.toPFunctorOracleComp spec αPFunctor.FreeM spec.toPFunctor αIn particular, VCVio does not introduce a parallel model of interaction here. It specializes the
corresponding PolyFun notions to
OracleSpecand supplies bridges to the existing oracle API.What this adds
OracleStrategyas theOracleSpecspecialization ofPFunctor.DynSystem.OracleMachineas theOracleSpecspecialization ofPFunctor.PointedMachine.Fuelled execution through PolyFun's monad-parametric
PointedMachine.runWith.The implementation relation
as a thin wrapper around
PFunctor.PointedMachine.Implements.A handler-parametric theorem turning implementation into execution equality:
A step-synchronised simulation relation for proving
Implementsfrom local machine/programinvariants.
Sequential composition of implementing machines.
Deterministic strategy execution, traces, query logging, and finite-run bridges reused from the
existing oracle framework.
PolyFun dependency update
The PolyFun revision is advanced to obtain the native
PointedMachine.Implementstheory and theassociated dynamical-system APIs. Four UC runtime files receive mechanical compatibility updates
for that revision.
Those compatibility edits do not change the UC model or introduce new VCVio protocol notions.
Deliberately out of scope
This PR contains no:
Those concerns can remain in the draft work while the basic operational tools land independently.
Review guide
The main files are:
VCVio/OracleComp/Coinductive/DynSystem.lean— the strategy/handler dictionary and run theory;VCVio/OracleComp/Coinductive/Machine.lean— pointed machines, implementation, and simulations;VCVio/OracleComp/Coinductive/Composition.lean— sequential composition.The key architectural check is that the definitions remain aliases or thin wrappers over PolyFun,
rather than becoming a second implementation of dynamical systems inside VCVio.
Validation
lake buildgit diff --check main..dtumad/oracle-machine-implements