File size: 2,446 Bytes
8df23f4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | import OAI.Computability.BinPacking.Expanders.SpectralCut
namespace OAI
namespace BinPackingGames.Foundations.PCP.GraphTransport
open PoweringWalks SpectralReturn
variable {V W D E : Type*}
def reindex (G : PortGraph V D) (vertices : V ≃ W) (ports : D ≃ E) :
PortGraph W E where
rot := (Equiv.prodCongr vertices ports).symm.trans
(G.rot.trans (Equiv.prodCongr vertices ports))
rot_involutive := by
intro x
change (Equiv.prodCongr vertices ports)
(G.rot ((Equiv.prodCongr vertices ports).symm
((Equiv.prodCongr vertices ports)
(G.rot ((Equiv.prodCongr vertices ports).symm x))))) = x
rw [Equiv.symm_apply_apply, G.rot_involutive, Equiv.apply_symm_apply]
@[simp] theorem reindex_rot (G : PortGraph V D) (vertices : V ≃ W)
(ports : D ≃ E) (v : V) (d : D) :
(reindex G vertices ports).rot (vertices v, ports d) =
(vertices (G.rot (v, d)).1, ports (G.rot (v, d)).2) := by
simp [reindex, Equiv.trans_apply, Prod.map]
variable [Fintype V] [Fintype W] [Fintype D] [Fintype E]
omit [Fintype V] [Fintype W] in
theorem operator_reindex (G : PortGraph V D) (vertices : V ≃ W)
(ports : D ≃ E) (f : W → ℝ) (w : W) :
averagingOperator (reindex G vertices ports) f w =
averagingOperator G (fun v => f (vertices v)) (vertices.symm w) := by
unfold averagingOperator
apply Fintype.expect_equiv ports.symm
intro e
rfl
theorem energy_reindex (vertices : V ≃ W) (f : W → ℝ) :
energy (fun v => f (vertices v)) = energy f :=
mean_equiv vertices (fun w => f w ^ 2)
theorem reindex_spectralCertificate (G : PortGraph V D) (vertices : V ≃ W)
(ports : D ≃ E) (lambda : ℝ) (certificate : SpectralCertificate G lambda) :
SpectralCertificate (reindex G vertices ports) lambda where
nonnegative := certificate.nonnegative
lt_one := certificate.lt_one
contraction := by
intro f hf
have hf' : mean (fun v => f (vertices v)) = 0 :=
(mean_equiv vertices f).trans hf
have h := certificate.contraction (fun v => f (vertices v)) hf'
have hout : energy (averagingOperator (reindex G vertices ports) f) =
energy (averagingOperator G (fun v => f (vertices v))) := by
rw [← energy_reindex vertices]
congr 1
funext v
rw [operator_reindex, vertices.symm_apply_apply]
rw [hout, ← energy_reindex vertices f]
exact h
end BinPackingGames.Foundations.PCP.GraphTransport
end OAI
|