Bounded execution of the first-witness extraction procedure
ProvedLax689794Proofs.Fun.E6b.extractFirst_runsalgorithmsgraph-theorytreewidth
On a well-formed graph word and a nice decomposition satisfying the extraction invariant, the functional machine returns the encoded result of first-witness extraction. The cost includes both computing the characteristic tables and reconstructing a witness when the root table is nonempty.
Preamble
import Definitions.Def_BodlaenderKloks_CharacteristicTables
import Definitions.Def_BodlaenderKloks_FunctionalMachine
import Definitions.Def_BodlaenderKloks_TreeDecompositionPrograms
import Definitions.Def_EdgeSublinearMWIS_Main_NativeSchemeInterfaces
import Definitions.Def_EdgeSublinearMWIS_Main_NativeWordRAM
import Definitions.Def_Lax228581_Treewidth
import Definitions.Def_Lax689794_GraphWords
import Mathlib.Algebra.BigOperators.Group.Finset.Sigma
import Mathlib.Algebra.BigOperators.Intervals
import Mathlib.Combinatorics.Enumerative.DoubleCounting
import Mathlib.Combinatorics.SimpleGraph.Acyclic
import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected
import Mathlib.Combinatorics.SimpleGraph.Maps
import Mathlib.Combinatorics.SimpleGraph.Metric
import Mathlib.Data.Finset.Card
import Mathlib.Data.Finset.Image
import Mathlib.Data.Finset.Option
import Mathlib.Data.Finset.Powerset
import Mathlib.Data.Finset.Sigma
import Mathlib.Data.Finset.Sort
import Mathlib.Data.Finset.Sum
import Mathlib.Data.Finset.Union
import Mathlib.Data.List.Basic
import Mathlib.Data.List.Dedup
import Mathlib.Data.List.Forall2
import Mathlib.Data.List.GetD
import Mathlib.Data.List.Induction
import Mathlib.Data.List.Sort
import Mathlib.Data.List.Sublists
import Mathlib.Data.Nat.Lattice
import Mathlib.Data.Set.Basic
import Mathlib.Data.Set.Card
import Mathlib.Logic.Relation
import Mathlib.Order.Interval.Finset.Nat
import Mathlib.Tactic
set_option linter.unusedSectionVars false
set_option linter.unusedTactic false
set_option linter.unreachableTactic false
set_option linter.unusedSimpArgs false
set_option maxRecDepth 100000
set_option maxHeartbeats 1000000
open Lax689794Proofs Lax689794Proofs.Fun
open Lax689794Proofs Lax689794Proofs.Fun Lax689794Proofs.Fun.E6b
open ToVal Lax689794Proofs.Seq Lax689794Proofs.Chars Lax689794Proofs.Trees CT
open Lax689794Proofs.Fun.E4 (adjOfWord nOfWord ntOk)
variable {Δ' : ℕ → Option Tm} (hΔ : Ext6 Δ')
include hΔFormal statement
theorem Lax689794Proofs.Fun.E6b.extractFirst_runs (B : ℕ) (x : List ℕ) (k : ℕ) (nt : NT) (M : ℕ) (hxM : x.length ≤ M)
(hsM : sz nt ≤ M) (hmM : mx nt ≤ M) (hok : ExtOk x k nt)
(hn : (nOfWord x) ^ 2 < B) (hk : k + 2 < B)
(hB : (nt.size * E4.cnode M k + nt.size ^ 2 * Wx M k + 30 + 2) ^ 2 < B) :
Runs Δ' B fExtractFirst [toVal x, toVal k, toVal nt] (toVal (extractFirst (adjOfWord x) k nt))
(nt.size * E4.cnode M k + nt.size ^ 2 * Wx M k + 30) := by sorrySource