Source: Logic at d80392c15f07.

OpenSymbolicRules Logic#

This repository provides an OpenSymbolicRules (OSR) rule set for Boolean simplification and propositional logic. It is language-neutral: each rule uses OSR expression syntax and declares its operator meaning with OpenMath.

Contents#

  • Boolean identity and idempotence rules.
  • Negation normal form and complement rules.
  • Implication and equivalence expansion to core connectives.
  • NAND, NOR, XOR, and XNOR expansion to core connectives.
  • Explicit to_cnf and to_dnf profiles for distributive normalisation.
  • An explicit resolution inference profile for sound clause derivation.
  • Lexically scoped universal and existential quantifier negation, scope, and vacuous-quantification rules, with a specification of capture-avoiding substitution for their binders.
  • Executable fixtures for every rule.

The current rules are intentionally oriented towards smaller expressions. This keeps simplification terminating and avoids rewrite loops such as expanding an expression and immediately applying its inverse identity.

OpenMath semantics#

The rule files map their operators to the logic1 OpenMath content dictionary:

OSR operatorOpenMath symbol
Andopenmath:logic1#and
Oropenmath:logic1#or
Notopenmath:logic1#not
Trueopenmath:logic1#true
Falseopenmath:logic1#false

This semantic mapping is part of the rule data, rather than an implementation detail of a particular computer algebra system.

Repository layout#

rules/       Rule files, ordered by rules/meta.json
tests/       Test fixtures corresponding to the rules
docs/        Explanatory documentation
Specification/  Pinned OSR specification and JSON schemas

Validation#

Initialize submodules and validate all JSON files:

git submodule update --init --recursive
just validate
just test
just verify

The validation command checks the OSR JSON Schemas and validates the rule and test data against them. The semantic verifier exhaustively checks the supported propositional rules and resolution inferences over Boolean valuations.

OSR v1#

v1/ holds the propositional rules in the OSR v1 format, generated from Lean proofs (OpenSymbolicRules/Lean) and published by OpenSymbolicRules/Verification. See docs/osr-v1.md. Check it with:

just v1 [<Verification report directory>]

License#

This repository is licensed under the MIT License. OpenMath identifiers are referenced for semantic interoperability; see NOTICE.md.