Source: Integration at 605cbc581c27.
Open Symbolic Rules - Integration (formerly OSR)#
Note: This repository has been created with AI assistance.
Start with Albert D. Rich’s final Rubi 4.17.3.0 release. Its ordered OSR manifest contains 7,375 converted entries in 198 sections. Apply the release errata when enabling rules: each record replaces a rule that RUBI states incorrectly (issues #11 and #12) or enables an omitted rule with an added guard (issue #13). Post-release open-source CAS additions have independent provenance.
The compatibility profile loads 7,418 entries from a later Rubi maintenance revision. The 72,254 distributed integration test problems have a separate upstream revision and conversion record. See the known conversion issues.
Overview#
This repository is the Integration Module of the OpenSymbolicRules specification.
It defines a JSON interchange format (originally named OSR) so that any CAS — Julia, Python/SymPy, Java/SymJa, Rust, JavaScript — can consume RUBI’s integration knowledge with a standard JSON parser. No CAS software required.
OpenMath Content Dictionaries provide mathematical vocabulary; unsupported RUBI helpers and operational constructs still require explicit interpretation.
OSR v1#
v1/ holds the first RUBI rules stated in the OSR v1 format, generated from
Lean (OpenSymbolicRules/Lean) and tracked by
OpenSymbolicRules/Verification: 3,015 entries. Over ℝ, 1,096 are proved and certified,
1,560 have counterexamples and 359 are unproved. Over ℂ, 568 are proved
(273 certified), 365 have counterexamples, 1,913 are unproved and 169 are
unsupported. The report also lists 529 source identities considered for
migration. The v1 catalogue includes 1,025 strengthened variants and four
generalized variants. The default v0.1 manifest counts 7,418 source entries.
Run just source-status to compare their original identities with v1.
See the v1 migration notes.
Independently proved derived generalizations of 1.1.3.4 #16, #27, #28 and #29
use algebraic conditions in place of order conditions; all are certified over ℝ and ℂ.
just check # v0.1 schemas, script tests and v1 files
just v1 <report> # also compare v1/ with a Verification report directory
just inventory # syntactic migration inventory (JSON)Integration engines#
The RUBI profile is a portable, ordered rule base. It is not an implementation of the Risch algorithm, and it must not be treated as the only integration strategy. A host CAS can combine compatible backends while keeping the same OSR/OpenMath representation:
- Try a procedural Risch-family method for the elementary-function decision problem when the host provides one.
- Apply an OSR rule profile, such as RUBI, for its ordered catalogue of transformations and for classes outside the procedural method’s scope.
- Verify a returned antiderivative by differentiation under the recorded assumptions, and retain the backend and applied rule identities in the proof trace.
For example, the Julia ecosystem’s SymbolicIntegration.jl exposes
integrate(expression, variable, RischMethod()); Symbolics.jl represents
the integral and can interoperate with that package. This repository remains
language- and backend-neutral: it specifies the rule data and OpenMath
semantics, not a preferred algorithm or fallback order.
The format covers:
- Rules: pattern + constraints + result, with wildcard and predicate support (8,268 entries in 221 files, including duplicates and empty sections)
- Test fixtures: integrand + variable + optimal antiderivative + expected step count (72,254 tests in 215 files)
- Taxonomy: RUBI’s exact 9-section hierarchy
- Load manifest: the default file order follows the pinned RUBI source, with elementary-function rules enabled
- Backend-neutral interoperability: a RUBI profile can complement a procedural Risch-family integrator without changing rule semantics
Repository Structure#
OSR/
├── schemas/ # JSON Schema definitions (draft-07)
│ ├── osr-expr.schema.json # Shared recursive expression type
│ ├── rule-file.schema.json # Rule file structure
│ ├── test-file.schema.json # Test fixture structure
│ └── meta.schema.json # Load manifest structure
├── rules/ # Integration rules (221 JSON files)
│ ├── meta.json # Load manifest, taxonomy, feature flags
│ └── 1-algebraic/ # Section-based directory tree
│ └── 1.1-binomial/
│ └── 1.1.1-linear/
│ └── 1.1.1.1-(a+b-x)^m.json
├── tests/ # Test fixtures (215 JSON files)
│ └── 1-algebraic/
│ └── 1.1-binomial/
│ └── 1.1.1-linear/
│ └── 1.1.1.2-(a+b-x)^m-(c+d-x)^n.json
├── converter/ # Mathematica-to-OSR converter (Julia)
│ ├── scripts/convert.jl # CLI entry point
│ └── src/ # Tokenizer, parser, transformer, writers
├── scripts/
│ ├── validate.sh # Local schema validation script
│ └── count.sh # Count rules and tests
├── specifications/
│ └── v0.1.0-draft/
│ └── spec.md # EARS specification (159 requirements)
├── rfc.md # RFC / design rationale
├── docs/
│ └── schema-validation.md # Validation documentation
└── .github/workflows/
└── validate-schemas.yml # CI schema validationQuick Start#
# Validate all rule and test files against schemas
pip install check-jsonschema
scripts/validate.sh
# Count rules and tests
scripts/count.shSee docs/schema-validation.md for details.
Converter#
The converter/ directory contains a Julia tool that converts RUBI’s
Mathematica source files to OSR JSON format. See
converter/README.md for full documentation.
# Initialize git submodules (RUBI source + test suite)
git submodule update --init
# Convert rules, tests, and update manifest
julia --project=converter converter/scripts/convert.jl --rules
julia --project=converter converter/scripts/convert.jl --tests
julia --project=converter converter/scripts/convert.jl --manifestDataset Summary#
| Artifact | Directory | Files | Items |
|---|---|---|---|
| Rules | rules/ | 221 | 8,268 entries; the conversion is incomplete |
| Tests | tests/ | 215 | 72,254 test problems |
| Manifest | rules/meta.json | 1 | load_order + counts |
Status#
This project is in v0.1.0-draft. The conversion is incomplete: some source rule files remain empty and some operators need further semantic work. Schema validation is enforced by CI; it does not establish mathematical correctness.
References#
- RUBI — Rule-based Integration
- RUBI 5 on GitHub
- MathLive MathJSON — operator name alignment
- OpenMath 2.0 — formal semantics mapping
License#
MIT