Skip to content

Commit d299c25

Browse files
committed
refactor(PEPS): use pi congruence for torus boundary casts
1 parent 8647245 commit d299c25

1 file changed

Lines changed: 4 additions & 20 deletions

File tree

TNLean/PEPS/TorusGaugedWeightCovariance.lean

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -86,26 +86,10 @@ noncomputable def tiBoundaryConfigEquiv (T : Tensor (torusGraph width height) d)
8686
(hT : IsTorusTranslationInvariant T) (a : ZMod width) (b : ZMod height)
8787
(R : Finset (TorusVertex width height)) :
8888
RegionBoundaryConfig (G := torusGraph width height) T R ≃
89-
RegionBoundaryConfig (G := torusGraph width height) T (Region.map (translate a b) R) where
90-
toFun := tiBoundaryConfigMap T hT a b R
91-
invFun bdry' := (regionBoundaryConfigMapEquiv T (translate a b) R).symm
92-
(fun f => Fin.cast (congrFun (congrArg Tensor.bondDim (hT a b)) f.1).symm (bdry' f))
93-
left_inv bdry := by
94-
beta_reduce
95-
have hcollapse : (fun f => Fin.cast
96-
(congrFun (congrArg Tensor.bondDim (hT a b)) f.1).symm
97-
(tiBoundaryConfigMap T hT a b R bdry f)) =
98-
regionBoundaryConfigMap T (translate a b) R bdry := by
99-
funext f
100-
apply Fin.eq_of_val_eq
101-
simp [tiBoundaryConfigMap]
102-
rw [hcollapse, ← regionBoundaryConfigMapEquiv_apply, Equiv.symm_apply_apply]
103-
right_inv bdry' := by
104-
beta_reduce
105-
funext f
106-
rw [tiBoundaryConfigMap, ← regionBoundaryConfigMapEquiv_apply, Equiv.apply_symm_apply]
107-
apply Fin.eq_of_val_eq
108-
simp
89+
RegionBoundaryConfig (G := torusGraph width height) T (Region.map (translate a b) R) :=
90+
(regionBoundaryConfigMapEquiv T (translate a b) R).trans
91+
(Equiv.piCongrRight fun f =>
92+
finCongr (congrFun (congrArg Tensor.bondDim (hT a b)) f.1))
10993

11094
@[simp] theorem tiBoundaryConfigEquiv_apply (T : Tensor (torusGraph width height) d)
11195
(hT : IsTorusTranslationInvariant T) (a : ZMod width) (b : ZMod height)

0 commit comments

Comments
 (0)