File size: 1,825 Bytes
b317718 | 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 | import OAI.Probability.FreeIsing.Estimates.PairCorrelation
namespace OAI
noncomputable section
namespace Problem367
theorem reducedWordDistance_prefixFlipWord {α : Type*} [DecidableEq α]
(a : α) (u v : List α) (hu : List.IsChain (fun x y : α => x ≠ y) (a :: u)) :
reducedWordDistance u (prefixFlipWord a v) = reducedWordDistance (a :: u) v := by
cases v with
| nil =>
cases u with
| nil => rfl
| cons b u =>
have hab : a ≠ b := (List.isChain_cons_cons.mp hu).1
simp only [prefixFlipWord, reducedWordDistance_cons_ne hab.symm,
List.length_nil, reducedWordDistance_nil_right, List.length_cons]
| cons b v =>
by_cases hab : a = b
· subst b
simp [prefixFlipWord]
· simp only [prefixFlipWord, ite_eq_right hab]
exact reducedWordDistance_move_head a b u v hab hu
theorem exists_treeAut_to_root_distance {d : ℕ} (u : TreeVertex d) :
∃ g : TreeAut d,
g.toEquiv u = ⟨[], List.IsChain.nil⟩ ∧
∀ v : TreeVertex d, (g.toEquiv v).1.length = reducedWordDistance u.1 v.1 := by
rcases u with ⟨w, hw⟩
induction w with
| nil =>
exact ⟨TreeAut.refl d, rfl, fun v => rfl⟩
| cons a w ih =>
obtain ⟨g, hg, hdist⟩ := ih hw.tail
refine ⟨(prefixTreeAut a).trans g, ?_, ?_⟩
· change g.toEquiv (prefixFlip a ⟨a :: w, hw⟩) = _
have hflip : prefixFlip a (⟨a :: w, hw⟩ : TreeVertex d) = ⟨w, hw.tail⟩ := by
apply Subtype.ext
simp [prefixFlip, prefixFlipWord]
rw [hflip]
exact hg
· intro v
change (g.toEquiv (prefixFlip a v)).1.length = reducedWordDistance (a :: w) v.1
rw [hdist (prefixFlip a v)]
exact reducedWordDistance_prefixFlipWord a w v.1 hw
end Problem367
end
end OAI
|