{"id":13992675,"url":"https://github.com/lclem/agda-kernel","last_synced_at":"2025-07-22T16:31:26.755Z","repository":{"id":45399634,"uuid":"180016003","full_name":"lclem/agda-kernel","owner":"lclem","description":"An experimental Agda kernel for Jupyter","archived":false,"fork":false,"pushed_at":"2022-03-09T13:30:59.000Z","size":20903,"stargazers_count":24,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-09T15:50:43.393Z","etag":null,"topics":["agda","jupyter","jupyter-notebook"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lclem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-07T19:53:21.000Z","updated_at":"2024-01-26T04:12:29.000Z","dependencies_parsed_at":"2022-08-25T14:40:14.525Z","dependency_job_id":null,"html_url":"https://github.com/lclem/agda-kernel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lclem%2Fagda-kernel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lclem%2Fagda-kernel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lclem%2Fagda-kernel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lclem%2Fagda-kernel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lclem","download_url":"https://codeload.github.com/lclem/agda-kernel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227133867,"owners_count":17735815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agda","jupyter","jupyter-notebook"],"created_at":"2024-08-09T14:02:05.180Z","updated_at":"2024-11-29T13:31:05.449Z","avatar_url":"https://github.com/lclem.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook"],"sub_categories":[],"readme":"[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lclem/agda-kernel/master?filepath=example)\n[![Build Status](https://travis-ci.org/lclem/agda-kernel.svg)](https://travis-ci.org/lclem/agda-kernel)\n[![codecov.io](https://codecov.io/github/lclem/agda-kernel/branch/master/graph/badge.svg)](https://codecov.io/github/lclem/agda-kernel)\n[![Jupyter Notebook](https://img.shields.io/badge/jupyter-5.7.8-blue.svg)](https://github.com/jupyter/notebook/releases/tag/5.7.8)\n[![Agda](https://img.shields.io/badge/agda-2.6.0-blue.svg)](https://github.com/agda/agda/releases/tag/v2.6.0)\n[![agda-stdlib](https://img.shields.io/badge/agda--stdlib-1.0.1-blue.svg)](https://github.com/agda/agda-stdlib/releases/tag/v1.0.1)\n\n# agda-kernel\nAn experimental Agda kernel for Jupyter.\nUsed at [Nextjournal](https://nextjournal.com/plfa/ToC) [[nextjournal kernel]](https://github.com/nextjournal/agda-kernel).\n\n![](demo/demo1.gif)\n\nExamples\n--------\n\nYou can launch the following examples directly via the mybinder interface:\n\n\u003c!-- - [example/Lab01.ipynb](https://github.com/lclem/agda-kernel/blob/master/example/Lab01.ipynb) [[binder]](https://mybinder.org/v2/gh/lclem/agda-kernel/master?filepath=/example/Lab01.ipynb).\n\n- [example/Lab02.ipynb](https://github.com/lclem/agda-kernel/blob/master/example/Lab02.ipynb) [[binder]](https://mybinder.org/v2/gh/lclem/agda-kernel/master?filepath=/example/Lab02.ipynb).\n\n- [example/Lab03.ipynb](https://github.com/lclem/agda-kernel/blob/master/example/Lab03.ipynb) [[binder]](https://mybinder.org/v2/gh/lclem/agda-kernel/master?filepath=/example/Lab03.ipynb).\n\n--\u003e\n\n- [example/LabImp.ipynb](https://github.com/lclem/agda-kernel/blob/master/example/LabImp.ipynb) [[binder]](https://mybinder.org/v2/gh/lclem/agda-kernel/master?filepath=example/LabImp.ipynb).\n\nAlternatively, if you have [binder](https://github.com/jupyterhub/binderhub),\nthen you can use [repo2docker](https://github.com/jupyter/repo2docker) locally:\n\n    repo2docker https://github.com/lclem/agda-kernel\n\nInstallation\n------------\n\n    pip install agda_kernel\n    python -m agda_kernel.install\n\n### Syntax highlighting\n\nSyntax highlighting is done separately by [Codemirror](https://codemirror.net/),\nbut unfortunately there is no Agda mode packaged with it.\nA rudimentary Agda mode for Codemirror can be found in ``codemirror-agda/agda.js``.\nIn order to install it, type\n\n    make codemirror-install\n    \n\u003c!-- or follow the manual instructions below:\nLet `dir` be the result of executing the following command\n\n    pip show notebook | grep Location | cut -d ' ' -f 2\n\n(It is something like ``/usr/local/lib/python3.7/site-packages``,\n``~/anaconda3/lib/python3.7/site-packages``,\nor  ``/usr/local/Cellar/jupyter/1.0.0_5/libexec/lib/python3.7/site-packages/``.)\nThen, \n\n    mkdir -p dir/notebook/static/components/codemirror/mode/agda\n    cp codemirror-agda/agda.js dir/notebook/static/components/codemirror/mode/agda\n--\u003e\n\n### Agda extension\n\nIn order to improve the Jupyter interface,\nit is strongly recommended to also install [`agda-extension`](https://github.com/lclem/jupyter_contrib_nbextensions).\n\nFunctionality\n-------------\n\nEach code cell must contain a line of the form ``module A.B.C where``.\nFor instance:\n\n```agda\nmodule A.B.C where\n\nid : {A : Set} → A → A\nid x = x\n```\n\nUpon execution, the file `A/B/C.agda` is created containing the cell's contents,\nand it is fed to the Agda interpreter (via `agda --interaction`).\nThe results of typechecking the cell are then displayed.\n\nAfter a cell has been evaluated, one can\n\n- Run Agsy (auto) by putting the cursor next to a goal `?` and hitting TAB.\nThe hole `?` is replaced by the result returned by Agsy, if any,\nor by `{! !}` if no result was found.\nIf there is more than one result, the first ten of them are presented for the user to choose from.\n\n- Refine the current goal by putting the cursor next to a goal `{! !}` and hitting TAB.\nAn optional variable can be provided for case-splitting `{! m !}`.\n\n- Show information about the current context, goal, etc.: putting the cursor near a goal/literal and hit SHIFT-TAB.\n\u003c!--If the expression is in parentheses ``(...)``, then the cursor should be near one of the two parentheses.\nIf the expression is just a literal, then the cursor should be inside, or in the vicinity of the literal.\n\n- Normalise a closed expression,\nby putting the cursor near the expression and hitting TAB.\nExpression localisation follows the same rules as in the previous point.\n--\u003e\n\nEditing\n-------\n\nInputting common UNICODE characters is facilitated by the code-completion feature of Jupyter.\n\n- When the cursor is immediately to the right of one of the `base form` symbols\nhitting TAB will replace it by the corresponding `alternate form`.\nHitting TAB again will go back to the base form.\n\n| base form | alternate form |\n|:---------:|:----------------:|\n| -\u003e | → |\n| \\ | λ |\n| \u003c | ⟨ |\n| B | 𝔹 |\n| \u003e | ⟩ |\n| = | ≡ |\n| top | ⊤ |\n| /= | ≢ |\n| bot | ⊥ |\n| alpha | α |\n| /\\ | ∧ |\n| e | ε |\n| \\/ | ∨ |\n| emptyset | ∅ |\n| neg | ¬ |\n| qed | ∎ |\n| forall | ∀ |\n| Sigma | Σ |\n| exists | ∃ |\n| Pi | Π |\n| \\[= | ⊑ |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flclem%2Fagda-kernel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flclem%2Fagda-kernel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flclem%2Fagda-kernel/lists"}