Source: Algebra at 3a8b8a9acc0f.
OSR v1 files#
v1/ holds the Algebra rule set in the OSR v1 interchange format
(Specification, docs/osr-v1.md). These files are generated, never edited
by hand:
| File | Content |
|---|---|
v1/algebra.osr.json | The 24 rules: OpenMath patterns, conditions, profiles, and per-domain verification records (Lean theorem, status, assurance). |
v1/algebra.report.json | Machine-readable audit: metrics per domain and the termination proof of every profile. |
v1/algebra.report.md | The same audit for humans. |
Where they come from#
OpenSymbolicRules/Leanstates each rule and proves it with Mathlib, over ℝ and ℂ (OSR/Algebra.lean).scripts/Export.leanwrites the files above.OpenSymbolicRules/Verificationpublishes the export underreports/<source digest>/and can rebuild it independently (scripts/recheck.sh).- This repository copies the published files. The CI checks that they validate against the v1 schema, share one source digest, and are byte-identical to the published report.
Differences from v0.1#
The v0.1 files in rules/ remain for the v0.1 loader of OpenSymbolicRules.jl
and will be removed in a later breaking release. In v1:
- all 20 v0.1 rules are migrated and proved: 20 over ℝ, 18 over ℂ;
- four square-root rules are authored in OSR, without a v0.1 counterpart, with
the real principal square root (
arith1#rootwith index 2), each proved over ℝ and not stated over ℂ (arith1#rootandarith1#abshave no complex interpretation):algebra.root.sqrt_sq_nonneg:sqrt(a^2) ⟶ afora ≥ 0(OSR.Algebra.sqrtSq_real, MathlibReal.sqrt_sq);algebra.root.sqrt_sq_abs:sqrt(a^2) ⟶ |a|, unconditional, so the reference engine applies it (OSR.Algebra.sqrtSqAbs_real, MathlibReal.sqrt_sq_eq_abs);algebra.root.sq_sqrt:(sqrt a)^2 ⟶ afora ≥ 0(OSR.Algebra.sqSqrt_real, MathlibReal.sq_sqrt);algebra.root.sqrt_mul:sqrt(a b) ⟶ sqrt a sqrt bfora, b ≥ 0(OSR.Algebra.sqrtMul_real, MathlibReal.sqrt_mul).ln(a b) = ln a + ln bandln(a^b) = b ln aare stated over ℝ only, because their positivity conditions have no complex meaning;
IntegerQ pbecomes the conditionp ∈ ℤ(set1#inwithsetname1#Z);- powers (
arith1#power) are interpreted for integer exponents only, so1^x = 1andln(a^b) = b ln aare certified where the exponent is an integer; exp(ln z) = zkeeps the v0.1 conditionz ≠ 0. Over ℝ it holds only becauseln zis defined forz > 0alone: engines must not apply it to a negative realz;- the two profiles
default(simplification and expansion) andfactor_polynomialsare proved to terminate under the reference strategy (LeanOSR.Algebra.default_terminates,OSR.Algebra.factor_terminates); - the reference engine applies unconditional rules only; the power rules
with conditions,
ln(a b),ln(a^b)andexp(ln z)are carried with their conditions for engines that can decide them.
Updating#
just update-v1 <Verification>/reports/<digest>Then update the Verification commit pinned in
.github/workflows/validate-schemas.yml.