Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ArkLib/Commitments/Functional/Hachi/Commitment.lean
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ instance multilinearEvalOracleInterface {n : ℕ} :
Query := Vector (Rq 𝓜(q, α)) n
toOC :=
{ spec := Vector (Rq 𝓜(q, α)) n →ₒ Rq 𝓜(q, α)
impl := fun p => do return CMlPolynomial.eval (← read) p }
impl.toFun p := do return CMlPolynomial.eval (← read) p }

-- `b > 1` is the gadget base used for **all** decompositions. Faithful to Hachi [NOZ26] §2.1/§4.1,
-- every coefficient is written in `δ := ⌈log_b q⌉ = Nat.clog b q` base-`b` digits — a single `δ`
Expand Down
8 changes: 6 additions & 2 deletions ArkLib/Interaction/Composition.lean
Original file line number Diff line number Diff line change
Expand Up @@ -489,13 +489,16 @@ def splitOracleMessages : (s₁ : OracleProtocol.{u, q}) → (s₂ : Path s₁
(splitOracleMessages (next x) (fun q => s₂ ⟨x, q⟩) p))

/-- Preserve ambient queries while routing bundle queries through an oracle map. -/
@[simps -isSimp]
def OracleMap.withAmbient {ι : Type uι}
(ambient : OracleSpec.{uι, u} ι) {In : OracleBundle.{u, uX, dX}}
{Out : OracleBundle.{u, uY, dY}}
(route : OracleMap In Out) : QueryImpl (ambient + Out.spec) (OracleComp (ambient + In.spec))
(route : OracleMap In Out) : QueryImpl (ambient + Out.spec)
(OracleComp (ambient + In.spec)) where
toFun
| .inl q => liftM ((ambient + In.spec).query (.inl q))
| .inr q => simulateQ
(fun r => liftM ((ambient + In.spec).query (.inr r))) (route.impl q)
⟨fun r => liftM ((ambient + In.spec).query (.inr r))⟩ (route.impl q)

