aboutsummaryrefslogtreecommitdiff
path: root/src/tests/theorem.spec.ts
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2023-12-15 22:36:03 +0530
committerAkshay Nair <phenax5@gmail.com>2023-12-15 22:36:03 +0530
commitefc0358c1e2b52308d3df68aa713cef5dc6e6bfe (patch)
tree40bac1f220895180c1cb99f044ac56eb4ed1ccbb /src/tests/theorem.spec.ts
parent3d91b8c0fe73d24e3bcf13e7d7e8079f58975500 (diff)
downloadts-theorem-provinator-efc0358c1e2b52308d3df68aa713cef5dc6e6bfe.tar.gz
ts-theorem-provinator-efc0358c1e2b52308d3df68aa713cef5dc6e6bfe.zip
refactor: moves stuff around
Diffstat (limited to 'src/tests/theorem.spec.ts')
-rw-r--r--src/tests/theorem.spec.ts28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/tests/theorem.spec.ts b/src/tests/theorem.spec.ts
new file mode 100644
index 0000000..4ab220a
--- /dev/null
+++ b/src/tests/theorem.spec.ts
@@ -0,0 +1,28 @@
+import { addition } from '../natural-numbers';
+import { Add, _0 } from '../utils/nat';
+import { ApplyRewrite, ChainRewrites, Sym, Eq, VerifyEquation, Equation, assert, Evaluate } from '../utils/theorem';
+
+export type specChainRewrites = [
+ assert<Eq<
+ ChainRewrites<
+ [
+ addition.Commutativity<_0, 'B'>,
+ addition.Identity<'B'>,
+ ],
+ Add<Add<_0, 'B'>, 'C'>
+ >,
+ Add<'B', 'C'>
+ >>,
+ assert<Eq<
+ ChainRewrites<
+ [
+ addition.Commutativity<_0, 'B'>,
+ addition.Identity<'B'>,
+ Sym<addition.Identity<Add<'B', 'C'>>>,
+ addition.Commutativity<Add<'B', 'C'>, _0>,
+ ],
+ Add<Add<_0, 'B'>, 'C'>
+ >,
+ Add<_0, Add<'B', 'C'>>
+ >>,
+]