Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fujiharuka/tautology
https://github.com/fujiharuka/tautology
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/fujiharuka/tautology
- Owner: FujiHaruka
- Created: 2022-09-23T02:01:53.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-23T06:09:07.000Z (about 2 years ago)
- Last Synced: 2024-04-13T19:32:04.168Z (7 months ago)
- Language: TypeScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tautology
Parser of propositional logic formula. It enables to check if a given formula is tautology or not.
```ts
import { parse } from "./mod.ts";const formula = parse("((a -> b) -> (NOT a OR b)) AND ((NOT a OR b) -> (a -> b))");
assert.equal(
formula.estimate({
a: true,
b: false,
}),
true,
);assert.equal(
isTautology(formula),
true,
);
```