Skip to content

A catalogue of the library's operations, by name - #2121

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
catalogue-of-operations
Oct 25, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
catalogue-of-operations

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #1684, the first of two PRs. The second puts the MCP server's tools on this.

Core/Operations/Catalogue.cs lists the operations the library offers by name, 33 of them. Each entry has a one-line description and the arguments it takes besides its input.

kind entries
transformations, each with its relation simplify, normalize, expand, factorize, differentiate, integrate, limit, substitute
queries on an expression solve, solve_system, evaluate, evaluate_numerically, variables, alternatives, latex, sympy, truth_table, satisfying_assignments, series
queries on a number to_base, from_base
queries on a matrix determinant, inverse, transpose, rank, reduced_row_echelon_form, trace, tensor_product
queries on an integer prime_factorization, totient, greatest_common_divisor, divisor_count, is_prime
  • Each entry answers exactly what the method it names answers. Catalogue.Differentiate.Apply(e, x, 2) is e.Differentiate(x, 2), so a surface that switches to the catalogue changes no answer.
  • Internal until v3, in a namespace of its own, as decided on the issue. Transformation and its factories stay where they are.
  • Names follow Pending breakages: changes agreed or arguable that cannot ship before a major version #1019 item 16's v3 column, the library's own verbs.
  • What is not an entry: the building blocks Transformation also names, such as RationalCanonicalization, EqualitySaturation and Rewriting(ruleSet). A caller composes them, and none of them answers a question by itself.

CatalogueTest (15 tests) checks:

  • that All holds every entry declared, once;
  • that names are lowercase words joined by underscores, and each description is one sentence;
  • that each entry's parameters are its delegate's arguments after the input;
  • that each transformation entry claims the same relation as its Transformation;
  • that every public factory of Transformation is either an entry or a building block with its reason. A new factory fails until it is placed. Removing Rewriting and Expansion from those lists fails the test, naming both;
  • that each entry's answer equals the method's own on an input where it and its neighbours differ. For example, simplify and normalize are both checked on sin(x)^2 + cos(x)^2.

Checked:

  • The library builds for netstandard2.0, net8.0 and net10.0.
  • The full suite passes: 17,054 passed, 0 failed, 13 skipped. That run was on the first 30 entries; adding satisfying_assignments, to_base and from_base touched only Catalogue.cs and its test, and CatalogueTest passes on them.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Part of #1684

The terminal's commands and the MCP server's tools each call the library
themselves, and nothing keeps the three in step. Core/Operations/Catalogue.cs
lists the operations the library offers by name, thirty-three of them, each
with a one-line description and the arguments it takes besides its input:
- eight transformations, simplify to substitute, each with the relation it
  claims;
- queries, whose answer is not an expression standing for the input:
  solve, evaluate, latex, the truth table and its satisfying assignments,
  the series, base conversion, the matrix operations and the number theory.

Each entry answers exactly what the method it names answers, so a surface
that switches to it changes no answer. The names are #1019 item 16's v3
column, the library's own verbs.

Internal until v3, as decided on the issue, in a namespace of its own.
Transformation and its factories stay where they are.

CatalogueTest checks that the list holds every entry once, that each
entry's parameters are its delegate's arguments after the input, and that
each transformation entry claims what its Transformation claims. It also
places every factory of Transformation as an entry or as a building block
with its reason, so a new factory fails until it is placed. Removing two
factories from those lists fails it and names them both.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet Rafael-SOWNet added this to the 2.7.0 milestone Oct 25, 2026
@Rafael-SOWNet Rafael-SOWNet moved this from Todo to In review in AngouriMath Oct 25, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 5999db4 into master Oct 25, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in AngouriMath Oct 25, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the catalogue-of-operations branch October 26, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant