Source: Calculus at 7081bbc05904.
OSR v1 files#
v1/ holds the Calculus rules that the OSR v1 fragment can state, in the
OSR v1 interchange format (Specification, docs/osr-v1.md). These files are
generated, never edited by hand:
| File | Content |
|---|---|
v1/calculus.osr.json | 29 rules: derivatives diff(λx. F) ⟶ λx. G and two-sided limits limit(a, both_sides, λx. F) ⟶ L, with lambdas as OMBIND fns1#lambda, and verification records over ℝ and ℂ. |
v1/calculus.report.json | Machine-readable audit: metrics per domain and the rules not migrated. |
v1/calculus.report.md | The same audit for humans. |
Where they come from#
OpenSymbolicRules/Leanstates each rule with Mathlib’s analysis (OSR/Calculus.lean): a derivative rule isHasDerivAtwherever the function is defined near the point; a limit rule isTendstoalong the punctured neighbourhood.OpenSymbolicRules/Verificationpublishes the export underreports/<source digest>/and can rebuild it independently.- 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.
In v1:
- 29 of the 32 rules are migrated: the derivatives of
x,sin,cos,exp,ln,tan,arctan, of the hyperbolic functions, ofcot,sec,csc, of the inverse trigonometric and hyperbolic functions, of a constant, the power rule, the limit of a constant and the five limits at 0. 28 are proved over ℝ and 16 over ℂ.Sqrtbecomesarith1#root(x, 2); FreeQbecomes anindependentmatching constraint: the metavariable’s match must not mention the bound variable;- the v0.1 power rule
diff(λx. x^n) = λx. n x^(n-1)is false atn = 0,x = 0(x^0is defined around 0,0 · x^(-1)is not); it is distributed with the statuscounterexampleand a Lean proof of its negation, and would hold with the conditionn ≠ 0; - 3 structural rules remain not migrated: their v0.1 patterns omit the
differentiability assumptions required by the sum, difference and product
rules, and their
osr#Applynode is outside the OpenMath fragment; - a rule applies at the root of a
difforlimitterm and keeps the input’s bound variable; its result is a lambda or a value, so normalization takes one step at most.
Updating#
just update-v1 <Verification>/reports/<digest>Then update the Verification commit pinned in the CI workflow.