{"id":13760453,"url":"https://github.com/latte-central/LaTTe","last_synced_at":"2025-05-10T10:32:48.803Z","repository":{"id":28180673,"uuid":"31682221","full_name":"latte-central/LaTTe","owner":"latte-central","description":"LaTTe : a Laboratory for Type Theory experiments (in clojure)","archived":false,"fork":false,"pushed_at":"2023-11-29T17:22:26.000Z","size":719,"stargazers_count":251,"open_issues_count":3,"forks_count":12,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-05-01T21:21:15.784Z","etag":null,"topics":["clojure","logic","mathematics","proof-assistant"],"latest_commit_sha":null,"homepage":"http://latte-central.github.io/LaTTe/","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/latte-central.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":"2015-03-04T22:01:18.000Z","updated_at":"2024-04-27T04:50:34.000Z","dependencies_parsed_at":"2024-01-13T17:00:50.478Z","dependency_job_id":"7ff1455f-92c8-47e2-bd00-facf6453f2f4","html_url":"https://github.com/latte-central/LaTTe","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latte-central%2FLaTTe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latte-central%2FLaTTe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latte-central%2FLaTTe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latte-central%2FLaTTe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/latte-central","download_url":"https://codeload.github.com/latte-central/LaTTe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224949829,"owners_count":17397241,"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":["clojure","logic","mathematics","proof-assistant"],"created_at":"2024-08-03T13:01:10.602Z","updated_at":"2024-11-16T17:31:09.044Z","avatar_url":"https://github.com/latte-central.png","language":"Clojure","funding_links":[],"categories":["Clojure"],"sub_categories":[],"readme":"# LaTTe\n\nhttp://latte-central.github.io/LaTTe/\n\n```text\n             ((((\n            ((((\n             ))))\n          _ .---.\n         ( |`---'|\n          \\|     |\n          : .___, :\n           `-----'  -Karl\n```\n\n**LaTTe** : a Laboratory for Type Theory experiments (in clojure)\n\n\n[![Clojars Project](https://img.shields.io/clojars/v/latte.svg)](https://clojars.org/latte)\n## What?\n\nLaTTe is a **proof assistant library** based on type theory (a variant of\nλD as described in the book [Type theory and formal proof: an introduction](http://www.cambridge.org/fr/academic/subjects/computer-science/programming-languages-and-applied-logic/type-theory-and-formal-proof-introduction)).\n\n - **Hot!** Watch Latte *live* at: https://www.youtube.com/watch?v=5YTCY7wm0Nw\n\n - **Sizzling!** A paper about LaTTe at the European Lisp Symposium, 2017:\n   https://github.com/latte-central/latte-ELS-2017\n   [[PDF]](https://github.com/latte-central/latte-ELS-2017/blob/master/paper/latte-els-2017.pdf)\n\n - **Blistering** LaTTe was in the [Hacker news!](https://news.ycombinator.com/item?id=18383654)\n\nThe specific feature of LaTTe is its design as a library (unlike most proof assistant, generally designed as tools) tightly integrated with the Clojure language. It is of course fully implemented in Clojure, but most importantly all the definitional aspects of the assistant (definitions, theorem and axioms) are handled using Clojure namespaces, definitions and macros.\n\nFor example, the fact that logical implication is reflexive can be stated *directly as a Clojure top-level form*:\n\n```clojure\n(defthm impl-refl\n  \"Implication is reflexive.\"\n  [[A :type]]\n  (==\u003e A A))\n;; =\u003e [:declared :theorem impl-refl]\n```\nin plain text:\n\u003e assuming a type `A`, then `A` implies `A`.\n\nThe proof of the theorem can be also constructed as a Clojure form:\n\n  - either giving a lambda-term as a direct proof (exploiting the proposition-as-type, proof-as-term correspondance) :\n\n```clojure\n(proof 'impl-refl\n  (qed (lambda [x A] x)))\n;; =\u003e [:qed impl-refl]\n```\n(i.e. the identity function is a proof of reflexivity for implication)\n\n  - or using a declarative *proof script*:\n\n```clojure\n(proof 'impl-refl\n   (assume [x A]\n     (have concl A :by x))\n   (qed concl))\n;; =\u003e [:qed impl-refl]\n```\n\n... which, with some training, can be read as a \"standard\" mathematical proof:\n\n\u003e assuming `A` holds, as an hypothesis named `x`\n\u003e we can deduce `A` by `x`\n\u003e hence `A` implies `A` as stated (QED).\n\nOf course, all the proofs are *checked for correctness*. Without the introduction\n of an inconsistent axiom (and assuming the correctness of the implementation of the LaTTe kernel),\n *no mathematical inconsistency* can be introduced by the `proof` form.\n\n## Yes, but what?\n\nLaTTe helps you formalize mathematic concepts and construct formal proofs of theorems (propositions) about such concepts.\nGiven the tight integration with the Clojure language, *existing* Clojure development environments (e.g. Cider, Cursive) can be used as (quite effective) interactive proof assistants.\n\n## How?\n\n - There will be a *tutorial* at some point ...\n\n - The *reference documentation* is at: http://latte-central.github.io/LaTTe/\n\n**Standard library** :\n\n - The **prelude** library is at: https://github.com/latte-central/latte-prelude\n\n - The **(typed) sets** library is at: https://github.com/latte-central/latte-sets\n\n - The **integer arithmetic** library is at: https://github.com/latte-central/latte-integers\n\n(obviously more to come ...)\n\n## Who?\n\nLaTTe may be of some interest for you:\n\n  - **obviously** if you are interested in type theory and the way it can be implemented on a Computer. LaTTe has been implemented with readability and simplicity in mind (more so than efficiency or correctness),\n  - **probably** if you are interested in the \"mechanical\" formalization of mathematics, intuitionistic logic, etc. (although you might not learn much, you may be interested in contributing definitions, theorems and proofs),\n  - **maybe** if you are curious about the lambda-calculus (the underlying theory of your favorite programming language) and dependent types (a current trend) and what you can do with these besides programming.\n\n## When?\n\nLaTTe is, at least for now, an experiment more than a finalized product, but it is already usable.\n\nA few non-trivial formalizations have been conducted using LaTTe:\n\n - e.g. a (gorilla REPL) document about **Knaster-Tarski fixed point theorem(s)**: https://github.com/latte-central/fixed-points\n\nContributions such as mathematical content or enhancement/correction of the underlying machinery are very much welcomed.\n\n## Build\n\nRunning Tests\n\n```\nclj -A:test\n```\n\nBuilding Documentation\n\n```\nclj -A:codox\n```\n----\nCopyright (C) 2015-2018 Frederic Peschanski (MIT license, cf. `LICENSE`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flatte-central%2FLaTTe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flatte-central%2FLaTTe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flatte-central%2FLaTTe/lists"}