Asgard
A mathematical framework for modeling, simulating, and reasoning about dynamical systems using Linear Categorical Logic.
Unified Framework
One system for ODEs, SDEs, PDEs, and discrete equations. Express systems in natural mathematical notation.
Multiple Calculi
Same system, different interpretations. Switch between deterministic, stochastic, and discrete calculi.
Composable Circuits
Build complex systems from simple operations. Compose, parallelize, and trace circuits algebraically.
JAX-Powered
Fast execution with automatic differentiation and GPU acceleration through JAX.
Proof System
Reason about and transform systems algebraically using rewrite rules and tactics.
LEAN-Style Syntax
Standard mathematical notation for equations. Familiar syntax for mathematicians and researchers.
Getting Started Quickly
Install Asgard and create your first circuit in minutes.
# Clone the repository
git clone https://github.com/arnovich/gimle-asgard.git
cd gimle-asgard
# Install with uv
uv sync
# Verify installation
uv run python -c "from gimle.asgard.circuit.circuit import Circuit; print('Asgard installed!')"
Or create and run a simple integration:
from gimle.asgard.circuit.circuit import Circuit
from gimle.asgard.runtime.stream import Stream, StreamState
import jax.numpy as jnp
# Create a circuit that integrates along dimension x
circuit = Circuit.from_string("register(x)")
# Input: f(x) = x (Taylor coefficients [0, 1])
input_stream = Stream(
data=jnp.array([[0.0, 1.0]]),
dim_labels=("x",),
chunk_size=1
)
# Execute the circuit
outputs, state = circuit.execute([input_stream], StreamState())
print(f"Output: {outputs[0].data}") # [0, 0, 1] representing x^2/2
Use Cases
Climate & Weather
Model complex atmospheric dynamics and simulate climate patterns.
Finance
Option pricing, risk analysis, and stochastic process simulation.
Physics & Engineering
Solve differential equations and simulate physical systems.
Research
Explore connections between computation and dynamical systems theory.
Next Steps
- Getting Started - Set up and create your first circuit
- Core Concepts - Understand equations, circuits, and runtime
- Reference - Grammar specifications and operation details
- Theory - Mathematical foundations and LCL introduction
- Examples - Learn from working examples
- API Reference - Detailed API documentation
- Advanced Topics - Gradient optimization and sensitivity analysis