-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add(SecondOrder):
Kind
, Typ
and Term
definitions
- Loading branch information
1 parent
3e8748c
commit 6cbf65f
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,26 @@ | ||
import TTFPI.Basic | ||
|
||
namespace SecondOrder | ||
|
||
inductive Kind where | ||
| star | ||
deriving Repr, DecidableEq | ||
|
||
notation " ∗ " => Kind.star | ||
|
||
inductive Typ where | ||
| var (name : Name) | ||
| arrow (dom : Typ) (codom : Typ) | ||
| pi (param : Name) (kind : Kind) (body : Typ) | ||
deriving Repr, DecidableEq | ||
|
||
-- 3.4.1: Second order pre-typed λ-terms | ||
inductive Term where | ||
| var (name : Name) | ||
| app (fn : Term) (arg : Term) | ||
| tapp (fn : Term) (arg : Typ) | ||
| abs (param : Name) (type : Typ) (body : Term) | ||
| tabs (param : Name) (kind : Kind) (body : Term) | ||
deriving Repr, DecidableEq | ||
|
||
end SecondOrder |