home / skills / plurigrid / asi / birkhoff-average

birkhoff-average skill

/skills/birkhoff-average

This skill computes the time average of an observable along a trajectory to analyze long term dynamics and stability.

npx playbooks add skill plurigrid/asi --skill birkhoff-average

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.0 KB
---
name: birkhoff-average
description: Time average of observable along trajectory
trit: 0
geodesic: true
moebius: "μ(n) ≠ 0"
---

# Birkhoff Average

**Trit**: 1 (PLUS)
**Domain**: Dynamical Systems Theory
**Principle**: Time average of observable along trajectory

## Overview

Birkhoff Average is a fundamental concept in dynamical systems theory, providing tools for understanding the qualitative behavior of differential equations and flows on manifolds.

## Mathematical Definition

```
BIRKHOFF_AVERAGE: Phase space × Time → Phase space
```

## Key Properties

1. **Local behavior**: Analysis near equilibria and invariant sets
2. **Global structure**: Long-term dynamics and limit sets  
3. **Bifurcations**: Parameter-dependent qualitative changes
4. **Stability**: Robustness under perturbation

## Integration with GF(3)

This skill participates in triadic composition:
- **Trit 1** (PLUS): Sources/generators
- **Conservation**: Σ trits ≡ 0 (mod 3) across skill triplets

## AlgebraicDynamics.jl Connection

```julia
using AlgebraicDynamics

# Birkhoff Average as compositional dynamical system
# Implements oapply for resource-sharing machines
```

## Related Skills

- equilibrium (trit 0)
- stability (trit +1)  
- bifurcation (trit +1)
- attractor (trit +1)
- lyapunov-function (trit -1)

---

**Skill Name**: birkhoff-average
**Type**: Dynamical Systems / Birkhoff Average
**Trit**: 1 (PLUS)
**GF(3)**: Conserved in triplet composition

## Non-Backtracking Geodesic Qualification

**Condition**: μ(n) ≠ 0 (Möbius squarefree)

This skill is qualified for non-backtracking geodesic traversal:

1. **Prime Path**: No state revisited in skill invocation chain
2. **Möbius Filter**: Composite paths (backtracking) cancel via μ-inversion
3. **GF(3) Conservation**: Trit sum ≡ 0 (mod 3) across skill triplets
4. **Spectral Gap**: Ramanujan bound λ₂ ≤ 2√(k-1) for k-regular expansion

```
Geodesic Invariant:
  ∀ path P: backtrack(P) = ∅ ⟹ μ(|P|) ≠ 0
  
Möbius Inversion:
  f(n) = Σ_{d|n} g(d) ⟹ g(n) = Σ_{d|n} μ(n/d) f(d)
```

Overview

This skill computes the Birkhoff time average of an observable along trajectories of a dynamical system. It captures long-term, asymptotic behavior by averaging values sampled along orbits, helping identify invariant measures, attractors, and typical motion. The implementation is designed for analytical and numerical exploration within compositional dynamical frameworks.

How this skill works

Given a phase space point and an observable, the skill iterates the flow or map and accumulates time averages of the observable along the trajectory. It reports convergence diagnostics and can combine averages across initial conditions to approximate invariant measures. The tool supports integration with compositional systems and enforces algebraic compatibility in triadic compositions.

When to use it

  • Estimate long-term average values of observables for a flow or discrete map
  • Identify invariant sets, ergodic components, or typical orbit behavior
  • Compare stability or bifurcation-induced changes in time-averages
  • Generate numerical evidence for ergodicity or its breakdown
  • Compose with other dynamical primitives in algebraic workflows

Best practices

  • Choose sufficiently long integration times and multiple initial conditions to test convergence
  • Monitor convergence speed and variance; use running-window checks for stationarity
  • Combine with stability and bifurcation analyses to interpret average changes
  • Use observables that are continuous or smooth on the region of interest to improve numerical behavior
  • Document trit/composition bookkeeping when integrating into algebraic pipelines

Example use cases

  • Compute the time-averaged energy along trajectories to detect attractors in a mechanical system
  • Aggregate averages over many initial states to approximate an invariant measure on a chaotic attractor
  • Track how a parameter sweep alters long-term averages to reveal bifurcation thresholds
  • Filter non-backtracking traversal data using Möbius-based cancellation in combinatorial state networks
  • Embed into compositional workflows that require GF(3)-compatible skill triplets

FAQ

How long must I run the trajectory for reliable averages?

Run until the running average stabilizes within a tolerance and verify with multiple initial conditions; chaotic systems typically require much longer times.

Can this detect ergodicity?

It provides numerical evidence: consistent averages across generic initial conditions suggest ergodicity, but rigorous proof requires additional analysis.

What observables work best?

Continuous or smooth observables that reflect quantities of interest (energy, coordinate projections, indicator functions) give clearer convergence behavior.