/-- Routing through a map and answering from data agrees with answering from the mapped data,
for any interpretation of the ambient queries. -/
Expand All @@ -514,6 +517,7 @@ theorem OracleMap.simulate_withAmbient_addLift {ι : Type uι}
· simp [OracleMap.withAmbient]
· simp only [OracleMap.withAmbient, QueryImpl.addLift_def]
rw [QueryImpl.simulateQ_simulateQ_eq_of_apply
(so := ⟨fun r => liftM ((ambient + In.spec).query (.inr r))⟩)
(impl := (In.answer x).liftTarget m)
(fun r => QueryImpl.simulateQ_add_query_right _ _ r), simulateQ_liftTarget, route.law]
rfl
Expand Down
4 changes: 2 additions & 2 deletions ArkLib/Interaction/Execution.lean
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ theorem simulateQ_run_simulate_sampler (h : QueryImpl spec n)
{Out : Transcript l s → Type u} (k : Prover l ambient s Out)
(draw : (c : ChallengeNode l s) → OracleComp spec (challengeSpec l s c)) :
simulateQ h (TwoParty.Lens.run s (k.simulate ιm) (sampler l s draw)) =
TwoParty.Lens.run s (k.simulate fun q => simulateQ h (ιm q))
TwoParty.Lens.run s (k.simulate ⟨fun q => simulateQ h (ιm q)⟩)
(sampler l s fun c => simulateQ h (draw c)) := by
rw [TwoParty.Lens.run, simulateQ_runWith_sampler, Prover.simulate_simulate]
rfl
Expand Down Expand Up @@ -232,7 +232,7 @@ theorem Verifier.onAccept_run_none {ι : Type u} {ambient : OracleSpec.{u, u} ι
(V : Verifier ambient s T U) (prover : Prover plainSig ambient s Out) :
V.onAccept.run none prover =
(fun r => ⟨r.1, r.2.1, none⟩) <$> TwoParty.Lens.run s
(prover.simulate (fun q => liftM ((ambient + challengeSpec plainSig s).query (.inl q))))
(prover.simulate ⟨fun q => liftM ((ambient + challengeSpec plainSig s).query (.inl q))⟩)
(sampler plainSig s (fun c =>
liftM ((ambient + challengeSpec plainSig s).query (.inr c)))) := by
simp only [Verifier.run, Verifier.onAccept, map_eq_bind_pure_comp]
Expand Down
36 changes: 19 additions & 17 deletions ArkLib/Interaction/Legacy/Execution.lean
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ variable {StmtIn WitIn StmtOut WitOut : Type}
def Layout.challengeReindex (L : Layout pSpec) (oSpec : OracleSpec ι) :
QueryImpl (oSpec + challengeSpec L.l L.protocol) (OracleComp (oSpec + [pSpec.Challenge]ₒ)) :=
QueryImpl.add (liftShared oSpec pSpec)
(L.draw (challengeOracle oSpec pSpec) 0 n (Nat.zero_add n))
⟨L.draw (challengeOracle oSpec pSpec) 0 n (Nat.zero_add n)⟩

/-- Answer the challenge queries of the plain tree with the legacy challenge oracle. -/
abbrev challengeReindex (oSpec : OracleSpec ι) (pSpec : ProtocolSpec n) :
Expand All @@ -400,16 +400,16 @@ focal-first run against the legacy sampler. -/
theorem simulateQ_challengeReindex_run {Out : Transcript plainSig (protocol pSpec) → Type}
(p : Interaction.Prover plainSig oSpec (protocol pSpec) Out) :
simulateQ (challengeReindex oSpec pSpec) (TwoParty.Lens.run (protocol pSpec)
(p.simulate (fun q => liftM ((oSpec + challengeSpec plainSig (protocol pSpec)).query
(.inl q))))
(p.simulate ⟨fun q => liftM ((oSpec + challengeSpec plainSig (protocol pSpec)).query
(.inl q))⟩)
(sampler plainSig (protocol pSpec) (fun c =>
liftM ((oSpec + challengeSpec plainSig (protocol pSpec)).query (.inr c))))) =
runWith .focalFirst (protocol pSpec) (p.simulate (liftShared oSpec pSpec))
(legacySampler pSpec (challengeOracle oSpec pSpec)) := by
have hl : (fun q => simulateQ (challengeReindex oSpec pSpec)
(liftM ((oSpec + challengeSpec plainSig (protocol pSpec)).query (.inl q)))) =
liftShared oSpec pSpec :=
funext fun q => QueryImpl.simulateQ_add_liftM_query_left _ _ q
have hl : (⟨fun q => simulateQ (challengeReindex oSpec pSpec)
(liftM ((oSpec + challengeSpec plainSig (protocol pSpec)).query (.inl q)))⟩ :
QueryImpl oSpec _) = liftShared oSpec pSpec :=
QueryImpl.ext fun q => QueryImpl.simulateQ_add_liftM_query_left _ _ q
have hr : (fun c => simulateQ (challengeReindex oSpec pSpec)
(liftM ((oSpec + challengeSpec plainSig (protocol pSpec)).query (.inr c)))) =
legacyDraw (challengeOracle oSpec pSpec) 0 n (Nat.zero_add n) :=
Expand All @@ -432,17 +432,18 @@ theorem simulateQ_verifier_run (V : Interaction.Verifier oSpec (protocol pSpec)
congr 1
rw [liftComp_def, liftComp_def]
refine QueryImpl.simulateQ_simulateQ_eq_of_apply (fun t => ?_) _
rw [OracleComp.liftM_eq_liftM_liftM, OracleQuery.liftM_add_left_query]
rw [QueryImpl.mk_apply, OracleComp.liftM_eq_liftM_liftM, OracleQuery.liftM_add_left_query]
refine (QueryImpl.simulateQ_add_liftM_query_left _ _ t).trans ?_
simp only [liftShared, QueryImpl.restrictLeft, QueryImpl.id'_apply]
simp only [liftShared, QueryImpl.restrictLeft_apply, QueryImpl.id'_apply]
rw [OracleComp.liftM_eq_liftM_liftM (spec := oSpec)]
rfl

/-- The challenge implementation of a layout's tree induced by a legacy challenge
implementation: each challenge node draws its round's legacy challenge. -/
@[simps]
def Layout.challengeImpl (L : Layout pSpec) (chImpl : QueryImpl [pSpec.Challenge]ₒ ProbComp) :
QueryImpl (challengeSpec L.l L.protocol) ProbComp :=
fun c => (L.challengeMove 0 n (Nat.zero_add n) c).symm <$>
QueryImpl (challengeSpec L.l L.protocol) ProbComp where
toFun c := (L.challengeMove 0 n (Nat.zero_add n) c).symm <$>
chImpl ⟨L.challengeRound 0 n (Nat.zero_add n) c, ()⟩

/-- The challenge implementation of the plain tree induced by a legacy challenge
Expand Down Expand Up @@ -711,9 +712,10 @@ section Logging
variable {κ σ : Type} {ambient : OracleSpec ι} {chal : OracleSpec κ}

/-- Record each shared-oracle query and its answer in the state, beside the shared state. -/
@[simps]
def logImpl (impl : QueryImpl ambient (StateT σ ProbComp)) :
QueryImpl ambient (StateT (σ × QueryLog ambient) ProbComp) :=
fun q => StateT.mk fun p => (fun r => (r.1, (r.2, p.2 ++ [⟨q, r.1⟩]))) <$> (impl q).run p.1
QueryImpl ambient (StateT (σ × QueryLog ambient) ProbComp) where
toFun q := StateT.mk fun p => (fun r => (r.1, (r.2, p.2 ++ [⟨q, r.1⟩]))) <$> (impl q).run p.1

/-- Log every query of a program, then keep the shared-oracle entries. Challenge entries are
dropped, so their position relative to shared-oracle queries does not matter. -/
Expand Down Expand Up @@ -747,7 +749,7 @@ theorem run_ambientLogged (impl : QueryImpl ambient (StateT σ ProbComp))
rw [ambientLogged_query_bind]
rcases t with q | c
· simp only [expHandler, QueryImpl.addLift_def, QueryImpl.liftTarget_self] at ih
simp [expHandler, logImpl, ← ih, QueryLog.fst]
simp [expHandler, ← ih, QueryLog.fst]
· simp only [expHandler, QueryImpl.addLift_def, QueryImpl.liftTarget_self] at ih
simp [expHandler, ← ih, QueryLog.fst]

Expand Down Expand Up @@ -820,7 +822,7 @@ theorem runEq_liftComp {κ₁ κ₂ : Type} {chal₁ : OracleSpec κ₁} {chal

/-- Logging the shared-oracle queries of a lifted program is lifting its logged run. -/
theorem run_withLogging_inl {β : Type} (y : OracleComp ambient β) :
(simulateQ (QueryImpl.withLogging ((fun q => liftM ((ambient + chal).query (.inl q))) :
(simulateQ (QueryImpl.withLogging (⟨fun q => liftM ((ambient + chal).query (.inl q))⟩ :
QueryImpl ambient (OracleComp (ambient + chal)))) y).run =
liftComp ((simulateQ ambient.loggingOracle y).run) (ambient + chal) := by
induction y using OracleComp.inductionOn with
Expand Down Expand Up @@ -866,8 +868,8 @@ theorem runEq_ambientLogged_prover (impl : QueryImpl oSpec (StateT σ ProbComp))
RunEq (expHandler impl (plainChallengeImpl chImpl)) (expHandler impl chImpl)
((fun z => ((decode pSpec z.1.1, z.1.2.1), z.2)) <$> ambientLogged
(TwoParty.Lens.run (protocol pSpec)
((embedProver P stmt wit).simulate (fun q =>
liftM ((oSpec + challengeSpec plainSig (protocol pSpec)).query (.inl q))))
((embedProver P stmt wit).simulate ⟨fun q =>
liftM ((oSpec + challengeSpec plainSig (protocol pSpec)).query (.inl q))⟩)
(sampler plainSig (protocol pSpec) (fun c =>
liftM ((oSpec + challengeSpec plainSig (protocol pSpec)).query (.inr c))))))
(ambientLogged (P.run stmt wit)) := fun st => by
Expand Down
20 changes: 11 additions & 9 deletions ArkLib/Interaction/Legacy/OracleExecution.lean
Original file line number Diff line number Diff line change
Expand Up @@ -548,16 +548,18 @@ theorem simulateQ_decisionImpl {m : Type → Type} [Monad m] [LawfulMonad m]
((pathBundle (family OStmtIn) (oracleProtocol pSpec) p).answer r)) q).trans ?_
rw [simulateQ_spec_query]
· simp only [QueryImpl.addLift_def, OracleInterface.simOracle2, QueryImpl.liftTarget_self]
change simulateQ _ (simulateQ (fun t => liftM
change simulateQ _ (simulateQ ⟨fun t => liftM
((oSpec + (pathBundle (family OStmtIn) (oracleProtocol pSpec) p).spec).query
(.inr t))) (pathBundleImpl p q)) = _
(.inr t))⟩ (pathBundleImpl p q)) = _
rw [QueryImpl.simulateQ_simulateQ_eq_of_apply
(impl := ((pathBundle (family OStmtIn) (oracleProtocol pSpec) p).answer r).liftTarget m)
(fun t => QueryImpl.simulateQ_add_query_right _ _ t),
simulateQ_liftTarget, pathBundleImpl_law]
change pure _ = simulateQ amb (pure _)
rw [simulateQ_pure]
rw [QueryImpl.simulateQ_simulateQ_eq_of_apply key x]
rw [QueryImpl.simulateQ_simulateQ_eq_of_apply
(impl := ⟨fun t => simulateQ amb (OracleInterface.simOracle2 (T₁ := OStmtIn)
(T₂ := pSpec.Message) oSpec r.1 (pathMessages p r.2) t)⟩) key x]
exact (QueryImpl.simulateQ_simulateQ_eq_of_apply (fun _ => rfl) x).symm

end Decision
Expand Down Expand Up @@ -610,16 +612,16 @@ theorem simulateQ_oracleChallengeReindex_run
{Out : Transcript oracleSig (oracleProtocol pSpec) → Type}
(p : Interaction.Prover oracleSig oSpec (oracleProtocol pSpec) Out) :
simulateQ (oracleChallengeReindex oSpec pSpec) (TwoParty.Lens.run (oracleProtocol pSpec)
(p.simulate (fun q => liftM
((oSpec + challengeSpec oracleSig (oracleProtocol pSpec)).query (.inl q))))
(p.simulate ⟨fun q => liftM
((oSpec + challengeSpec oracleSig (oracleProtocol pSpec)).query (.inl q))⟩)
(sampler oracleSig (oracleProtocol pSpec) (fun c =>
liftM ((oSpec + challengeSpec oracleSig (oracleProtocol pSpec)).query (.inr c))))) =
runWith .focalFirst (oracleProtocol pSpec) (p.simulate (liftShared oSpec pSpec))
(oracleLegacySampler pSpec (challengeOracle oSpec pSpec)) := by
have hl : (fun q => simulateQ (oracleChallengeReindex oSpec pSpec)
(liftM ((oSpec + challengeSpec oracleSig (oracleProtocol pSpec)).query (.inl q)))) =
liftShared oSpec pSpec :=
funext fun q => QueryImpl.simulateQ_add_liftM_query_left _ _ q
have hl : (⟨fun q => simulateQ (oracleChallengeReindex oSpec pSpec)
(liftM ((oSpec + challengeSpec oracleSig (oracleProtocol pSpec)).query (.inl q)))⟩ :
QueryImpl oSpec _) = liftShared oSpec pSpec :=
QueryImpl.ext fun q => QueryImpl.simulateQ_add_liftM_query_left _ _ q
have hr : (fun c => simulateQ (oracleChallengeReindex oSpec pSpec)
(nodeMove 0 n _ c <$> liftM ((oSpec + challengeSpec oracleSig (oracleProtocol pSpec)).query
(.inr (toOracleNode 0 n _ c))))) =
Expand Down
12 changes: 6 additions & 6 deletions ArkLib/Interaction/Legacy/OracleKnowledge.lean
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ theorem oracleExtractionGame_embed
(stmt, oStmt) adv =
((fun z => ((oracleDecode pSpec z.1.1, z.1.2.1), z.2)) <$> ambientLogged
(TwoParty.Lens.run (oracleProtocol pSpec)
(adv.simulate (fun q =>
liftM ((oSpec + challengeSpec oracleSig (oracleProtocol pSpec)).query (.inl q))))
(adv.simulate ⟨fun q =>
liftM ((oSpec + challengeSpec oracleSig (oracleProtocol pSpec)).query (.inl q))⟩)
(sampler oracleSig (oracleProtocol pSpec) (fun c =>
liftM ((oSpec + challengeSpec oracleSig (oracleProtocol pSpec)).query
(.inr c)))))) >>=
Expand Down Expand Up @@ -141,16 +141,16 @@ theorem runEq_ambientLogged_oracleProver (impl : QueryImpl oSpec (StateT σ Prob
((fun z : ((_ : Transcript oracleSig (oracleProtocol pSpec)) × X × PUnit) × QueryLog oSpec =>
((oracleDecode pSpec z.1.1, z.1.2.1), z.2)) <$> ambientLogged
(TwoParty.Lens.run (oracleProtocol pSpec)
(p.simulate (fun q =>
liftM ((oSpec + challengeSpec oracleSig (oracleProtocol pSpec)).query (.inl q))))
(p.simulate ⟨fun q =>
liftM ((oSpec + challengeSpec oracleSig (oracleProtocol pSpec)).query (.inl q))⟩)
(sampler oracleSig (oracleProtocol pSpec) (fun c =>
liftM ((oSpec + challengeSpec oracleSig (oracleProtocol pSpec)).query
(.inr c))))))
((fun z : ((_ : Transcript plainSig (protocol pSpec)) × X × PUnit) × QueryLog oSpec =>
((decode pSpec z.1.1, z.1.2.1), z.2)) <$> ambientLogged
(TwoParty.Lens.run (protocol pSpec)
(Interaction.Prover.simulate (fun q =>
liftM ((oSpec + challengeSpec plainSig (protocol pSpec)).query (.inl q)))
(Interaction.Prover.simulate ⟨fun q =>
liftM ((oSpec + challengeSpec plainSig (protocol pSpec)).query (.inl q))⟩
(toPlainFrom .focal 0 n (Nat.zero_add n) p :
Interaction.Prover plainSig oSpec (protocol pSpec) (fun _ => X)))
(sampler plainSig (protocol pSpec) (fun c =>
Expand Down
16 changes: 8 additions & 8 deletions ArkLib/Interaction/Legacy/OracleReduction.lean
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ variable {ι κ : Type} {oSpec : OracleSpec ι} {spec : OracleSpec κ}
/-- Answer each shared-oracle query with a default value, and keep the other queries. -/
def dropAmbient [∀ t, Inhabited (oSpec.Range t)] :
QueryImpl (oSpec + spec) (OracleComp spec) :=
QueryImpl.add (fun _ => pure default) (QueryImpl.id' spec)
QueryImpl.add ⟨fun _ => pure default⟩ (QueryImpl.id' spec)

/-- If a computation simulates to `pure x` while its shared-oracle queries are passed through,
then it reaches no shared-oracle query, so dropping them leaves the value `x`. -/
Expand All @@ -54,10 +54,10 @@ theorem simulateQ_dropAmbient_of_eq_pure [∀ t, Inhabited (oSpec.Range t)]
(h : simulateQ (QueryImpl.addLift (QueryImpl.id oSpec) g :
QueryImpl (oSpec + spec) (OracleComp oSpec)) oa = pure x) :
simulateQ g (simulateQ dropAmbient oa) = x := by
let fallback : QueryImpl oSpec Id := fun _ => default
let fallback : QueryImpl oSpec Id := ⟨fun _ => default⟩
have routed : QueryImpl.compose g dropAmbient =
QueryImpl.compose fallback (QueryImpl.addLift (QueryImpl.id oSpec) g) := by
funext t
ext t : 1
cases t <;>
simp [QueryImpl.compose, dropAmbient, QueryImpl.addLift_def, QueryImpl.add, fallback] <;> rfl
rw [← QueryImpl.simulateQ_compose, routed, QueryImpl.simulateQ_compose, h]
Expand Down Expand Up @@ -310,9 +310,9 @@ def pathBundleImpl (p : Path (oracleProtocol pSpec)) :
(OracleComp (pathBundle (family OStmtIn) (oracleProtocol pSpec) p).spec) :=
QueryImpl.add
(OracleMap.fst (family OStmtIn) (oracleMessageFamily (oracleProtocol pSpec) p)).impl
(fun q => simulateQ
⟨fun q => simulateQ
(OracleMap.snd (family OStmtIn) (oracleMessageFamily (oracleProtocol pSpec) p)).impl
(queryMsg 0 n _ p q.1 (Nat.zero_le _) q.2))
(queryMsg 0 n _ p q.1 (Nat.zero_le _) q.2)⟩

/-- Routing answers each legacy query from the statement data and the path's messages. -/
theorem pathBundleImpl_law (p : Path (oracleProtocol pSpec))
Expand All @@ -335,9 +335,9 @@ def decisionImpl (p : Path (oracleProtocol pSpec)) :
QueryImpl.add
(QueryImpl.id' (oSpec +
(pathBundle (family OStmtIn) (oracleProtocol pSpec) p).spec)).restrictLeft
(fun q => simulateQ (QueryImpl.id' (oSpec +
⟨fun q => simulateQ (QueryImpl.id' (oSpec +
(pathBundle (family OStmtIn) (oracleProtocol pSpec) p).spec)).restrictRight
(pathBundleImpl p q))
(pathBundleImpl p q)⟩

/-- The output map of a legacy output-oracle simulation, for the challenges of a run. Its data
map is the legacy materialization on the input data and the path's messages, and its queries
Expand All @@ -348,7 +348,7 @@ def _root_.Interaction.OracleMap.ofLegacySimulation [∀ t, Inhabited (oSpec.Ran
OracleMap (pathBundle (family OStmtIn) (oracleProtocol pSpec) p)
(OracleBundle.ofFamily (family OStmtOut)) where
f r := S.materializeOutput challenges r.1 (pathMessages p r.2)
impl q :=
impl.toFun q :=
simulateQ (pathBundleImpl p) (simulateQ dropAmbient (S.simulateOutputQuery challenges q))
law r q := by
rw [QueryImpl.simulateQ_simulateQ_eq_of_apply (pathBundleImpl_law p r)]
Expand Down
4 changes: 2 additions & 2 deletions ArkLib/Interaction/Legacy/Security.lean
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@ theorem extractionGame_embed (V : _root_.Verifier oSpec StmtIn StmtOut pSpec)
extractionGame (embedVerifier V) (fun _ o => o.2) (liftExtractor E) stmt adv =
((fun z => ((decode pSpec z.1.1, z.1.2.1), z.2)) <$> ambientLogged
(TwoParty.Lens.run (protocol pSpec)
(adv.simulate (fun q =>
liftM ((oSpec + challengeSpec plainSig (protocol pSpec)).query (.inl q))))
(adv.simulate ⟨fun q =>
liftM ((oSpec + challengeSpec plainSig (protocol pSpec)).query (.inl q))⟩)
(sampler plainSig (protocol pSpec) (fun c =>
liftM ((oSpec + challengeSpec plainSig (protocol pSpec)).query (.inr c)))))) >>=
knowledgeTail (challengeSpec plainSig (protocol pSpec)) V E stmt := by
Expand Down
4 changes: 2 additions & 2 deletions ArkLib/Interaction/LegacyAppend.lean
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def routeAlong (f : QueryImpl [p₁.Message]ₒ (OracleComp spec))
/-- Route the message queries of an appended spec to the handlers of its two halves. -/
def appendRoute (f : QueryImpl [p₁.Message]ₒ (OracleComp spec))
(g : QueryImpl [p₂.Message]ₒ (OracleComp spec)) :
QueryImpl [(p₁ ++ₚ p₂).Message]ₒ (OracleComp spec) :=
fun q => routeAlong f g (MessageIdx.sumEquiv.apply_symm_apply q.1) q.2
QueryImpl [(p₁ ++ₚ p₂).Message]ₒ (OracleComp spec) where
toFun q := routeAlong f g (MessageIdx.sumEquiv.apply_symm_apply q.1) q.2

/-- A query named by its half is routed to the handler of that half. -/
theorem appendRoute_sumEquiv (f : QueryImpl [p₁.Message]ₒ (OracleComp spec))
Expand Down
Loading
Loading