IID-Proof-Test.agda 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. module IID-Proof-Test where
  2. open import LF
  3. open import Identity
  4. open import IID
  5. open import IIDr
  6. open import DefinitionalEquality
  7. open import IID-Proof-Setup
  8. η : {I : Set}(γ : OPg I)(U : I -> Set) -> Args γ U -> Args γ U
  9. η (ι i) U _ = ★
  10. η (σ A γ) U a = < a₀ | η (γ a₀) U a₁ >
  11. where
  12. a₀ = π₀ a
  13. a₁ = π₁ a
  14. η (δ A i γ) U a = < a₀ | η γ U a₁ >
  15. where
  16. a₀ = π₀ a
  17. a₁ = π₁ a
  18. r←→gArgs-equal :
  19. {I : Set}(γ : OPg I)(U : I -> Set)
  20. (i : I)(a : Args (ε γ i) U) ->
  21. _==_ {I × \i -> Args (ε γ i) U}
  22. < index γ U (r→gArgs γ U i a) |
  23. g→rArgs γ U (r→gArgs γ U i a)
  24. > < i | a >
  25. r←→gArgs-equal {I} (ι i) U j < p | ★ > = elim== i (\k q -> _==_ {I × \k -> Args (ε (ι i) k) U}
  26. < i | < refl | ★ > >
  27. < k | < q | ★ > >
  28. ) refl j p
  29. r←→gArgs-equal {I} (σ A γ) U j < a | b > = cong f ih
  30. where ih = r←→gArgs-equal (γ a) U j b
  31. f : (I × \i -> Args (ε (γ a) i) U) -> (I × \i -> Args (ε (σ A γ) i) U)
  32. f < k | q > = < k | < a | q > >
  33. r←→gArgs-equal {I} (δ H i γ) U j < g | b > = cong f ih
  34. where ih = r←→gArgs-equal γ U j b
  35. f : (I × \k -> Args (ε γ k) U) -> (I × \k -> Args (ε (δ H i γ) k) U)
  36. f < k | q > = < k | < g | q > >
  37. {-
  38. r←→gArgs-subst-identity' :
  39. {I : Set}(γ : OPg I) ->
  40. (\(U : I -> Set)(C : (i : I) -> rArgs (ε γ) U i -> Set)
  41. (a : Args γ U)(h : C (index γ U (r→gArgs γ U (index γ U (η γ U a)) (g→rArgs γ U (η γ U a))))
  42. (g→rArgs γ U (r→gArgs γ U (index γ U (η γ U a)) (g→rArgs γ U (η γ U a))))
  43. ) -> r←→gArgs-subst γ U C (index γ U (η γ U a)) (g→rArgs γ U (η γ U a)) h
  44. ) ==¹
  45. (\(U : I -> Set)(C : (i : I) -> rArgs (ε γ) U i -> Set)
  46. (a : Args γ U)(h : C (index γ U (r→gArgs γ U (index γ U (η γ U a)) (g→rArgs γ U (η γ U a))))
  47. (g→rArgs γ U (r→gArgs γ U (index γ U (η γ U a)) (g→rArgs γ U (η γ U a))))
  48. ) -> h
  49. )
  50. r←→gArgs-subst-identity' (ι i) = refl¹
  51. r←→gArgs-subst-identity' (σ A γ) = ?
  52. r←→gArgs-subst-identity' (δ A i γ) = subst¹ (\ ∙ -> f ∙ ==¹ f (\U C a h -> h))
  53. (r←→gArgs-subst-identity' γ) ?
  54. where
  55. ih = r←→gArgs-subst-identity' γ
  56. f = \g U C a h -> g U (\i c -> C i < π₀ a | c >) (π₁ a) h
  57. -}