OAI/Computability/FiniteCompiler/Paths.lean
120 declarations, 0 contain sorry, 0 declared as axioms
Path alphabet, sectors, cuts, and contextual preparation.
- inductive
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Vertexline 13 - instance
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.(instance at line 17)line 17 - inductive
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letterline 20Source documentation
There are no vertex-identity letters.
zerois the absorbing letter.inductive Letter (C H : Type*) | zero | enter | leave | head : H → Letter C H | left : C → Letter C H | right : C → Letter C H deriving DecidableEq, Fintype /-- Boundary type of a word; `unit` belongs only to the empty word. -/
- inductive
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Shapeline 28Source documentation
Boundary type of a word;
unitbelongs only to the empty word.inductive Shape | zero | unit | path : Vertex → Vertex → Shape deriving DecidableEq
- instance
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.(instance at line 33)line 33 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Shape.compline 37 - instance
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.(instance at line 44)line 44 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.unit_mulline 51 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.mul_unitline 52 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.zero_mulline 54 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.mul_zeroline 55 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.path_mul_pathline 56 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.typeOfline 61 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shapeline 69 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape_nilline 71 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape_consline 72 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape_appendline 74 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape_singletonline 76 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape_contextline 80Source documentation
Parallel nonzero equation sides preserve the complete contextual shape, including nonpath status. This also covers all length-decreasing cleanup.
theorem shape_context {u v : List (Letter C H)} (h : shape u = shape v) (x y : List (Letter C H)) : shape (x++u++y) = shape (x++v++y) := by simp [h]Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letter, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape_zero_contextline 83 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.typeOf_ne_unitline 86 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.comp_eq_unit_iffline 89 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape_unit_iffline 91 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.headedline 96Source documentation
A headed sector written literally. Cells left of the head are supplied in nearest-first zipper order.
def headed (l : List C) (q : H) (r : List C) (lb rb : Bool) : List (Letter C H) := …
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape_leftline 100 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape_rightline 110 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape_headedline 120 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.headsline 129 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.leftsline 133 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.rightsline 137 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.heads_headedline 141 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.lefts_headedline 145 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.rights_headedline 149 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.headed_injectiveline 153 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.glueline 169Source documentation
Prefix a (possibly empty) fragment to the first sector, creating a sector only when the fragment is nonempty.
def glue (u : List (Letter C H)) (cs : List (List (Letter C H))) : List (List (Letter C H)) := …
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.glue_nilline 176 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.glue_consline 179 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.glue_assocline 182 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.cutsline 188Source documentation
Cut immediately after an omega, omitting the empty final sector. On paths every interior cut is exactly omega-alpha, including headless end sectors.
def cuts : List (Letter C H) → List (List (Letter C H)) | [] => [] | .leave::w => [.leave] :: cuts w | a::w => glue [a] (cuts w)
Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letter, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.glue
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.cuts_nilline 193 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.cuts_leaveline 194 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.cuts_consline 196 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.flatten_glueline 199 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.flatten_cutsline 203 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.glue_singleton_nonemptyline 208 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.cuts_nonemptyline 219 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.cuts_append_nonleaveline 231 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.cuts_of_noLeaveline 241 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.headed_ne_nilline 244 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.cuts_headedline 252 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape_append_ne_zeroline 267 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape_mem_flatten_ne_zeroline 271 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape_cut_ne_zeroline 281 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Shape.actline 285 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Shape.act_compline 290 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.walkline 293 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.walk_nilline 295 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.walk_consline 297 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.exists_walkline 301 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.terminalLeaveline 309Source documentation
A sector cannot have any omega except its last letter.
def terminalLeave : List (Letter C H) → Prop | [] => True | .leave::w => w = [] | _::w => terminalLeave w
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.terminalLeave_consline 314 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.terminalLeave_glueline 317 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.terminalLeave_cutsline 329 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.right_formline 345Source documentation
Once a path is at R, its terminal sector consists only of right loops and an optional omega. This includes a headless right end-sector.
theorem right_form {w : List (Letter C H)} (hn : terminalLeave w) {v : Vertex} (h : walk .right w = some v) : ∃ r : List C, ∃ rb : Bool, w = r.map .right ++ (if rb then [.leave] else []) := by …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letter, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.terminalLeave, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Vertex, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.walk
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.left_formline 366Source documentation
Starting at L, a sector either has no head and only left loops, or has exactly one head followed by a right-only tail.
theorem left_form {w : List (Letter C H)} (hn : terminalLeave w) {v : Vertex} (h : walk .left w = some v) : (∃ l : List C, w = l.map .left) ∨ (∃ l : List C, ∃ q : H, ∃ r : List C, ∃ rb : Bool, w = l.map .left ++ [.head q] ++ r.map .right ++ (if rb then [.leave] else [])) := by …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letter, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.terminalLeave, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Vertex, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.walk
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.sector_formline 391Source documentation
Every nonzero sector is either literally headless or has the precise optional-boundary zipper grammar used by the finite component evaluator.
theorem sector_form {w : List (Letter C H)} (hn : terminalLeave w) (h : shape w ≠ .zero) : heads w = [] ∨ ∃ l q r lb rb, w = headed l q r lb rb := by …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letter, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.terminalLeave, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.heads, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.headed
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.cut_formline 420 - structure
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Sectorline 425 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.encodeline 433 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.encode_injectiveline 436 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.enter_mem_headedline 443 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.leave_mem_headedline 447 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.decodeline 455Source documentation
An entirely literal decoder, including a final equality check. It does not assume that its input is a path or that any tag is clean.
def decode (w : List (Letter C H)) : Option (Sector C H) := …
Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letter, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Sector
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.decode_encodeline 463 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.decode_soundline 469 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.decode_none_of_headlessline 480 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.decode_completeline 483 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.cut_decode_completeline 489 - abbrev
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shortlexline 498Source documentation
The shortlex order of literal encodings, fixed independently of a budget. The alphabet order may be the concrete compiler's numerical symbol order.
abbrev shortlex [LinearOrder (Letter C H)] : LinearOrder (Sector C H) := …
Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letter, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Sector
- inductive
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Contextline 511Source documentation
A single literal equation step in arbitrary word context.
inductive Context (r : List (Letter C H) → List (Letter C H) → Prop) : List (Letter C H) → List (Letter C H) → Prop | apply (x y : List (Letter C H)) {a b} (h : r a b) : Context r (x++a++y) (x++b++y) - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.context_contextline 516 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.reaches_contextline 523 - inductive
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.ZeroStepline 530Source documentation
These are exactly the absorbing-letter and incompatible-arrow equations, oriented toward the zero letter.
inductive ZeroStep : List (Letter C H) → List (Letter C H) → Prop | pair (a b : Letter C H) (h : typeOf a * typeOf b = .zero) : ZeroStep [a,b] [.zero]
Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letter, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.typeOf
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Shape.middle_zeroline 533 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.absorb_zeroline 536 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.zero_reachesline 546Source documentation
Every dirty nonpath, including every occurrence of Omega, has a finite zero derivation. No simulation, program call, or confluence is used.
theorem zero_reaches {w : List (Letter C H)} (h : shape w = .zero) : ReflTransGen (Context ZeroStep) w [.zero] := by …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letter, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Context, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.ZeroStep
- def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.letterGradeline 567Source documentation
Additive grade on literal words. The head and boundary letters each have grade one, while all cell-tag data is ignored by a supplied base grade.
def letterGrade (g : C → ℕ) : Letter C H → ℕ | .zero => 0 | .left c | .right c => g c | _ => 1
- def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.gradeline 572 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.grade_nilline 574 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.grade_consline 575 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.grade_appendline 577 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.context_gradeline 580 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.zeroStep_gradeline 588 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.zero_context_gradeline 591 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.grade_headedline 594 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.glue_append_of_ne_nilline 604 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.cuts_append_leaveline 611 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.split_left_contextline 627Source documentation
Split an arbitrary left context after its last omega. The finished part cannot join the sector containing a subsequently inserted head.
theorem split_left_context (x : List (Letter C H)) : ∃ p a, x = p++a ∧ (.leave : Letter C H) ∉ a ∧ (p = [] ∨ ∃ t, p = t++[.leave]) := by … - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.context_frameline 643Source documentation
One delimiter frame works simultaneously for every nonempty replacement with no omega. This lemma makes no path or cleanliness assumption.
theorem context_frame (x y : List (Letter C H)) : ∃ cs a b ds, (.leave : Letter C H) ∉ a ∧ terminalLeave b ∧ (∀ u : List (Letter C H), u ≠ [] → .leave ∉ u → cuts (x++u++y) = cs ++ (a++u++b)::ds) := by …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letter, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.terminalLeave, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.cuts
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.terminalLeave_append_nonleaveline 673 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.head_context_formline 683Source documentation
The unique designated head identifies its entire host sector, even when the surrounding input is malformed. The only premise is literal pathhood.
theorem head_context_form {a b : List (Letter C H)} {q : H} (hn : terminalLeave (a++ .head q::b)) (h : shape (a++ .head q::b) ≠ .zero) : ∃ (l r : List C) (lb rb : Bool), a = (if lb then [.enter] else []) ++ l.reverse.map .left ∧ b = r.map .right ++ (if rb then [.leave] else []) := by …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letter, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.terminalLeave, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.head_frameline 706Source documentation
Extract the containing sector in an arbitrary path context. The same surrounding sector list works after any head change, or any added left and right loops. No claim that sector boundaries survive arbitrary attachment of context is built into the statement.
theorem head_frame (x y : List (Letter C H)) (q : H) (h : shape (x++[.head q]++y) ≠ .zero) : ∃ cs ds l r lb rb, ∀ (q' : H) (ls rs : List C), cuts (x++ls.map .left++[.head q']++rs.map .right++y) = cs ++ [headed (ls.reverse++l) q' (rs++r) lb rb] ++ ds := by …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letter, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.cuts, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.headed
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.split_right_contextline 726 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.general_context_frameline 743Source documentation
A two-sided delimiter frame, valid even for replacements which change the number of heads or create/delete internal visits to the outer vertex.
theorem general_context_frame (x y : List (Letter C H)) : ∃ cs a b ds, (.leave : Letter C H) ∉ a ∧ terminalLeave b ∧ (∀ u, cuts (x++u++y) = cs ++ cuts (a++u++b) ++ ds) := by …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letter, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.terminalLeave, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.cuts
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.word_frameline 768Source documentation
Around a fixed head every path context is exactly an arbitrary prefix of finished sectors, an optional alpha and left loops, right loops and an optional omega, and an arbitrary suffix of sectors. This uniform literal identity is also valid for merge and unmerge replacements.
theorem word_frame (x y : List (Letter C H)) (q : H) (h : shape (x++[.head q]++y) ≠ .zero) : ∃ (cs ds : List (List (Letter C H))) (l r : List C) (lb rb : Bool), ∀ u, cuts (x++u++y) = cs ++ cuts (((if lb then [.enter] else []) ++ l.reverse.map .left) ++ u ++ (r.map .right ++ (if rb then [.leave] else []))) ++ ds := by …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letter, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.cuts
- def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.prepareChunkline 794Source documentation
Preprocessing is applied only to headed sectors. Headless pieces retain their literal words; no implicit boundary or identity generator is added.
def prepareChunk (P : Sector C H → List (Sector C H)) (w : List (Letter C H)) : List (List (Letter C H)) := …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Sector, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letter
- def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.prepareChunksline 800 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.prepareline 803 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.prepareChunk_encodeline 806 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.prepareChunks_appendline 809 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.prepareChunks_singletonline 814 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.prepare_context_headedline 820Source documentation
All ordinary compiler rules can be checked on a sector with arbitrary extra zipper cells. This theorem transports those checks into arbitrary literal word contexts, without a cleanliness or boundary promise.
theorem prepare_context_headed (P : Sector C H → List (Sector C H)) (x y : List (Letter C H)) (l₁ l₂ r₁ r₂ : List C) (q₁ q₂ : H) (h : shape (x++headed l₁ q₁ r₁ false false++y) ≠ .zero) (hinv : ∀ (l r : List C) (lb rb : Bool), P ⟨l₁++l,q₁,r₁++r,lb,rb⟩ = P ⟨l₂++l,q₂,r₂++r,lb,rb⟩) : prepare P (x++headed l₁ q₁ r₁ false false++y) = prepare P (x++headed l₂ q₂ r₂ false false++y) := by …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Sector, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letter, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.headed, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.prepare
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.prefix_end_enterline 848 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.suffix_begin_leaveline 863 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.left_boundary_frameline 870 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.right_boundary_frameline 891 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.prepare_context_left_boundaryline 922 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.prepare_context_right_boundaryline 933 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.cuts_join_headedline 948 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Path.prepare_context_mergeline 960Source documentation
Literal merge invariance in every well-typed context, including incomplete and dirty outer sectors. The two visits to the outer vertex are explicit.
theorem prepare_context_merge (P : Sector C H → List (Sector C H)) (x y : List (Letter C H)) (q p : H) (c d : C) (h : shape (x++[.head q,.leave,.enter,.head q]++y) ≠ .zero) (hinv : ∀ (l r : List C) (lb rb : Bool), P ⟨c::l,p,d::r,lb,rb⟩ = P ⟨l,q,[],lb,true⟩ ++ P ⟨[],q,r,true,rb⟩) : prepare P (x++[.head q,.leave,.enter,.head q]++y) = prepare P (x++[.left c,.head p,.right d]++y) := by …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Sector, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.Letter, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.shape, OAI.FiniteAlgebraicEnvelopes.Compiler.Path.prepare