OAI/Computability/Superstring/Attachments.lean
21 declarations, 0 contain sorry, 0 declared as axioms
- theorem
OAI.Superstring.Hierarchical.LayerCollection.attach_layerline 11Source documentation
Complete one touched base layer and splice it into the rooted walk. Only this layer's base turn and its one geometric connection are charged.
theorem attach_layer (closed : SubstringClosed V) (g : G) (i : Fin (C.size g)) (P : Path V [] []) (F : Loop V) (hcF : F.cost ≤ C.period g) (ht : (C.layer g i).TouchedBy F.path) (hmeet : (Loop.mk [] P).Meets F) : ∃ Q : Path V [] [], Q.cost ≤ P.cost + 2 * C.period g ∧ (∀ w, P.Visits w → Q.Visits w) ∧ ∀ w ∈ (C.layer g i).Content, Q.Visits w := by …Mentions: OAI.Superstring.Hierarchical.SubstringClosed, OAI.Superstring.Hierarchical.Path, OAI.Superstring.Hierarchical.Loop
- theorem
OAI.Superstring.Hierarchical.LayerCollection.root_belowline 29Source documentation
Root each as-yet-unspent layer below the chosen recipient baseline. The baseline itself is already fully retained by the incoming-request operation.
theorem root_below (closed : SubstringClosed V) (g : G) (base : Fin (C.size g)) (P : Path V [] []) (hp : ∀ w ∈ (C.layer g base).Content, P.Visits w) (a b : ℤ) (hbf : (C.layer g base).first a ≤ b) (hbl : b ≤ (C.layer g base).last a) (hlen : b - a < 2 * C.period g) (I : Finset (Fin (C.size g))) (hbelow : ∀ i ∈ I, i ≤ base) : ∃ Q : Path V [] [], Q.cost ≤ P.cost + 2 * (I.card * C.period g) ∧ (∀ w, P.Visits w → Q.Visits w) ∧ ∀ i ∈ I, ∀ w ∈ (C.layer g i).Content, Q.Visits w := by …Mentions: OAI.Superstring.Hierarchical.SubstringClosed, OAI.Superstring.Hierarchical.Path
- theorem
OAI.Superstring.Hierarchical.LayerCollection.root_upper_budgetline 61Source documentation
Easy upper round-trip branch, including all upper base turns.
theorem root_upper_budget (closed : SubstringClosed V) (g : G) (I : Finset (Fin (C.size g))) (top : Fin (C.size g)) (hupper : ∀ i ∈ I, i ≤ top) (t : ℤ) (hcost : (C.layer g top).first t - t ≤ (I.card * C.period g : ℕ)) : ∃ Q : Path V [] [], Q.cost ≤ 2 * (I.card * C.period g) ∧ ∀ i ∈ I, ∀ w ∈ (C.layer g i).Content, Q.Visits w := by …Mentions: OAI.Superstring.Hierarchical.SubstringClosed, OAI.Superstring.Hierarchical.Path
- theorem
OAI.Superstring.Hierarchical.LayerCollection.attach_upper_bandline 88Source documentation
Easy upper band branch, paid only by upper layers, not by the already rooted baseline's budget.
theorem attach_upper_band (closed : SubstringClosed V) (g : G) (I : Finset (Fin (C.size g))) (base top : Fin (C.size g)) (horder : ∀ i ∈ I, base ≤ i ∧ i ≤ top) (hbt : base ≤ top) (P : Path V [] []) (hp : ∀ w ∈ (C.layer g base).Content, P.Visits w) (t : ℤ) (hband : (C.layer g top).first t - (C.layer g base).last t ≤ (I.card * C.period g : ℕ)) : ∃ Q : Path V [] [], Q.cost ≤ P.cost + 2 * (I.card * C.period g) ∧ (∀ w, P.Visits w → Q.Visits w) ∧ ∀ i ∈ I, ∀ w ∈ (C.layer g i).Content, Q.Visits w := by …Mentions: OAI.Superstring.Hierarchical.SubstringClosed, OAI.Superstring.Hierarchical.Path
- abbrev
OAI.Superstring.Hierarchical.LayerCollection.Pendingline 131 - def
OAI.Superstring.Hierarchical.LayerCollection.Pending.sourceline 135 - def
OAI.Superstring.Hierarchical.LayerCollection.Pending.idsline 136 - def
OAI.Superstring.Hierarchical.LayerCollection.Pending.reserveline 137 - theorem
OAI.Superstring.Hierarchical.LayerCollection.Pending.laterline 139 - theorem
OAI.Superstring.Hierarchical.LayerCollection.Pending.sameline 141 - def
OAI.Superstring.Hierarchical.LayerCollection.upperline 145 - theorem
OAI.Superstring.Hierarchical.LayerCollection.mem_upperline 148 - theorem
OAI.Superstring.Hierarchical.LayerCollection.card_upperline 151 - def
OAI.Superstring.Hierarchical.LayerCollection.Coveredline 167 - theorem
OAI.Superstring.Hierarchical.LayerCollection.complete_upperline 174Source documentation
Complete exactly the unspent upper interval. The failed count test is resolved by the proved record supply, not taken as a plan oracle.
theorem complete_upper (closed : SubstringClosed V) (supply : C.RecordSupply) (g : G) (cut : ℕ) (hcut : cut ≤ C.size g) (P : Path V [] []) (hp : ∀ i : Fin (C.size g), i.val < cut → ∀ w ∈ (C.layer g i).Content, P.Visits w) : ∃ (Q : Path V [] []) (B : Finset C.PlannedBlock) (R : Finset C.Pending), Q.cost + (∑ b ∈ B, b.reserve) + (∑ r ∈ R, r.reserve) ≤ P.cost + 2 * ((C.size g - cut) * C.period g) ∧ (∀ w, P.Visits w → Q.Visits w) ∧ (∀ i ∈ C.upper g cut, C.Covered Q B R ⟨g, i⟩) ∧ (∀ r ∈ R, r.source = g) ∧ R.card ≤ 1 := by …Mentions: OAI.Superstring.Hierarchical.SubstringClosed, OAI.Superstring.Hierarchical.Path
- def
OAI.Superstring.Hierarchical.LayerCollection.Pending.onTargetline 307 - theorem
OAI.Superstring.Hierarchical.LayerCollection.Pending.at_sourceline 309 - theorem
OAI.Superstring.Hierarchical.LayerCollection.Pending.at_budgetline 313 - theorem
OAI.Superstring.Hierarchical.LayerCollection.Pending.at_idsline 317 - theorem
OAI.Superstring.Hierarchical.LayerCollection.fulfill_fibreline 324Source documentation
Fulfill precisely the pending requests on one fixed recipient.
theorem fulfill_fibre (closed : SubstringClosed V) (d : C.Id) (R : Finset C.Pending) (hne : R.Nonempty) (ht : ∀ r ∈ R, r.1 = d) (distinct : Set.InjOn Pending.source (R : Set C.Pending)) : ∃ Q : Path V [] [], Q.cost ≤ 2 * C.period d.1 + ∑ r ∈ R, r.reserve ∧ (∀ w ∈ (C.layerAt d).Content, Q.Visits w) ∧ ∀ r ∈ R, ∀ i ∈ r.ids, ∀ w ∈ (C.layerAt i).Content, Q.Visits w := by …Mentions: OAI.Superstring.Hierarchical.SubstringClosed, OAI.Superstring.Hierarchical.LayerCollection.Pending.source, OAI.Superstring.Hierarchical.Path
- theorem
OAI.Superstring.Hierarchical.LayerCollection.fulfill_allline 352