# skolodynski/isarmathlib architecture

> Architecture diagram of the GitHub repository skolodynski/isarmathlib, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/skolodynski/isarmathlib
- Repository: https://github.com/skolodynski/isarmathlib

## Overview

##### Main Components Identification

a. Core Library Structure
- Mathematical Theory Files (.thy files)
- Documentation Generation System
- Proof Verification System
- HTML/LaTeX Rendering Components

**┌─ User Interface Layer ─────────────────────┐**
- HTML Documentation                       │
- PDF Documentation                        │
- Interactive Isabelle Interface           │
- ┘

**┌─ Processing Layer ──────────────────────────┐**
- ┌─ isar2html Component ─┐ ┌─ Documentation ┐│
- HTML Generation     │ │ - LaTeX        ││
- JavaScript         │ │ - PDF Gen      ││
- ┘ └──────────────┘│
- ┘

**┌─ Theory Layer ────────────────────────────┐**
- Mathematical Theories (.thy files)      │
- Proof Definitions                       │
- Theorems and Lemmas                     │
- ┘

**┌─ Infrastructure Layer ───────────────────────┐**
- Isabelle/ZF System                        │
- Build System                              │
- Verification Workflows                     │
- ┘

##### Important Relationships
- Theory files dependencies (based on imports)
- Documentation generation flow
- Verification workflow
- Build process flow

##### Additional Elements
- Version information
- External dependencies (LaTeX, Isabelle)
- Documentation generation paths

##### Implementation Notes
- Bidirectional relationships where applicable
- Version control integration points

##### The build and deployment workflow

Remember to maintain clarity by using appropriate spacing and grouping related components together. Consider creating separate detailed views for complex subsystems like the theory hierarchy or documentation generation process.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Style Definitions
    classDef ui fill:#a8d1f0,stroke:#333
    classDef processing fill:#90EE90,stroke:#333
    classDef theory fill:#FFE5B4,stroke:#333
    classDef infra fill:#E0E0E0,stroke:#333
    
    subgraph UI["User Interface Layer"]
        HTML["HTML Documentation"]:::ui
        PDF["PDF Documentation"]:::ui
        ISA["Interactive Isabelle Interface"]:::ui
    end

    subgraph Processing["Processing Layer"]
        subgraph HTML_Gen["HTML Generation"]
            Export["HTML Generator"]
            Parser["Parser Components"]
            Symbols["Symbol Processing"]
        end

        subgraph Doc_Gen["Documentation Generation"]
            LaTeX["LaTeX Support"]
            Templates["Documentation Templates"]
            CSS["CSS Styling"]
            JS["JavaScript Components"]
        end
    end

    subgraph Theory["Theory Layer"]
        subgraph Math["Mathematical Theories"]
            Group["Group Theory"]
            Ring["Ring Theory"]
            Topo["Topology"]
        end
    end

    subgraph Infra["Infrastructure Layer"]
        IsabelleZF["Isabelle/ZF System"]:::infra
        Build["Build System"]:::infra
        Verify["Verification System"]:::infra
        StyleCheck["Style Checking"]:::infra
    end

    %% Relationships
    Theory --> Processing
    Processing --> UI
    Infra --> Theory
    HTML_Gen --> HTML
    Doc_Gen --> PDF
    IsabelleZF --> Math
    Verify --> Theory
    StyleCheck --> Theory

    %% Click Events
    click Group "https://github.com/SKolodynski/IsarMathLib/blob/master//IsarMathLib/Group_ZF*.thy"
    click Ring "https://github.com/SKolodynski/IsarMathLib/blob/master//IsarMathLib/Ring_ZF*.thy"
    click Topo "https://github.com/SKolodynski/IsarMathLib/blob/master//IsarMathLib/Topology_ZF*.thy"
    click Export "https://github.com/SKolodynski/IsarMathLib/blob/master//isar2html/src/Export2Html.hs"
    click LaTeX "https://github.com/SKolodynski/IsarMathLib/blob/master//IsarMathLib/document/root.tex"
    click Templates "https://github.com/SKolodynski/IsarMathLib/blob/master//isar2html/isar2html_template.html"
    click HTML "https://github.com/SKolodynski/IsarMathLib/blob/master//docs/IsarMathLib/*.html"
    click CSS "https://github.com/SKolodynski/IsarMathLib/blob/master//isar2html/isarhtml/imlstyle.css"
    click JS "https://github.com/SKolodynski/IsarMathLib/blob/master//isar2html/isarhtml/isar2html.js"
    click Verify "https://github.com/SKolodynski/IsarMathLib/blob/master//.github/workflows/verification.yml"
    click StyleCheck "https://github.com/SKolodynski/IsarMathLib/blob/master//.github/workflows/style-check.yml"
    click Parser "https://github.com/SKolodynski/IsarMathLib/blob/master//isar2html/src/IMLParser.hs"
    click Symbols "https://github.com/SKolodynski/IsarMathLib/blob/master//isar2html/src/IsarSym2Latex.hs"

    %% Legend
    subgraph Legend
        UI_L["User Interface"]:::ui
        PROC_L["Processing"]:::processing
        THEORY_L["Theory"]:::theory
        INFRA_L["Infrastructure"]:::infra
    end
```
