{"id":16890475,"url":"https://github.com/sds/propose","last_synced_at":"2025-04-11T13:09:50.669Z","repository":{"id":11752027,"uuid":"14283107","full_name":"sds/propose","owner":"sds","description":"Create, manipulate, and verify propositional logic sentences","archived":false,"fork":false,"pushed_at":"2020-10-13T04:04:45.000Z","size":51,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T09:21:36.913Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sds.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-10T19:50:45.000Z","updated_at":"2024-12-05T19:38:48.000Z","dependencies_parsed_at":"2022-09-23T01:21:17.892Z","dependency_job_id":null,"html_url":"https://github.com/sds/propose","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sds%2Fpropose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sds%2Fpropose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sds%2Fpropose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sds%2Fpropose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sds","download_url":"https://codeload.github.com/sds/propose/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248404870,"owners_count":21097845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T17:03:19.262Z","updated_at":"2025-04-11T13:09:50.650Z","avatar_url":"https://github.com/sds.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Propose\n\n[![Gem Version](https://badge.fury.io/rb/propose.svg)](http://badge.fury.io/rb/propose)\n[![Build Status](https://travis-ci.org/sds/propose.svg)](https://travis-ci.org/sds/propose)\n[![Code Climate](https://codeclimate.com/github/sds/propose.png)](https://codeclimate.com/github/sds/propose)\n[![Inline Docs](http://inch-ci.org/github/sds/propose.svg?branch=master)](http://inch-ci.org/github/sds/propose)\n\n**Propose** is a playground for creating, manipulating, and verifying\nstatements in [propositional logic](https://en.wikipedia.org/wiki/Propositional_calculus).\n\nIt comes with a simple command-line [REPL](https://en.wikipedia.org/wiki/REPL)\n`propose`, which can answer questions about propositional statements.\n\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Writing Formulas](#writing-formulas)\n* [Commands](#commands)\n* [License](#license)\n\n## Requirements\n\nRuby 2.4+\n\n## Installing\n\n```bash\ngem install propose\n```\n\n## Writing Formulas\n\nYou can write formulas with **Propose** in plain English (e.g. `p or q`), or\nuse the standard propositional calculus notation (e.g. `p ∨ q`), amongst a few\nother options outlined below.\n\n### Atoms\n\nAtoms are the basic unit of propositional logic, and represent a single\nstatement which can be true or false, like \"The sun is shining.\" They can be\nwritten in one or more lowercase letters.\n\n```\n\u003e p\n\u003e q\n\u003e ball\n```\n\n### Negation (¬)\n\nThe negation of an atom expresses that the statement is _not_ true. Negation\ncan also be applied to larger expressions.\n\n```\n\u003e not p\n\u003e ¬p\n\u003e !p\n```\n\n### Conjunction (∧)\n\nThe conjunction of two expressions denotes that both expressions are true.\n\n```\n\u003e p and q\n\u003e p ∧ q\n\u003e p \u0026 q\n```\n\n### Disjunction (∨)\n\nThe disjunction of two expressions denotes that at least one of the expressions\nis true.\n\n```\n\u003e p or q\n\u003e p ∨ q\n\u003e p | q\n```\n\n### Implication (→)\n\nImplication expresses the concept that the expression on the right is a logical\nconsequence of the expression on the left, e.g. \"*if* the sun is shining,\n*then* the ice is melting\".\n\n```\n\u003e p implies q\n\u003e p imply q\n\u003e p → q\n\u003e p -\u003e q\n\u003e p =\u003e q\n```\n\n### Parentheses\n\nYou can write arbitrarily complex formulas by using parentheses to nest\nexpressions.\n\n```\n\u003e p or (q and r)\n\u003e (p or q) implies (q or r)\n\u003e not (p and q)\n```\n\n### Binding Priorities\n\nFor convenience, you can avoid writing unnecessary parentheses by adhering to\nthe conventions below:\n\n* ¬ binds more tightly than ∧, meaning ¬p ∧ q denotes (¬p) ∧ q\n* ∧ binds more tightly than ∨, meaning p ∧ q ∨ r denotes (p ∧ q) ∨ r\n* ∨ binds more tightly than →, meaning p ∨ q → q ∨ r denotes (p ∨ q) → (q ∨ r)\n* → is _right-associative_, meaning p → q → r denotes p → (q → r)\n\n## Commands\n\nTo print out a truth table for a propositional formula, simply enter the\nformula as a command.\n\n```\n\u003e not p or q and r\n+---+---+---+--------+\n|    ¬p ∨ (q ∧ r)    |\n+---+---+---+--------+\n| p | q | r | Result |\n+---+---+---+--------+\n| T | T | T |   T    |\n| F | T | T |   T    |\n| T | F | T |   F    |\n| F | F | T |   T    |\n| T | T | F |   F    |\n| F | T | F |   T    |\n| T | F | F |   F    |\n| F | F | F |   T    |\n+---+---+---+--------+\n```\n\n## License\n\nThis project is released under the [MIT license](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsds%2Fpropose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsds%2Fpropose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsds%2Fpropose/lists"}