Allow negative numbers in expressions

This commit is contained in:
2026-08-09 17:51:58 -05:00
parent a19f9fa148
commit c0542d0811
3 changed files with 23 additions and 8 deletions

View File

@@ -33,7 +33,7 @@ inductive Env.Mem : String × Value → Env → Prop
/-- Inference rules for evaluating an expression (`Spa.Expr`) in a given
environment. Pretty standard big-step expression evaluation. -/
inductive EvalExpr : Env Expr Value Prop
| num (ρ : Env) (n : ) : EvalExpr ρ (.num n) (.int n)
| num (ρ : Env) (z : ) : EvalExpr ρ (.num z) (.int z)
| var (ρ : Env) (x : String) (v : Value) :
Env.Mem (x, v) ρ EvalExpr ρ (.var x) v
| add (ρ : Env) (e₁ e₂ : Expr) (z₁ z₂ : ) :