Split neutrals from canonical values so stuck eliminators arent encoded via constructor overloading

This commit is contained in:
2026-04-19 15:03:40 +00:00
parent bb002a4d92
commit 963c9f3e94
5 changed files with 245 additions and 207 deletions
+12 -8
View File
@@ -3,11 +3,18 @@ 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
inductive Val where
| var : Nat Val
| app : Val Val Val
| fst : Val Val
| snd : Val Val
| neu : Neutral Val
| lam : Closure Val
| pi : Val Closure Val
| sig : Val Closure Val
@@ -15,15 +22,11 @@ mutual
| nat : Val
| zero : Val
| succ : Val Val
| natElim : Val Val Val Val Val
| unit : Val
| triv : Val
| unitElim : Val Val Val Val
| empty : Val
| emptyElim : Val Val Val
| id : Val Val Val Val
| refl : Val
| idElim : Val Val Val Val Val
| univ : Nat Val
inductive Closure where
@@ -33,6 +36,7 @@ end
abbrev Env := List Val
abbrev Lvl := Nat
instance : Inhabited Neutral := .var 0
instance : Inhabited Val := .univ 0
instance : Inhabited Closure := .mk [] (.univ 0)