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_cnfandto_dnfprofiles for distributive normalisation. - An explicit
resolutioninference 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 operator | OpenMath symbol |
|---|---|
And | openmath:logic1#and |
Or | openmath:logic1#or |
Not | openmath:logic1#not |
True | openmath:logic1#true |
False | openmath: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 schemasValidation#
Initialize submodules and validate all JSON files:
git submodule update --init --recursive
just validate
just test
just verifyThe 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.