Skip to content

chore(deps): pin PolyFun's inductive return predicate and retire the support workaround - #1204

Merged
dtumad merged 4 commits into
Verified-zkEVM:mainfrom
dtumad:dtumad/freem-canreturn
Nov 21, 2026
Merged

dtumad merged 4 commits into
Verified-zkEVM:mainfrom
dtumad:dtumad/freem-canreturn

Conversation

@dtumad

@dtumad dtumad commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Pins PolyFun at 713d8857, the merge of Verified-zkEVM/PolyFun#509, in the root lakefile and both manifests. That commit makes the return predicate of FreeM, and so of OracleComp, the inductive PFunctor.FreeM.CanReturn. Neither the kernel nor the elaborator reduces it, so comparing x ∈ support mx with x ∈ support my compares mx with my and runs neither computation.

The reproduction from #1197 now checks without the workaround from gotcha 13b. VCVioTest/OracleComp/SupportKernel.lean keeps four cases: the original simp proof with mem_support_bind_iff on a do block, h : r ∈ support sampleThenFive passed to a lemma, an abbrev of the computation, and unfold. On main all four fail, in the kernel or at the elaborator's recursion limit. Gotcha 13b now describes the inductive predicate and keeps the warning for other sets defined by recursion over a program (leanprover/lean4#16613), and docs/reading/upstream-alignment.md records the change.

support (pure x) = {x} no longer holds by rfl on OracleComp. About 40 proofs in 21 files used a membership in the support of pure as an equation, through subst, an rfl pattern, congrArg, ▸ or Prod.ext_iff. They now use eq_of_mem_support_pure or mem_support_pure_iff. Two call sites move to PolyFun's renamed Handler.support_run_liftM_id_withChargeW and IsChargeBound.bind_support.

The pin also covers the PolyFun changes since 528b3b1. The compatibility edits for them, in the lower-expectation and relational-algebra files and their tests, are the same as in #1186, which can rebase onto this.

Verification

On 77ead20ef, ./scripts/validate.sh --lint --test --axioms passed, including the init-sweep ratchet, lake test and the axiom sweep, with zero sorry or nonstandard-axiom taint across 32,432 declarations in 1,335 modules. That run resolved PolyFun from a local copy of f3eb8333, the head of PolyFun#509, with the optional native FFI backends disabled. The PR's CI, which resolves PolyFun from a fresh checkout, passed on eeb2c5d70, which adds only the ledger row. PolyFun#509 merged as 713d8857, whose tree is identical to f3eb8333, and 775892ae7 moves the pin to it. With PolyFun checked out at 713d8857, lake build --no-build reports every library and test target up to date. VCVioTest/OracleComp/SupportKernel.lean fails on main at all four cases.

dtumad and others added 3 commits November 20, 2026 16:15
…or support

PolyFun's `MonadAttach` instance for `FreeM P` now uses an inductive `FreeM.CanReturn`. With it,
neither the kernel nor the elaborator evaluates a computation to compare `x ∈ support mx` with
`x ∈ support my`. The proof of Verified-zkEVM#1197 checks without the workaround from gotcha 13b, including
`simp` with `mem_support_bind_iff` on a `do` block, passing `h : x ∈ support mx` to a lemma, an
`abbrev` and `unfold`. `VCVioTest/OracleComp/SupportKernel.lean` checks those four cases.

`support (pure x) = {x}` no longer holds by `rfl` on `OracleComp`. Proofs that used a membership
in the support of `pure` as an equation now go through `eq_of_mem_support_pure` or
`mem_support_pure_iff`. Gotcha 13b describes the inductive predicate and keeps the general warning
about sets computed by recursion over a program (leanprover/lean4#16613).

The PolyFun pin is a cherry-pick of the PolyFun change onto the previous pin, for integration
testing. It must be replaced by the merged PolyFun commit before this lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pins PolyFun at f3eb8333 in the root lakefile and both manifests. The PolyFun changes since
528b3b1 need the compatibility edits from Verified-zkEVM#1186 in the lower-expectation and relational-algebra
files and their tests. They are copied unchanged, so Verified-zkEVM#1186 rebases onto this with only its own
content left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

🤖 PR Summary

ℹ️ This PR modifies 1 file(s) under ToMathlib/ — consider whether a corresponding upstream PR is needed.

PolyFun pin to inductive return predicate & removal of support workaround\n\nInfrastructure / CI\n- The PolyFun dependency is pinned at 713d8857 (the merge of Verified-zkEVM/PolyFun#509) in both the root lakefile and both manifests.\n- This commit makes the return predicate of FreeM (and thus OracleComp) the inductive predicate PFunctor.FreeM.CanReturn. Neither the kernel nor the elaborator reduces it any longer—comparing support memberships does not run the computation. The earlier workaround (gotcha 13b) is retired.\n- The lakefile.lean hash changes from 528b3b1… to 713d8857….\n\nProof adaptation (major theme)\n- Because support (pure x) = {x} no longer holds by rfl on OracleComp, about 40 proofs in 21 files had to be updated. The two central lemmas introduced are:\n - eq_of_mem_support_pure – extracts equality from membership in support (pure _).\n - mem_support_pure_iff – characterises such membership as equality.\n- The affected files span:\n - Examples/PRFTagReader/BadEvent.lean, MultipleBadCollision.lean\n - HashSig/SLHDSA/SHAKE128s/Proof/PhaseRightRecord.lean, RecordInvariant.lean\n - VCVio/CryptoFoundations/ (many: AsymmEncAlg/INDCPA/Oracle.lean, GPVHashAndSign/ (EmbedIndex.lean, TrapCount.lean, VerificationBridge.lean), GroupModel/Interaction.lean, GroupModel/Typed.lean, Rewinding/Laws.lean)\n - VCVio/OracleComp/ (EvalDist/Measure.lean, QueryTracking/CachingOracle.lean, LoggingOracle/Core.lean)\n - VCVio/ProgramLogic/Unary/WP/ (Lower.lean, LowerSpecs.lean, Measure.lean, OracleMeasure.lean)\n - VCVio/Schemes/MacFromPRF.lean, Schnorr/SigmaProtocol.lean\n - VCVioTest/GroupModel/Cost.lean, VCVioTest/OracleComp/LoggedHistory.lean\n- In most cases the change is replacing a subst hz, congrArg Prod.snd hpure, or rfl pattern with an explicit call to eq_of_mem_support_pure or a (mem_support_pure_iff _ _).mp. No new sorry or admit are introduced—proofs remain logically identical but use the new API.\n\nOther PolyFun compatibility edits\n- Two lemmas are renamed: PFunctor.Handler.supp_run_liftM_id_withChargeW → support_run_liftM_id_withChargeW (in CostModel.lean) and .bind_supp → .bind_support in QueryBound/Basic.lean. The corresponding call sites are updated.\n- In ToMathlib/Control/Monad/RelationalAlgebra.lean three lemmas are renamed (added _stateT suffix) and their instance declarations updated.\n\nDocumentation\n- docs/agents/gotchas.md: Entry for gotcha 13b completely rewritten. Now describes the inductive predicate and gives concrete lemmas (support_pure, PFunctor FreeM.mem_support_liftBind, etc.). A warning is kept for other sets defined by recursion over a program.\n- docs/reading/upstream-alignment.md: Added a row documenting the PolyFun inductive return predicate change.\n\nNew test file\n- VCVioTest/OracleComp/SupportKernel.lean – A new file (publicly imported via VCVioTest.lean) demonstrating the new behavior. It defines noncomputable def sampleThenFive and shows three proof techniques for establishing membership in support. Contains no sorry.\n\nInfrastructure\n- VCVio/ProgramLogic/Tactics/Unary/Internals/Driver.lean: The runVCGenPass function now saves and restores the tactic state when both tryCoreVCGen and runVCGenStep fail, preventing stale obligations from remaining in the goal queue.\n\nMathematical formalization\


Statistics

Metric Count
📝 Files Changed 35
✅ Lines Added 197
❌ Lines Removed 133

Lean Declarations

✏️ Added: 7 declaration(s)

VCVioTest/OracleComp/SupportKernel.lean (6)

  • example (r : ℕ) (h : r ∈ support sampleAgain) : r = 5
  • example (r : ℕ) (h : r ∈ support sampleThenFive) : r = 5
  • example (r : ℕ) : r ∈ support sampleThenFive → r = 5
  • noncomputable abbrev sampleAgain : ProbComp ℕ
  • noncomputable def sampleThenFive : ProbComp ℕ
  • theorem sampleThenFive_support (r : ℕ) : r ∈ support sampleThenFive → r = 5

VCVioTest/ProgramLogic/VCGenCoreDelegation.lean (1)

  • example {α : Type} (oa : OracleComp spec α) (n : ℕ) (I : ℝ≥0∞) :
✏️ Affected: 4 declaration(s) (line number changed)
  • theorem wp_uniformSample_eq_tsum (β : Type) [SampleableType β] (post : β → ℝ≥0∞) in VCVio/ProgramLogic/Unary/WP/LowerSpecs.lean moved from L85 to L85
  • theorem wp_const (mx : m α) (c : ENNReal) (epost : EStack⟨⟩ in VCVio/ProgramLogic/Unary/WP/Measure.lean moved from L90 to L90
  • theorem wp_const_of_oracle (mx : OracleComp spec α) (c : ENNReal) in VCVio/ProgramLogic/Unary/WP/OracleMeasure.lean moved from L43 to L43
  • example (c : ENNReal) (epost : EStack⟨⟩) : in VCVioTest/ProgramLogic/MeasureWP.lean moved from L44 to L44

sorry Tracking

  • No sorrys were added, removed, or affected.

📄 **Per-File Summaries**
  • Examples/PRFTagReader/BadEvent.lean: Modified unlinkBadReaderQueryImpl_state_eq — a private lemma showing that any resulting state in the support of (unlinkBadReaderQueryImpl transcript).run st still equals the initial state st. The proof was rewritten from a single simpa using congrArg Prod.snd to a two-step simp that explicitly unfolds the state monad operations (StateT.run_bind, StateT.run_get, StateT.run_pure, pure_bind, mem_support_pure_iff). This makes the reasoning more explicit and less dependent on simp's underlying simpa heuristics.
  • Examples/PRFTagReader/MultipleBadCollision.lean: The diff replaces uses of subst hz (and similarly subst hr) with obtain rfl := eq_of_mem_support_pure … in six lemmas that reason about probabilities and invariants of the multipleBadQueryImpl construction: multipleBadStep_bad_le, multipleBadStep_sessionsUsed_eq, multipleBadStep_reader_state_eq, multipleBadStep_preserves, and simulateQ_multipleBad_prob_le. This is a stylistic/refactoring change that makes the rewriting of equalities from mem_support_pure more explicit and does not alter the logical content of any of those lemmas. No new theorems, definitions, or sorry/admit are introduced.
  • HashSig/SLHDSA/SHAKE128s/Proof/PhaseRightRecord.lean: In right_record_phase, the proof step congrArg Prod.snd hpure was replaced with congrArg Prod.snd (eq_of_mem_support_pure hpure). The new call to eq_of_mem_support_pure extracts an equality from a hpure hypothesis that is a membership in the support of a pure computation, whereas the previous formulation assumed a stronger form of purity that was not available in the context. This change maintains the same conclusion outer.2 = signed.2 while using the correct lemma for the given hypothesis type.
  • HashSig/SLHDSA/SHAKE128s/Proof/RecordInvariant.lean: In both phase_invariant and phase_invariant_of_after, the hpure hypothesis obtained from support_bind_exists is now passed through eq_of_mem_support_pure before being used in the congrArg rewrites (e.g., show step.2.2.2 = z.2 from congrArg (fun p => p.2.2.2) (eq_of_mem_support_pure hpure)). This change aligns the proof with a refined API where eq_of_mem_support_pure extracts the equality from a membership in the support of a pure computation, replacing the direct use of hpure. No new sorry or admit are introduced.
  • ToMathlib/Control/Monad/RelationalAlgebra.lean: Renamed the three lemmas strictBindStateTLeft, strictBindStateTRight, and strictBindStateTBoth to strictBind_stateTLeft, strictBind_stateTRight, and strictBind_stateTBoth respectively in the file ToMathlib/Control/Monad/RelationalAlgebra.lean. Each instance declaration (instStrictBindStateTLeft, instStrictBindStateTRight, instStrictBindStateTBoth) was updated to point to the corresponding renamed lemma. No other changes were made.
  • VCVio/CryptoFoundations/AsymmEncAlg/INDCPA/Oracle.lean: The diff adds simp only [mem_support_pure_iff] at hp (or hz) after rw [StateT.run_lift, mem_support_bind_iff] in three lemmas: IND_CPA_queryImpl'_counted_counter_le_succ, IND_CPA_queryImpl'_counted_run_invariant_le, and IND_CPA_hybridLR_counted_counter_le. It also adds pure_bind, mem_support_pure_iff to the simp call in the inr mm case of IND_CPA_queryImpl'_counted_counter_le_succ. These changes improve the proof automation by explicitly rewriting support (pure _) into a condition p.1 = _, which is necessary for the subsequent obtain and simpa to work after the StateT.run_lift rewrite.
  • VCVio/CryptoFoundations/GPVHashAndSign/EmbedIndex.lean: The diff replaces uses of subst hh (or subst hh; simp) with obtain rfl := eq_of_mem_support_pure hh (and similarly inside Prod.ext_iff.mp calls) in the proofs of embedTrapIdxSigImpl_run_step_count_le and embedTrapIdxSigImpl_fresh_idx_cache_eq_general. The new lemma eq_of_mem_support_pure (defined elsewhere) is used to derive equality from membership in the support of a pure computation, making the reasoning more explicit and compositional. No new theorems, definitions, or sorry/admit are introduced; the changes are purely a proof-style refactor in the two existing lemmas.
  • VCVio/CryptoFoundations/GPVHashAndSign/TrapCount.lean: In the three lemmas embedTrapImpl_run_step_count_le, embedTrapIdxImpl_run_step_count_le, and embedTrapIdxImpl_idx_iff_cache, the diff replaces all uses of subst hh (and one direct application of (Prod.ext_iff.mp hh).2) with obtain rfl := eq_of_mem_support_pure hh or a corresponding call to eq_of_mem_support_pure before Prod.ext_iff.mp. This is a systematic refactoring that replaces a raw subst with a dedicated lemma eq_of_mem_support_pure that extracts an equality from membership in the support of a pure computation, making the proof more robust and idiomatic. No new sorry or admit are introduced; the changes are purely structural and do not alter the logical statements of the lemmas.
  • VCVio/CryptoFoundations/GPVHashAndSign/VerificationBridge.lean: The lemma embedAtIndexImpl_run_count_le has its proof updated in three places where hpst (from a mem_support_bind_iff equality) was previously projected directly with Prod.ext_iff.mp or congrArg. Each occurrence now first applies the new lemma eq_of_mem_support_pure to the equality before projecting or using congrArg. This refines the reasoning by using the dedicated lemma eq_of_mem_support_pure (which extracts an equality from membership in the support of a pure computation) instead of directly destructing the simp-produced equality, aligning the proof with the project's current lemma interface for reasoning about support of pure.
  • VCVio/CryptoFoundations/GroupModel/Interaction.lean: The proof of Adversary.run_valid is modified: in the pure out case of the OracleComp.inductionOn induction, a simp tactic call is added to normalize the hypothesis hz before the existing simpa block uses it to rewrite. The change tightens the reasoning in the base case of the induction by eliminating the simulateQ_pure and StateT.run_pure wrappers and the singleton nature of support for a pure computation, making the equality chain in hz ▸ h type-correct.
  • VCVio/CryptoFoundations/GroupModel/Typed.lean: The diff adds a simp call to the pure case of the induction in Adversary.run_basis, before the existing simpa. This prepares the context (hz) by simplifying it with simulateQ_pure, StateT.run_pure, support_pure, and Set.mem_singleton_iff, refactoring the proof's flow without changing the theorem's statement or its logical conclusion.
  • VCVio/CryptoFoundations/Rewinding/Laws.lean: In the grows_run theorem, the pure a case was strengthened by adding a simp call before the final simpa. The new simp step normalizes the hypothesis hz (which is of type z ∈ support [...]) using simulateQ_pure, StateT.run_pure, support_pure, and Set.mem_singleton_iff, transforming it into an equality z = (a, w, c). This makes the subsequent simpa more robust by explicitly eliminating the Set.mem_singleton_iff membership before rewriting with hz ▸. No sorry or admit was introduced.
  • VCVio/OracleComp/EvalDist/Measure.lean: The only change in Measure.lean is the addition of a rw [mem_support_pure_iff] rewrite rule in the pure case of the induction block of the theorem mem_support_iff_evalDist_singleton_pos_of_fullSupport. This rewrite simplifies the proof by replacing the goal's x ∈ support (pure a) with the equivalent condition x = a, reducing the subsequent reasoning to a direct equivalence between x = a and positivity of the Dirac measure at {x}. No sorry or admit have been added anywhere in the file.
  • VCVio/OracleComp/QueryTracking/CachingOracle.lean: The proof of simulateQ_cachingOracle_cache_le was refactored to use (mem_support_pure_iff _ _).mp instead of directly applying hmem to obtain a reflexivity equality. This change suggests a cleanup or alignment with a lemma that provides the standard decomposition of membership in the support of a pure computation, likely improving proof robustness or consistency with other lemmas in the codebase.
  • VCVio/OracleComp/QueryTracking/CostModel.lean: In support_costDist_eq_range_path, the invoked lemma was renamed from PFunctor.Handler.supp_run_liftM_id_withChargeW to PFunctor.Handler.support_run_liftM_id_withChargeW. This aligns the lemma name with the project's naming convention of using support instead of supp. The proof itself is unchanged beyond this single identifier update.
  • VCVio/OracleComp/QueryTracking/LoggingOracle/Core.lean: In the induction case for pure in both log_length_le_of_mem_support_run_simulateQ and holds_of_mem_log_of_mem_support_run_simulateQ, the proof tactic subst hz was replaced by obtain rfl := (mem_support_pure_iff _ _).mp hz. This changes how the hypothesis hz (which states z ∈ support ((simulateQ loggingOracle oa).run)) is used when oa is pure x: instead of substituting hz as an equality, the proof now applies mem_support_pure_iff to retrieve equality information (rfl) before proceeding with simp.
  • VCVio/OracleComp/QueryTracking/QueryBound/Basic.lean: The diff renames .bind_supp to .bind_support in the proofs of isQueryBoundP_bind and isTotalQueryBound_bind_of_mem_support. This matches an upstream rename in the underlying IsChargeBound API, correcting a name mismatch that would cause the lemmas to fail to compile. No sorries or admits are introduced.
  • VCVio/ProgramLogic/Tactics/Unary/Internals/Driver.lean: The runVCGenPass function now saves and restores the tactic state when tryCoreVCGen <||> runVCGenStep fails. Before this change, a failing step could leave the original goal partially normalized (assigned to a new obligation), disrupting the goal queue. Now saved.restore reverts to the pre-step snapshot, ensuring the unchanged goal is re-pushed exactly as it was.
  • VCVio/ProgramLogic/Unary/WP/Lower.lean: The file now imports PolyFun.Control.Monad.WriterT.WP and uses its ExactWPMonad.wp_bind, ExactWPMonad.wp_pure, and ExactWPMonad.wp_map lemmas to replace the manual simp-based proofs of wp_bind, wp_pure, and wp_map. Those three theorems lost their @[simp] attribute and now simply delegate to the corresponding ExactWPMonad lemma, reducing duplication and linking the WriterT weakest-precondition calculations to the general monad-algebra theory. The unchanged wp_tell and wp_monadLift theorems retain @[simp] and their original proof structure.
  • VCVio/ProgramLogic/Unary/WP/LowerSpecs.lean: The theorem wp_uniformSample_eq_tsum has its signature changed: it now takes an explicit epost argument (defaulting to Lean.Order.bot) and its conclusion is stated in terms of Std.WP.wp instead of OracleComp.ProgramLogic.wp, with a change tactic added to the proof to align the goal. Accordingly, the call site in Spec.uniformSample is updated to pass epost. Separately, the proofs of Spec.monadLift_query_iInf, Spec.query_iInf, and Spec.uniformSample_iInf are modified: each replaces a rewrite using MAlgOrdered.iInf_eq_iInf with LeanOrder.iInf_eq_iInf.
  • VCVio/ProgramLogic/Unary/WP/Measure.lean: The theorem wp_const was generalized: its signature now accepts an explicit epost : EStack⟨⟩ argument (defaulting to Lean.Order.bot) instead of hardcoding the empty stack. A change tactic was inserted in the proof to rewrite the goal back to the old form before the existing rw chain, keeping the proof compatible with the new signature.
  • VCVio/ProgramLogic/Unary/WP/OracleMeasure.lean: The theorem wp_const_of_oracle now generalizes the post-expectation argument from the fixed value Lean.Order.bot to an arbitrary epost : EStack⟨⟩, defaulting to Lean.Order.bot. The proof explicitly forces a rewrite of the generic epost back to Lean.Order.bot via change and then uses the existing rw/simp chain, so the generalization is achieved without constructing a new proof for the general case.
  • VCVio/Schemes/MacFromPRF.lean: The diff refines two lemmas in VCVio/Schemes/MacFromPRF.lean to use simpler rewriting for the pure branch of the oracle simulation. In log_cache_invariant_step_query, the simp call in the msg = msg' case is augmented with simulateQ_pure, StateT.run_pure, and mem_support_pure_iff, and the dsimp in the msg ≠ msg' case is replaced by a simp with those same lemmas. In log_cache_invariant_aux's pure case, the existing simulateQ_pure and WriterT.run_pure' are supplemented with StateT.run_pure and mem_support_pure_iff. These changes make the proofs more explicit about eliminating the monadic layers when the computation consists of a pure value; no new theorems or definitions are added, and no sorry or admit appears.
  • VCVio/Schemes/Schnorr/SigmaProtocol.lean: The diff adds support_pure to the simp invocation inside sigma_speciallySound. This addition likely supplies a lemma (from the project's Monad or Probability theory) so that the simplifier can reduce a support expression on a pure probability distribution to a singleton set, thereby eliminating an intermediate rewrite step and keeping the proof compatible with a change elsewhere in the library.
  • VCVioTest.lean: The public API of the VCVioTest module is extended by adding a public import for VCVioTest.OracleComp.SupportKernel, making the definitions from that file available to downstream consumers.
  • VCVioTest/GroupModel/Cost.lean: In the three_operations theorem, the second sub-case (z hz) was refactored: the simp call was expanded to a simp only that additionally rewrites QueryImpl.ofLift_eq_id', add_apply_inl, bind_pure_comp, simulateQ_bind, simulateQ_query, OracleQuery.input_query, OracleQuery.cont_query, QueryImpl.add_apply_inl, id_eq, map_bind, id_map, smul_eq_mul, simulateQ_map, bind_assoc, and MonadAttach.mem_support; the subst z was replaced by cases hz, and the concluding simp [append] was retained unchanged.
  • VCVioTest/OracleComp/LoggedHistory.lean: In both zero_query_completion and compiled_style_error_data, the justification for the supported hypothesis was changed from Set.mem_singleton _ to (mem_support_pure_iff _ _).2 rfl. This likely reflects a refactoring of the underlying support representation for computations involving pure or liftM; the new call uses a dedicated lemma to connect membership in the support of a pure computation to reflexivity, making the proof more structural and robust to changes in how runLogged is defined.
  • VCVioTest/OracleComp/SupportKernel.lean: This new file VCVioTest/OracleComp/SupportKernel.lean defines noncomputable def sampleThenFive : ProbComp ℕ, which samples a BitVec (2 ^ 32) (a type the kernel refuses to evaluate) and returns 5. The file then demonstrates three proof techniques for establishing that r ∈ support sampleThenFive → r = 5: (1) sampleThenFive_support uses simp with mem_support_bind_iff and support_pure; (2) an example passes a hypothesis to sampleThenFive_support; (3) another example uses unfold to reduce to the same lemma. It also introduces noncomputable abbrev sampleAgain := sampleThenFive and shows that the same lemma works for the abbreviation via definitional equality. The file contains no sorry or admit.
  • VCVioTest/ProgramLogic/MeasureWP.lean: The example wp (some 7 : Option Nat) (fun _ ↦ c) Lean.Order.bot = c was generalized to wp (some 7 : Option Nat) (fun _ ↦ c) epost = c by adding an explicit epost : EStack⟨⟩ parameter, replacing the fixed Lean.Order.bot. The simp proof still works, showing that the weakest precondition for a deterministic some value yields constant c regardless of the postcondition. No sorry or admit were introduced.
  • VCVioTest/ProgramLogic/VCGenCoreDelegation.lean: At the end of the file, a new section block adds a second example that demonstrates VCGenCoreDelegation (the pvcgen tactic) working with OracleComp.replicate. The example proves ⦃ I ⦄ oa.replicate n ⦃ fun _ => I ⦄ by applying pvcgen then (wp_const (oa.replicate n) I).ge. To make the proof go through, it temporarily disables (via attribute [-simp]) the ExpectationWP.Lower.wp_const_of_oracle simp lemma, which would otherwise interfere with the residual expectation. The new example sits after the existing one that uses pvcgen on a Boolean expression.
  • docs/agents/gotchas.md: The entry for 'gotcha 13b' was completely rewritten. It now reports that the kernel does not run a computation when comparing membership in support for OracleComp, because the support is defined via the inductive predicate PFunctor.FreeM.CanReturn. It replaces the previous description of a kernel-evaluation hazard with concrete instructions for using the lemmas PFunctor.FreeM.support_liftBind, PFunctor.FreeM.mem_support_liftBind, support_pure, PFunctor.FreeM.canReturn_pure_iff, and PFunctor.FreeM.canReturn_liftBind_iff, and notes that VCVioTest/OracleComp/SupportKernel.lean tests these safe cases. The new entry also adds a general warning that the old kernel-evaluation hazard still applies to other sets defined by recursion over a computation, and recommends using an inductive predicate in such cases.
  • docs/reading/upstream-alignment.md: Added a new row to the dependency-upgrade table documenting the PolyFun inductive return predicate change. It notes that support on OracleComp now uses PolyFun's inductive PFunctor.FreeM.CanReturn, explains that neither the kernel nor the elaborator evaluates a computation when comparing support memberships (gotcha 13b), and that support (pure x) = {x} holds via support_pure rather than rfl, with memberships read through eq_of_mem_support_pure. A link to the relevant PolyFun PR (Convert to module system #509) is included.
  • lakefile.lean: Updated the PolyFun dependency's pinned commit hash from 528b3b1fda285487e55704409bd1b058dc18fcad to 713d8857e49d20927c1447b3ba7397acc5537319. This advances the project to use a later version of the PolyFun library, which may include bug fixes, new features, or performance improvements relevant to the formal verification work.
  • 2 file(s) filtered as noise (lockfiles, generated, or trivial): Interop/lake-manifest.json, lake-manifest.json

Last updated: 2026-11-21 04:55 UTC.

Verified-zkEVM/PolyFun#509 merged as 713d8857, whose tree is identical
to the PR head f3eb8333 that this branch was validated against. The root
lakefile and both manifests now name the merged commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dtumad
dtumad added this pull request to the merge queue Nov 21, 2026
Merged via the queue into Verified-zkEVM:main with commit e9727ae Nov 21, 2026
9 checks passed
dtumad added a commit to dtumad/VCVio that referenced this pull request Nov 21, 2026
Main now pins PolyFun at 713d8857 (Verified-zkEVM#1204), a descendant of this
branch's pin 77731620, and carries this branch's compatibility edits,
so the pin conflicts resolve to main's files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dtumad added a commit to dtumad/VCVio that referenced this pull request Nov 21, 2026
Main now pins PolyFun at 713d8857 (Verified-zkEVM#1204), a descendant of this
branch's pin bdc1cde7, so the pin conflicts resolve to main's files.
The upstream-alignment ledger keeps both new rows.

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