{"id":13992992,"url":"https://github.com/leanprover/lean4export","last_synced_at":"2025-10-31T15:30:41.664Z","repository":{"id":137139133,"uuid":"608155024","full_name":"leanprover/lean4export","owner":"leanprover","description":"Plain-text declaration export for Lean 4","archived":false,"fork":false,"pushed_at":"2024-10-18T01:44:23.000Z","size":7535,"stargazers_count":13,"open_issues_count":4,"forks_count":7,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-02-12T03:47:34.352Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lean","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leanprover.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-03-01T12:42:13.000Z","updated_at":"2025-01-10T19:28:49.000Z","dependencies_parsed_at":"2024-01-18T08:17:06.927Z","dependency_job_id":"8f1b3fb1-971f-497c-82cf-3ff8158d3e41","html_url":"https://github.com/leanprover/lean4export","commit_stats":null,"previous_names":["leanprover/lean4export"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Flean4export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Flean4export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Flean4export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Flean4export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leanprover","download_url":"https://codeload.github.com/leanprover/lean4export/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239212561,"owners_count":19600830,"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":[],"created_at":"2024-08-09T14:02:11.869Z","updated_at":"2025-10-31T15:30:41.611Z","avatar_url":"https://github.com/leanprover.png","language":"Lean","funding_links":[],"categories":["Lean"],"sub_categories":[],"readme":"A simple declaration exporter for Lean 4 using the [Lean 3 export format](https://github.com/leanprover/lean/blob/master/doc/export_format.md)\n\n## How to Run\n\n```sh\n$ lake exe lean4export \u003cmods\u003e [-- \u003cdecls\u003e]\n```\nThis exports the contents of the given Lean modules, looked up in the core library or `LEAN_PATH` (as e.g. initialized by an outer `lake env`) and their transitive dependencies.\nA specific list of declarations to be exported from these modules can be given after a separating `--`.\n\n## Format Extensions\n\nThe following commands have been added to represent new features of the Lean 4 type system.\n\n```\n\u003ceidx'\u003e #EJ \u003cnidx\u003e \u003cinteger\u003e \u003ceidx\u003e\n```\nA primitive projection of the `\u003cinteger\u003e`-nth field of a value `\u003ceidx\u003e` of the record type `\u003cnidx\u003e`.\nExample: the primitive projection corresponding to `Prod.snd` of the innermost bound variable\n```\n1 #NS 0 Prod\n0 #EV 0\n1 #EJ 1 1 0\n```\n\n```\n\u003ceidx'\u003e #ELN \u003cinteger\u003e\n\u003ceidx'\u003e #ELS \u003chexhex\u003e*\n```\nPrimitive literals of type `Nat` and `String` (encoded as a sequence of UTF-8 bytes in hexadecimal), respectively.\nExamples:\n```\n0 #ELN 1000000000000000\n1 #ELS 68 69  # \"hi\"\n```\n\n```\n\u003ceidx'\u003e #EZ \u003cnidx\u003e \u003ceidx_1\u003e \u003ceidx_2\u003e \u003ceidx_3\u003e\n```\nA binding `let \u003cnidx\u003e : \u003ceidx_1\u003e := \u003ceidx_2\u003e; \u003ceidx_3\u003e`.\nAlready supported by the Lean 3 export format, but not documented.\nExample: the encoding of `let x : Nat := Nat.zero; x` is\n```\n1 #NS 0 x\n2 #NS 0 Nat\n0 #EC 2 \n3 #NS 2 zero\n1 #EC 3 \n2 #EV 0\n3 #EZ 1 0 1 2\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanprover%2Flean4export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleanprover%2Flean4export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanprover%2Flean4export/lists"}