diff --git a/Language/Properties.agda b/Language/Properties.agda index 70c56a5..e018874 100644 --- a/Language/Properties.agda +++ b/Language/Properties.agda @@ -52,3 +52,26 @@ Trace-∙ʳ g₁ g₂ {idx₁} (Trace-edge ρ₁⇒ρ idx₁→idx tr') rewrite sym (lookup-++ʳ (Graph.nodes g₁) (Graph.nodes g₂) idx₁) = Trace-edge ρ₁⇒ρ (ListMemProp.∈-++⁺ʳ _ (x∈xs⇒fx∈fxs (Graph.size g₁ ↑ʳ_) idx₁→idx)) (Trace-∙ʳ g₁ g₂ tr') + +Trace-↦ˡ : ∀ (g₁ g₂ : Graph) {idx₁ idx₂ : Graph.Index g₁} {ρ₁ ρ₂ : Env} → + Trace {g₁} idx₁ idx₂ ρ₁ ρ₂ → + Trace {g₁ ↦ g₂} (idx₁ Fin.↑ˡ Graph.size g₂) (idx₂ Fin.↑ˡ Graph.size g₂) ρ₁ ρ₂ +Trace-↦ˡ g₁ g₂ {idx₁} {idx₁} (Trace-single ρ₁⇒ρ₂) + rewrite sym (lookup-++ˡ (Graph.nodes g₁) (Graph.nodes g₂) idx₁) = + Trace-single ρ₁⇒ρ₂ +Trace-↦ˡ g₁ g₂ {idx₁} (Trace-edge ρ₁⇒ρ idx₁→idx tr') + rewrite sym (lookup-++ˡ (Graph.nodes g₁) (Graph.nodes g₂) idx₁) = + Trace-edge ρ₁⇒ρ (ListMemProp.∈-++⁺ˡ (x∈xs⇒fx∈fxs (_↑ˡ Graph.size g₂) idx₁→idx)) + (Trace-↦ˡ g₁ g₂ tr') + +Trace-↦ʳ : ∀ (g₁ g₂ : Graph) {idx₁ idx₂ : Graph.Index g₂} {ρ₁ ρ₂ : Env} → + Trace {g₂} idx₁ idx₂ ρ₁ ρ₂ → + Trace {g₁ ↦ g₂} (Graph.size g₁ Fin.↑ʳ idx₁) (Graph.size g₁ Fin.↑ʳ idx₂) ρ₁ ρ₂ +Trace-↦ʳ g₁ g₂ {idx₁} {idx₁} (Trace-single ρ₁⇒ρ₂) + rewrite sym (lookup-++ʳ (Graph.nodes g₁) (Graph.nodes g₂) idx₁) = + Trace-single ρ₁⇒ρ₂ +Trace-↦ʳ g₁ g₂ {idx₁} (Trace-edge ρ₁⇒ρ idx₁→idx tr') + rewrite sym (lookup-++ʳ (Graph.nodes g₁) (Graph.nodes g₂) idx₁) = + Trace-edge ρ₁⇒ρ (ListMemProp.∈-++⁺ʳ (Graph.edges g₁ ↑ˡᵉ Graph.size g₂) + (ListMemProp.∈-++⁺ˡ (x∈xs⇒fx∈fxs (Graph.size g₁ ↑ʳ_) idx₁→idx))) + (Trace-↦ʳ g₁ g₂ tr')