https://github.com/kiranandcode/normalisation-by-evaluation-lean
Experiments with implementing Normalisation-by-evaluation blog post in Lean.
https://github.com/kiranandcode/normalisation-by-evaluation-lean
Last synced: 3 days ago
JSON representation
Experiments with implementing Normalisation-by-evaluation blog post in Lean.
- Host: GitHub
- URL: https://github.com/kiranandcode/normalisation-by-evaluation-lean
- Owner: kiranandcode
- Created: 2025-08-24T17:26:35.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-24T17:35:54.000Z (10 months ago)
- Last Synced: 2025-08-24T21:55:57.015Z (10 months ago)
- Language: Lean
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lean-typing
Experiments with converting the Bidirectional typing through normalisation blog post into Lean.
```lean4
open Typing.Untyped in
#eval Term.runProgramNorm []
(program:
def id := (λ x . x)
id id
def f := (λ x . λ y . y x)
(λ x . λ y . x y) (λ x . x))
-- 20:0:
-- id id ==> λ x . x
-- ((λ x . λ y . x y) λ x . x) ==> λ y . y
open Typing.Typed in
#eval Term.runProgram []
(program:
def id := (λ x . x)
id id
def f := (λ x . λ y . y x)
(λ x . λ y . x y) (λ x . x))
-- 28:0:
-- id id ==> clo( ⊢ λ x . x)
-- ((λ x . λ y . x y) λ x . x) ==> clo(x : (clo(f : (clo(id : (clo( ⊢ λ x . x)) ⊢ λ x . λ y . y x)), id : (clo( ⊢ λ x . x)) ⊢ λ x . x)), f : (clo(id : (clo( ⊢ λ x . x)) ⊢ λ x . λ y . y x)), id : (clo( ⊢ λ x . x)) ⊢ λ y . x y)
```