# eabadir/egpt-lean architecture

> Architecture diagram of the GitHub repository eabadir/egpt-lean, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eabadir/egpt-lean
- Repository: https://github.com/eabadir/egpt-lean

## Overview

This repository is a Lean 4/mathlib fork centered on formalized information theory, entropy-based number systems, complexity proofs, and statistical-physics results. The principal workflow is to build Lean declarations and ask Lean to report their axioms; the README identifies three P=NP proof chains and a Rota entropy theorem capstone. The graph follows those documented domains and dependencies. Source excerpts focus on peripheral mathlib maintenance scripts, so relationships among the proof modules are based on README statements rather than inspected Lean implementations.

Main entry points: [`Mathlib/InformationTheory/Complexity/PPNP.lean`](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Complexity/PPNP.lean) (Information P NP), [`Mathlib/InformationTheory/EntropyNumber/RotaEntropy.lean`](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/EntropyNumber/RotaEntropy.lean) (Rota capstone), [`Mathlib/InformationTheory/Entropy/Concrete.lean`](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Entropy/Concrete.lean) (Concrete entropy), [`Mathlib/InformationTheory/Physics/StatisticalDistributions.lean`](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Physics/StatisticalDistributions.lean) (Statistical distributions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_verification["Proof verification"]
  node_lean["Lean checker"]
  node_bridge["Time-information bridge<br/>[Bridge.lean]"]
  node_base["Instructions and paths<br/>[Basic.lean]"]
end

subgraph group_entropy["Entropy theory"]
  node_shannon["Shannon entropy<br/>[Shannon.lean]"]
  node_axioms["Rota axioms<br/>[Axioms.lean]"]
  node_uniqueness["Entropy uniqueness<br/>[Uniqueness.lean]"]
  node_concrete["Concrete entropy<br/>[Concrete.lean]"]
  node_program["Program complexity<br/>[Program.lean]"]
  node_sourcecoding["Source coding<br/>[SourceCoding.lean]"]
end

subgraph group_numbers["Entropy numbers"]
  node_hierarchy["Entropy number hierarchy<br/>[Hierarchy.lean]"]
  node_rota["Rota capstone<br/>[RotaEntropy.lean]"]
end

subgraph group_complexity["Complexity proofs"]
  node_cnf["CNF representation<br/>[CNF.lean]"]
  node_tableau["SAT tableau<br/>[Tableau.lean]"]
  node_decomposition["SAT decomposition<br/>[Decomposition.lean]"]
  node_utm["Machine walks<br/>[UTM.lean]"]
  node_infochain["Information P NP<br/>[PPNP.lean]"]
  node_identitychain["Identity P NP<br/>[SetRFL.lean]"]
  node_standardchain["Standard P NP"]
end

subgraph group_physics["Statistical physics"]
  node_physicscommon["Physical macrostates<br/>[Common.lean]"]
  node_uniform["Uniform systems"]
  node_distributions["Statistical distributions"]
  node_physicsdist["Physics distributions<br/>[PhysicsDist.lean]"]
end

node_engineer(("Engineer"))

node_engineer -->|"checks proofs"| node_lean
node_lean -->|"reports axioms"| node_rota
node_lean -->|"reports axioms"| node_infochain
node_lean -->|"reports axioms"| node_identitychain
node_lean -->|"reports axioms"| node_standardchain
node_axioms -->|"constrains"| node_uniqueness
node_concrete -->|"shows satisfies"| node_shannon
node_concrete -->|"satisfies"| node_axioms
node_program -->|"establishes RECT"| node_bridge
node_sourcecoding -.->|"uses entropy"| node_shannon
node_hierarchy -.->|"supports scaling"| node_rota
node_rota -->|"uses uniqueness"| node_uniqueness
node_rota -->|"uses Shannon axioms"| node_concrete
node_cnf -->|"walks clauses"| node_tableau
node_tableau -->|"extracts information"| node_infochain
node_decomposition -.->|"supports criterion"| node_infochain
node_utm -.->|"supports walk"| node_infochain
node_hierarchy -->|"provides entropy numbers"| node_identitychain
node_cnf -.->|"provides syntax"| node_identitychain
node_infochain -->|"restated as standard complexity"| node_standardchain
node_physicscommon -.->|"models systems"| node_uniform
node_physicscommon -.->|"provides physical entropy"| node_distributions
node_distributions -->|"equals scaled Shannon"| node_shannon
node_physicsdist -.->|"defines distributions"| node_distributions

click node_bridge "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Bridge.lean"
click node_base "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Basic.lean"
click node_shannon "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Entropy/Shannon.lean"
click node_axioms "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Entropy/Axioms.lean"
click node_uniqueness "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Entropy/Uniqueness.lean"
click node_concrete "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Entropy/Concrete.lean"
click node_program "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Entropy/Program.lean"
click node_sourcecoding "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Entropy/SourceCoding.lean"
click node_hierarchy "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/EntropyNumber/Hierarchy.lean"
click node_rota "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/EntropyNumber/RotaEntropy.lean"
click node_cnf "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Complexity/CNF.lean"
click node_tableau "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Complexity/Tableau.lean"
click node_decomposition "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Complexity/Decomposition.lean"
click node_utm "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Complexity/UTM.lean"
click node_infochain "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Complexity/PPNP.lean"
click node_identitychain "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Complexity/SetRFL.lean"
click node_standardchain "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Complexity/StandardComplexity.lean"
click node_physicscommon "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Physics/Common.lean"
click node_uniform "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Physics/UniformSystems.lean"
click node_distributions "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Physics/StatisticalDistributions.lean"
click node_physicsdist "https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Physics/PhysicsDist.lean"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_lean,node_bridge,node_base toneBlue
class node_shannon,node_axioms,node_uniqueness,node_concrete,node_program,node_sourcecoding toneAmber
class node_hierarchy,node_rota toneMint
class node_cnf,node_tableau,node_decomposition,node_utm,node_infochain,node_identitychain,node_standardchain toneRose
class node_physicscommon,node_uniform,node_distributions,node_physicsdist,node_engineer toneIndigo
```

## Components

### Proof verification

- **Lean checker**
- [Time-information bridge](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Bridge.lean): `Mathlib/InformationTheory/Bridge.lean`
- [Instructions and paths](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Basic.lean): `Mathlib/InformationTheory/Basic.lean`

### Entropy theory

- [Shannon entropy](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Entropy/Shannon.lean): `Mathlib/InformationTheory/Entropy/Shannon.lean`
- [Rota axioms](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Entropy/Axioms.lean): `Mathlib/InformationTheory/Entropy/Axioms.lean`
- [Entropy uniqueness](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Entropy/Uniqueness.lean): `Mathlib/InformationTheory/Entropy/Uniqueness.lean`
- [Concrete entropy](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Entropy/Concrete.lean): `Mathlib/InformationTheory/Entropy/Concrete.lean`
- [Program complexity](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Entropy/Program.lean): `Mathlib/InformationTheory/Entropy/Program.lean`
- [Source coding](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Entropy/SourceCoding.lean): `Mathlib/InformationTheory/Entropy/SourceCoding.lean`

### Entropy numbers

- [Entropy number hierarchy](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/EntropyNumber/Hierarchy.lean): `Mathlib/InformationTheory/EntropyNumber/Hierarchy.lean`
- [Rota capstone](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/EntropyNumber/RotaEntropy.lean): `Mathlib/InformationTheory/EntropyNumber/RotaEntropy.lean`

### Complexity proofs

- [CNF representation](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Complexity/CNF.lean): `Mathlib/InformationTheory/Complexity/CNF.lean`
- [SAT tableau](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Complexity/Tableau.lean): `Mathlib/InformationTheory/Complexity/Tableau.lean`
- [SAT decomposition](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Complexity/Decomposition.lean): `Mathlib/InformationTheory/Complexity/Decomposition.lean`
- [Machine walks](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Complexity/UTM.lean): `Mathlib/InformationTheory/Complexity/UTM.lean`
- [Information P NP](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Complexity/PPNP.lean): `Mathlib/InformationTheory/Complexity/PPNP.lean`
- [Identity P NP](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Complexity/SetRFL.lean): `Mathlib/InformationTheory/Complexity/SetRFL.lean`
- [Standard P NP](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Complexity/StandardComplexity.lean): `Mathlib/InformationTheory/Complexity/StandardComplexity.lean`

### Statistical physics

- [Physical macrostates](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Physics/Common.lean): `Mathlib/InformationTheory/Physics/Common.lean`
- [Uniform systems](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Physics/UniformSystems.lean): `Mathlib/InformationTheory/Physics/UniformSystems.lean`
- [Statistical distributions](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Physics/StatisticalDistributions.lean): `Mathlib/InformationTheory/Physics/StatisticalDistributions.lean`
- [Physics distributions](https://github.com/eabadir/egpt-lean/blob/main/Mathlib/InformationTheory/Physics/PhysicsDist.lean): `Mathlib/InformationTheory/Physics/PhysicsDist.lean`

### Other components

- **Engineer**

## Connections

- Engineer → Lean checker: checks proofs (evidence: `README.md`)
- Lean checker → Rota capstone: reports axioms (evidence: `README.md`)
- Lean checker → Information P NP: reports axioms (evidence: `README.md`)
- Lean checker → Identity P NP: reports axioms (evidence: `README.md`)
- Lean checker → Standard P NP: reports axioms (evidence: `README.md`)
- Rota axioms → Entropy uniqueness: constrains (evidence: `README.md`)
- Concrete entropy → Shannon entropy: shows satisfies (evidence: `README.md`)
- Concrete entropy → Rota axioms: satisfies (evidence: `README.md`)
- Program complexity → Time-information bridge: establishes RECT (evidence: `README.md`)
- Source coding → Shannon entropy: uses entropy
- Entropy number hierarchy → Rota capstone: supports scaling
- Rota capstone → Entropy uniqueness: uses uniqueness (evidence: `README.md`)
- Rota capstone → Concrete entropy: uses Shannon axioms (evidence: `README.md`)
- CNF representation → SAT tableau: walks clauses (evidence: `README.md`)
- SAT tableau → Information P NP: extracts information (evidence: `README.md`)
- SAT decomposition → Information P NP: supports criterion
- Machine walks → Information P NP: supports walk
- Entropy number hierarchy → Identity P NP: provides entropy numbers (evidence: `README.md`)
- CNF representation → Identity P NP: provides syntax
- Information P NP → Standard P NP: restated as standard complexity (evidence: `README.md`)
- Physical macrostates → Uniform systems: models systems
- Physical macrostates → Statistical distributions: provides physical entropy
- Statistical distributions → Shannon entropy: equals scaled Shannon (evidence: `README.md`)
- Physics distributions → Statistical distributions: defines distributions
