Skip to content

refactor(SimSemantics)!: make QueryImpl a one-field structure - #1241

Draft
dtumad wants to merge 3 commits into
Verified-zkEVM:mainfrom
dtumad:dtumad/handler-structure
Draft

dtumad wants to merge 3 commits into
Verified-zkEVM:mainfrom
dtumad:dtumad/handler-structure

Conversation

@dtumad

@dtumad dtumad commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

QueryImpl spec m was a reducible function type, so instance search looked through it. An instance stated for handlers was also found for ordinary functions of that shape: the HAdd for handler sums applied to them too. It is now a structure with the single field toFun : (x : spec.Domain) → m (spec.Range x).

  • Use. impl x and impl₁ + impl₂ read as before. A handler coerces to its answer function. A function does not coerce to a handler: write where toFun x := …, ⟨fun x => …⟩ or a combinator. impl.toHandler and QueryImpl.ofHandler convert to and from PolyFun's Handler, which the parent PR also makes a structure.
  • Proofs. Handlers are used through their application equations, as bundled morphisms are in Mathlib. Handlers built by the constructor are tagged @[simps]; @[simps -isSimp] is kept for those whose equation competes with a preferred lemma or leaves a match on a variable. Equalities of handlers use ext instead of funext.
  • Enforcement. The environment linters handlerApply (PolyFun) and queryImplApply report a constructor-built handler with no application lemma, or one that is reducible.
  • Why not unfold. Unfolding a handler in simp traverses its whole body at each occurrence; a first version that did so was markedly slower where proofs unfold handlers.

CSLib's FreeM.liftM still takes a raw function, and a handler coerces to it. docs/agents/oracle-comp.md describes the pattern and docs/agents/module-system.md says when a type should be an abbreviation and when a structure.

The first commit only bumps PolyFun to 6aded150 on its main (lens properties became classes, so toLens_isCartesian is now an instance); the second contains the change; the third adds the design record.

Stack. PolyFun (parent): Verified-zkEVM/PolyFun#534. This PR pins PolyFun to that PR's commit on a fork, so it cannot merge until the parent does and the pin moves. ArkLib (consumer): Verified-zkEVM/ArkLib#1604. #1111 gives handler sums a notation of their own for the same instance leak; the two are independent alternatives for that part, and #1111 is untouched here.

Cost. Local, with lean -j1 per module against the first commit: the 810 VCVio/ modules take 1649 s against 1655 s (0.997×). Four modules were 1.27–1.84× slower because their proofs unfolded handlers in simp; naming the application lemmas brought them to 1.00–1.05×. The first CI build took 1.47× the module time of main's nightly clean build, but modules the change cannot affect (Cslib, ToMathlib, Extern) were 1.3–1.65× slower too, so the two runners differed in speed; the comparison is consistent with a change within about 10% and does not measure it more closely. Details are in docs/design/handler-structure.md, which also lists what the ports exposed.

Verification

Based on 84928e95c. At the head (12d744443):

  • ./scripts/validate.sh --lint --test --axioms passed, including the build of the six proof libraries within the warning budget, boundary and import checks, initsweep, style and environment lint, the agent-docs and doc-name checks, lake test, and axiomsweep --check (34,424 declarations, no taint).
  • queryImplApply and handlerApply report nothing on all six libraries. CI runs them on the VCVio root only, since the other roots do not import the linter.

Checklist

  • New files carry the standard header and module docstring; docstrings are intrinsic.
  • New files use plain public section with per-declaration @[expose].
  • ./scripts/update-lib.sh leaves the umbrella files unchanged, and lake exe axiomsweep --check passes.
  • No set_option linter.* false, no deprecated aliases, and no native FFI test executables on the PR path.
  • Documentation touched by the change is updated and check-agent-docs.py passes.
  • No simp, grind or gcongr gate was weakened; QueryImpl.liftTarget_self becomes a simp lemma, matching PolyFun's.

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

🤖 PR Summary

ℹ️ Some sections were omitted to fit GitHub's comment size limit.

Refactor: make QueryImpl a one-field structure


Statistics

Metric Count
📝 Files Changed 364
✅ Lines Added 2832
❌ Lines Removed 2234

Lean Declarations

✏️ Removed: 6 declaration(s)

VCVio/OracleComp/Coinductive/Machine.lean (1)

  • example : QueryImpl spec m = PFunctor.Handler m spec.toPFunctor

VCVio/OracleComp/SimSemantics/QueryImpl/Basic.lean (2)

  • @[reducible] def QueryImpl {ι} (spec : OracleSpec ι) (m : Type u → Type v)
  • theorem eq_handler : QueryImpl spec m = PFunctor.Handler m spec.toPFunctor

VCVio/OracleComp/SimSemantics/StateT/StateSeparating.lean (1)

  • theorem Stateful.eq_handler

VCVioTest/OracleNetwork.lean (2)

  • example : (serialObservation service 1 adaptive 0).run.1.1 = none
  • example : (serialObservation service 2 adaptive 0).run.2 = 2
✏️ Added: 19 declaration(s)

VCVio/Lint/HandlerApply.lean (1)

  • @[env_linter] def queryImplApply : Linter

VCVio/OracleComp/SimSemantics/Batch.lean (1)

  • def batchAnswers [Monad m] (impl : QueryImpl spec m) : (ts : List ι) → m (spec.batch.Range ts)

