Nat-double.tex 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. \begin{code}%
  2. %% \>[0]\<%
  3. %% \\
  4. %% \>[0]\AgdaKeyword{open}\AgdaSpace{}%
  5. %% \AgdaKeyword{import}\AgdaSpace{}%
  6. %% \AgdaModule{Level}\AgdaSpace{}%
  7. %% \AgdaKeyword{using}\AgdaSpace{}%
  8. %% \AgdaSymbol{(}\AgdaPrimitive{zero}\AgdaSymbol{)}\<%
  9. %% \\
  10. %% %
  11. %% \\[\AgdaEmptyExtraSkip]%
  12. %% \>[0]\AgdaKeyword{module}\AgdaSpace{}%
  13. %% \AgdaModule{Nat}\AgdaSpace{}%
  14. %% \AgdaKeyword{where}\<%
  15. %% \\
  16. %% %
  17. %% \\[\AgdaEmptyExtraSkip]%
  18. %% \>[0]\AgdaKeyword{data}\AgdaSpace{}%
  19. %% \AgdaDatatype{ℕ}\AgdaSpace{}%
  20. %% \AgdaSymbol{:}\AgdaSpace{}%
  21. %% \AgdaPrimitiveType{Set}\AgdaSpace{}%
  22. %% \AgdaPrimitive{zero}\AgdaSpace{}%
  23. %% \AgdaKeyword{where}\<%
  24. %% \\
  25. %% \>[0][@{}l@{\AgdaIndent{0}}]%
  26. %% \>[2]\AgdaInductiveConstructor{0\#}\AgdaSpace{}%
  27. %% \AgdaSymbol{:}\AgdaSpace{}%
  28. %% \AgdaDatatype{ℕ}\<%
  29. %% \\
  30. %% %
  31. %% \>[2]\AgdaInductiveConstructor{suc}\AgdaSpace{}%
  32. %% \AgdaSymbol{:}\AgdaSpace{}%
  33. %% \AgdaDatatype{ℕ}\AgdaSpace{}%
  34. %% \AgdaSymbol{→}\AgdaSpace{}%
  35. %% \AgdaDatatype{ℕ}\<%
  36. %% \\
  37. %% %
  38. %% \\[\AgdaEmptyExtraSkip]%
  39. \>[0]\AgdaFunction{double}\AgdaSpace{}%
  40. \AgdaSymbol{:}\AgdaSpace{}%
  41. \AgdaDatatype{ℕ}\AgdaSpace{}%
  42. \AgdaSymbol{→}\AgdaSpace{}%
  43. \AgdaDatatype{ℕ}\<%
  44. \\
  45. \>[0]\AgdaFunction{double}\AgdaSpace{}%
  46. \AgdaInductiveConstructor{0\#}\AgdaSpace{}%
  47. \AgdaSymbol{=}\AgdaSpace{}%
  48. \AgdaInductiveConstructor{0\#}\<%
  49. \\
  50. \>[0]\AgdaFunction{double}\AgdaSpace{}%
  51. \AgdaSymbol{(}\AgdaInductiveConstructor{suc}\AgdaSpace{}%
  52. \AgdaBound{n}\AgdaSymbol{)}\AgdaSpace{}%
  53. \AgdaSymbol{=}\AgdaSpace{}%
  54. \AgdaInductiveConstructor{suc}\AgdaSpace{}%
  55. \AgdaSymbol{(}\AgdaInductiveConstructor{suc}\AgdaSpace{}%
  56. \AgdaSymbol{(}\AgdaFunction{double}\AgdaSpace{}%
  57. \AgdaBound{n}\AgdaSymbol{))}\<%
  58. \\
  59. \>[0]\<%
  60. \end{code}