IndentingContainer.tex 3.4 KB

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