Skip to content

AI agent workflow for Lie group methods in differential equations (REDUCE CAS + ReLie)

License

Notifications You must be signed in to change notification settings

hinsley/DiffSymAgent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DiffSymAgent: Agentic Workspace for Lie Symmetry Analysis

This repo is a ready-to-run workspace for Lie symmetry analysis using REDUCE + ReLie, designed for OpenAI Codex (and similar agents) to run the CAS workflow inside Docker.

Quick start (Codex)

  1. Install Docker Desktop (or Colima) and ensure the daemon is up: docker --version then docker info.
  2. Open this repo in Codex CLI.
  3. Ask for a symmetry computation. Example prompt:
$reduce-relie-lie-symmetries Compute point symmetries of u_t = c*u_xx.

The agent will load ReLie from resources/relie-src/relie.red, run REDUCE in Docker, and interpret generators in plain language.

Using the skills in your own Codex agent

Two options:

  • Repo-local (recommended): keep .codex/skills in this repo and run Codex from the repo root.
  • Global install: copy or symlink the skill folders into $CODEX_HOME/skills (default ~/.codex/skills), for example:
rsync -a skills/ ~/.codex/skills/

or:

ln -s "$(pwd)/skills/reduce-relie-basics" ~/.codex/skills/
ln -s "$(pwd)/skills/reduce-relie-lie-symmetries" ~/.codex/skills/
ln -s "$(pwd)/skills/reduce-crack-basics" ~/.codex/skills/

Skills included:

  • reduce-relie-basics (Docker + ReLie bootstrap)
  • reduce-relie-lie-symmetries (point/conditional/etc symmetries + interpretation)
  • reduce-crack-basics (CRACK workflows, used by ReLie)

Docker + REDUCE details

  • Container image: lunacamp/reduce-algebra
  • ReLie source is vendored at resources/relie-src/relie.red
  • Apple Silicon: keep --platform linux/amd64

Example command (non-interactive):

docker run --rm -i --platform linux/amd64 \
  -v "$PWD":/workspace -w /workspace \
  --entrypoint /usr/lib/reduce/cslbuild/csl/reduce \
  lunacamp/reduce-algebra <<'EOF'
in "resources/relie-src/relie.red"$

jetorder := 2$
xvar := {t,x}$
uvar := {u}$
diffeqs := {u_t - c*u_xx}$
leadders := {u_t}$

relie(4)$
reliegen(1,{})$

symmetries;
generators;
bye;
EOF

Troubleshooting Docker

  • Daemon not running: open -a Docker (macOS) or colima start, then wait until docker info succeeds.
  • Permission denied on docker.sock: fix socket permissions or run the command with elevated permissions (Codex sandboxing may require escalation).

FAQ

Q: Do I need to pull the image first? A: No. The first docker run will pull lunacamp/reduce-algebra automatically if missing.

Q: Does this require network access? A: Only for the initial image pull (and any future image updates). Everything else runs locally.

Q: ReLie returns no solutions or stalls. What should I do? A: Turn on CRACK verbosity (onprintcrack()), run the staged pipeline relieinit, relieinv, reliedet, reliesolve, and inspect invcond/deteqs.

Q: Can I use my own ReLie fork? A: Yes. Replace resources/relie-src/relie.red and rerun.

Repository layout

  • .codex/skills/: Codex-discoverable skills (mirrors skills/)
  • skills/: Skills source for reuse or global install
  • resources/: ReLie sources and interpretation notes
  • examples/: Example prompts/sessions

About

AI agent workflow for Lie group methods in differential equations (REDUCE CAS + ReLie)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published