npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

okay-prove

v0.0.4

Published

Minimal package for generating propositional logic proofs

Downloads

6

Readme

okay-prove

Propositional logic proof generator written in TypeScript

Usage

You can interact with it using one of these front-end interfaces:

Or as a library in your own code:

High-Level Prompt Format

a
b
a and b

The last line is the conclusion. Every other line is a premise.

Symbols

Symbols can be any combination of the characters A-Z, a-z, 0-9 and _.

Operators

Operators include and, or, not and implies, with not having the highest precedence and implies having a lower precedence than and and or.

Groups

Expressions can be grouped together by parentheses - e.g. (a implies b) and (b and c)

Tautologies

Tautologies are written with a period - e.g. .

Contradictions

Contradictions are written with an exclamation point - e.g. !

Example Proofs

Example #1

Prompt (in high-level input format):

(q and (a or b)) or ((b or a) and r)
b or a

Proof (visualized in "inline" format):

 1. (q and (a or b)) or ((b or a) and r) [premise]
 2. (q and (a or b)) or ((a or b) and r) [commutative : 1]
 3. ((a or b) and q) or ((a or b) and r) [commutative : 2]
 4. (a or b) and (q or r)                [distributive : 3]
 5. a or b                               [specialization : 4]
 6. b or a                               [commutative : 5] ☐

Example #2

Prompt (in high-level input format):

p or not (r or q)
s implies r
not p
not s

Proof (visualized in "inline" format):

 1. not p             [premise]
 2. p or not (r or q) [premise]
 3. not (r or q)      [elimination : 2, 1]
 4. not r and not q   [de morgan's : 3]
 5. not r             [specialization : 4]
 6. s implies r       [premise]
 7. not s             [modus tollens : 6, 5] ☐

Example #3

Prompt (in high-level input format):

p implies (q implies r)
not ((q implies r) and s)
not (p and s) implies u and w
x implies not u
s
not x

Proof (visualized in "inline" format):

 1. s                               [premise]
 2. not ((q implies r) and s)       [premise]
 3. not ((not q or r) and s)        [definition of implies : 2]
 4. not (not q or r) or not s       [de morgan's : 3]
 5. not (not q or r)                [elimination : 4, 1]
 6. p implies (q implies r)         [premise]
 7. p implies (not q or r)          [definition of implies : 6]
 8. not p                           [modus tollens : 7, 5]
 9. not p or not s                  [generalization : 8]
10. not (p and s)                   [de morgan's : 9]
11. not (p and s) implies (u and w) [premise]
12. u and w                         [modus ponens : 11, 10]
13. u                               [specialization : 12]
14. x implies not u                 [premise]
15. not x                           [modus tollens : 14, 13] ☐