lemmaoccurrence_query (eqs : S→EquationName) (σ η : ℚ) (u : I→S) (e : IndexI k m n g) :
elementaryQuery eqs g σ η (occurrence eqs (u,e)).1 (occurrence eqs (u,e)).2=
(indexQuery σ η e).realize (fun i=>eqs (u i)) e.2.2.1:=by
proof · 4
lines
rcases e with ⟨j,H,pos,B,C,z,q⟩
dsimp only [occurrence,indexQuery,elementaryQuery,localSampleEquiv,samplePull,
Equiv.prodCongr_apply,Prod.map,Equiv.refl_apply]
exact (query_realize _ _ _ _ _ _ _ _).symm
lemmaoccurrence_demand (eqs : S→EquationName) (σ η : ℚ) (u : I→S) (e : IndexI k m n g) :
allDemand eqs g σ η (occurrence eqs (u,e))=
((indexQuery σ η e).realize (fun i=>eqs (u i)) e.2.2.1).signed familyBase :=by
lemmaslotExpr_append (input : SourceEncoding.Input) (u : Fin t →Fin input.equations.length)
(rest : Listℕ) (j : Fin t) (p : ℕ) (hp : p<4) :
(slotExpr j.val p).eval (inputTuple input u++rest)=(slotExpr j.val p).eval (inputTuple input u) :=by
proof · 5
lines
simp only [slotExpr,AExpr.eval,tupleDigit_append,tupleDigit_eval]
apply drop_head_append
simp only [inputTuple,List.length_cons,SourceEncoding.inputWords_length]
have h := (u j).isLt
omega
lemmafirstExpr_append (input : SourceEncoding.Input) (u : Fin t →Fin input.equations.length)
(rest : Listℕ) :
(firstExpr t).eval (inputTuple input u++rest)=(firstExpr t).eval (inputTuple input u) :=by
proof · 2
lines
simp only [firstExpr,AExpr.eval_sum,List.map_ofFn,Function.comp_def,List.sum_ofFn,AExpr.eval,
equationExpr_append,AExpr.eval_pow,tuple_reg_append input u rest 1 (by decide)]
lemmasecondExpr_append (input : SourceEncoding.Input) (u : Fin t →Fin input.equations.length)
(rest : Listℕ) (h : Fin t →Bool) (pos : Fin t →Fin3) :
(secondExpr h pos).eval (inputTuple input u++rest)=(secondExpr h pos).eval (inputTuple input u) :=by
proof · 6
lines
simp only [secondExpr,AExpr.eval_sum,List.map_ofFn,Function.comp_def,List.sum_ofFn,AExpr.eval,AExpr.eval_pow,
tuple_reg_append input u rest 1 (by decide)]
apply Finset.sum_congr rfl
intro j _
cases h j <;> simp only [Bool.false_eq_true,ite_false,ite_true,AExpr.eval,equationExpr_append,
slotExpr_append input u rest j (pos j).val (by omega),tuple_reg_append input u rest 1 (by decide)]
lemmasecondAddress_append (input : SourceEncoding.Input) (u : Fin t →Fin input.equations.length)
(rest : Listℕ) (h : Fin t →Bool) (pos : Fin t →Fin3) :
(secondAddress h pos).eval (inputTuple input u++rest)=(secondAddress h pos).eval (inputTuple input u) :=by
proof · 1
line
simp only [secondAddress,AExpr.eval,AExpr.eval_pow,tuple_reg_append input u rest 1 (by decide),secondExpr_append]
lemmaqueryWords_append (input : SourceEncoding.Input) (u : Fin t →Fin input.equations.length)
(rest : Listℕ) {h : Fin t →Bool} (T : Query h) (pos : Fin t →Fin3) :
queryWords T pos (inputTuple input u++rest)=queryWords T pos (inputTuple input u) :=by
proof · 2
lines
simp only [queryWords,leftExpr,rightExpr,signExpr,AExpr.eval,signatureLookup_append,secondAddress_append]
cases T.first <;> simp only [Bool.false_eq_true,ite_false,ite_true,firstExpr_append,secondAddress_append]