Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Symbolic Lie Algebra Engine

Java Status

A computational tool for calculating generator actions in the enveloping algebra of sl(4,ℂ). Automates complex algebraic transformations with expression simplification and formatted output.

Table of Contents

Quick Example

Simple Operation

Input Generator: Xa
Input Operator: vbc

Output:
(Xa).(vbc) = vabc

Complex Computation Example

Context: Evaluation of a composite generator expression acting on operators across V, W, and Z modules.

Command:

$ java SourceCode/Main

Input Configuration:

Generator expression: HaXa - XabcYabc

Operators: vabc vbc zbc zb wa wabc w_O v_O z_O zabc

Additional generators: no

Available Mathematical Objects:

Generators:
  X = {Xa, Xb, Xc, Xab, Xbc, Xabc}
  Y = {Ya, Yb, Yc, Yab, Ybc, Yabc}
  H = {Ha, Hb, Hc}

Vector Spaces (Modules):
  V = {vabc, vbc, vc, v_O}
  W = {wabc, wab, wa, w_O}
  Z = {zabbc, zabc, zab, zbc, zb, z_O}

Computation Process (simplified):

Applying generators in sequence: [Ha, Xa]

Step 1: Evaluating Xa action
(Xa).((vabc)(vbc)(zbc)(zb)(wa)(wabc)(w_O)(v_O)(z_O)(zabc))

Step 2: Intermediate expression expansion completed

Step 3: Applying remaining generator Ha to expanded expression

Note: Full computation process was simplified for demonstration purposes.

Final Result:

(HaXa - XabcYabc).(vabc)(vbc)(zbc)(zb)(wa)(wabc)(w_O)(v_O)(z_O)(zabc) =

  -1(vabc)(vbc)(zabc)(zb)(wa)(wabc)(wc)(v_O)(z_O)(zabc)
  +1(vabc)(vbc)(zabc)(zb)(wa)(wabc)(w_O)(v_O)(z_O)(zabc)
  -1(vabc)(vbc)(zbc)(zab)(wa)(wabc)(wc)(v_O)(z_O)(zabc)
  -1(vabc)(vabc)(zbc)(zb)(wa)(wabc)(wc)(v_O)(z_O)(zabc)
  +1(vabc)(vbc)(zbc)(zab)(wa)(wabc)(w_O)(v_O)(z_O)(zabc)
  +1(vabc)(vabc)(zbc)(zb)(wa)(wabc)(w_O)(v_O)(z_O)(zabc)
  -1(vabc)(vbc)(zbc)(zb)(wa)(wabc)(wa)(v_O)(z_O)(zabc)
  -6(vabc)(vbc)(zbc)(zb)(wa)(wabc)(w_O)(v_O)(z_O)(zabc)

What The Engine Does Automatically

  • Validates mathematical expressions against defined generator/operator sets
  • Computes multi-step transformations with intermediate results
  • Simplifies and groups like terms with proper coefficients
  • Formats output for mathematical readability
  • Handles composite generator expressions (e.g., HaXa - XabcYabc)
  • Processes operators across multiple vector space modules

Overview

Working with Lie algebra sl(4,ℂ) involves computing how generators act on operators across three vector space modules. Manual calculation is error-prone and impractical for complex expressions.

This engine provides an interactive command-line interface that:

  • Handles generator-operator calculations automatically
  • Shows intermediate steps for verification
  • Supports nested operations (generators acting within generator actions)
  • Validates input and simplifies output expressions

Mathematical Context

sl(4,ℂ) is the special linear Lie algebra of 4×4 complex matrices with trace zero, fundamental in representation theory and theoretical physics.

Key Features

Core Capabilities

  • Interactive Input System - Simple prompts for generators and operators with real-time validation
  • Step-by-Step Computation - Visualize each transformation in the calculation process
  • Expression Simplification - Automatic grouping and simplification of algebraic terms
  • Nested Operations - Apply generators within generator actions recursively
  • Dynamic Management - Add or reuse generators at any point during execution

Performance

  • Handles expressions with 100+ terms efficiently
  • Supports deeply nested operations (tested up to 10+ levels)
  • Optimized expression grouping algorithm

Getting Started

Prerequisites

Java 21 or higher

Installation

Clone the repository:

git clone https://github.com/ismiljannic/symbolic-lie-algebra-engine.git
cd symbolic-lie-algebra-engine

Compile and run:

javac SourceCode/Main.java
java SourceCode/Main

IDE Setup (IntelliJ/Eclipse)

  1. Import as Java project
  2. Set JDK to version 21
  3. Run Main.java

Usage

Basic Workflow

1. Enter generators:

2. Enter operators:

3. View computed results:

Advanced Features

Dynamic generator addition during execution:

Input validation with helpful error messages:

Project Structure

symbolic-lie-algebra-engine/
├── docs/
│   └── golden-tests/
│   └── cli-transcripts.md
│   └── docsHR.pdf
│   └── finalPaperHR.pdf
│   └── finalPaperPresentationHR.pptx
│   └── README.md
│   └── test-cases.json
│   └── test-cases.md
├── Pictures/
├── SourceCode/
│   └── generatorPackage
│   └── modulesPackage
│   └── Main.java
└── README.md

Technical Details

Built With: Java 21 • Command-Line Interface • Monolithic

Architecture

Main Class - Core computation engine orchestrating all transformations

Design Note: The engine is intentionally implemented as a single Main.java class to prioritize computational efficiency and minimize runtime overhead. This monolithic approach eliminates object instantiation costs and method dispatch latency, making it optimal for intensive algebraic computations where performance is critical. For production systems requiring extensibility, this could be refactored into a modular architecture.

Key Components:

  • main() - Program entry point, manages generator/operator lists and user interaction flow
  • handleNextUserInput() - Processes dynamic generator input during runtime
  • addExtraGenerators() - Pre-loads additional generators at program start
  • generatorAction() - Implements nested generator operations recursively

Algorithm Approach

  1. Parse and validate user input against allowed generator/operator sets
  2. Apply generator transformations using defined algebraic rules
  3. Collect resulting terms in intermediate data structures
  4. Group and simplify like terms
  5. Format output with proper mathematical notation

For detailed implementation documentation see Documentation.

Contact

Ivan Smiljanić - ssmiljanicivan@gmail.com

Project Link: https://github.com/ismiljanic/symbolic-lie-algebra-engine


Ivan Smiljanić • 2024

About

Symbolic computation engine for calculating generator actions in sl(4,ℂ) enveloping algebra. Built with Java 21 for algebraic transformation and expression simplification.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages