Theory BMSSP_Runtime_Instance
theory BMSSP_Runtime_Instance
imports BMSSP_Top_Level_Bounds BMSSP_Executable_Base_Case
begin
section ‹A Concrete Non-Vacuous Instance of the Runtime Locale›
text ‹
The asymptotic running-time headline lives in the
@{locale bounded_reduced_positive_instance} locale, whose interpretation
yields the closed theorem @{thm [source]
bmssp_runtime_headline_instance.bmssp_runtime_bigo_target}. A locale theorem
only carries content once the locale is shown to be inhabited. This theory
exhibits a concrete, non-trivial graph---the unit-weight directed path
‹0 → 1 → 2 → 3›---and discharges every assumption of that locale,
obtaining the ‹O(m * (ln n) powr (2 / 3))› bound for it as a closed,
assumption-free statement. This certifies that the runtime headline is not
vacuously true.
Uniqueness of shortest walks---the only non-routine locale assumption---is
obtained from the verified simple-walk enumerator
@{const exec_simple_walks_betw}: on this graph the enumerator returns exactly
one simple walk to each vertex, so any two shortest walks to a vertex
coincide.
›
definition path_vs :: "nat list" where
"path_vs = [0, 1, 2, 3]"
definition path_es :: "(nat × nat) list" where
"path_es = [(0, 1), (1, 2), (2, 3)]"
definition path_V :: "nat set" where
"path_V = set path_vs"
definition path_E :: "(nat × nat) set" where
"path_E = set path_es"
definition path_weight :: "nat ⇒ nat ⇒ real" where
"path_weight u v = (if (u, v) ∈ path_E then 1 else 0)"
lemma path_vs_V: "set path_vs = path_V"
unfolding path_V_def by (rule refl)
lemma path_es_E: "set path_es = path_E"
unfolding path_E_def by (rule refl)
lemma path_positive_weight: "(u, v) ∈ path_E ⟹ 0 < path_weight u v"
unfolding path_weight_def by simp
lemma path_finite_weighted_digraph:
"finite_weighted_digraph path_V path_E path_weight 0"
unfolding finite_weighted_digraph_def
path_V_def path_vs_def path_E_def path_es_def path_weight_def
by auto