@@ -5,20 +5,20 @@ variable {α : Type*} [DecidableEq α]
55
66namespace Trace
77
8- /-- A dependence relation is a finite, reflexive, and symmetric relation. -/
9- structure Dependence (α : Type *) where
8+ /-- A dependency is a finite, reflexive, and symmetric relation. -/
9+ structure Dependency (α : Type *) where
1010 rel : α → α → Prop
1111 refl : ∀ a, rel a a
1212 symm: ∀ a b, rel a b → rel b a
1313
14- /-- An independence relation is a finite, irreflexive, and symmetric relation. -/
15- structure Independence (α : Type *) where
14+ /-- An independency is a finite, irreflexive, and symmetric relation. -/
15+ structure Independency (α : Type *) where
1616 rel : α → α → Prop
1717 irrefl : ∀ a, ¬ rel a a
1818 symm : ∀ a b, rel a b → rel b a
1919
2020/-- The Independency relation induced by a Dependency `D`. -/
21- def inducedIndependency {α : Type *} (D : Dependence α) : Independence α :=
21+ def inducedIndependency {α : Type *} (D : Dependency α) : Independency α :=
2222 { rel := fun a b => ¬ D.rel a b,
2323 irrefl := by
2424 intro a h
@@ -27,7 +27,7 @@ def inducedIndependency {α : Type*} (D : Dependence α) : Independence α :=
2727 intro a b h
2828 exact h ∘ (D.symm b a) }
2929
30- variable {I : Independence α}
30+ variable {I : Independency α}
3131
3232variable (I) in
3333/--
@@ -358,26 +358,39 @@ lemma equiv_of_head_eq_tail_implies_mid_equiv {u v x y : List α}
358358 replace h := equiv_of_tail_eq_implies_head_equiv I h
359359 exact h
360360
361+ variable (I) in
362+ @[simp]
363+ def independent (u v : List α) := ∀ a ∈ u, ∀ b ∈ v, I.rel a b
364+
361365variable (I) in
362366lemma commutation_lemma {u v w : List α} {a : α}
363367 (h : TraceEquiv I (u ++ [a] ++ v) (w ++ [a])) (hav : a ∉ v) : -- (1.3.3)
364- ∀ b ∈ v, I.rel a b := by
368+ independent I [a] v := by
365369 induction v using List.induction_right generalizing w with
366370 | nil =>
367371 simp
368372 | snoc x b ih =>
373+ simp
369374 intro b' hb'
370375 simp at hb' hav
371376 rcases hav with ⟨hax, hab⟩
372377 rw [eq_comm] at hab
373378 rw [← List.append_assoc] at h
374- have ⟨hr, _⟩ := tail_lemma I h hab
379+ have hr := ( tail_lemma I h hab).left
375380 replace h := cancellation_rule I b h
376381 simp only [List.cancel_right_snoc, hab, ↓reduceIte] at h
377382 replace h := ih h hax
383+ simp at h
378384 rcases hb' with hb'x | hb'b
379385 · exact h b' hb'x
380386 · rw [← hb'b] at hr
381387 exact I.symm b' a hr
382388
389+ -- variable (I) in
390+ -- lemma levi_lemma {u v x y : List α} (h : TraceEquiv I (u ++ v) (x ++ y)) : -- (1.11)
391+ -- ∃ z₁ z₂ z₃ z₄, independent I z₂ z₃
392+ -- ∧ TraceEquiv I u (z₁ ++ z₂) ∧ TraceEquiv I v (z₃ ++ z₄)
393+ -- ∧ TraceEquiv I x (z₁ ++ z₃) ∧ TraceEquiv I y (z₂ ++ z₄) := by
394+ -- sorry
395+
383396end Trace
0 commit comments