Test.agda 936 B

12345678910111213141516171819202122232425
  1. module Test where
  2. open import LF
  3. open import IID
  4. -- r←→gArgs-subst eliminates the identity proof stored in the rArgs. If this proof is
  5. -- by reflexivity r←→gArgs-subst is a definitional identity. This is the case
  6. -- when a = g→rArgs a'
  7. r←→gArgs-subst-identity :
  8. {I : Set}(γ : OPg I)(U : I -> Set)
  9. (C : (i : I) -> rArgs (ε γ) U i -> Set)
  10. (a' : Args γ U) ->
  11. let a = g→rArgs γ U a'
  12. i = index γ U a' in
  13. (h : C (index γ U (r→gArgs γ U i a))
  14. (g→rArgs γ U (r→gArgs γ U i a))
  15. ) -> r←→gArgs-subst γ U C i a h ≡ h
  16. r←→gArgs-subst-identity (ι i) U C _ h = refl-≡
  17. r←→gArgs-subst-identity (σ A γ) U C arg h = r←→gArgs-subst-identity (γ (π₀ arg)) U C' (π₁ arg) h
  18. where C' = \i c -> C i (π₀ arg , c)
  19. r←→gArgs-subst-identity (δ H i γ) U C arg h = r←→gArgs-subst-identity γ U C' (π₁ arg) h
  20. where C' = \i c -> C i (π₀ arg , c)