aboutsummaryrefslogtreecommitdiff
path: root/src/util.ts
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2023-12-12 20:21:13 +0530
committerAkshay Nair <phenax5@gmail.com>2023-12-12 20:21:13 +0530
commita393765df40744aae68dab943e25bad8175bd5c0 (patch)
tree606aafea514fb8f53dcfafd86ab06e74ca18f868 /src/util.ts
parent999c2314c0d649646a53e7cc440ae3f4aa1a3d61 (diff)
downloadts-theorem-provinator-a393765df40744aae68dab943e25bad8175bd5c0.tar.gz
ts-theorem-provinator-a393765df40744aae68dab943e25bad8175bd5c0.zip
feat: associativity + distributivity for multiplication
Diffstat (limited to 'src/util.ts')
-rw-r--r--src/util.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util.ts b/src/util.ts
index 97e9335..88e3749 100644
--- a/src/util.ts
+++ b/src/util.ts
@@ -34,6 +34,8 @@ export type ChainRewrites<Rws extends Rewrite<Op, Op>[], O extends Op> =
export type VerifyEquation<Eq extends Rewrite<Op, Op>> =
Eq['right'] extends 'true' ? true : false & Eq['right'];
+export type Evaluate<Eq extends Rewrite<Op, Op>> = ApplyRewrite<Eq['left'], Eq>;
+
export type assert<T extends true> = T;
export type Eq<a, b> = ([a] extends [b] ? ([b] extends [a] ? true : false & { lhs: a; rhs: b }) : false & { lhs: a; rhs: b });