VCVio/OracleComp/SimSemantics/QueryImpl/Basic.lean (12)

  • @[simp] lemma mk_apply (f : (x : spec.Domain) → m (spec.Range x)) (x : spec.Domain) :
  • @[simp] lemma ofHandler_apply (h : PFunctor.Handler m spec.toPFunctor) (x : spec.Domain) :
  • @[simp] lemma ofHandler_toHandler (so : QueryImpl spec m) : ofHandler so.toHandler = so
  • @[simp] lemma toFun_inj {so so' : QueryImpl spec m} : so.toFun = so'.toFun ↔ so = so'
  • @[simp] lemma toHandler_apply (so : QueryImpl spec m) (x : spec.Domain) :
  • @[simp] lemma toHandler_ofHandler (h : PFunctor.Handler m spec.toPFunctor) :
  • @[simps] def equivHandler : QueryImpl spec m ≃ PFunctor.Handler m spec.toPFunctor where
  • def ofHandler (h : PFunctor.Handler m spec.toPFunctor) : QueryImpl spec m where
  • def toHandler (so : QueryImpl spec m) : PFunctor.Handler m spec.toPFunctor where
  • lemma toFun_injective : Function.Injective (toFun : QueryImpl spec m → _)
  • lemma toHandler_liftTarget (n : Type u → Type*) [MonadLiftT m n] (impl : QueryImpl spec m) :
  • protected lemma congr_fun {so so' : QueryImpl spec m} (h : so = so') (x : spec.Domain) :

VCVio/OracleComp/SimSemantics/QueryImpl/Constructions/Core.lean (1)

  • lemma preInsert_apply_seqRight (so : QueryImpl spec m) (nx : spec.Domain → n α)

VCVio/OracleComp/SimSemantics/SimulateQ.lean (1)

  • lemma simulateQ_ofHandler {m : Type u → Type v} [Monad m]

VCVio/OracleComp/SimSemantics/StateT/StateSeparating.lean (1)

  • abbrev Stateful.toHandler

VCVioTest/OracleNetwork.lean (2)

  • example : (serialObservation service.toHandler 1 adaptive 0).run.1.1 = none
  • example : (serialObservation service.toHandler 2 adaptive 0).run.2 = 2
✏️ Affected: 233 declaration(s) (line number changed)
  • @[simps] def hidingAvgRightImpl : in Examples/CommitmentScheme/Hiding/CountBounds.lean moved from L1155 to L1155
  • def oneTimeDDHFairCoinImpl : QueryImpl coinSpec ProbComp where in Examples/ElGamal/ComputationalComplexity.lean moved from L153 to L154
  • @[expose, simps -isSimp] def queryImpl [Field F] [Fintype F] [DecidableEq F] [SampleableType F] in Examples/ElGamal/GenericINDCPA.lean moved from L34 to L34
  • def idealImpl (sp : ℕ) : QueryImpl.Stateful unifSpec (otpSpec sp) (Heap UsedFlag) where in Examples/OneTimePad/HeapBasic.lean moved from L157 to L160
  • def realImpl (sp : ℕ) : QueryImpl.Stateful unifSpec (otpSpec sp) (Heap UsedFlag) where in Examples/OneTimePad/HeapBasic.lean moved from L137 to L138
  • @[expose, simps] def implementation (_ : Unit) : in Examples/ProgramLogic/GaussianWiring.lean moved from L49 to L49
  • @[expose, simps] def implementation (_ : Unit) : in Examples/ProgramLogic/RandomOracleWiring.lean moved from L41 to L41
  • def impl (prims : Primitives p) : QueryImpl (publicHashSpec prims.core) Id where in HashSig/SLHDSA/Oracle.lean moved from L95 to L95
  • @[expose, simps -isSimp] def unlabelAdversary (e : A ≃ B) : in HashSig/SLHDSA/SHAKE128s/Bridge/Transfer.lean moved from L366 to L368
  • @[expose] def relabel (e : A ≃ B) : QueryImpl (Game.World A) (OracleComp (Game.World B)) where in HashSig/SLHDSA/SHAKE128s/Bridge/Transfer.lean moved from L45 to L45
  • @[expose] def unlabel (e : A ≃ B) : QueryImpl (Game.World B) (OracleComp (Game.World A)) where in HashSig/SLHDSA/SHAKE128s/Bridge/Transfer.lean moved from L51 to L52
  • @[expose, simps] def replay (cache : QueryCache HashSpec) : QueryImpl HashSpec Id where in HashSig/SLHDSA/SHAKE128s/Proof/CacheReplay.lean moved from L37 to L37
  • @[expose, simps] noncomputable def lazyProgram (availableAt : HandlerCarrier.State → Node → Prop) in HashSig/SLHDSA/SHAKE128s/Proof/OpenCache.lean moved from L166 to L166
  • @[expose, simps] noncomputable def fuseServing (outer : QueryImpl OracleWorld (StateT S ProbComp)) in HashSig/SLHDSA/SHAKE128s/Proof/PhaseFusion.lean moved from L102 to L102
  • noncomputable def blindStep (setup : Setup) : QueryImpl ShareSpec (StateT St ProbComp) where in HashSig/SLHDSA/SHAKE128s/Proof/ShareBlindFacts.lean moved from L50 to L51
  • noncomputable def filing (setup : Setup) : QueryImpl ShareSpec (StateT (St × Bool) ProbComp) where in HashSig/SLHDSA/SHAKE128s/Proof/ShareBlindFacts.lean moved from L111 to L112
  • @[expose, simps] noncomputable def realCoinImpl : in HashSig/SLHDSA/SHAKE128s/Proof/ShareEvent.lean moved from L198 to L198
  • noncomputable def coinImpl (setup : Setup) : QueryImpl unifSpec (StateT (St × Bool) ProbComp) where in HashSig/SLHDSA/SHAKE128s/Proof/ShareFiled.lean moved from L242 to L242
  • noncomputable def hashImpl (setup : Setup) : QueryImpl HashSpec (StateT (St × Bool) ProbComp) where in HashSig/SLHDSA/SHAKE128s/Proof/ShareFiled.lean moved from L237 to L237
  • @[expose, simps] noncomputable def handler (lenient : Bool) (setup : Setup) : in HashSig/SLHDSA/SHAKE128s/Proof/ShareGame.lean moved from L271 to L271
  • noncomputable def splitter : QueryImpl (OracleWorld + SigningSpec) (OracleComp ShareSpec) where in HashSig/SLHDSA/SHAKE128s/Proof/ShareGame.lean moved from L209 to L209
  • noncomputable def realWorldImpl : QueryImpl OracleWorld (StateT VerifyState ProbComp) where in HashSig/SLHDSA/SHAKE128s/Proof/SharePresent.lean moved from L199 to L200
  • def stripImpl (cache : QueryCache HashSpec) : QueryImpl HashSpec (OracleComp HashSpec) where in HashSig/SLHDSA/SHAKE128s/Proof/StripCached.lean moved from L48 to L49
  • @[expose, simps] noncomputable def tapeRecorder (keep : Bytes → Prop) : in HashSig/SLHDSA/SHAKE128s/Proof/TapeFactor.lean moved from L47 to L47
  • @[expose, simps] def signingOracle (scheme : ExternalScheme Output PK SK) (sk : SK) : in HashSig/SLHDSA/SHAKE128s/Statement/Game.lean moved from L128 to L128
  • @[expose, simps] def signingOracle (sk : SecretKey) : QueryImpl SigningSpec CountedRun where in HashSig/SLHDSA/SHAKE128s/Statement/Security.lean moved from L75 to L75
  • @[expose, simps -isSimp] def shakeAnswer : QueryImpl (shakeSpec vp) Id where in HashSig/SLHDSA/Security/ByteConformance.lean moved from L188 to L188
  • @[expose, simps] noncomputable def encHashImpl : in HashSig/SLHDSA/Security/ByteModel.lean moved from L220 to L220
  • def roleImpl (r : Role) : QueryImpl (deriveSpec core) (OracleComp (roleSpec core)) where in HashSig/SLHDSA/Security/CoverageRoles.lean moved from L183 to L184
  • @[expose, simps -isSimp] def romAnswer (prims : Primitives vp.params) : in HashSig/SLHDSA/Security/RomConformance.lean moved from L49 to L49
  • def cachedHandler (answer : Output) : QueryImpl (World Output) (CachedBackend Output) where in HashSigTest/SLHDSA/SHAKE128s/Support.lean moved from L141 to L142
  • def toyHandler : QueryImpl toySpec (StateM (List Nat)) where in HashSigTest/SLHDSA/Wire.lean moved from L107 to L107
  • @[expose, simps] def opImpl [Monad m] (proto : Scheme m K UK TK W) (tk : TK) : in VCVio/CryptoFoundations/AKE/UAKE/Defs.lean moved from L180 to L180
  • def decryptionOracle (sk : SK) : QueryImpl (C →ₒ Option M) m where in VCVio/CryptoFoundations/AsymmEncAlg/INDCCA.lean moved from L38 to L38
  • @[simps (attr in VCVio/CryptoFoundations/FiatShamir/Sigma/Stateful/Bridge.lean moved from L96 to L96
  • @[simps (attr in VCVio/CryptoFoundations/FiatShamir/Sigma/Stateful/Chain/Simulation.lean moved from L264 to L264
  • @[simps -isSimp (attr in VCVio/CryptoFoundations/FiatShamir/Sigma/Stateful/Compatibility.lean moved from L167 to L167
  • @[simps (attr in VCVio/CryptoFoundations/FiatShamir/Sigma/Stateful/Games.lean moved from L43 to L43
  • @[simps (attr in VCVio/CryptoFoundations/FiatShamir/Sigma/Stateful/Games.lean moved from L65 to L66
  • @[simps (attr in VCVio/CryptoFoundations/FiatShamir/Sigma/Stateful/Games.lean moved from L77 to L79
  • @[simps (attr in VCVio/CryptoFoundations/FiatShamir/Sigma/Stateful/Games.lean moved from L93 to L96
  • @[simps (attr in VCVio/CryptoFoundations/FiatShamir/Sigma/Stateful/Games.lean moved from L112 to L116
  • @[simps (attr in VCVio/CryptoFoundations/FiatShamir/Sigma/Stateful/Games.lean moved from L129 to L134
  • @[simps (attr in VCVio/CryptoFoundations/FiatShamir/Sigma/Stateful/Games.lean moved from L170 to L176
  • @[simps (attr in VCVio/CryptoFoundations/FiatShamir/Sigma/Stateful/Games.lean moved from L183 to L189
  • @[simps (attr in VCVio/CryptoFoundations/FiatShamir/Sigma/Stateful/Games.lean moved from L231 to L238
  • @[simps (attr in VCVio/CryptoFoundations/FiatShamir/Sigma/Stateful/Games.lean moved from L245 to L253
  • @[expose, simps] noncomputable def hybridSignImpl in VCVio/CryptoFoundations/FiatShamir/WithAbort/GhostBodies/GhostLayer.lean moved from L397 to L398
  • noncomputable def ghostHybridImpl (progSide : Bool) (pk : Stmt) (sk : Wit) : in VCVio/CryptoFoundations/FiatShamir/WithAbort/GhostBodies/GhostLayer.lean moved from L246 to L247
  • @[expose, simps] noncomputable def ghostNmaImpl (pk : Stmt) (_sk : Wit) : in VCVio/CryptoFoundations/FiatShamir/WithAbort/GhostBodies/NMAHandler.lean moved from L197 to L197
  • @[expose, simps] noncomputable def deferredDrawImpl (pk : Stmt) (sk : Wit) : in VCVio/CryptoFoundations/FiatShamir/WithAbort/Security/DrawCollectingBody.lean moved from L180 to L180
  • @[expose, simps] noncomputable def flagLift {ι : Type} {spec : OracleSpec ι} {σ : Type} in VCVio/CryptoFoundations/FiatShamir/WithAbort/Security/HopLemmas.lean moved from L253 to L253
  • @[expose, simps] noncomputable def deferredDrawReadImpl (pk : Stmt) (sk : Wit) : in VCVio/CryptoFoundations/FiatShamir/WithAbort/Security/ReadRecording.lean moved from L88 to L88
  • @[expose, simps] noncomputable def progGameRunImplCombinedTrap (pk : PK) (sk : SK) : in VCVio/CryptoFoundations/GPVHashAndSign/CombinedHandler.lean moved from L647 to L647
  • @[expose, simps] noncomputable def gpvRealImplFlag (pk : PK) (sk : SK) : in VCVio/CryptoFoundations/GPVHashAndSign/FlagHandlers.lean moved from L59 to L59
  • @[expose, simps] noncomputable def gpvRealImplFlagFresh (pk : PK) (sk : SK) : in VCVio/CryptoFoundations/GPVHashAndSign/FlagHandlers.lean moved from L923 to L923
  • @[expose, simps] noncomputable def gpvRealImplFresh (pk : PK) (sk : SK) : in VCVio/CryptoFoundations/GPVHashAndSign/FlagHandlers.lean moved from L1335 to L1335
  • @[expose, simps] noncomputable def gpvRealImplTape (pk : PK) (sk : SK) : in VCVio/CryptoFoundations/GPVHashAndSign/GameRuns.lean moved from L541 to L541
  • @[expose, simps] noncomputable def gpvRealImplTapeFlag (pk : PK) (sk : SK) : in VCVio/CryptoFoundations/GPVHashAndSign/GameRuns.lean moved from L803 to L804
  • noncomputable def progGameRunImplTape (domainSample : PK → ProbComp Domain) (pk : PK) : in VCVio/CryptoFoundations/GPVHashAndSign/GameRuns.lean moved from L607 to L608
  • @[expose, simps] noncomputable def progGameRunImplCombinedTrapCount (pk : PK) (sk : SK) : in VCVio/CryptoFoundations/GPVHashAndSign/TrapCount.lean moved from L53 to L53
  • @[expose, simps] def withCoins {S Query : Type} {G : S → Type} {Reply : Query → Type} in VCVio/CryptoFoundations/GroupModel/Coins.lean moved from L33 to L33
  • @[expose, simps] def liftGame [∀ s, Zero (G s)] {Query : Type} {Reply : Query → Type} in VCVio/CryptoFoundations/GroupModel/Game.lean moved from L58 to L58
  • @[expose, simps -isSimp] def rawGame : in VCVio/CryptoFoundations/GroupModel/HashToGroup/LazyExecution.lean moved from L26 to L26
  • @[expose, simps] def game [DecidableEq Label] (decode : C → G) (sample : Label → ProbComp C) : in VCVio/CryptoFoundations/GroupModel/HashToGroup/Oracle.lean moved from L77 to L77
  • @[expose, simps -isSimp] def fixedOracle {M G : Type} (hash sign : M → G) : in VCVio/CryptoFoundations/GroupModel/LinearFunctional/LazyExecution.lean moved from L63 to L62
  • @[expose, simps -isSimp] def transcriptOracle {M R G : Type} (hash sign : R → G) : in VCVio/CryptoFoundations/GroupModel/LinearFunctional/LazyExecution.lean moved from L31 to L31
  • private def certifiedHandler {N : Type → Type} [Monad N] in VCVio/CryptoFoundations/GroupModel/OfExplained.lean moved from L249 to L250
  • @[expose, simps] def impl [DecidableEq S] [CommSemiring F] in VCVio/CryptoFoundations/GroupModel/Oracle.lean moved from L113 to L113
  • @[expose, simps] def game {N : Type → Type} [Monad N] in VCVio/CryptoFoundations/GroupModel/PairingExplained.lean moved from L209 to L209
  • @[expose, simps] def virtualizeImpl [DecidableEq S] (z : S → Handle) : in VCVio/CryptoFoundations/GroupModel/Virtualize.lean moved from L34 to L34
  • @[expose, simps] def SM_DT_DSPR_challengeOracle [DecidableEq Tweak] in VCVio/CryptoFoundations/HardnessAssumptions/TweakableHash/SMDTDSPR.lean moved from L119 to L119
  • noncomputable def SM_DT_RTCR_challengeOracle [DecidableEq Tweak] [SampleableType R] in VCVio/CryptoFoundations/HardnessAssumptions/TweakableHash/SMDTRTCR.lean moved from L180 to L181
  • @[expose, simps] def SM_DT_UD_challengeOracle [DecidableEq Tweak] (world : SM_DT_UD_World) in VCVio/CryptoFoundations/HardnessAssumptions/TweakableHash/SMDTUD.lean moved from L184 to L184
  • @[expose, simps] def monitorChallengeOracle [DecidableEq Tweak] : in VCVio/CryptoFoundations/HardnessAssumptions/TweakableHash/ToFinalValidity/Core.lean moved from L122 to L122
  • @[expose, simps] def roaChallengeOracle [DecidableEq Tweak] : in VCVio/CryptoFoundations/HardnessAssumptions/TweakableHash/ToFinalValidity/Core.lean moved from L109 to L109
  • @[expose, simps] def ResetPolicy.rerun (P : ResetPolicy init impl) {Q α : Type} in VCVio/CryptoFoundations/Rewinding/Basic.lean moved from L104 to L104
  • @[expose, simps] def counted {Q α : Type} (f : Q → α) : in VCVio/CryptoFoundations/Rewinding/Basic.lean moved from L94 to L94
  • @[expose, simps] def charged {Q α : Type} (f : Q → α) (cost : Q → ℕ) : in VCVio/CryptoFoundations/Rewinding/Cost.lean moved from L77 to L77
  • @[expose, simps] def costAdapterImpl {Q α : Type} : in VCVio/CryptoFoundations/Rewinding/Cost.lean moved from L189 to L189
  • def answer : QueryImpl unifSpec (StateT (tapeSpec.QueryCache × Cursor) ProbComp) where in VCVio/CryptoFoundations/Rewinding/FixedTape.lean moved from L43 to L44
  • @[expose, simps] def persistentAnswer (impl : QueryImpl spec (StateT W ProbComp)) : in VCVio/CryptoFoundations/Rewinding/Instances.lean moved from L28 to L28
  • @[expose, simps] def productAnswer : QueryImpl (spec₁ + spec₂) in VCVio/CryptoFoundations/Rewinding/Instances.lean moved from L253 to L261
  • @[expose, simps] def statelessImpl (answer : (q : spec.Domain) → spec.Range q) : in VCVio/CryptoFoundations/Rewinding/Instances.lean moved from L93 to L93
  • private def uniformInl : QueryImpl unifSpec (OracleComp (unifSpec + spec)) where in VCVio/CryptoFoundations/Rewinding/Instances.lean moved from L112 to L114
  • @[expose, simps] def logCounted (g : Q → Bool) : in VCVio/CryptoFoundations/Rewinding/QueriedPoints.lean moved from L34 to L34
  • @[expose, simps] def handlerRouterImpl (ro : QueryImpl (unifSpec + hs) (StateT τ ProbComp)) in VCVio/CryptoFoundations/SignatureAlg/Routed.lean moved from L130 to L137
  • @[expose, simps] def liftAmbientImpl : in VCVio/CryptoFoundations/SignatureAlg/Routed.lean moved from L76 to L80
  • @[expose, simps] def liftRawImpl : in VCVio/CryptoFoundations/SignatureAlg/Routed.lean moved from L69 to L71
  • @[expose, simps] def liftTypedImpl : in VCVio/CryptoFoundations/SignatureAlg/Routed.lean moved from L64 to L64
  • @[expose, simps] def programRouterImpl in VCVio/CryptoFoundations/SignatureAlg/Routed.lean moved from L111 to L116
  • @[expose, simps] noncomputable def tableRouter : in VCVio/CryptoFoundations/SignatureAlg/Routed.lean moved from L463 to L474
  • @[expose, simps] def signingImpl (message : E → M) (sig : CanonicalEncoding S WS) : in VCVio/CryptoFoundations/SignatureAlg/Wire.lean moved from L103 to L103
  • def IND_CCA_challengeImpl (encAlg : SymmEncAlg (OracleComp spec) M K C) (k : K) in VCVio/CryptoFoundations/SymmEncAlg/INDCCA.lean moved from L68 to L69
  • def IND_CCA_decryptImpl [DecidableEq C] (encAlg : SymmEncAlg (OracleComp spec) M K C) in VCVio/CryptoFoundations/SymmEncAlg/INDCCA.lean moved from L79 to L82
  • @[expose, simps] def signingKernelOracle [DecidableEq E] in VCVio/CryptoFoundations/SyncSignatureAlg/Unforgeability.lean moved from L146 to L146
  • instance toLens_isCartesian : h.toLens.IsCartesian where in VCVio/OracleComp/Coercions/SubSpec/Basic.lean moved from L140 to L138
  • @[expose, simps] def insertMiddle : QueryImpl (a + b) (OracleComp ((a + c) + b)) where in VCVio/OracleComp/Coercions/SubSpec/Routing.lean moved from L33 to L34
  • @[expose, simps] def mergeRight : QueryImpl (((a + c) + b) + c) in VCVio/OracleComp/Coercions/SubSpec/Routing.lean moved from L38 to L40
  • @[expose, simps] def swapRight : QueryImpl ((a + b) + c) (OracleComp ((a + c) + b)) where in VCVio/OracleComp/Coercions/SubSpec/Routing.lean moved from L27 to L27
  • @[simps] noncomputable def _root_.ProbHandler.ofHandler (h : OracleHandler spec) : in VCVio/OracleComp/Coinductive/DynSystem.lean moved from L288 to L288
  • def toQueryImpl (h : OracleHandler spec) : QueryImpl spec Id in VCVio/OracleComp/Coinductive/DynSystem.lean moved from L99 to L99
  • def withCaching (so : QueryImpl spec m) : QueryImpl spec (StateT spec.QueryCache m) where in VCVio/OracleComp/QueryTracking/CachingOracle.lean moved from L39 to L39
  • def eraseObsImpl (base : QueryImpl spec m) : QueryImpl (spec + ObsSpec Ev) m where in VCVio/OracleComp/QueryTracking/ObservationOracle.lean moved from L98 to L99
  • @[expose] def toPartialImpl (cache : spec.QueryCache) : QueryImpl spec Option in VCVio/OracleComp/QueryTracking/RandomOracle/CachePartial.lean moved from L57 to L57
  • @[inline, simps] def eagerRandomOracle {ι} [DecidableEq ι] {spec : OracleSpec ι} in VCVio/OracleComp/QueryTracking/RandomOracle/Eager.lean moved from L45 to L45
  • @[expose, simps] def encodeImpl : in VCVio/OracleComp/QueryTracking/RandomOracle/Encoded.lean moved from L178 to L178
  • @[expose, simps] noncomputable def routerImpl : in VCVio/OracleComp/QueryTracking/RandomOracle/Encoded.lean moved from L230 to L231
  • @[expose, simps] noncomputable def truncatedImpl : in VCVio/OracleComp/QueryTracking/RandomOracle/Encoded.lean moved from L160 to L160
  • def rawLift : QueryImpl (unifSpec + (D →ₒ M)) (OracleComp (unifSpec + (spec + (D →ₒ M)))) where in VCVio/OracleComp/QueryTracking/RandomOracle/Encoded/Batch.lean moved from L183 to L186
  • def roundImpl : QueryImpl (unifSpec + spec.batch) (OracleComp (unifSpec + (D →ₒ M).batch)) where in VCVio/OracleComp/QueryTracking/RandomOracle/Encoded/Batch.lean moved from L209 to L214
  • def typedLift : QueryImpl (unifSpec + spec) (OracleComp (unifSpec + (spec + (D →ₒ M)))) where in VCVio/OracleComp/QueryTracking/RandomOracle/Encoded/Batch.lean moved from L189 to L193
  • @[expose, simps] def deriveImpl (s : S) : in VCVio/OracleComp/QueryTracking/RandomOracle/HiddenSeed.lean moved from L233 to L233
  • @[expose, simps] def withDerivationsLift : in VCVio/OracleComp/QueryTracking/RandomOracle/HiddenSeed.lean moved from L122 to L122
  • @[expose, simps] noncomputable def idealImpl : in VCVio/OracleComp/QueryTracking/RandomOracle/HiddenSeed.lean moved from L423 to L426
  • @[expose, simps] noncomputable def collapseFwd : in VCVio/OracleComp/QueryTracking/RandomOracle/HiddenSeedCollapse.lean moved from L40 to L40
  • @[expose, simps] noncomputable def labelImpl : in VCVio/OracleComp/QueryTracking/RandomOracle/Relabel.lean moved from L196 to L196
  • @[expose, simps -isSimp] def routeHash [DecidableEq D] [SampleableType R] : in VCVio/OracleComp/QueryTracking/RandomOracle/SlotRenaming.lean moved from L66 to L66
  • @[expose] def withTrace (so : QueryImpl spec m) in VCVio/OracleComp/QueryTracking/Tracing/Core.lean moved from L90 to L90
  • @[expose] def withTraceAppend (so : QueryImpl spec m) in VCVio/OracleComp/QueryTracking/Tracing/Core.lean moved from L184 to L184
  • @[expose] def withTraceAppendBefore (so : QueryImpl spec m) (traceFn : spec.Domain → ω) : in VCVio/OracleComp/QueryTracking/Tracing/Core.lean moved from L144 to L144
  • @[expose] def withTraceBefore (so : QueryImpl spec m) (traceFn : spec.Domain → ω) : in VCVio/OracleComp/QueryTracking/Tracing/Core.lean moved from L43 to L43
  • def batch [Monad m] (impl : QueryImpl spec m) : QueryImpl spec.batch m where in VCVio/OracleComp/SimSemantics/Batch.lean moved from L136 to L145
  • @[ext] protected lemma ext {so so' : QueryImpl spec m} in VCVio/OracleComp/SimSemantics/QueryImpl/Basic.lean moved from L48 to L65
  • @[simp] lemma liftTarget_apply (n : Type u → Type*) [MonadLiftT m n] in VCVio/OracleComp/SimSemantics/QueryImpl/Basic.lean moved from L104 to L167
  • @[simp] lemma liftTarget_self (impl : QueryImpl spec m) : in VCVio/OracleComp/SimSemantics/QueryImpl/Basic.lean moved from L109 to L174
  • def liftTarget (n : Type u → Type*) [MonadLiftT m n] in VCVio/OracleComp/SimSemantics/QueryImpl/Basic.lean moved from L100 to L163
  • def toQueryImpl [HasQuery spec m] : QueryImpl spec m where in VCVio/OracleComp/SimSemantics/QueryImpl/Basic.lean moved from L230 to L294
  • @[expose] def postInsert (so : QueryImpl spec m) {α} in VCVio/OracleComp/SimSemantics/QueryImpl/Constructions/Core.lean moved from L168 to L173
  • @[expose] def preInsert (so : QueryImpl spec m) (nx : spec.Domain → n α) : in VCVio/OracleComp/SimSemantics/QueryImpl/Constructions/Core.lean moved from L57 to L57
  • def tagWith (k : K) : QueryImpl spec (OracleComp (spec.tagged K)) where in VCVio/OracleComp/SimSemantics/QueryImpl/Tagged.lean moved from L51 to L51
  • def untag : QueryImpl (spec.tagged K) (OracleComp spec) where in VCVio/OracleComp/SimSemantics/QueryImpl/Tagged.lean moved from L55 to L55
  • @[simps] def fixSndStateT {ι : Type} {spec : OracleSpec ι} {σ Q : Type} in VCVio/OracleComp/SimSemantics/StateT/StateProjection.lean moved from L285 to L285
  • @[simps] def linkWith (F : Frame σ σ₁ σ₂) in VCVio/OracleComp/SimSemantics/StateT/StateSeparating.lean moved from L242 to L245
  • @[expose, simps -isSimp] def flattenStateTWriterT {ι : Type _} {spec : OracleSpec ι} in VCVio/OracleComp/SimSemantics/WriterT/Core.lean moved from L68 to L71
  • @[expose, simps] def flattenWriterT {ι : Type _} {spec : OracleSpec ι} in VCVio/OracleComp/SimSemantics/WriterT/Core.lean moved from L57 to L59
  • @[expose, simps] def parallelWriterT {ι₁ : Type u} {ι₂ : Type v} in VCVio/OracleComp/SimSemantics/WriterT/Core.lean moved from L33 to L33
  • @[expose, simps] def sigmaWriterT {τ : Type} [DecidableEq τ] {ι : τ → Type v} in VCVio/OracleComp/SimSemantics/WriterT/Core.lean moved from L45 to L46
  • @[expose, simps -isSimp] def oracle {M G₁ G₂ : Type} : in VCVio/Schemes/BLS/AGM/Adversary.lean moved from L61 to L61
  • @[simps -isSimp] private def cachedOracle {M R G : Type} [DecidableEq M] [SampleableType R] in VCVio/Schemes/BLS/AGM/Reductions.lean moved from L237 to L236
  • @[simps -isSimp] private def fixedPlainOracle {M G₁ G₂ : Type} (hash sign : M → G₁) : in VCVio/Schemes/BLS/AGM/Reductions.lean moved from L103 to L103
  • @[simps] private def realSign {F G M : Type} [SMul F G] [SampleableType G] [DecidableEq M] in VCVio/Schemes/BLS/Games.lean moved from L29 to L29
  • @[expose, simps -isSimp] def oracle {M G₁ G₂ Gₜ : Type} : in VCVio/Schemes/BLS/Generic/Adversary.lean moved from L90 to L90
  • @[expose, simps -isSimp] def realReductionHandler [CommSemiring F] in VCVio/Schemes/BLS/Generic/ReductionExecution.lean moved from L35 to L35
  • @[simps -isSimp] private def combinedHandler [CommSemiring F] [DecidableEq F] in VCVio/Schemes/BLS/Generic/ReductionExecution.lean moved from L179 to L180
  • @[expose, simps -isSimp] def reductionCache [DecidableEq M] [SampleableType R] : in VCVio/Schemes/BLS/Generic/ReductionPrograms.lean moved from L107 to L109
  • @[expose, simps -isSimp] def reductionHandler [CommSemiring F] [DecidableEq F] in VCVio/Schemes/BLS/Generic/ReductionPrograms.lean moved from L70 to L71
  • @[expose, simps -isSimp] def reductionLift : QueryImpl (genSpec F pairingSig) in VCVio/Schemes/BLS/Generic/ReductionPrograms.lean moved from L39 to L39
  • @[expose, simps -isSimp] def relabel : in VCVio/Schemes/BLS/Generic/Translation.lean moved from L32 to L32
  • @[simps -isSimp] private def sourceOracle : in VCVio/Schemes/BLS/Generic/Translation.lean moved from L72 to L73
  • @[expose, simps -isSimp] def programmedOracle {V W M : Type} [SampleableType V] [DecidableEq M] in VCVio/Schemes/BLS/Programming.lean moved from L49 to L49
  • @[expose, simps] def cpaChallengeImpl (mac : MacAlg ProbComp C Km T) (km : Km) : in VCVio/Schemes/EncryptThenMac.lean moved from L329 to L338
  • @[expose, simps] def cpaDecryptImpl : in VCVio/Schemes/EncryptThenMac.lean moved from L340 to L349
  • @[expose, simps] def forgerDecryptImpl : QueryImpl (C × T →ₒ Option M) in VCVio/Schemes/EncryptThenMac.lean moved from L574 to L588
  • @[expose, simps] def rejectDecryptImpl : in VCVio/Schemes/EncryptThenMac.lean moved from L178 to L182
  • def ccaDecryptImpl (enc : SymmEncAlg ProbComp M Ke C) (mac : MacAlg ProbComp C Km T) in VCVio/Schemes/EncryptThenMac.lean moved from L169 to L172
  • def challengeImpl (enc : SymmEncAlg ProbComp M Ke C) (mac : MacAlg ProbComp C Km T) in VCVio/Schemes/EncryptThenMac.lean moved from L144 to L145
  • def forgerChallengeImpl (enc : SymmEncAlg ProbComp M Ke C) (ke : Ke) (leak : M → Λ) in VCVio/Schemes/EncryptThenMac.lean moved from L560 to L573
  • def stopChallengeImpl (enc : SymmEncAlg ProbComp M Ke C) (mac : MacAlg ProbComp C Km T) in VCVio/Schemes/EncryptThenMac.lean moved from L402 to L413
  • def toImpl (O : Oracles n S L Salt Ctx) : QueryImpl (oracleSpec n S L Salt Ctx) Id where in VCVio/Schemes/PointerChainPuzzle/Basic.lean moved from L295 to L295
  • @[expose, simps -isSimp] def oracle {F M G : Type} [Zero G] : in VCVio/Schemes/Schnorr/AGM/Adversary.lean moved from L71 to L71
  • def handler [Field F] [AddCommGroup G] [Module F G] [DecidableEq F] [DecidableEq G] in VCVio/Schemes/Schnorr/AGM/Reduction.lean moved from L164 to L165
  • def demoImpl : QueryImpl demoSpec (StateT (Heap DemoCell) ProbComp) where in VCVio/StateSeparating/CellRef.lean moved from L824 to L825
  • def toyMappedWriter (_ : Unit) : in VCVioTest/Computability.lean moved from L128 to L128
  • def toyTrackingInner : QueryImpl (Unit →ₒ Bool) (StateT (List Bool) ProbComp) where in VCVioTest/Computability.lean moved from L118 to L118
  • private def failingMiss : QueryImpl rawSpec (ExceptT Unit (StateT Nat Id)) where in VCVioTest/CryptoFoundations/MerkleTreeCacheRefinement.lean moved from L162 to L162
  • private def miss : QueryImpl rawSpec (StateT Nat Id) where in VCVioTest/CryptoFoundations/MerkleTreeCacheRefinement.lean moved from L29 to L29
  • private def failingMiss : QueryImpl rawSpec (ExceptT Nat (StateT Nat Id)) where in VCVioTest/CryptoFoundations/MerkleTreeCostRefinement.lean moved from L215 to L215
  • private def miss : QueryImpl rawSpec (StateT Nat Id) where in VCVioTest/CryptoFoundations/MerkleTreeCostRefinement.lean moved from L39 to L39
  • def constImpl : QueryImpl bitSpec (OracleComp bitSpec) where in VCVioTest/CryptoFoundations/SignatureAlgBudget.lean moved from L51 to L51
  • def fwdImpl : QueryImpl bitSpec (OracleComp bitSpec) where in VCVioTest/CryptoFoundations/SignatureAlgBudget.lean moved from L78 to L79
  • @[expose] def counterImpl : QueryImpl counterSpec (StateT Nat ProbComp) where in VCVioTest/EvalDist/EventBounds.lean moved from L92 to L92
  • def failingHandler : QueryImpl (Unit × Unit →ₒ Unit) (OptionT ProbComp) where in VCVioTest/FiatShamirAbort.lean moved from L60 to L60
  • @[expose] def weightedStep : QueryImpl sourceSpec (StateT ℕ (OracleComp targetSpec)) where in VCVioTest/FiniteQuerySimulation.lean moved from L36 to L36
  • def countingCoin : QueryImpl coinSpec (StateT ℕ ProbComp) where in VCVioTest/Foundations.lean moved from L254 to L254
  • def clearGame : QueryImpl gameSpec (StateT (Tbl fun _ : Unit => ZMod 7) Id) where in VCVioTest/GroupModel/Basic.lean moved from L56 to L56
  • def singleGame : QueryImpl gameSpec (StateT (Tbl fun _ : Unit => ZMod 7) Id) where in VCVioTest/GroupModel/Basic.lean moved from L34 to L34
  • example : (measured.run (N in VCVioTest/GroupModel/Interaction/Basic.lean moved from L43 to L43
  • example : (noOracles.run (N in VCVioTest/GroupModel/Interaction/Basic.lean moved from L26 to L26
  • private def emptyGame : QueryImpl (plainSpec (fun _ : Bool => ZMod 7) Empty Empty.elim) Id where in VCVioTest/GroupModel/ToExplained.lean moved from L117 to L118
  • private def lastCoin : QueryImpl unifSpec Id where in VCVioTest/GroupModel/ToExplained.lean moved from L65 to L65
  • private def succGame : QueryImpl (plainSpec (fun _ : Bool => ZMod 7) Unit (fun _ => Unit)) Id where in VCVioTest/GroupModel/ToExplained.lean moved from L68 to L69
  • private def game : QueryImpl (plainSpec Group Unit (fun _ => Scalar)) (OracleComp unifSpec) where in VCVioTest/GroupModel/Typed.lean moved from L61 to L61
  • @[expose] def fresh : QueryImpl (Nat →ₒ Nat) (StateM Nat) where in VCVioTest/ListCache.lean moved from L25 to L25
  • def counter : QueryImpl ambSpec (StateT ℕ ProbComp) where in VCVioTest/LoggedRunInvariant.lean moved from L36 to L36
  • def inner : QueryImpl logSpec (OracleComp ambSpec) where in VCVioTest/LoggedRunInvariant.lean moved from L40 to L40
  • def verifierImpl : QueryImpl (VerifierQuery →ₒ Nat) Id where in VCVioTest/MerkleTreeBatch.lean moved from L393 to L393
  • def fresh : QueryImpl (Unit →ₒ Nat) (StateT Nat Id) where in VCVioTest/ModuleAPI/Cache.lean moved from L62 to L62
  • private def missCounter : QueryImpl fullSpec (StateT Nat Id) where in VCVioTest/ModuleAPI/Cache.lean moved from L88 to L88
  • def handler : QueryImpl signature Id where in VCVioTest/ModuleAPI/Counting.lean moved from L39 to L39
  • def refusing : QueryImpl signature Option where in VCVioTest/ModuleAPI/Counting.lean moved from L55 to L56
  • def coinImpl : QueryImpl (Unit →ₒ Bool) (StateT Bool ProbComp) where in VCVioTest/OracleComp/BudgetedPotential.lean moved from L52 to L52
  • def hitImpl : QueryImpl (Option (Option Y) →ₒ Y) (StateT (HitState Y) ProbComp) where in VCVioTest/OracleComp/BudgetedPotential.lean moved from L178 to L179
  • def route : QueryImpl signature (OracleComp signature) where in VCVioTest/OracleComp/CostSimulation.lean moved from L41 to L41
  • def nextWord : QueryImpl Spec (StateM Nat) where in VCVioTest/OracleComp/CostedCacheReplay.lean moved from L35 to L35
  • def longBranch : QueryImpl choiceSpec Id where in VCVioTest/OracleComp/MeasuredProgram.lean moved from L185 to L186
  • def shortBranch : QueryImpl choiceSpec Id where in VCVioTest/OracleComp/MeasuredProgram.lean moved from L182 to L182
  • def bumpImpl : QueryImpl (Unit →ₒ Unit) (StateT ℕ ProbComp) where in VCVioTest/OracleComp/PreservesInv.lean moved from L28 to L28
  • def coinImpl : QueryImpl (Unit →ₒ Unit) (StateT ℕ ProbComp) where in VCVioTest/OracleComp/PreservesInv.lean moved from L33 to L34
  • def service : QueryImpl spec (StateT Nat Id) where in VCVioTest/OracleNetwork.lean moved from L28 to L28
  • theorem adaptive_result : in VCVioTest/OracleNetwork.lean moved from L37 to L38
  • def zeroHandler : PFunctor.Handler Option triPFunctor where in VCVioTest/PFunctorFacade.lean moved from L50 to L50
  • def hetImpl : QueryImpl hetSpec Id where in VCVioTest/PointerChainPuzzle/Batch.lean moved from L41 to L41
  • def traceImpl : QueryImpl pointSpec (StateM (List ℕ)) where in VCVioTest/PointerChainPuzzle/Batch.lean moved from L109 to L111
  • def zeroCoins : QueryImpl unifSpec Id where in VCVioTest/PointerChainPuzzle/Batch.lean moved from L46 to L47
  • def tapeImpl (g : QueryImpl spec Id) : QueryImpl (unifSpec + spec.batch) (StateM (List ℕ)) where in VCVioTest/PointerChainPuzzle/HidingNonce.lean moved from L104 to L104
  • def challenges : QueryImpl (LeftOrRight.spec ℕ ℕ) (StateT OnState Id) where in VCVioTest/PointerChainPuzzle/LeanSealHidingBridge.lean moved from L111 to L111
  • def counterCoins {σ : Type} (get : σ → ℕ) (set : ℕ → σ → σ) : QueryImpl unifSpec (StateT σ Id) where in VCVioTest/PointerChainPuzzle/LeanSealHidingBridge.lean moved from L96 to L96
  • def typRounds : QueryImpl typSpec.batch (StateT OnState Id) where in VCVioTest/PointerChainPuzzle/LeanSealHidingBridge.lean moved from L115 to L115
  • def notImpl : QueryImpl boolSpec Id where in VCVioTest/PointerChainPuzzle/Truncate.lean moved from L30 to L30
  • def zeroCoins : QueryImpl unifSpec Id where in VCVioTest/PointerChainPuzzle/Truncate.lean moved from L33 to L34
  • def countingImpl : QueryImpl fixedSpec (StateT (ℕ → ℕ) (OracleComp fixedSpec)) where in VCVioTest/ProgramLogic/OracleWP.lean moved from L65 to L65
  • def countImpl : QueryImpl CountSpec (StateM Nat) where in VCVioTest/QueryHom.lean moved from L91 to L91
  • def gated : QueryImpl unifSpec (StateT ℕ ProbComp) where in VCVioTest/RandomOracleEncoded.lean moved from L209 to L209
  • def collapse : QueryImpl spec (OracleComp single) where in VCVioTest/RandomOracleRedirect.lean moved from L109 to L110
  • def expand : QueryImpl single (OracleComp spec) where in VCVioTest/RandomOracleRedirect.lean moved from L112 to L114
  • def toFalse : QueryImpl spec (OracleComp spec) where in VCVioTest/RandomOracleRedirect.lean moved from L37 to L37
  • def constantHandler : QueryImpl.Stateful WeightedSpec WeightedSpec Unit where in VCVioTest/StateSeparating/Measure.lean moved from L39 to L40
  • def drawHandler : QueryImpl.Stateful WeightedSpec WeightedSpec Unit where in VCVioTest/StateSeparating/Measure.lean moved from L36 to L36
  • def echoImpl : QueryImpl (Bool →ₒ Bool) Id where in VCVioTest/TimeLockPuzzle/FreeSummand.lean moved from L48 to L49
  • def notImpl : QueryImpl boolSpec Id where in VCVioTest/TimeLockPuzzle/FreeSummand.lean moved from L51 to L53
  • def zeroCoins : QueryImpl unifSpec Id where in VCVioTest/TimeLockPuzzle/FreeSummand.lean moved from L45 to L45
  • def counterCoins {σ : Type} (get : σ → ℕ) (set : ℕ → σ → σ) : QueryImpl unifSpec (StateT σ Id) where in VCVioTest/TimeLockPuzzle/Lift.lean moved from L67 to L67
  • def puzPoint : QueryImpl puzSpec (StateT ℕ Id) where in VCVioTest/TimeLockPuzzle/Lift.lean moved from L71 to L71
  • def puzRounds : QueryImpl puzSpec.batch (StateT (ℕ × List (List ℕ)) Id) where in VCVioTest/TimeLockPuzzle/Lift.lean moved from L78 to L79
  • def sumRounds : QueryImpl (puzSpec + sideSpec).batch (StateT (List (List (ℕ ⊕ ℕ))) Id) where in VCVioTest/TimeLockPuzzle/Lift.lean moved from L209 to L210
  • def onImpl : QueryImpl (unifSpec + (puzSpec + sideSpec).batch) Id where in VCVioTest/TimeLockPuzzle/LogSide.lean moved from L62 to L63
  • def preImpl : QueryImpl (unifSpec + (puzSpec + sideSpec)) Id where in VCVioTest/TimeLockPuzzle/LogSide.lean moved from L57 to L57
  • def notImpl : QueryImpl boolSpec Id where in VCVioTest/TimeLockPuzzle/Truncate.lean moved from L44 to L44
  • def zeroCoins : QueryImpl unifSpec Id where in VCVioTest/TimeLockPuzzle/Truncate.lean moved from L47 to L48
  • @[expose, simps -isSimp] def counted : QueryImpl spec (StateT Nat ProbComp) where in VCVioTest/UntilBadBind.lean moved from L78 to L78
  • @[expose] def first : QueryImpl spec (StateT Bool ProbComp) where in VCVioTest/UntilBadBind.lean moved from L32 to L32
  • @[expose] def second : QueryImpl spec (StateT Bool ProbComp) where in VCVioTest/UntilBadBind.lean moved from L36 to L36

sorry Tracking

  • No sorrys were added, removed, or affected.

Coverage Notes

  • Additional-instructions analysis was skipped because the full diff exceeded the analysis size budget, and partial results would be misleading.

Last updated: 2026-11-26 03:04 UTC.

dtumad and others added 2 commits November 25, 2026 19:57
PolyFun makes lens properties classes, so `toLens_isCartesian` becomes an instance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`QueryImpl spec m` was a reducible function type, so instances stated for handlers, such as the
`HAdd` of handler sums, were also found for ordinary functions. It is now a structure with the field
`toFun`. A handler coerces to its answer function; a function does not coerce to a handler.

Handlers built by the constructor are used through application equations generated by `@[simps]`
(`-isSimp` where the equation competes with a preferred lemma or leaves a `match` on a variable),
and equalities of handlers use `ext`. The environment linter `queryImplApply` instantiates
PolyFun's `handlerApplyFor` for `QueryImpl`. `QueryImpl.liftTarget_self` becomes a simp lemma, as
PolyFun's is.

PolyFun is pinned to the commit of its matching change on a fork.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dtumad
dtumad force-pushed the dtumad/handler-structure branch from 0bab251 to 12d7444 Compare November 26, 2026 02:01
Describe the change, how handlers are used and checked, local cost measurements, and what porting
VCVio, PolyFun and ArkLib exposed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dtumad
dtumad force-pushed the dtumad/handler-structure branch from 12d7444 to 87925ee Compare November 26, 2026 02:49
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