OAI/Probability/FKMaps/Matching.lean
26 declarations, 0 contain sorry, 0 declared as axioms
- def
OAI.FKCRT.Inventory.liveAtline 11 - lemma
OAI.FKCRT.Inventory.mem_liveAtline 14 - lemma
OAI.FKCRT.Inventory.liveAt_sortedline 17 - lemma
OAI.FKCRT.Inventory.liveAt_zeroline 20 - lemma
OAI.FKCRT.Inventory.liveAt_endline 21 - lemma
OAI.FKCRT.Inventory.liveAt_openline 27 - lemma
OAI.FKCRT.Inventory.liveAt_closeline 50 - lemma
OAI.FKCRT.Inventory.liveAt_mateline 74 - lemma
OAI.FKCRT.Inventory.pop_map_eraseline 77 - lemma
OAI.FKCRT.Inventory.matching_step_liveline 96Source documentation
For noncrossing same-colour arcs, the literal typed stack is the list of live openers in reverse chronological order. No choice of a stack matching is assumed.
lemma matching_step_live (a : Perm (Fin N)) (ha : Function.Involutive a) (hf : ∀ x,a x≠x) (c : Fin N→Bool) (hc : ∀ x,c (a x)=c x) (hn : ∀ x y,c x=c y → x < y → y < a x → a x < a y → False) (i : Fin N) : stackTypedStep ((liveAt a i.val).map c) (if i < a i then .burger (c i) else .order (c i))= some ((liveAt a (i.val+1)).map c) := by …Mentions: OAI.FKCRT.Inventory.stackTypedStep, OAI.FKCRT.Inventory.liveAt
- lemma
OAI.FKCRT.Inventory.liveAt_first_colourline 127 - lemma
OAI.FKCRT.Inventory.head_map_eq_of_firstline 142 - lemma
OAI.FKCRT.Inventory.head_eq_iff_greatestline 153 - theorem
OAI.FKCRT.Inventory.flexibleClosing_iff_no_later_crossline 173Source documentation
The source's flexible-mark obstruction, with the strict first-occurrence order and both closing endpoints retained exactly.
theorem flexibleClosing_iff_no_later_cross (a : Perm (Fin N)) (ha : Function.Involutive a) (c : Fin N→Bool) (hc : ∀ x,c (a x)=c x) (hn : ∀ x y,c x=c y → x < y → y < a x → a x < a y → False) (i : Fin N) (hi : a i < i) : flexibleClosing ((liveAt a i.val).map c) (.order (c i)) ↔ ¬∃ j : Fin N,a i < j ∧ j < i ∧ i < a j := by …Mentions: OAI.FKCRT.Inventory.flexibleClosing, OAI.FKCRT.Inventory.liveAt
- lemma
OAI.FKCRT.Inventory.flexibleCount_ofFnline 204 - theorem
OAI.FKCRT.Inventory.matching_flexibleCountline 220Source documentation
The complete flexible exponent of the actual identified word is the number of its matched pairs with no later-first crossing edge.
theorem matching_flexibleCount {N : ℕ} (a : Perm (Fin N)) (ha : Function.Involutive a) (hf : ∀ x,a x≠x) (c : Fin N→Bool) (hc : ∀ x,c (a x)=c x) (hn : ∀ x y,c x=c y → x < y → y < a x → a x < a y → False) : flexibleCount (List.ofFn (fun i => if i<a i then .burger (c i) else .order (c i))) []= ∑ i : Fin N,if a i < i ∧ ¬∃ j : Fin N,a i < j ∧ j < i ∧ i < a j then 1 else 0 := by …Mentions: OAI.FKCRT.Inventory.flexibleCount
- lemma
OAI.FKCRT.Chords.componentDarts_mateline 252 - def
OAI.FKCRT.Chords.openerline 268 - lemma
OAI.FKCRT.Chords.opener_endpointsline 272 - lemma
OAI.FKCRT.Chords.gapIndex_mateline 280 - def
OAI.FKCRT.Chords.cornerDartsline 292 - lemma
OAI.FKCRT.Chords.cornerDarts_mateline 295 - lemma
OAI.FKCRT.Chords.component_card_evenline 303 - def
OAI.FKCRT.Inventory.pairWordline 338 - theorem
OAI.FKCRT.Inventory.typedRun_closed_subwordline 344Source documentation
Any pair-closed ordered subword of a two-colour noncrossing matching is itself an actual successful inventory word. This applies both to a root crossing component and to each of its corner intervals.
theorem typedRun_closed_subword (a : Perm (Fin N)) (ha : Function.Involutive a) (hf : ∀ x,a x≠x) (c : Fin N→Bool) (hc : ∀ x,c (a x)=c x) (hn : ∀ x y,c x=c y → x < y → y < a x → a x < a y → False) (l : List (Fin N)) (hl : l.Pairwise (·<·)) (hclosed : ∀ x∈l,a x∈l) : stackTypedRun (l.map (pairWord a c)) []=some [] := by …Mentions: OAI.FKCRT.Inventory.stackTypedRun, OAI.FKCRT.Inventory.pairWord
- theorem
OAI.FKCRT.Inventory.component_and_corners_emptyline 378Source documentation
Every root component and every one of its literal corner subwords reduce empty. The conclusion uses the full ordered subword, not independent fresh words postulated at a random cut.
theorem component_and_corners_empty (a : Perm (Fin N)) (ha : Function.Involutive a) (hf : ∀ x,a x≠x) (c : Fin N→Bool) (hc : ∀ x,c (a x)=c x) (hn : ∀ x y,c x=c y → x < y → y < a x → a x < a y → False) (r : Chords.Opener a) (hr : r.val.val=0) : stackTypedRun (((List.finRange N).filter (fun d => decide (d∈Chords.componentDarts a r))).map (pairWord a c)) []=some [] ∧ ∀ k,stackTypedRun (((List.finRange N).filter (fun d => decide (d∈Chords.cornerDarts a r k))).map (pairWord a c)) []=some [] := by …Mentions: OAI.FKCRT.Chords.Opener, OAI.FKCRT.Inventory.stackTypedRun, OAI.FKCRT.Chords.componentDarts, OAI.FKCRT.Inventory.pairWord, OAI.FKCRT.Chords.cornerDarts