{"id":17931747,"url":"https://github.com/noti0na1/lambdacalculus-java","last_synced_at":"2025-03-24T05:32:08.044Z","repository":{"id":213713832,"uuid":"74249315","full_name":"noti0na1/LambdaCalculus-java","owner":"noti0na1","description":"Lambda calculus implemented in Java","archived":false,"fork":false,"pushed_at":"2017-02-07T04:46:51.000Z","size":22,"stargazers_count":20,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-19T02:11:29.266Z","etag":null,"topics":["computer-science","java","lambda","lambda-calculus","utlc"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/noti0na1.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":"2016-11-20T02:57:40.000Z","updated_at":"2024-12-10T00:54:00.000Z","dependencies_parsed_at":"2023-12-22T16:10:36.389Z","dependency_job_id":"a6bcd762-5818-4aac-8f6b-72c56ad4e13d","html_url":"https://github.com/noti0na1/LambdaCalculus-java","commit_stats":null,"previous_names":["noti0na1/lambdacalculus-java"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noti0na1%2FLambdaCalculus-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noti0na1%2FLambdaCalculus-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noti0na1%2FLambdaCalculus-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noti0na1%2FLambdaCalculus-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noti0na1","download_url":"https://codeload.github.com/noti0na1/LambdaCalculus-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245217103,"owners_count":20579288,"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":["computer-science","java","lambda","lambda-calculus","utlc"],"created_at":"2024-10-28T21:23:44.286Z","updated_at":"2025-03-24T05:32:07.743Z","avatar_url":"https://github.com/noti0na1.png","language":"Java","readme":"# Lambda Calculus in Java\n\nA library implementing lambda calculus in Java\n\n\n\n[TOC]\n\n## Information\n\nLambda calculus (also written as λ-calculus) is a formal system in\nmathematical logic for expressing computation based on function\nabstraction and application using variable binding and substitution \n(wikipedia).\n\n* What is Lambda Calculus: https://en.wikipedia.org/wiki/Lambda_calculus\n\n* More materials: [A Tutorial Introduction to the Lambda Calculus](www.inf.fu-berlin.de/lehre/WS03/alpi/lambda.pdf)\n\nI write this library in order to understand lambda calculus deeper and,\nmeanwhile, recall how to white Java.\n\n## Features\n\n* Easy to write lambda expression\n* It can reduce expression in one step or fully\n* All expression can be pretty-printed\n* Arithmetic, logic and pairs are implemented in  [com.notnl.lambda.examples](https://github.com/noti0na1/LambdaCalculus-java/tree/master/src/com/notnl/lambda/example)\n\n## How To Use\n\nFirst you need to add lambda-calculus.jar to your project libraries. You\ncould find it at \n[release](https://github.com/noti0na1/LambdaCalculus-java/releases).\nYou can build it from the source as well.\n\nThe best way to create lambda expression is to extend the \ncom.notnl.lambda.Lambda class and use its handy functions directly.\n\n```java\npublic class ExampleUse extends Lambda {\n    // use it!\n}\n```\n\n## Example\n\n```java\n// create a variable x\nExpression x = var(\"x\");\nSystem.out.println(\"x = \" + x.toString());\n\n// create a function\nExpression fun = λ(\"x\", apply(λ(\"x\", apply(\"f\", \"x\")), \"x\"));\n// λx.(λx.f x) x\nSystem.out.println(\"fun = \" + fun.toString());\n// λx.f x\nSystem.out.println(\"fun  (reduced) = \" + fun.reduce().toString());\n\n// apply this function\nExpression app = apply(fun, \"z\");\n// (λx.(λx.f x) x) z\nSystem.out.println(\"app = \" + app.toString());\n// f z\nSystem.out.println(\"app (fully reduced) = \" + app.deepReduce().toString());\n// print reduce steps\n// or app.printReduceSteps(2) to print certain steps\napp.printReduceSteps();\n// (λx.(λx.f x) x) ((λx.x) z)\n// (λx.f x) ((λx.x) z)\n// (λx.f x) z\n// f z\n```\n\nSee more examples in [com.notnl.lambda.examples](https://github.com/noti0na1/LambdaCalculus-java/tree/master/src/com/notnl/lambda/example)\n\n## TODO \n\n* add more comments\n* add documents\n* ...\n\n## Report A Problem\n\nFeel free to report mistakes I made or give suggestions at  [GitHub Issue](https://github.com/noti0na1/LambdaCalculus-java/issues).\n\nI am also glad to talk about lambda with me.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoti0na1%2Flambdacalculus-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoti0na1%2Flambdacalculus-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoti0na1%2Flambdacalculus-java/lists"}