@@ -1438,6 +1438,11 @@ lemma lexNf_ccDec_order {w : List α} (hw : w ∈ LexNfLanguage I) (hz : w ≠ [
14381438 rename_i j
14391439 exact lt_trans (ih (Nat.lt_of_succ_lt hj)) (lexNf_ccDec_adj_order hw hz j hj)
14401440
1441+ instance {I : Independence α} {u : List α} :
1442+ Trans (dependencyTransClosureInL I u) (dependencyTransClosureInL I u) (dependencyTransClosureInL I u) where
1443+ trans := Relation.TransGen.trans
1444+
1445+ omit [Fintype α] [LinearOrder α] in
14411446lemma ccDec_aux_across_indep (I : Independence α) (u w : List α) (hi : 1 < (ccDec_aux I u w).length) (hwu : w ⊆ u) :
14421447 Independent I ((ccDec_aux I u w).getLast (ccDec_aux_nonempty _ _)) (ccDec_aux I u w)[0 ] ∨
14431448 (Independent I ((ccDec_aux I u w).getLast (ccDec_aux_nonempty _ _) ++ (ccDec_aux I u w)[0 ]) (ccDec_aux I u w)[1 ] ∧
@@ -1453,14 +1458,46 @@ lemma ccDec_aux_across_indep (I : Independence α) (u w : List α) (hi : 1 < (cc
14531458 apply And.intro
14541459 · by_contra hl
14551460 apply @ccDec_aux_adj_char_indep α I u w 0 (Nat.add_lt_of_lt_sub' hi) hw
1456- have hs' : Independent I (ccDec_aux I u w)[0 ] (ccDec_aux I u w)[1 ] := ccDec_aux_adj_indep u w 0 _ hwu
14571461 simp at hl hs ⊢
14581462 have ⟨a, ha, b, hb, hab⟩ := hl
14591463 have ⟨c, hc, d, hd, hcd⟩ := hs
14601464 clear hl hs
14611465 cases ha with
1462- | inl ha => sorry
1463- | inr ha => sorry
1466+ | inl ha =>
1467+ calc
1468+ dependencyTransClosureInL I u ((ccDec_aux I u w)[0 ].getLast (ccDec_aux_nonempty_head I u w hw)) d :=
1469+ ccDec_aux_elem_conn u w hwu _ _ _ _ (List.getLast_mem _) hd
1470+ dependencyTransClosureInL I u d c := by
1471+ apply Relation.TransGen.single
1472+ use fun h => hcd (I.symm _ _ h)
1473+ apply And.intro
1474+ · exact hwu (List.IsInfix.subset (ccDec_aux_infix _ _ _ _ _) hd)
1475+ · rw [List.getLast_eq_getElem _] at hc
1476+ exact hwu (List.IsInfix.subset (ccDec_aux_infix _ _ _ _ _) hc)
1477+ dependencyTransClosureInL I u c a := by
1478+ rw [List.getLast_eq_getElem _] at ha hc
1479+ exact ccDec_aux_elem_conn u w hwu _ _ _ _ hc ha
1480+ dependencyTransClosureInL I u a b := by
1481+ apply Relation.TransGen.single
1482+ use hab
1483+ apply And.intro
1484+ · rw [List.getLast_eq_getElem _] at ha
1485+ exact hwu (List.IsInfix.subset (ccDec_aux_infix _ _ _ _ _) ha)
1486+ · exact hwu (List.IsInfix.subset (ccDec_aux_infix _ _ _ _ _) hb)
1487+ dependencyTransClosureInL I u b ((ccDec_aux I u w)[1 ][0 ]'(ccDec_aux_elem_nonempty_len u w 1 hi hw)) :=
1488+ ccDec_aux_elem_conn u w hwu _ _ _ _ hb (List.getElem_mem _)
1489+ | inr ha =>
1490+ calc
1491+ dependencyTransClosureInL I u ((ccDec_aux I u w)[0 ].getLast (ccDec_aux_nonempty_head I u w hw)) a :=
1492+ ccDec_aux_elem_conn u w hwu _ _ _ _ (List.getLast_mem _) ha
1493+ dependencyTransClosureInL I u a b := by
1494+ apply Relation.TransGen.single
1495+ use hab
1496+ apply And.intro
1497+ · exact hwu (List.IsInfix.subset (ccDec_aux_infix _ _ _ _ _) ha)
1498+ · exact hwu (List.IsInfix.subset (ccDec_aux_infix _ _ _ _ _) hb)
1499+ dependencyTransClosureInL I u b ((ccDec_aux I u w)[1 ][0 ]'(ccDec_aux_elem_nonempty_len u w 1 hi hw)) :=
1500+ ccDec_aux_elem_conn u w hwu _ _ _ _ hb (List.getElem_mem _)
14641501 · by_contra hl
14651502 simp at hl
14661503 replace hi := Nat.le_antisymm hl hi
0 commit comments