Use a unified representation for all trace types
This commit is contained in:
@@ -99,15 +99,18 @@ lemma walkPrefix : ∀ {s₂ s : prog.State} {ρ₂ ρin : Env}
|
||||
⟦ joinForKey s₂ (result L prog) ⟧ (S.Pre trₗ) →
|
||||
⟦ joinForKey s (result L prog) ⟧ (S.Pre (trₗ ++ mid)) := by
|
||||
intro s₂ s ρ₂ ρin mid
|
||||
induction mid with
|
||||
| nil => intro s₁ ρ₁ trₗ hjoin; simpa [HAppend.hAppend, Traceₗ.append] using hjoin
|
||||
| cons hnode hedge rest ih =>
|
||||
match mid with
|
||||
| Traceₗ.nil =>
|
||||
intro s₁ ρ₁ trₗ hjoin
|
||||
simpa only [HAppend.hAppend, Path.append_nil] using hjoin
|
||||
| Traceₗ.cons hnode hedge rest =>
|
||||
intro s₁ ρ₁ trₗ hjoin
|
||||
have hstep := stepTrace trₗ hjoin hnode
|
||||
have hmem := FiniteMap.mem_valuesAt prog.states_nodup
|
||||
(prog.mem_incoming_of_edge hedge) (variablesAt_mem _ (result L prog))
|
||||
simpa [HAppend.hAppend, Traceₗ.append] using
|
||||
ih ((trₗ ++ hnode).addEdge hedge)
|
||||
simpa only [HAppend.hAppend, Traceₗ.appendStep, Trace.addEdge,
|
||||
Path.append_assoc, Path.single, Path.append] using
|
||||
walkPrefix rest ((trₗ ++ hnode).addEdge hedge)
|
||||
(interp_foldr (S.post_pre (trₗ ++ hnode) hedge hstep) hmem)
|
||||
|
||||
omit [DecidableEq L] in
|
||||
|
||||
Reference in New Issue
Block a user