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/yourusername/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.0.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.0-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reasonforge-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 01a379cbfe569f4dfb515b10324148f55d31b03fa8811800aee1e455e541fc77
MD5 9a2b31d7f73880867b566f862d04de22
BLAKE2b-256 00403ebd2832f78dca98387767e8c233243e09d4057a1f11468df4e6347d3c04

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reasonforge-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 049733edc96216e1b035d6d88e1b3b7c963145edc46e39110722b8bb22331451
MD5 6ee93288a3bc2bbc1480d3d1516b7f06
BLAKE2b-256 1ff71045d53528757cf7101ad52c0f4490807c2caa05fad4168402a62b378906

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