OAI/Probability/FKMaps/WordMaps.lean
27 declarations, 0 contain sorry, 0 declared as axioms
- def
OAI.FKCRT.Inventory.TypedLetter.colorline 11 - def
OAI.FKCRT.Inventory.TypedLetter.stepline 15 - lemma
OAI.FKCRT.Inventory.colorWord_mapline 19 - theorem
OAI.FKCRT.Inventory.identified_matchingsline 30Source documentation
Actual identified words produce a complete pair of noncrossing matchings; the labels on each pair are the matching burger and fixed order.
theorem identified_matchings {n : ℕ} (w : Dart n→TypedLetter) (hw : stackTypedRun ((List.finRange (2*(n+1))).map w) []=some []) : ∃ E F : List (Dart n × Dart n), Arches (List.finRange (2*(n+1))) E ∧ Arches (List.finRange (2*(n+1))) F ∧ (endpoints (E++F)).Perm (List.finRange (2*(n+1))) ∧ (∀ e∈E,w e.1=.burger true ∧ w e.2=.order true) ∧ (∀ e∈F,w e.1=.burger false ∧ w e.2=.order false) := by …Mentions: OAI.FKCRT.Dart, OAI.FKCRT.Inventory.TypedLetter, OAI.FKCRT.Inventory.stackTypedRun
- theorem
OAI.FKCRT.Inventory.identified_map_existsline 69Source documentation
The finite inverse in words.tex is defined on every nonempty identified word, and lands in the exact genus-zero maps rather than an auxiliary class.
theorem identified_map_exists {n : ℕ} (w : Dart n→TypedLetter) (hw : stackTypedRun ((List.finRange (2*(n+1))).map w) []=some []) : ∃ E F : List (Dart n × Dart n), MapConditions (turns (E++F),(List.finRange (2*(n+1))).formPerm * turns E) ∧ (∀ e∈E,w e.1=.burger true ∧ w e.2=.order true) ∧ (∀ e∈F,w e.1=.burger false ∧ w e.2=.order false) := by …Mentions: OAI.FKCRT.Dart, OAI.FKCRT.Inventory.TypedLetter, OAI.FKCRT.Inventory.stackTypedRun, OAI.FKCRT.MapConditions
- def
OAI.FKCRT.MapCycles.scanArchesline 88Source documentation
Deterministic stack matching of one colour;
noneskips the other colour.def scanArches (f : α→Option Bool) : List α → List α → Option (List α × List (α×α)) | [],S => some (S,[]) | a::l,S => match f a with | none => scanArches f l S | some true => scanArches f l (a::S) | some false => match S with | [] => none | b::S => (scanArches f l S).map (fun z => (z.1,(b,a)::z.2)) - lemma
OAI.FKCRT.MapCycles.scanArches_appendline 97 - lemma
OAI.FKCRT.MapCycles.Arches.mem_endpointsline 117 - theorem
OAI.FKCRT.MapCycles.Arches.scanline 126Source documentation
Noncrossing typed pairings are uniquely recovered by the stack. In particular no hidden choice of an arch pairing enters the map inverse.
theorem Arches.scan {l : List α} {E : List (α×α)} (h : Arches l E) (hn : l.Nodup) (f : α→Option Bool) (hp : ∀ e∈E,f e.1=some true ∧ f e.2=some false) (hc : ∀ x∈l,f x≠none → x∈MapCycles.endpoints E) (S : List α) : ∃ F,scanArches f l S=some (S,F) ∧ F.Perm E := by …Mentions: OAI.FKCRT.MapCycles.Arches, OAI.FKCRT.MapCycles.endpoints, OAI.FKCRT.MapCycles.scanArches
- theorem
OAI.FKCRT.MapCycles.arches_uniqueline 174Source documentation
Uniqueness is literal up to the irrelevant order of disjoint pairs.
theorem arches_unique {l : List α} {E F : List (α×α)} (hE : Arches l E) (hF : Arches l F) (hn : l.Nodup) (f : α→Option Bool) (hpE : ∀ e∈E,f e.1=some true ∧ f e.2=some false) (hpF : ∀ e∈F,f e.1=some true ∧ f e.2=some false) (hcE : ∀ x∈l,f x≠none → x∈MapCycles.endpoints E) (hcF : ∀ x∈l,f x≠none → x∈MapCycles.endpoints F) : E.Perm F := by …Mentions: OAI.FKCRT.MapCycles.Arches, OAI.FKCRT.MapCycles.endpoints
- lemma
OAI.FKCRT.MapCycles.endpoints_permline 194 - lemma
OAI.FKCRT.MapCycles.turns_permline 199 - def
OAI.FKCRT.Inventory.colorInstructionline 216Source documentation
The one-colour stack instruction attached to a typed inventory symbol.
def colorInstruction (c : Bool) : TypedLetter→Option Bool | .burger b => if b=c then some true else none | .order b => if b=c then some false else none
Mentions: OAI.FKCRT.Inventory.TypedLetter
- lemma
OAI.FKCRT.Inventory.matching_color_coverageline 220 - theorem
OAI.FKCRT.Inventory.typed_matchings_uniqueline 246Source documentation
Literal uniqueness of the inverse map's two matchings, including empty colour classes. This removes all pairing choices in
identified_map_exists.theorem typed_matchings_unique (w : α→TypedLetter) (l : List α) (hn : l.Nodup) (E F E' F' : List (α×α)) (hE : Arches l E) (hF : Arches l F) (hE' : Arches l E') (hF' : Arches l F') (hc : (endpoints (E++F)).Perm l) (hc' : (endpoints (E'++F')).Perm l) (htE : ∀ e∈E,w e.1=.burger true ∧ w e.2=.order true) (htF : ∀ e∈F,w e.1=.burger false ∧ w e.2=.order false) (htE' : ∀ e∈E',w e.1=.burger true ∧ w e.2=.order true) (htF' : ∀ e∈F',w e.1=.burger false ∧ w e.2=.order false) : E.Perm E' ∧ F.Perm F' := by …Mentions: OAI.FKCRT.Inventory.TypedLetter
- theorem
OAI.FKCRT.Inventory.typed_map_uniqueline 277Source documentation
In particular the reconstructed edge and vertex permutations are independent of the proof/choice of Dyck pairing.
theorem typed_map_unique (w : α→TypedLetter) (l : List α) (hn : l.Nodup) (E F E' F' : List (α×α)) (hE : Arches l E) (hF : Arches l F) (hE' : Arches l E') (hF' : Arches l F') (hc : (endpoints (E++F)).Perm l) (hc' : (endpoints (E'++F')).Perm l) (htE : ∀ e∈E,w e.1=.burger true ∧ w e.2=.order true) (htF : ∀ e∈F,w e.1=.burger false ∧ w e.2=.order false) (htE' : ∀ e∈E',w e.1=.burger true ∧ w e.2=.order true) (htF' : ∀ e∈F',w e.1=.burger false ∧ w e.2=.order false) : turns (E++F)=turns (E'++F') ∧ l.formPerm*turns E=l.formPerm*turns E' := by …Mentions: OAI.FKCRT.Inventory.TypedLetter
- theorem
OAI.FKCRT.MapCycles.arches_of_noncrossingline 303Source documentation
A closed involutive noncrossing colour matching admits exactly the recursive arch decomposition. No Jordan-curve principle is assumed.
theorem arches_of_noncrossing (a : α→α) (ha : Function.Involutive a) (P : α→Bool) (hP : ∀ x,P (a x)=P x) (l : List α) (hs : l.Pairwise (·<·)) (hc : ∀ x∈l,P x=true → a x∈l) (hf : ∀ x∈l,P x=true → a x≠x) (hn : ∀ x∈l,∀ y∈l,P x=true → P y=true → x<y → y<a x → a x<a y → False) : ∃ E,Arches l E ∧ (endpoints E).Perm (l.filter P) ∧ ∀ e∈E,e.2=a e.1 ∧ P e.1=true := by …Mentions: OAI.FKCRT.MapCycles.Arches, OAI.FKCRT.MapCycles.endpoints
- lemma
OAI.FKCRT.MapCycles.orbitList_formPermline 395 - lemma
OAI.FKCRT.MapCycles.ordered_four_sublistline 413 - theorem
OAI.FKCRT.ordered_no_crossingline 431Source documentation
The orbit-maximal planar matching has the ordinary increasing-position noncrossing property, with root/end seam retained exactly.
theorem ordered_no_crossing (a : Perm (Dart n)) (ha : Function.Involutive a) (l : List (Dart n)) (hs : l.Pairwise (·<·)) (hc : ∀ x,x∈l) (A : Finset (Orbit a)) (hmax : Nat.card (Orbit (partialReversal a ha A*l.formPerm))=Nat.card (Orbit l.formPerm)+A.card) (x y : Dart n) (hx : orbit a x∈A) (hy : orbit a y∈A) (hxy : x<y) (hyx : y<a x) (haxy : a x<a y) : False := by …Mentions: OAI.FKCRT.Dart, OAI.FKCRT.Orbit, OAI.FKCRT.partialReversal, OAI.FKCRT.orbit
- theorem
OAI.FKCRT.maximal_matching_archesline 460Source documentation
Every orbit-maximal one-colour matching is an actual stack matching.
theorem maximal_matching_arches (a : Perm (Dart n)) (ha : Function.Involutive a) (hf : ∀ x,a x≠x) (A : Finset (Orbit a)) (hmax : Nat.card (Orbit (partialReversal a ha A*(List.finRange (2*(n+1))).formPerm))= Nat.card (Orbit (List.finRange (2*(n+1))).formPerm)+A.card) : ∃ E,Arches (List.finRange (2*(n+1))) E ∧ (endpoints E).Perm ((List.finRange (2*(n+1))).filter (fun x => decide (orbit a x∈A))) ∧ ∀ e∈E,e.2=a e.1 ∧ orbit a e.1∈A := by …Mentions: OAI.FKCRT.Dart, OAI.FKCRT.Orbit, OAI.FKCRT.partialReversal, OAI.FKCRT.orbit
- lemma
OAI.FKCRT.Inventory.scanArches_prefixline 487 - lemma
OAI.FKCRT.Inventory.scanArches_color_balanceline 496 - theorem
OAI.FKCRT.Inventory.typedRun_of_matchingsline 533Source documentation
Complete noncrossing matchings give successful typed inventory reduction, not merely two balanced endpoint counts.
theorem typedRun_of_matchings (w : α→TypedLetter) (l : List α) (hn : l.Nodup) (E F : List (α×α)) (hE : Arches l E) (hF : Arches l F) (hc : (endpoints (E++F)).Perm l) (htE : ∀ e∈E,w e.1=.burger true ∧ w e.2=.order true) (htF : ∀ e∈F,w e.1=.burger false ∧ w e.2=.order false) : stackTypedRun (l.map w) []=some [] := by …Mentions: OAI.FKCRT.Inventory.TypedLetter, OAI.FKCRT.Inventory.stackTypedRun
- lemma
OAI.FKCRT.MapCycles.Arches.increasingline 584 - def
OAI.FKCRT.Inventory.matchingWordline 605Source documentation
The actual two-colour opening/closing word in canonical rooted tour order.
def matchingWord (a : Perm (Dart n)) (A : Finset (Orbit a)) (i : Dart n) : TypedLetter := …
Mentions: OAI.FKCRT.Dart, OAI.FKCRT.Orbit, OAI.FKCRT.Inventory.TypedLetter
- theorem
OAI.FKCRT.Inventory.maximal_matching_wordline 610Source documentation
Surjectivity of the stack correspondence on canonical two-colour tours, with the complete literal inverse pairing and rotation.
theorem maximal_matching_word (a : Perm (Dart n)) (ha : Function.Involutive a) (hf : ∀ i,a i≠i) (A : Finset (Orbit a)) (hE : Nat.card (Orbit (partialReversal a ha A*(List.finRange (2*(n+1))).formPerm))= Nat.card (Orbit (List.finRange (2*(n+1))).formPerm)+A.card) (hF : Nat.card (Orbit (partialReversal a ha Aᶜ*(List.finRange (2*(n+1))).formPerm))= Nat.card (Orbit (List.finRange (2*(n+1))).formPerm)+Aᶜ.card) : stackTypedRun ((List.finRange (2*(n+1))).map (matchingWord a A)) []=some [] ∧ ∃ E F,Arches (List.finRange (2*(n+1))) E ∧ Arches (List.finRange (2*(n+1))) F ∧ (endpoints (E++F)).Perm (List.finRange (2*(n+1))) ∧ (∀ e∈E,matchingWord a A e.1=.burger true ∧ matchingWord a A e.2=.order true) ∧ (∀ e∈F,matchingWord a A e.1=.burger false ∧ matchingWord a A e.2=.order false) ∧ turns (E++F)=a ∧ turns E=partialReversal a ha A := by …Mentions: OAI.FKCRT.Dart, OAI.FKCRT.Orbit, OAI.FKCRT.partialReversal, OAI.FKCRT.Inventory.stackTypedRun, OAI.FKCRT.Inventory.matchingWord