Skip to main content

Core symbolic computation library for ReasonForge - 100% accuracy mathematical reasoning

Project description

ReasonForge Core Library

Standalone symbolic computation library for mathematical reasoning

ReasonForge is a pure Python library that provides symbolic mathematical computation using SymPy. It serves as the core computation engine for all ReasonForge MCP servers.

Features

  • Deterministic: Exact symbolic computation using SymPy
  • Complete State Management: Variables, expressions, matrices, quantum states
  • Advanced Mathematics: Calculus, algebra, optimization, pattern recognition
  • Pure Python: No MCP dependencies, use anywhere
  • Well-Tested: Foundation for 462 passing tests across MCP servers

Installation

pip install reasonforge

Quick Start

from reasonforge import SymbolicAI

# Create symbolic AI instance
ai = SymbolicAI()

# Define variables
x, y = ai.define_variables(['x', 'y'])

# Solve equations
result = ai.solve_equation_system([
    x**2 + y**2 - 25,  # Circle
    x + y - 7           # Line
])

print(result['solutions'])
# [{'x': 3, 'y': 4}, {'x': 4, 'y': 3}]

Core Capabilities

Equation Solving

ai.solve_equation_system([x**2 - 5*x + 6], [x])

Calculus Operations

ai.perform_calculus("sin(x)*cos(x)", "x", operation="diff")
ai.perform_calculus("x**2", "x", operation="integrate")

Optimization

ai.optimize_function("x**2 + y**2", variables=[x, y])

Pattern Recognition

ai.pattern_recognition([1, 4, 9, 16, 25])  # Recognizes n^2 pattern

Matrix Operations

ai.matrix_operations([[[1, 2], [3, 4]]], operation="eigenvalues")

Logical Reasoning

ai.logical_reasoning(["A -> B", "A"], conclusion="B")

State Management

The SymbolicAI class maintains state for:

  • Variables: Symbolic variables with assumptions
  • Expressions: Named expressions with auto-incrementing keys
  • Functions: Function symbols for differential equations
  • Matrices: Matrix objects with keys
  • Metrics: Tensor/metric objects for general relativity
  • Coordinate Systems: Vector calculus coordinate systems
  • Quantum States: Quantum state vectors and density matrices

Dependencies

  • sympy>=1.12 - Symbolic mathematics
  • numpy>=1.24.0 - Numerical operations
  • matplotlib>=3.7.0 - Visualization

Used By

ReasonForge core library is used by:

License

MIT License - See LICENSE file for details

Citation

@software{reasonforge_core,
  title = {ReasonForge: Core Symbolic Computation Library},
  author = {Derek Fox},
  year = {2025},
  description = {Standalone Python library for exact symbolic mathematical reasoning},
  url = {https://github.com/foxintheloop/ReasonForge}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reasonforge-0.1.1.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reasonforge-0.1.1-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file reasonforge-0.1.1.tar.gz.

File metadata

  • Download URL: reasonforge-0.1.1.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for reasonforge-0.1.1.tar.gz
Algorithm Hash digest
SHA256 55dba986865067af8aa70d7ed96aa54729c80b5d354d21b0461df2741bc27de1
MD5 67882b124c05d0a4aabea1eb90656878
BLAKE2b-256 c762ebaba38c7a6af15f8a3ac83888242c7f47ba012c801a3ac7985642fd2c1b

See more details on using hashes here.

File details

Details for the file reasonforge-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: reasonforge-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for reasonforge-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f894d823b010f7f896ebbb8d37bb69e8afa593a12d5de88759521d7bf1f2baa2
MD5 61fb5d0d42973c76d8818a1be3f1e9a1
BLAKE2b-256 057d65462a96b883a036d4339a10ca874311bd5254da24341e0939851ca36599

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page