Issue982.quick.tex 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. \documentclass{article}
  2. \usepackage{agda}
  3. \begin{document}
  4. %\renewcommand{\AgdaIndent}{\;\;}
  5. \begin{code}%
  6. \>[0]\AgdaKeyword{record}\AgdaSpace{}%
  7. \AgdaRecord{Sigma}\AgdaSpace{}%
  8. \AgdaSymbol{(}\AgdaBound{A}\AgdaSpace{}%
  9. \AgdaSymbol{:}\AgdaSpace{}%
  10. \AgdaPrimitive{Set}\AgdaSymbol{)}\AgdaSpace{}%
  11. \AgdaSymbol{(}\AgdaBound{B}\AgdaSpace{}%
  12. \AgdaSymbol{:}\AgdaSpace{}%
  13. \AgdaBound{A}\AgdaSpace{}%
  14. \AgdaSymbol{→}\AgdaSpace{}%
  15. \AgdaPrimitive{Set}\AgdaSymbol{)}\AgdaSpace{}%
  16. \AgdaSymbol{:}\AgdaSpace{}%
  17. \AgdaPrimitive{Set}\AgdaSpace{}%
  18. \AgdaKeyword{where}\<%
  19. \\
  20. \>[0][@{}l@{\AgdaIndent{0}}]%
  21. \>[2]\AgdaKeyword{constructor}\AgdaSpace{}%
  22. \AgdaOperator{\AgdaInductiveConstructor{\AgdaUnderscore{},\AgdaUnderscore{}}}\<%
  23. \\
  24. %
  25. \>[2]\AgdaKeyword{field}\<%
  26. \\
  27. \>[2][@{}l@{\AgdaIndent{0}}]%
  28. \>[4]\AgdaField{proj₁}\AgdaSpace{}%
  29. \AgdaSymbol{:}\AgdaSpace{}%
  30. \AgdaBound{A}\<%
  31. \\
  32. %
  33. \>[4]\AgdaField{proj₂}\AgdaSpace{}%
  34. \AgdaSymbol{:}\AgdaSpace{}%
  35. \AgdaBound{B}\AgdaSpace{}%
  36. \AgdaField{proj₁}\<%
  37. \\
  38. %
  39. \\[\AgdaEmptyExtraSkip]%
  40. \>[0]\AgdaKeyword{open}\AgdaSpace{}%
  41. \AgdaModule{Sigma}\AgdaSpace{}%
  42. \AgdaKeyword{public}\<%
  43. \end{code}
  44. \begin{code}%
  45. \>[0]\AgdaFunction{uncurry}\AgdaSpace{}%
  46. \AgdaSymbol{:}%
  47. \>[21I]\AgdaSymbol{\{}\AgdaBound{A}\AgdaSpace{}%
  48. \AgdaSymbol{:}\AgdaSpace{}%
  49. \AgdaPrimitive{Set}\AgdaSymbol{\}}\AgdaSpace{}%
  50. \AgdaSymbol{\{}\AgdaBound{B}\AgdaSpace{}%
  51. \AgdaSymbol{:}\AgdaSpace{}%
  52. \AgdaBound{A}\AgdaSpace{}%
  53. \AgdaSymbol{→}\AgdaSpace{}%
  54. \AgdaPrimitive{Set}\AgdaSymbol{\}}\AgdaSpace{}%
  55. \AgdaSymbol{\{}\AgdaBound{C}\AgdaSpace{}%
  56. \AgdaSymbol{:}\AgdaSpace{}%
  57. \AgdaRecord{Sigma}\AgdaSpace{}%
  58. \AgdaBound{A}\AgdaSpace{}%
  59. \AgdaBound{B}\AgdaSpace{}%
  60. \AgdaSymbol{→}\AgdaSpace{}%
  61. \AgdaPrimitive{Set}\AgdaSymbol{\}}\AgdaSpace{}%
  62. \AgdaSymbol{→}\<%
  63. \\
  64. \>[.][@{}l@{}]\<[21I]%
  65. \>[10]\AgdaSymbol{((}\AgdaBound{x}\AgdaSpace{}%
  66. \AgdaSymbol{:}\AgdaSpace{}%
  67. \AgdaBound{A}\AgdaSymbol{)}\AgdaSpace{}%
  68. \AgdaSymbol{→}\AgdaSpace{}%
  69. \AgdaSymbol{(}\AgdaBound{y}\AgdaSpace{}%
  70. \AgdaSymbol{:}\AgdaSpace{}%
  71. \AgdaBound{B}\AgdaSpace{}%
  72. \AgdaBound{x}\AgdaSymbol{)}\AgdaSpace{}%
  73. \AgdaSymbol{→}\AgdaSpace{}%
  74. \AgdaBound{C}\AgdaSpace{}%
  75. \AgdaSymbol{(}\AgdaBound{x}\AgdaSpace{}%
  76. \AgdaOperator{\AgdaInductiveConstructor{,}}\AgdaSpace{}%
  77. \AgdaBound{y}\AgdaSymbol{))}\AgdaSpace{}%
  78. \AgdaSymbol{→}\<%
  79. \\
  80. %
  81. \>[10]\AgdaSymbol{((}\AgdaBound{p}\AgdaSpace{}%
  82. \AgdaSymbol{:}\AgdaSpace{}%
  83. \AgdaRecord{Sigma}\AgdaSpace{}%
  84. \AgdaBound{A}\AgdaSpace{}%
  85. \AgdaBound{B}\AgdaSymbol{)}\AgdaSpace{}%
  86. \AgdaSymbol{→}\AgdaSpace{}%
  87. \AgdaBound{C}\AgdaSpace{}%
  88. \AgdaBound{p}\AgdaSymbol{)}\<%
  89. \\
  90. \>[0]\AgdaFunction{uncurry}\AgdaSpace{}%
  91. \AgdaBound{f}\AgdaSpace{}%
  92. \AgdaSymbol{(}\AgdaBound{x}\AgdaSpace{}%
  93. \AgdaOperator{\AgdaInductiveConstructor{,}}\AgdaSpace{}%
  94. \AgdaBound{y}\AgdaSymbol{)}\AgdaSpace{}%
  95. \AgdaSymbol{=}\AgdaSpace{}%
  96. \AgdaBound{f}\AgdaSpace{}%
  97. \AgdaBound{x}\AgdaSpace{}%
  98. \AgdaBound{y}\<%
  99. \end{code}
  100. \end{document}