Append/Add Operation for Simulation Oracles #
def
QueryImpl.add
{ι₁ : Type u_4}
{ι₂ : Type u_5}
{spec₁ : OracleSpec ι₁}
{spec₂ : OracleSpec ι₂}
{m : Type u → Type u_1}
(impl₁ : QueryImpl spec₁ m)
(impl₂ : QueryImpl spec₂ m)
:
Simplest version of adding queries when all implementations are in the same monad.
The actual add notation for QueryImpl uses QueryImpl.addLift which adds monad lifting
to this definition for greater flexibility.
Equations
Instances For
instance
QueryImpl.instHAddSumHAddOracleSpec
{ι₁ : Type u_4}
{ι₂ : Type u_5}
{spec₁ : OracleSpec ι₁}
{spec₂ : OracleSpec ι₂}
{m : Type u → Type u_1}
:
Add two QueryImpl to get an implementation on the sum of the two OracleSpec.
Equations
theorem
QueryImpl.add_apply
{ι₁ : Type u_4}
{ι₂ : Type u_5}
{spec₁ : OracleSpec ι₁}
{spec₂ : OracleSpec ι₂}
{m : Type u → Type u_1}
(impl₁ : QueryImpl spec₁ m)
(impl₂ : QueryImpl spec₂ m)
(t : (spec₁ + spec₂).Domain)
:
@[simp]
theorem
QueryImpl.add_apply_inl
{ι₁ : Type u_4}
{ι₂ : Type u_5}
{spec₁ : OracleSpec ι₁}
{spec₂ : OracleSpec ι₂}
{m : Type u → Type u_1}
(impl₁ : QueryImpl spec₁ m)
(impl₂ : QueryImpl spec₂ m)
(t : spec₁.Domain)
:
@[simp]
theorem
QueryImpl.add_apply_inr
{ι₁ : Type u_4}
{ι₂ : Type u_5}
{spec₁ : OracleSpec ι₁}
{spec₂ : OracleSpec ι₂}
{m : Type u → Type u_1}
(impl₁ : QueryImpl spec₁ m)
(impl₂ : QueryImpl spec₂ m)
(t : spec₂.Domain)
:
def
QueryImpl.addLift
{ι₁ : Type u_7}
{ι₂ : Type u_8}
{spec₁ : OracleSpec ι₁}
{spec₂ : OracleSpec ι₂}
{m : Type u → Type u_4}
{n : Type u → Type u_5}
{r : Type u → Type u_6}
[MonadLiftT m r]
[MonadLiftT n r]
(impl₁ : QueryImpl spec₁ m)
(impl₂ : QueryImpl spec₂ n)
:
Version of QueryImpl.add that also lifts the two implementations to a shared lift monad.
Equations
Instances For
@[simp]
theorem
QueryImpl.addLift_def
{ι₁ : Type u_7}
{ι₂ : Type u_8}
{spec₁ : OracleSpec ι₁}
{spec₂ : OracleSpec ι₂}
{m : Type u → Type u_4}
{n : Type u → Type u_5}
{r : Type u → Type u_6}
[MonadLiftT m r]
[MonadLiftT n r]
(impl₁ : QueryImpl spec₁ m)
(impl₂ : QueryImpl spec₂ n)
: