From 79659cb0edf1eea026a93955403a33a1f38f6123 Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Sat, 11 Jul 2020 15:13:20 +0200 Subject: Defined annotated terms to be used in future typechecking improvements --- spartan/core/Spartan.thy | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'spartan/core') diff --git a/spartan/core/Spartan.thy b/spartan/core/Spartan.thy index 1ca027f..8fa6cfe 100644 --- a/spartan/core/Spartan.thy +++ b/spartan/core/Spartan.thy @@ -42,10 +42,13 @@ typedecl o judgment has_type :: \o \ o \ prop\ ("(2_:/ _)" 999) +text \Type annotations:\ -section \Type annotations\ +definition anno :: \o \ o \ o\ ("'(_ : _')") + where "(a : A) \ a" if "a: A" -consts anno :: \o \ o \ o\ ("'(_: _')") +lemma anno: "a: A \ (a : A): A" + by (unfold anno_def) section \Universes\ @@ -95,7 +98,7 @@ translations "\x: A. b" \ "CONST lam A (fn x. b)" abbreviation Fn (infixr "\" 40) where "A \ B \ \_: A. B" -term "\x: A. b x" + axiomatization where PiF: "\\x. x: A \ B x: U i; A: U i\ \ \x: A. B x: U i" and @@ -166,7 +169,7 @@ axiomatization where section \Infrastructure\ ML_file \lib.ML\ -ML_file \types.ML\ +ML_file \typechecking.ML\ subsection \Proof commands\ -- cgit v1.2.3