Skip to content

cpiemontese/tlc-elpi

Repository files navigation

tlc-elpi

Implementation of some type theories in ELPI, an embeddable λProlog interpreter, as part of a curricular internship with professor Claudio Sacerdoti Coen. These theories can be used to prove some (basic) theorems using the interactive theorem prover found in itp.elpi. Given a type it gradually builds a typed λ-term through the use of tactics given as input by the user.

stlc contains term definitions, typing, conversion and tactics for the simply typed λ-calculus.

itt contains all of the above for a fragment Martin-Löf's Intuitionistic Type Theory (namely pi, sigma and nats).

How to use this thing.

1. Install ELPI

Who could have guessed it! Go here.

2. Prove stuff using stlc or itt

  1. Create a file where you'll put what you want to prove,
  2. using accumulate add stlc/theory or itt/theory to accumulate the whole "theory",
  3. accumulate the itp and start the itp loop by
    1. writing something like of X TypeDecl where TypeDecl is what you want to prove and
    2. running the actual loop using: run_itp X InScript where InScript is a list of tactics that can be given as input.

As an example of how one such file could look see test_itt.elpi.