diff options
author | Jason Gross <jgross@mit.edu> | 2017-01-21 18:48:24 -0500 |
---|---|---|
committer | Jason Gross <jgross@mit.edu> | 2017-01-21 18:48:24 -0500 |
commit | c83cb07f1477de33ce9eb43eea6a4f2720a94763 (patch) | |
tree | 028f4c1bc309715db9d35197f8eadb52f821229b /Bedrock | |
parent | 5597e03e4db81700bb0774a2986cd22e45810409 (diff) |
Move weqb_hetero to Bedrock.Word
Diffstat (limited to 'Bedrock')
-rw-r--r-- | Bedrock/Word.v | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Bedrock/Word.v b/Bedrock/Word.v index 2c518807d..10bd452bb 100644 --- a/Bedrock/Word.v +++ b/Bedrock/Word.v @@ -300,6 +300,16 @@ Definition weq : forall sz (x y : word sz), {x = y} + {x <> y}. abstract (rewrite (shatter_word y); simpl; intro; injection H; auto). Defined. +Fixpoint weqb_hetero sz1 sz2 (x : word sz1) (y : word sz2) : bool := + match x, y with + | WO, WO => true + | WO, _ => false + | WS b _ x', WS b' _ y' + => eqb b b' && @weqb_hetero _ _ x' y' + | WS _ _ _, _ + => false + end%bool. +Global Arguments weqb_hetero {_ _} _ _. Fixpoint weqb sz (x : word sz) : word sz -> bool := match x in word sz return word sz -> bool with | WO => fun _ => true |