Changing only the Pauli payload in a parsed answer #
The map may depend on the question label. Auxiliary registers and source answers are unchanged. Endpoint-local projection agreements suffice for all mixed checks, and equality consistency survives every deterministic map.
def
MIPRE.Introspection.ParsedAnswer.mapPauli
{V : Type u_1}
{A : Type u_2}
{P : Type u_3}
{B : Type u_4}
{T : Type u_5}
{ℓ : ℕ}
(f : QuestionType T ℓ → P → B)
(t : QuestionType T ℓ)
:
ParsedAnswer V A P → ParsedAnswer V A B
Equations
- MIPRE.Introspection.ParsedAnswer.mapPauli f t (MIPRE.Introspection.ParsedAnswer.pauli a) = MIPRE.Introspection.ParsedAnswer.pauli (f t a)
- MIPRE.Introspection.ParsedAnswer.mapPauli f t (MIPRE.Introspection.ParsedAnswer.pair y a) = MIPRE.Introspection.ParsedAnswer.pair y a
- MIPRE.Introspection.ParsedAnswer.mapPauli f t (MIPRE.Introspection.ParsedAnswer.read y yp a) = MIPRE.Introspection.ParsedAnswer.read y yp a
- MIPRE.Introspection.ParsedAnswer.mapPauli f t (MIPRE.Introspection.ParsedAnswer.hide y yp x_1) = MIPRE.Introspection.ParsedAnswer.hide y yp x_1
Instances For
@[simp]
theorem
MIPRE.Introspection.ParsedAnswer.fits_mapPauli
{A : Type u_2}
{P : Type u_3}
{B : Type u_4}
{T : Type u_5}
{ℓ : ℕ}
{F : Type u_6}
{ι : Type u_7}
[Field F]
[Fintype ι]
[DecidableEq ι]
(f : QuestionType T ℓ → P → B)
(t : QuestionType T ℓ)
(a : ParsedAnswer (ι → F) A P)
:
theorem
MIPRE.Introspection.AuxiliaryQuotient.directed_mapPauli
{F : Type u_1}
{ι : Type u_2}
{A : Type u_3}
{PA : Type u_4}
{PB : Type u_5}
{P : Type u_6}
[Field F]
[Fintype ι]
[DecidableEq ι]
{ℓ : ℕ}
(L : Bool → CL.CLFun F ι ℓ)
(X Z : P)
(π : PA → ι → F)
(π' : PB → ι → F)
(D : (ι → F) → (ι → F) → A → A → Bool)
(f : QuestionType P ℓ → PA → PB)
(t u : QuestionType P ℓ)
(a b : ParsedAnswer (ι → F) A PA)
(hp : ∀ (p : P) (c : PA), p = X ∨ p = Z → t = Sum.inl p → a = ParsedAnswer.pauli c → π' (f (Sum.inl p) c) = π c)
(h : directed L X Z π D t u a b = true)
:
Only the distinguished Pauli endpoints require projection compatibility.
theorem
MIPRE.Introspection.AuxiliaryQuotient.check_mapPauli
{F : Type u_1}
{ι : Type u_2}
{A : Type u_3}
{PA : Type u_4}
{PB : Type u_5}
{P : Type u_6}
[Field F]
[Fintype ι]
[DecidableEq ι]
{ℓ : ℕ}
(L : Bool → CL.CLFun F ι ℓ)
(X Z : P)
(π : PA → ι → F)
(π' : PB → ι → F)
(D : (ι → F) → (ι → F) → A → A → Bool)
(f : QuestionType P ℓ → PA → PB)
(DP : P → P → PA → PA → Bool)
(DP' : P → P → PB → PB → Bool)
(t u : QuestionType P ℓ)
(a b : ParsedAnswer (ι → F) A PA)
(hpa : ∀ (p : P) (c : PA), p = X ∨ p = Z → t = Sum.inl p → a = ParsedAnswer.pauli c → π' (f (Sum.inl p) c) = π c)
(hpb : ∀ (p : P) (c : PA), p = X ∨ p = Z → u = Sum.inl p → b = ParsedAnswer.pauli c → π' (f (Sum.inl p) c) = π c)
(hDP :
∀ (p q : P) (x y : PA),
t = Sum.inl p →
u = Sum.inl q →
a = ParsedAnswer.pauli x →
b = ParsedAnswer.pauli y → DP p q x y = true → DP' p q (f (Sum.inl p) x) (f (Sum.inl q) y) = true)
(h : check L X Z π D DP t u a b = true)
:
A type-dependent Pauli encoding or decoding preserves accepted tuples.
def
MIPRE.Introspection.ParsedAnswer.mapAnswer
{V : Type u_1}
{A : Type u_2}
{B : Type u_3}
{PA : Type u_4}
(g : A → B)
:
ParsedAnswer V A PA → ParsedAnswer V B PA
Map the original answer in the pair and Read formats.
Equations
- MIPRE.Introspection.ParsedAnswer.mapAnswer g (MIPRE.Introspection.ParsedAnswer.pauli a) = MIPRE.Introspection.ParsedAnswer.pauli a
- MIPRE.Introspection.ParsedAnswer.mapAnswer g (MIPRE.Introspection.ParsedAnswer.pair y a) = MIPRE.Introspection.ParsedAnswer.pair y (g a)
- MIPRE.Introspection.ParsedAnswer.mapAnswer g (MIPRE.Introspection.ParsedAnswer.read y yp a) = MIPRE.Introspection.ParsedAnswer.read y yp (g a)
- MIPRE.Introspection.ParsedAnswer.mapAnswer g (MIPRE.Introspection.ParsedAnswer.hide y yp x_1) = MIPRE.Introspection.ParsedAnswer.hide y yp x_1
Instances For
@[simp]
theorem
MIPRE.Introspection.ParsedAnswer.fits_mapAnswer
{A : Type u_2}
{B : Type u_3}
{PA : Type u_4}
{P : Type u_5}
{ℓ : ℕ}
{F : Type u_6}
{ι : Type u_7}
[Field F]
[Fintype ι]
[DecidableEq ι]
(g : A → B)
(t : QuestionType P ℓ)
(a : ParsedAnswer (ι → F) A PA)
:
theorem
MIPRE.Introspection.AuxiliaryQuotient.directed_mapAnswer
{F : Type u_1}
{ι : Type u_2}
{A : Type u_3}
{B : Type u_4}
{PA : Type u_5}
{P : Type u_6}
[Field F]
[Fintype ι]
[DecidableEq ι]
{ℓ : ℕ}
(L : Bool → CL.CLFun F ι ℓ)
(X Z : P)
(π : PA → ι → F)
(D : (ι → F) → (ι → F) → A → A → Bool)
(D' : (ι → F) → (ι → F) → B → B → Bool)
(g : A → B)
(t u : QuestionType P ℓ)
(a b : ParsedAnswer (ι → F) A PA)
(hD :
∀ (x y : ι → F) (c d : A),
a = ParsedAnswer.pair x c → b = ParsedAnswer.pair y d → D x y c d = true → D' x y (g c) (g d) = true)
(h : directed L X Z π D t u a b = true)
:
Source-predicate compatibility is required only for the actual endpoint payloads.
theorem
MIPRE.Introspection.AuxiliaryQuotient.check_mapAnswer
{F : Type u_1}
{ι : Type u_2}
{A : Type u_3}
{B : Type u_4}
{PA : Type u_5}
{P : Type u_6}
[Field F]
[Fintype ι]
[DecidableEq ι]
{ℓ : ℕ}
(L : Bool → CL.CLFun F ι ℓ)
(X Z : P)
(π : PA → ι → F)
(D : (ι → F) → (ι → F) → A → A → Bool)
(D' : (ι → F) → (ι → F) → B → B → Bool)
(g : A → B)
(DP : P → P → PA → PA → Bool)
(t u : QuestionType P ℓ)
(a b : ParsedAnswer (ι → F) A PA)
(hD :
∀ (x y : ι → F) (c d : A),
a = ParsedAnswer.pair x c → b = ParsedAnswer.pair y d → D x y c d = true → D' x y (g c) (g d) = true)
(hDr :
∀ (x y : ι → F) (c d : A),
b = ParsedAnswer.pair x c → a = ParsedAnswer.pair y d → D x y c d = true → D' x y (g c) (g d) = true)
(h : check L X Z π D DP t u a b = true)
:
In particular, bounded decoding of source answers preserves all accepted checks.