On this page
- State a probability and sample uniformly
- Normalize the law of a program
- Bind a program inside a distribution
- Invert a support membership
- Sample uniformly, reject within a budget and count coins
- Bound statistical distance, divergences and hybrids
- Compare two runs one step at a time
- Certify a closed randomized routine
- Substitute an oracle while preserving private samples
- Pass a query adapter through an eager/lazy game hop
- Bound stateful identical-until-bad hops and random-oracle collisions
- Certify an adaptive oracle client
- Connect a randomized RAM loop to its answer law
- Carry the certificate into a security proof
Work with randomized and oracle programs
Randomized algorithms, interactive verifiers and cryptographic reductions separate three layers:
program syntax (ProbComp α and ProbOracleComp spec α), probability distributions (PMF α,
obtained via ProbComp.eval or stateful oracle execution), and strict polynomial-time machine
certificates (IsPPTOn, IsPPT, IsOraclePPTOn, IsOraclePPT). Prove distributional equalities
and distance bounds on the semantic side, certify runtime separately on the program syntax, and
join them at the final theorem. Each Lean block below is a contextual excerpt from a checked
test client, reproduced under the repository's Apache 2.0 license; open the linked file for full
imports and surrounding context. cslib-frontier
State a probability and sample uniformly#
Import Notation.lean and
open Cslib.Probability so public statements match textbook conventions:
- Named advantages have type
ℝ≥0, defined viaExperiment.advantage,Experiment.succProbabilityorGame.advantage, becauseNegligible,Game.Indistinguishableand reductions consumeℝ≥0. Rewrite real casts withExperiment.coe_advantageandExperiment.coe_succProbability(|Pr[e₀] - Pr[e₁]|andPr[e]). - Standalone probabilities have type
Pr[e] : ℝfor one-sided bounds (Pr[e] ≤ 1 / q), exact values (Pr[e] = 1 / 2) and hop differences, rather than exposing(ProbComp.eval e true).toRealorℝ≥0∞masses in public theorem signatures. - Exact game hops stay distribution equalities (
ProbComp.eval G₁ = ProbComp.eval G₂, orG₁ = G₂byrfl), which are stronger thanPr[G₁] = Pr[G₂]and rewrite directly withrw. ℝ≥0∞masses stay inside internalPMFalgebra (eval_*,bind_apply_*and private helpers consumed by otherPMFproofs).
Write uniform sampling with $ᵗ α (let a ← $ᵗ ZMod q, parenthesizing compound types as
$ᵗ (ZMod q × Bool)). It is notation for ProbComp.uniform α, so ProbComp.eval_uniform,
pmf_norm and all ProbComp.uniform lemmas apply directly; see
ProbabilityNotation.lean.
Normalize the law of a program#
To compute with ProbComp.eval of a do block, import
Norm.lean in the proof and run
simp only [pmf_norm]. It rewrites program evaluation into right-nested PMF.bind chains with
returned values substituted and maps pushed into continuations—the exact shape expected by
PMF.bind_congr_on_support, PMF.bind_apply and support lemmas, without unfolding support
membership or masses (PMFNorm.lean).
To align independent draws across two sampling chains, import
PMFSwap.lean (for pmf_swap and pmf_hoist) and
GameHop.lean (for peel_binds and game_trans):
pmf_swapdischarges equalities of two chains that differ only in the order of independent samples, normalizing visible monadic notation, nested binds, maps andProbComp.evalalong the path to each stripped draw (unfold named program definitions first).peel_bindsaligns an independent draw from anywhere in the opposite chain while keeping its support witness in context for the remaining equality orGame.advantagebound (usinggame_transto hop through an intermediate game), leaving matching leading draws in order.pmf_hoist q(orpmf_hoist [commutation_rule] sampler, such aspmf_hoist [Game.bind_runStatelessOracle_comm] (Game.runStatelessOracle _ _)) pulls a chosen distribution or stateless-oracle call to the front explicitly.
See CslibFrontierTests/PMFSwap.lean and GameHopTactic.lean for positive examples and failure boundaries.
Bind a program inside a distribution#
When a security game must be a PMF Bool (for instance because its setup distribution is not
assumed efficiently sampleable), import
Lift.lean to bind ProbComp steps
directly inside a PMF do-block without repeating ProbComp.eval on every line. The lift
unfolds definitionally to ProbComp.eval; simp only [pmf_norm] and ProbComp.liftM_eq_eval
restore explicit ProbComp.eval for rewriting
(ProbabilisticLift.lean).
Keep public theorem statements explicit (ProbComp.eval, Pr[e] or Experiment), and keep any
experiment whose steps are all programs as a ProbComp Bool rather than lifting it prematurely to
PMF.
Invert a support membership#
To extract the intermediate random choices behind h : x ∈ m.support, import
SuppCases.lean and run
supp_cases h with ⟨a, ha, b, hb, rfl⟩. It pushes support membership through bind, map,
pure, conditionals and uniform draws for PMF, ProbComp.eval, OracleComp.supportWith and
OracleComp.support:
- Uniform draws contribute only the sampled value; returned pairs split into components;
ifbecomes a disjunction (⟨-, h⟩ | ⟨-, h⟩), and dependentPMFconditionals retain the branch hypothesis (⟨hc, h⟩ | ⟨hc, h⟩; for dependent conditionals of oracle programs, runsplit_ifs at hfirst). - Pass local definitions or deciding hypotheses in brackets (
supp_cases h [handler_def]), or inspect the normalized hypothesis without destructuring viasimp only [supp_norm] at h. - Without
with,supp_cases hdestructures completely, substitutes variable equations and closes contradictory constructor equalities. - For stateful oracle executions, import Oracle/Norm.lean and call
supp_cases h [runWith_norm, program_def]to retain joint(result, state)support witnesses on opaque subprograms.
See SuppCases.lean for checked patterns and diagnostics.
Sample uniformly, reject within a budget and count coins#
A strict polynomial-time fair-coin machine can sample exact uniform distributions only on dyadic
sizes (such as Bool, BitString.sampleList n, or powers of two). ProbComp.uniform (Fin 3) has
an exact uniform PMF law, but cannot be realized in strict polynomial time without either
truncation error or unbounded coin flips. Choose the matching sampling layer for your claim:
- Fixed-width bit words and seeded universal hashes. Sample
kfair bits withBitString.sampleList k. For pairwise-independent hashing and leftover-hash extraction, pair the statistical bounds in Extractor/LeftoverHash.lean with Probabilistic/LinearHash.lean:LinearHash.computableInPolyTime_wordHashcertifies matrix-vector hashing from plain unary count, seed and input certificates, andLinearHash.isPPTOn_extractcertifies sampling the seed and outputting(seed, digest)in strict polynomial time. - Bounded-trial rejection sampling (strict PPT with exponential tail). When decoding
width-bit blocks viaattempt : List Bool → Option α, combineBlockRejectionSpecin DDGTree/Rejection.lean, the programssampleBlockTrials,sampleSeededTrialsandsampleBlockCappedin Languages/Probabilistic/RejectionSampling.lean, and the certificatesisPPTOn_sampleBlockTrials,isPPTOn_sampleSeededTrialsandisPPTOn_sampleBlockCappedin Computability/Probabilistic/RejectionSampling.lean (taking unarytrialsandwidthplus polynomial-timeattemptandfallback). Afterttrials,runTrials_nonegives exact failurerejectProb ^ tanddist_runCapped_lebounds statistical distance to the exact target law by(rejectProb ^ t).toReal.uniformFinRejectionSpecspecializes this toFin nwith failure≤ (1 / 2) ^ t(FairBitRejectionAndCondExp.lean). Carry that2 ^ (-n)statistical tail into the game-hop bound rather than assuming an idealized exact sampler. - Centered-binomial noise. For lattice constructions using
sampleCenteredBinomial η, CenteredBinomial/Concentration.lean providessampleCenteredBinomial_tail_leandsampleCenteredBinomial_strict_tail_le(4 exp(-B² / (2η))forη > 0,B ≥ 0), compatible withIsPPTOn encUnary encIntBin(CenteredBinomialConcentration.lean). - Unbounded exact samplers and expected coin counts. To study exact discrete distribution generating trees over unbounded fair or biased coin streams, import DDGTree.lean, DDGTree/KnuthYao.lean (
entropy_le_expectedFlips,knuthYao_generates,expectedFlips_knuthYao_ltwithinH(p) + 2; KnuthYao.lean), and DDGTree/Biased.lean (vonNeumann_generatesWith_coinandexpectedFlipsWith_coin_vonNeumann; BiasedCoinSamplers.lean). These count coin flips only, not Turing-machine runtime.
Bound statistical distance, divergences and hybrids#
Keep normalization conventions explicit when converting between distance and divergence measures:
- Statistical distance
dist μ νon finitePMFs (open scoped Cslib.Probability.PMF, StatisticalDistance/Event.lean) uses the half-L1 convention (dist ∈ [0, 1], distinct point masses at distance1). Useabs_toOuterMeasure_toReal_sub_le_distfor event differences,abs_bind_apply_toReal_sub_le_distfor randomized postprocessing, anddist_map_of_injectivefor injections. Product, XOR and Sahai–Vadhan polarization bounds live in StatisticalDistance/DirectProduct.lean, StatisticalDistance/XOR.lean and StatisticalDistance/Polarization.lean. - All-event closeness
CloseTo μ ν εapplies on arbitrary discrete types and bridges to both L1 metrics via StatisticalDistance/TotalVariation.lean:closeTo_coe_iff_dist_le(dist μ ν ≤ εon finite types) andcloseTo_iff_etvDist_le(etvDist ≤ 2 * εon types with measurable singletons). - Measure-theoretic
tvDist/etvDistuses Mathlib's full-L1 convention (distinct probability atoms at distance2, sodist_eq_tvDist_toMeasure_div_two). Push bounds through measurable maps withMeasureTheory.tvDist_map_lein TotalVariation/Map.lean and combine component and mixture-weight errors withMeasureTheory.tvDist_finsetSum_smul_lein TotalVariation/Mixture.lean. - Hellinger distance and chi-square divergence on finite
PMFs tensorize cleanly across product and mixture distributions: import Hellinger.lean (bhattacharyya_pi,dist_le_sqrt_two_mul_hellingerDist) and ChiSquare.lean (one_add_chiSquare_pi,one_add_chiSquare_bind_iid_eq,dist_le_sqrt_chiSquare_div_two; HellingerChiSquare.lean).
For conditioned finite laws p.filter s h (requiring h : ∃ a ∈ s, a ∈ p.support), import
PMF/Filter.lean for
toOuterMeasure_filter_mul_eq_inter, filter_filter, filter_map and filter_bind_pair. For
independence of observables, use indepFun_iff_map_pair_eq_bind and IndepUniform in
PMF/Independence.lean; for splitting
product distributions PMF.pi p, import
Product/Split.lean; for discrete moment and
Markov-chain coupling bounds, use
EventCount.lean,
PMF/Markov.lean,
PMF/Chebyshev.lean and
MarkovChain/Coupling.lean.
In multi-hop security proofs, chain Game.advantage_comm, Game.advantage_triangle and
Game.advantage_four_hop_le to establish a concrete per-parameter bound
Adv(A, n) ≤ Adv(B₁ A, n) + Adv(B₂ A, n) + δ n, then close the asymptotic Negligible goal with
negligible (or negligible using hbound after applying each hardness assumption to obtain the
negligibility of Adv(Bᵢ A, ·)).
Compare two runs one step at a time#
To relate two iterative or stateful computations without inducting on full transcripts by hand:
- Rewrite loops as distribution chains with
ProbComp.eval_iterate,ProbComp.eval_iterate_congrandOracleComp.run_interpret_iterate_pmffrom Iteration/Chain.lean. - Couple loop states with invariants using PMF/Coupling.lean:
PMF.RepInvbundlesd₁.map rep = d₂with a support invariant (PMF.RepInv.iterate), whilePMF.HiddenCouplingrelates a real stateato an ideal run that first draws hidden randomnessexp aand appliesrep a(PMF.HiddenCoupling.iterate, composing via.pure,.bind,.mapand.congr). - Lift step relations across adaptive oracle queries with
run_interpret_simulation_of_invariantandrun_interpret_map_state_of_invariantin Simulation.lean, or under a decreasing query budget (such as remaining space in a bounded cache) withProbOracleComp.IsQueryBounded.run_interpret_bind_comm_of_invariantin Oracle/QueryBoundedSimulation.lean.
Certify a closed randomized routine#
State closed runtime claims as IsPPTOn encIn encOut program (or IsPPT encOut program for
cryptographic algorithms taking unary security parameter n : ℕ and auxiliary word List Bool). A
certificate provides one finite-control fair-coin multi-tape Turing machine and one strict
polynomial clock valid on every input and coin path, charging output writing and matching
ProbComp.eval (program x) exactly.
When a module certifies many reductions or ppt is slow on an adversary call with preprocessed
inputs, compose the combinators explicitly: apply IsPPTOn.isPPT, chain sampled words with
(ComputableInPolyTime.sampleList (by fun_prop)).bind_with, invoke the adversary via
IsPPT.preprocess (which takes separate certificates for the security parameter and word input,
avoiding metavariable ambiguity on pairs), and close deterministic leaves with fun_prop. Open
InaccessibleEntropy.lean:
example {A : ℕ → List Bool → ProbComp (List Bool)} (hA : IsPPT encBits A) :
IsPPT encBits (fun n y => do
let pad ← Cslib.BitString.sampleList n
let raw ← A n (y ++ pad)
return raw.take n) := by
apply IsPPTOn.isPPT
refine (ComputableInPolyTime.sampleList (by fun_prop)).bind_with ?_
exact (hA.preprocess (by fun_prop) (by fun_prop)).bind_with
(ComputableInPolyTime.isPPTOn (by fun_prop))
For randomized loops, folds and iterated PRG stretch whose state grows across rounds:
- Bounded iteration: import Adaptive.lean and apply
IsPPTOn.iterate_spec,iterateWith_spec,iterate_of_length_le,iterate_of_bounded_growthoriterateWith_of_bounded_growth, supplying plainComputableInPolyTimecount/init certificates and a bound on encoded state growth across every supported outcome (AdaptivePPT.lean). - Monadic list folds: import Probabilistic/Fold.lean and apply
IsPPTOn.foldlM_of_bounded_growth(orIsOraclePPTOn.foldlM_of_bounded_growth, after truncating or bounding external replies) with an additive growth bound on the encoded accumulator (ProbabilisticFold.lean). - Emitted PRG prefixes: for variable-length stream pads built from a one-bit PRG, use
polyTime_take_forwardIterateandindistinguishable_take_forwardIteratein Stretch/Prefix.lean (PRGStretch.lean).
Substitute an oracle while preserving private samples#
In an oracle reduction, import
Oracle/Substitution.lean
and replace external queries with a ProbOracleComp handler via
ProbOracleComp.simulate handler adversary. External queries route through handler (which may
itself flip coins and issue target queries), while adversary's private coin draws remain untouched
without case-splitting on sumHandler. Open
ProbOracleSubstitution.lean:
private noncomputable def adversary : ProbOracleComp (fun _ : Bool => ℕ) (Bool × ℕ) := do
let bit ← ProbOracleComp.sample (ProbComp.uniform Bool)
let reply ← ProbOracleComp.query bit
return (bit, reply)
private noncomputable def maskedQuery (bit : Bool) : ProbOracleComp (fun _ : Bool => ℕ) ℕ := do
let mask ← ProbOracleComp.sample (ProbComp.uniform Bool)
ProbOracleComp.query (bit ^^ mask)
private noncomputable def reduction : ProbOracleComp (fun _ : Bool => ℕ) (Bool × ℕ) :=
ProbOracleComp.simulate maskedQuery adversary
Combine ProbOracleComp.simulate with three companion modules:
- Interpretation and stateful runs:
ProbOracleComp.interpret_simulatecomposes a surroundingOracleComp.interpretwithhandler; forrunWithagainst a stateful oracle (such as in identical-until-bad hops), import Oracle/Substitution/RunWith.lean and rewrite withProbOracleComp.runWith_simulate. - Query and predicate propagation: import Oracle/Substitution/QueryCount.lean for
IsQueryBounded.simulate(when each handler call makes at most one target query),isCostBounded_simulate, andProbOracleComp.queriesSatisfy_simulate. - Typed channels for word adversaries: when an adversary sends raw
List Boolrequests to an oracle that is naturally typed, define anOracleCodec Op Q speconce in Oracle/Codec.lean (OracleCodec.bitString,.comap,.withOp).c.adapt Panswers malformed requests with[]without querying, andOracleCodec.run_adapt/runWith_adaptequate the typed run toPrunning againstc.wordOracle Owhile preserving query budgets (isQueryBounded_adapt; OracleCodec.lean).
Pass a query adapter through an eager/lazy game hop#
To switch between an eagerly sampled random function and a lazily memoized cache behind a query
adapter, import
Oracle/Substitution.lean
and
RandomOracle/Probabilistic.lean,
and apply RandomOracle.interpret_prob_eq_memoize (or interpret_prob_eq_memoize_map when cache
keys and values map through a representation) directly to ProbOracleComp.simulate handler program.
Open RandomOracleAdapter.lean:
private def oneBitQuery (word : List Bool) : ProbOracleComp (fun _ : Bool => Bool) (List Bool) :=
match word with
| [bit] => List.singleton <$> ProbOracleComp.query bit
| _ => pure []
private noncomputable def repeated : ProbOracleComp (fun _ : List Bool => List Bool) Bool := do
let first ← ProbOracleComp.query [false]
let coin ← ProbOracleComp.sample (ProbComp.uniform Bool)
let rejected ← ProbOracleComp.query []
let second ← ProbOracleComp.query [false]
return (first == second) && rejected.isEmpty && coin
private noncomputable def adapted : ProbOracleComp (fun _ : Bool => Bool) Bool :=
ProbOracleComp.simulate oneBitQuery repeated
Follow with ProbOracleComp.interpret_simulate and normalize closed state-threaded runs using
simp only [runWith_norm, pmf_norm] from
Oracle/Norm.lean.
When a game stores one or more random-oracle caches inside its own state record (rather than
calling memoize directly), import
RandomOracle/Represented.lean
(and RandomOracle/Sum.lean for
⊕ₒ multi-oracle interfaces): map state to RandomOracle.Cache spec with RandomOracle.ofList
and Cache.sum, prove each lazy call matches RandomOracle.answer, and apply
RandomOracle.eval_run_interpret_eq_complete_bind followed by RandomOracle.bind_complete_sum. If
a handler inspects the cache directly (so the hop is only statistically close), use
OracleComp.closeTo_run_interpret_simulation_readOnly in
Simulation/CloseTo.lean with
RandomOracle.complete, charging only cache-reading calls.
Bound stateful identical-until-bad hops and random-oracle collisions#
When two stateful oracle worlds agree until a collision or guessing event occurs, use the shared bad-flag framework in UntilBad/Flag.lean and Crypto/Game/UntilBad.lean (UntilBadROMFramework.lean):
- Monotone Boolean flags:
OracleComp.withBadFlag steplatches a per-call Boolean bad indicator ontoState × Bool;ProbOracleComp.identicalUntilBad_withBadFlagasks only for pointwise agreement on unflagged outcomes(a, (s', false)), suppliesProbOracleComp.IdenticalUntilBad.advantage_leandcloseTo_run, and projects back to unflagged handlers viaProbOracleComp.runWith_withBadFlag_map_fst. - Linear and birthday (
choose 2) union bounds: applyProbOracleComp.toOuterMeasure_bad_lefor additive per-call budgets, or import UntilBad/ChooseTwo.lean (ProbOracleComp.toOuterMeasure_bad_choose_two_le,toOuterMeasure_bad_choose_two_cost_le) when each call triggersbadwith probabilitysize s * δwhile incrementing table size, giving(n * size s + n.choose 2) * δand two-channel active/passive bounds(k₁ * size s + k₁ * k₂ + k₁.choose 2) * δ. - Random-oracle collisions and programming: RandomOracle/Programming.lean and CloseTo/RandomOracle.lean prove the
q-query birthday output-collision boundq.choose 2 / Fintype.card Digest(toOuterMeasure_hasOutputCollision_memoize_uniform_le), list-cache min-entropy hits (toOuterMeasure_exists_mem_fst_eq_le), and lazy-vs.-overwrite random-oracle programming bounds (closeTo_run_lazyProgramHandler_overwriteProgramHandler_choose_two), paired with strict-PPT word handlers in Computability/Probabilistic/RandomOracle/Programming.lean. For lazy sampling pulled back along a mapφwhose collision probability is bounded after the run (such as averaging over a hash key), useRandomOracle.closeTo_runWith_memoize_simulate_queryin RandomOracle/Through.lean. For two independent list-memoized oracles, useRandomOracle.memoizeSumin RandomOracle/Sum.lean with per-channel query lifts in QueryCount/Sum.lean.
Certify an adaptive oracle client#
Strict polynomial-time oracle algorithms are written in WordOracleComp Operation α (finite
operation tags with List Bool requests and replies) and certified with
IsOraclePPTOn encIn encOut prog (or parameterized IsOraclePPT) from
Oracle/Composition.lean.
To propagate query budgets and instantiate external handlers:
- Worst-case, multi-channel and expected query budgets: convert call bounds
IsQueryBoundedto cost boundsIsCostBoundedwith QueryCount/Scale.lean, push multi-channel weights through handlers withIsCostBounded.interpret_demandin QueryCount/Demand.lean (OracleChannelDemand.lean), and bound average query cost withOracleComp.expectedCostandexpectedCost_bindin QueryCount/Expected.lean. - Instantiating an oracle with a stateful PPT handler: import Oracle/Substitution.lean and Oracle/Parameter.lean for
IsOraclePPTOn.run_interpret_preprocess_open(or_of_polyBoundedwhen the per-call reply and added-state allowance isPolyBoundedrather than computed in unary; closed runs userun_interpret_preprocess, orIsOraclePPTOn.isPPTOn_runStatein Oracle/RunState.lean). Always supply a state-growth invariant: individual polynomial-time calls do not keep total time polynomial if the handler state doubles on each query (OraclePlainSubstitution.lean, OracleRunStatePPT.lean).
Connect a randomized RAM loop to its answer law#
When certifying a randomized algorithm on the Word-RAM rather than a Turing machine, import
Randomized/LoopSegmentLaw.lean
and track LoopSegmentLaw (pairing exact equality of an observed output's PMF with pathwise
instruction and random-call upper bounds and a supported-state postcondition): lift a loop body's
ExecRandLaw with LoopSegmentLaw.single (charging two guard steps), chain phases across every
supported intermediate state with LoopSegmentLaw.trans, and exit on a falsified guard with
LoopSegmentLaw.finish
(WordRAMLoopSegmentLaw.lean).
Carry the certificate into a security proof#
Follow the contract of AGENTS.md (Security theorems) and policy/statements.md from the start of every cryptographic development:
- Check model boundaries before proving security. In Crypto/Computational/Basic.lean,
ComputationallyIndistinguishablequantifies over uniform strict-PPT distinguishers (IsPPT encBool) without requiring the comparedPMFensembles themselves to be efficiently sampleable. In CCA and hybrid reductions (Encryption/Hybrid.lean, Hybrid/CompositionCCA.lean, KEMFromPKE/CCA.lean), verify canonicalencPairframing and the KEM ciphertext-space predicatectSpaceon decryption, enforce challenge freshness on raw ciphertext words, distinguish failed decapsulationnonefrom an empty keysome [], and state public-key CPA assumptions with two-stagecpaAdvantage(PKE/ExplicitCoin.lean) rather than fixed message pairs. - Write every reduction as an explicit program with a strict-PPT witness. Prove
isPPT_…orisOraclePPT_…from the adversary's certificate and any component efficiency hypotheses, prove the concrete advantage inequalityAdv(A, n) ≤ f(Adv(B A, n)) + δ nas a lemma, and derive the asymptotic security theorem first by applying each hardness assumption directly toB Athrough its efficiency witness (ElGamal/ProbComp.lean is a canonical template). Never leave a premise about a constructed reduction, simulator, extractor or hybrid on a security theorem; an algebraic helper taking such a premise must be named…_of_reduction_leand open its docstring by calling itself a step or helper, not a headline. - Register and verify every named hardness assumption. Every
Prop-valued hardness assumption (including component security notions assumed of caller arguments) must appear in the assumptions inventory as standard (docstring cites the exact source definition with a locator verified at the source, listing every material deviation such as uniform adversaries or arbitrary setup laws), novel (docstring states"novel to this library", relates it to standard assumptions and explains plausibility; theorems resting on it name the assumption and never claim a cited result), or vocabulary (generic relations such asGame.Indistinguishable, whose concrete instance review checks at each call site). Where an insecure instance exists (a constant function, fixed group or zero noise law), include a test proving the assumption fails on it (AssumptionNonvacuity.lean). - Run the cryptographic audits before opening a PR. After building the affected targets and
CslibFrontierResults, runpython3 scripts/check_hardness_assumptions.py(enforced in CI) and inspect any output from the advisory scanspython3 scripts/check_security_premises.pyandpython3 scripts/check_reduction_witnesses.pyon changed modules, alongsidepython3 -B scripts/check_operator_manual.py.