summaryrefslogtreecommitdiff
path: root/Common/Char.lean
diff options
context:
space:
mode:
Diffstat (limited to 'Common/Char.lean')
-rw-r--r--Common/Char.lean4
1 files changed, 4 insertions, 0 deletions
diff --git a/Common/Char.lean b/Common/Char.lean
new file mode 100644
index 0000000..9c727eb
--- /dev/null
+++ b/Common/Char.lean
@@ -0,0 +1,4 @@
+namespace Char
+
+def asDigit (d : Char) (ok : Char.isDigit d = true) : Nat :=
+ d.toNat - 48