SPComp Instance of UCMonad #
This file provides the concrete UCMonad SPComp instance, connecting
the generic typeclass to the existing CatCrypt infrastructure.
Main results #
UCMonad SPComp— the instancemapSumSP— a UC-free local copy ofmapSum(keeps this file off the UC layer)
The generic↔concrete bridge lemmas (generic_UCEmulates_iff_concrete,
generic_approxFact_iff_concrete) need Crypto.UC, so they live in
SPCompUCBridge.lean.
Design #
The instance fields map directly:
ucMapSum→mapSum(fromUC.lean)ucFail→SPComp.fail(fromCode.lean)ucSdist→sdist(fromSDist.lean)
Re-derive bind_fail_right (private in Affine.lean) #
Localized mapSum (UC-free copy) #
mapSum lives in UC.lean, which this file must NOT depend on: keeping
SPCompInstance off the UC layer is what makes the whole RoundM/ITreeN
substrate built on it UC-free (the compiler-boundary cut). mapSum is a pure
Sum-parallel-composition, so we keep a local copy here; the proofs mirror
UC.lean / UCFactorization.lean.
Equations
- UCMonad.mapSumSP f g (Sum.inl a) = CatCrypt.Core.SPComp.map Sum.inl (f a)
- UCMonad.mapSumSP f g (Sum.inr c) = CatCrypt.Core.SPComp.map Sum.inr (g c)
Instances For
UC-free copy of RC.sdist_mapSum_le for mapSumSP. Since mapSumSP is
definitionally mapSum, this also closes goals stated with mapSum, letting
the ITreeN multi-session layer stay off the RC/UC layer. Proof mirrors
RC.sdist_mapSum_le.
The UCMonad instance for SPComp #
Equations
- One or more equations did not get rendered due to their size.
UCPure instance for SPComp #
SPComp.IsPure satisfies the UCPure interface.
Equations
- UCMonad.instUCPureSPComp = { isPure := fun {α : Type} => CatCrypt.Core.SPComp.IsPure, isPure_pure := ⋯, isPure_bind := ⋯, isPure_comm := ⋯ }