aboutsummaryrefslogtreecommitdiff
path: root/src/utils/nat.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/nat.ts')
-rw-r--r--src/utils/nat.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/utils/nat.ts b/src/utils/nat.ts
new file mode 100644
index 0000000..af8f3da
--- /dev/null
+++ b/src/utils/nat.ts
@@ -0,0 +1,10 @@
+import { Op } from './theorem';
+
+export type Add<A extends Op, B extends Op> = { op: '+'; a: A; b: B };
+export type Multiply<A extends Op, B extends Op> = { op: '*'; a: A; b: B };
+export type Succ<A extends Op> = { op: 'succ', a: A };
+
+export type _0 = '0'
+export type _1 = Succ<_0>
+export type _2 = Succ<_1>
+export type _3 = Succ<_2>