Bookkeeping for one stage of a graded joint recipe
Provedmme_log_joint_recipe_g_stage_composeThis is the bookkeeping rule for one stage of a graded logarithmic joint recipe.
Let be predicates on words of length , and let be levels. Suppose we are given the data of a stage from level to level : a partition of the positions into parts of sizes (an equivalence ), part predicates on words of length such that the parts' sources jointly imply and implies all targets , part stages from to at level , and a continuation recipe of level with source . Let and .
Claim. If for all , , and , then there is a graded joint recipe of level with source such that
Role. This is the composition step used whenever a recipe starts with a stage: the stage contributes its summed rate and multiplies the input count by the product of its type counts, and all dimensions come from the continuation. It is used for the level-3 to level-2 stage of the hashed construction (six parts), and applies equally to the later level-2 to level-1 stage.
Formalization Note. is LogJointRecipeG.stage applied to the given data; the statement is about LogJointRecipeG.inputs, .logOutputs, .a, .b, .c.
import Definitions.Def_mme_graded_integer_regional_step_data open BigOperators MME MME.ProfiledCW MME.RegionRealization set_option autoImplicit false
theorem mme_log_joint_recipe_g_stage_compose {N ell lower parts : ℕ} {P Q : Predicate N}
(level_decreases : lower < ell)
(size : Fin parts → ℕ)
(positions : ((j : Fin parts) × Fin (size j)) ≃ Fin N)
(S T : ∀ j, Predicate (size j))
(source : ∀ i x, (∀ j, S j i (fun r ↦ x (positions ⟨j, r⟩))) → P i x)
(steps : ∀ j, LogPartStageG (size j) lower (S j) (T j))
(target : ∀ i x, Q i x → ∀ j, T j i (fun r ↦ x (positions ⟨j, r⟩)))
(next : LogJointRecipeG N lower Q)
(X Y : ℕ) (α β : ℝ)
(htypes : ∀ j, 1 ≤ (steps j).types ∧ (steps j).types ≤ X)
(hnext1 : 1 ≤ next.inputs) (hnextY : next.inputs ≤ Y)
(hα : α ≤ ∑ j, (steps j).rate) (hβ : β ≤ next.logOutputs) :
∃ R : LogJointRecipeG N ell P,
1 ≤ R.inputs ∧ R.inputs ≤ X ^ parts * Y ∧
α + β ≤ R.logOutputs ∧
R.a = next.a ∧ R.b = next.b ∧ R.c = next.c := by sorry