File size: 1,776 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | import OAI.Algorithms.SubexponentialSAT.LeanCompat
import OAI.Algorithms.SubexponentialSAT.Subexp.AssignmentPairFrontend
import OAI.Algorithms.SubexponentialSAT.SubexpVertexPairComplexity
namespace OAI.Algorithms
/-! Explicit polynomial cost for the physical assignment pair frontend. -/
namespace SubexponentialSAT.Subexp.AssignmentPairFrontend
open BitProgram StructuredCalls
def polynomialBudget (D Ξ : β) (scopes : List (List β)) : β :=
60 * (SubexpVertexPairProgram.polynomialBound D Ξ scopes +
(SubexpPlanAlphabetBase.scopeBytes scopes).length + 4)
theorem sourceBudget_le_polynomial (D Ξ : β) (scopes : List (List β))
(hd : β v : Fin D, IncidencePlanSpec.degree scopes v.val β€ Ξ) :
sourceBudget D Ξ scopes β€ polynomialBudget D Ξ scopes := by
have h := SubexpVertexPairProgram.bound_le_polynomial D Ξ scopes hd
unfold sourceBudget polynomialBudget
omega
theorem primitive_run_polynomial (regs : Fin 16 β Bool) (r Q Ξ D : β)
(scopes : List (List β))
(hd : β v : Fin D, IncidencePlanSpec.degree scopes v.val β€ Ξ) :
β rf, Computation.RunsIn (BitProgram.primitive program).step
(BitProgram.primitiveOverhead program * polynomialBudget D Ξ scopes)
(BitProgram.primitiveCfg program
((inputState regs r Q Ξ D scopes).withPC (some program.entry)))
(BitProgram.primitiveCfg program
((AssignmentInputProgram.inputState rf r Q Ξ D scopes.length
(pairBytes D Ξ scopes)).withPC none)) := by
obtain β¨rf, n, hn, htβ© := program_run regs r Q Ξ D scopes hd
exact β¨rf, BitProgram.primitive_execution program
β¨n, hn.trans (sourceBudget_le_polynomial D Ξ scopes hd), htβ©β©
end SubexponentialSAT.Subexp.AssignmentPairFrontend
end OAI.Algorithms
|