Files

44 lines
1.1 KiB
Lean4
Raw Permalink Normal View History

2026-04-19 04:17:45 +00:00
import BidirTT.Syntax
namespace BidirTT
mutual
inductive Neutral where
| var : Nat Neutral
| app : Neutral Val Neutral
| fst : Neutral Neutral
| snd : Neutral Neutral
| natElim : Val Val Val Neutral Neutral
| unitElim : Val Val Neutral Neutral
| emptyElim : Val Neutral Neutral
| idElim : Val Val Val Neutral Neutral
2026-04-19 04:17:45 +00:00
inductive Val where
| neu : Neutral Val
2026-04-19 04:17:45 +00:00
| lam : Closure Val
| pi : Val Closure Val
| sig : Val Closure Val
| pair : Val Val Val
| nat : Val
| zero : Val
| succ : Val Val
| unit : Val
| triv : Val
| empty : Val
| id : Val Val Val Val
| refl : Val
| univ : Level Val
2026-04-19 04:17:45 +00:00
inductive Closure where
| mk : List Val Tm Closure
end
abbrev Env := List Val
abbrev Lvl := Nat
instance : Inhabited Neutral := .var 0
2026-04-19 04:17:45 +00:00
instance : Inhabited Val := .univ 0
instance : Inhabited Closure := .mk [] (.univ 0)
end BidirTT