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

To install the complete ReasonForge ecosystem with all domain-specific packages:

pip install reasonforge[all]

This installs: reasonforge-logic, reasonforge-algebra, reasonforge-expressions, reasonforge-analysis, reasonforge-geometry, reasonforge-statistics, and reasonforge-physics.

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.2.tar.gz (17.5 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.2-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reasonforge-0.1.2.tar.gz
  • Upload date:
  • Size: 17.5 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.2.tar.gz
Algorithm Hash digest
SHA256 83bfc05ccf4672270cdcb67d17346809c4ed6ee9143ecf64d2a8855efdbca37e
MD5 92a83d81d8d6c5eb61056c1d8d398fc5
BLAKE2b-256 f9d88b9e6bc315ee97121a00a1d50f0aef855eb648bc5fd338e04db71fbaed53

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reasonforge-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2a23783015d8842530f5514bb3ce98a1e082125579ff0baecaf5d005ba16c759
MD5 9ced341e7f0f7b7f1a7d9e807927e59f
BLAKE2b-256 fbd99347f02e63514f17afcea3f8de78a4619386a4b40e283131f0268e49fd37

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