The OSR v1 format#
An OSR v1 rule set is a JSON document validated by the
rule-set schema.
Expressions are OpenMath objects in a JSON encoding (OMA applications,
OMS symbols from standard content dictionaries, OMV variables, OMI
integers, OMBIND bindings such as fns1#lambda), so a rule means the same
thing in every system that maps those symbols.
A rule record has:
idandlegacy_id: a stable identifier and the identity of the source rule (here, a RUBI rule);patternandreplacement: OpenMath objects; an antiderivative rule rewritesint(λx. F)intoλx. G;conditions: explicit side conditions (relation1#neq,relation1#eq,relation1#gt,set1#inwithsetname1#Z), read semantically on defined values; an engine must not apply a rule whose conditions it cannot decide;independent: matching constraints, the v0.1FreeQ;provenance: the method and the original sources, with their licenses;verification: one record per domain, naming the Lean theorem (a proof or a counterexample), the toolchain, the Mathlib revision and the source digest of the Lean checkout;findings: migration notes, such as a counterexample or the conditions a strengthened variant adds.
The specification currently defines 44
numbered requirements (V1-…); read them in
docs/osr-v1.md.
A complete rule#
Rule integration.linear_power_nondegenerate as distributed in Integration@605cbc5 (2026-11-29) v1/integration.osr.json:
{
"applicability": "defined_pattern",
"conditions": [
{
"applicant": {
"cd": "relation1",
"kind": "OMS",
"name": "neq"
},
"arguments": [
{
"kind": "OMV",
"name": "m"
},
{
"integer": -1,
"kind": "OMI"
}
],
"kind": "OMA"
},
{
"applicant": {
"cd": "relation1",
"kind": "OMS",
"name": "neq"
},
"arguments": [
{
"applicant": {
"cd": "arith1",
"kind": "OMS",
"name": "times"
},
"arguments": [
{
"kind": "OMV",
"name": "b"
},
{
"applicant": {
"cd": "arith1",
"kind": "OMS",
"name": "plus"
},
"arguments": [
{
"kind": "OMV",
"name": "m"
},
{
"integer": 1,
"kind": "OMI"
}
],
"kind": "OMA"
}
],
"kind": "OMA"
},
{
"integer": 0,
"kind": "OMI"
}
],
"kind": "OMA"
}
],
"description": "∫ (a + b x)^m = (a + b x)^(m+1)/(b (m+1)), when b (m+1) ≠ 0",
"findings": [
"strengthened: the condition b (m + 1) ≠ 0 (relation1#neq) is appended to the converted v0.1 conditions. This corrected variant is not RUBI's rule as stated: it excludes the degenerate case of the counterexample to integration.linear_power, which stays refuted.",
"conditions: RUBI's NeQ[m, -1] becomes a relation1#neq condition, read semantically (both sides defined, values different); Mathematica's NeQ tests that the difference is not possibly zero. The reference rewriter does not apply conditional rules.",
"matching: the optional wildcards a. and b. of the v0.1 pattern are ordinary metavariables; the v1 rule does not match the instances with RUBI's default values."
],
"id": "integration.linear_power_nondegenerate",
"independent": [
{
"of": "x",
"variable": "a"
},
{
"of": "x",
"variable": "b"
},
{
"of": "x",
"variable": "m"
}
],
"legacy_id": "rubi:1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.1 (a+b x)^m:4",
"orientation": "forward",
"pattern": {
"applicant": {
"cd": "calculus1",
"kind": "OMS",
"name": "int"
},
"arguments": [
{
"binder": {
"cd": "fns1",
"kind": "OMS",
"name": "lambda"
},
"kind": "OMBIND",
"object": {
"applicant": {
"cd": "arith1",
"kind": "OMS",
"name": "power"
},
"arguments": [
{
"applicant": {
"cd": "arith1",
"kind": "OMS",
"name": "plus"
},
"arguments": [
{
"kind": "OMV",
"name": "a"
},
{
"applicant": {
"cd": "arith1",
"kind": "OMS",
"name": "times"
},
"arguments": [
{
"kind": "OMV",
"name": "b"
},
{
"kind": "OMV",
"name": "x"
}
],
"kind": "OMA"
}
],
"kind": "OMA"
},
{
"kind": "OMV",
"name": "m"
}
],
"kind": "OMA"
},
"variables": [
{
"kind": "OMV",
"name": "x"
}
]
}
],
"kind": "OMA"
},
"priority": 7000,
"profiles": [
"default"
],
"provenance": {
"method": "derived",
"sources": [
{
"license": "MIT",
"locator": "rubi:1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.1 (a+b x)^m:4",
"name": "OpenSymbolicRules/Integration",
"revision": "f84ed2a81702836c019e647e0a586b8d576ae7c6"
},
{
"license": "MIT",
"locator": "1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.1 (a+b x)^m.m#4",
"name": "Rubi",
"revision": "4.16.1"
}
]
},
"replacement": {
"binder": {
"cd": "fns1",
"kind": "OMS",
"name": "lambda"
},
"kind": "OMBIND",
"object": {
"applicant": {
"cd": "arith1",
"kind": "OMS",
"name": "times"
},
"arguments": [
{
"applicant": {
"cd": "arith1",
"kind": "OMS",
"name": "power"
},
"arguments": [
{
"applicant": {
"cd": "arith1",
"kind": "OMS",
"name": "plus"
},
"arguments": [
{
"kind": "OMV",
"name": "a"
},
{
"applicant": {
"cd": "arith1",
"kind": "OMS",
"name": "times"
},
"arguments": [
{
"kind": "OMV",
"name": "b"
},
{
"kind": "OMV",
"name": "x"
}
],
"kind": "OMA"
}
],
"kind": "OMA"
},
{
"applicant": {
"cd": "arith1",
"kind": "OMS",
"name": "plus"
},
"arguments": [
{
"kind": "OMV",
"name": "m"
},
{
"integer": 1,
"kind": "OMI"
}
],
"kind": "OMA"
}
],
"kind": "OMA"
},
{
"applicant": {
"cd": "arith1",
"kind": "OMS",
"name": "power"
},
"arguments": [
{
"applicant": {
"cd": "arith1",
"kind": "OMS",
"name": "times"
},
"arguments": [
{
"kind": "OMV",
"name": "b"
},
{
"applicant": {
"cd": "arith1",
"kind": "OMS",
"name": "plus"
},
"arguments": [
{
"kind": "OMV",
"name": "m"
},
{
"integer": 1,
"kind": "OMI"
}
],
"kind": "OMA"
}
],
"kind": "OMA"
},
{
"integer": -1,
"kind": "OMI"
}
],
"kind": "OMA"
}
],
"kind": "OMA"
},
"variables": [
{
"kind": "OMV",
"name": "x"
}
]
},
"symbols": [
"http://www.openmath.org/cd/calculus1#int",
"http://www.openmath.org/cd/fns1#lambda",
"http://www.openmath.org/cd/arith1#power",
"http://www.openmath.org/cd/arith1#plus",
"http://www.openmath.org/cd/arith1#times",
"http://www.openmath.org/cd/relation1#neq"
],
"variables": [
{
"kind": "OMV",
"name": "x"
},
{
"kind": "OMV",
"name": "a"
},
{
"kind": "OMV",
"name": "b"
},
{
"kind": "OMV",
"name": "m"
}
],
"verification": [
{
"axioms": [
"Classical.choice",
"Quot.sound",
"propext"
],
"carrier": {
"cd": "setname1",
"kind": "OMS",
"name": "R"
},
"certified": true,
"domain": "real",
"lean_toolchain": "leanprover/lean4:v4.35.0",
"mapping_assurance": "reviewed",
"mathlib_revision": "56a005855ea17e0b0958f73ec801ae140b0a1679",
"module": "OSR.Calculus",
"prover": "lean4",
"source_digest": "sha256:91657130570f4d8ff783442b329fe1b367f8c2f0c9ed93072ca5bbc1631cbcd2",
"statement": "OSR.Calculus.CRule.Holds OSR.IntegrationRec37.linearPowerNondeg OSR.Domain.real",
"status": "proved",
"theorem": "OSR.IntegrationRec37.linearPowerNondeg_real"
},
{
"axioms": [
"Classical.choice",
"Quot.sound",
"propext"
],
"carrier": {
"cd": "setname1",
"kind": "OMS",
"name": "C"
},
"certified": true,
"domain": "complex",
"lean_toolchain": "leanprover/lean4:v4.35.0",
"mapping_assurance": "reviewed",
"mathlib_revision": "56a005855ea17e0b0958f73ec801ae140b0a1679",
"module": "OSR.Calculus",
"prover": "lean4",
"source_digest": "sha256:91657130570f4d8ff783442b329fe1b367f8c2f0c9ed93072ca5bbc1631cbcd2",
"statement": "OSR.Calculus.CRule.Holds OSR.IntegrationRec37.linearPowerNondeg OSR.Domain.complex",
"status": "proved",
"theorem": "OSR.IntegrationRec37.linearPowerNondeg_complex"
}
]
}