aboutsummaryrefslogtreecommitdiff
path: root/theories
diff options
context:
space:
mode:
authorcoqbot-app[bot]2021-02-25 11:08:08 +0000
committerGitHub2021-02-25 11:08:08 +0000
commit87fc1db11d152af38b5e0d01d7ba925035c396a9 (patch)
tree72ce81688beb9e9705a0dc1019b5caa559207b08 /theories
parent26439e3eebc3d0b76d8cf89a71cfd0de07731c26 (diff)
parentaab8634bcda7829004c369644e9d4600692913f0 (diff)
Merge PR #13080: Ascii: add leb and ltb
Reviewed-by: anton-trunov
Diffstat (limited to 'theories')
-rw-r--r--theories/Strings/Ascii.v8
1 files changed, 8 insertions, 0 deletions
diff --git a/theories/Strings/Ascii.v b/theories/Strings/Ascii.v
index 06b02ab211..37d30a282c 100644
--- a/theories/Strings/Ascii.v
+++ b/theories/Strings/Ascii.v
@@ -173,6 +173,14 @@ Proof.
apply N_ascii_bounded.
Qed.
+Definition ltb (a b : ascii) : bool :=
+ (N_of_ascii a <? N_of_ascii b)%N.
+
+Definition leb (a b : ascii) : bool :=
+ (N_of_ascii a <=? N_of_ascii b)%N.
+
+Infix "<?" := ltb : char_scope.
+Infix "<=?" := leb : char_scope.
(** * Concrete syntax *)