Game Package View: UC-Free Game/Handler Layer #
The UC-free core of the PackageView framework: the isomorphism between SPComp
games and single-operation typed handlers, plus the handler simp lemmas that
drive the pkg_coherence tactic.
The statistical-distance / UC machinery (handlerSdist, oracle-swap theorems,
OracleGame, PackageView) lives downstream in the dev-repo layer over this
file.
Main Definitions #
singleIface— interface with one operationGamePkg.ofGame/GamePkg.toGame— isomorphism(A → SPComp B) ≃ GamePkg A B
Supporting SPComp law #
bind_fail_right' is a pure SPComp algebra law consumed by the
pkg_coherence simp set (and by uc_coherence in the larger UC development).
Single-Operation Interface #
A package interface with exactly one operation of type A → SPComp B.
Equations
Instances For
Wrap an SPComp game as a single-operation handler.
Equations
- CatCrypt.Bridge.PkgView.GamePkg.ofGame game x✝ = game
Instances For
Extract the game from a single-operation handler.
Instances For
The isomorphism between games and single-operation handlers.
Equations
- CatCrypt.Bridge.PkgView.gamePkgEquiv A B = { toFun := CatCrypt.Bridge.PkgView.GamePkg.ofGame, invFun := CatCrypt.Bridge.PkgView.GamePkg.toGame, left_inv := ⋯, right_inv := ⋯ }
Instances For
Oracle Games (Package Category Morphisms) #
An oracle game is a morphism in the package category: it takes an oracle handler and produces a game.
Concretely, OracleGame O A B is TypedHandler O → TypedHandler (singleIface A B),
i.e., a morphism O ⟶ singleIface A B in pkgCat.
Equations
Instances For
Construct an oracle game from a function that takes an oracle handler and produces a game.
Equations
Instances For
Run an oracle game with a specific handler.
Equations
- game.run h = CatCrypt.Bridge.PkgView.GamePkg.toGame (game h)
Instances For
An oracle game from a single-oracle function.
The common case: the game takes one oracle X → SPComp Y.
Equations
Instances For
Handler Simp Lemmas for pkg_coherence #
These lemmas reduce handler operations to pointwise equalities,
enabling the pkg_coherence tactic.