P closure properties — proof internals #
This file contains the proof helpers used by DTIME_union (stated in P.lean).
The key simulation theorem unionTM_decidesInTime establishes that the
composite machine from TM.unionTM correctly decides L₁ ∪ L₂.
theorem
Complexity.TM.unionTM_decidesInTime
{n₁ n₂ : ℕ}
{tm₁ : TM n₁}
{tm₂ : TM n₂}
{L₁ L₂ : Language}
{f₁ f₂ : ℕ → ℕ}
(h₁ : tm₁.DecidesInTime L₁ f₁)
(h₂ : tm₂.DecidesInTime L₂ f₂)
:
The union TM correctly decides L₁ ∪ L₂ with time bound 10·f₁ + f₂.
The factor 10 arises from Phase 1 (f₁ steps), transition (≤ 2·f₁ + 7 steps absorbed into 9·f₁ since f₁ ≥ 1), and Phase 2 (f₂ steps).