diff options
Diffstat (limited to 'common/AST.v')
-rw-r--r-- | common/AST.v | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/AST.v b/common/AST.v index eab1adf..ec8053d 100644 --- a/common/AST.v +++ b/common/AST.v @@ -46,6 +46,12 @@ Definition typesize (ty: typ) : Z := Lemma typesize_pos: forall ty, typesize ty > 0. Proof. destruct ty; simpl; omega. Qed. +Lemma typ_eq: forall (t1 t2: typ), {t1=t2} + {t1<>t2}. +Proof. decide equality. Qed. + +Lemma opt_typ_eq: forall (t1 t2: option typ), {t1=t2} + {t1<>t2}. +Proof. decide equality. apply typ_eq. Qed. + (** Additionally, function definitions and function calls are annotated by function signatures indicating the number and types of arguments, as well as the type of the returned value if any. These signatures |