Shared-site coefficient context · GraphMomentumVerticesRegister
DefinitionMarkovScatteringCharged_GraphMomentumVerticesRegistermarkov-scattering
Source context from the finite shared-site cubic model and its supporting definitions and checked lemmas.
Definition code
import Definitions.Def_MarkovScatteringCharged_GraphMomentumRouting
open scoped BigOperators
namespace MarkovScattering.GraphMomentum
noncomputable section
variable {E H B A : Type*} [Fintype E] [DecidableEq E] [Fintype H]
[AddCommGroup B] [AddCommGroup A]
/-- Include an independent assignment slot for each edge, besides the
physical balance which will be read by the endpoint. -/
abbrev Register (B E A : Type*) := B × (E → A)
/-- A draw contributes physical momentum and stores its code at the edge's
own slot. Encoding is independent of the momentum contribution. -/
def codedIncrement (d : E → H → B) (code : H → A) (e : E) (q : H) : Register B E A :=
(d e q,Pi.single e (code q))
omit [Fintype H] in
theorem codedIncrement_sum (d : E → H → B) (code : H → A) (q : E → H) :
(∑ e, codedIncrement d code e (q e)) = ((∑ e, d e (q e)),fun e => code (q e)) := by
apply Prod.ext
· rw [Prod.fst_sum]
rfl
· rw [Prod.snd_sum]
funext i
simp [codedIncrement,Finset.sum_apply,Pi.single_apply]
variable [DecidableEq B] [DecidableEq A]
/-- Local edge transfers for any finite draw alphabet and any code into an
additive register. The draw alphabet itself need not carry an addition. -/
def codedEdgeSteps (d : E → H → B) (code : H → A) (w : E → H → ℂ) :
List (Register B E A → Register B E A → ℂ) :=
let e := (Fintype.equivFin E).symm
steps (fun i => codedIncrement d code (e i)) (fun i => w (e i))
variable [Fintype B] [Fintype A]
theorem apply_codedEdgeSteps (d : E → H → B) (code : H → A) (w : E → H → ℂ)
(f : Register B E A → ℂ) (u : Register B E A) :
FourPhase.applyWord f (codedEdgeSteps d code w) u =
∑ q : E → H, (∏ i, w i (q i)) * f (u + ((∑ i, d i (q i)),fun i => code (q i))) := by
classical
let e := (Fintype.equivFin E).symm
unfold codedEdgeSteps
rw [apply_steps]
refine Fintype.sum_equiv (e.arrowCongr (Equiv.refl H)) _ _ ?_
intro q
have hs := e.sum_comp (fun j => codedIncrement d code j (q (e.symm j)))
have hp := e.prod_comp (fun j => w j (q (e.symm j)))
simp only [Equiv.symm_apply_apply] at hs hp
change (∏ i, w (e i) (q i)) * f (u + ∑ i, codedIncrement d code (e i) (q i)) =
(∏ j, w j (q (e.symm j))) *
f (u + ((∑ j, d j (q (e.symm j))),fun j => code (q (e.symm j))))
rw [hp,hs,codedIncrement_sum]
end
end MarkovScattering.GraphMomentum
Source