# math-research

Personal mathematics research repository by Eric Bauerfeld. Papers are written in AMS-LaTeX using the `amsart` document class.

## Papers

### `kempe_style_search_for_smaller_contradiction`
**Humans Suffice: A Novel Proof of the Four Color Theorem**

An in-progress proof of the Four Color Theorem via a minimal counterexample argument. The paper builds on Kempe's 1879 strategy — establishing valid cases for vertices of degree ≤ 4, then extending the argument to the degree-5 case using properties of non-adjacent degree-5 vertices, merged subgraphs, and locked colorings.

### `plane_depth_labelling`
**Plane Depth Labelling**

Early-stage paper. Title and author information set; content in progress.

## Creating a New Paper

Use `run.sh` to scaffold a new paper from the AMS-LaTeX template:

```sh
./run.sh init_paper "Your Paper Title"
```

This creates a new directory (name derived from the title) containing a `paper.tex` pre-filled with the title and author.

## Setup

The Python library code in `lib/` requires SageMath. Run setup once per machine:

```sh
./run.sh setup <sage_python_path> <sage_site_packages> [system_name]
```

- `sage_python_path` — path to the SageMath Python interpreter (e.g. `/opt/sage/local/bin/python3`)
- `sage_site_packages` — path to SageMath's site-packages directory
- `system_name` — optional label for this machine (defaults to `hostname -s`); used to store per-machine env files as `.env.<system_name>`

On subsequent runs the paths default to whatever was saved in `.env`, so `./run.sh setup` alone re-runs setup with the existing configuration.

Setup also compiles the [plantri](https://github.com/mishun/plantri) submodule via `make`.

## Running Sage

To run a Sage script with `plantri` available on `PATH`:

```sh
./run.sh sage <script.py> [args...]
```

Or to open an interactive Sage session:

```sh
./run.sh sage
```

## Linting

```sh
./run.sh lint
```

Runs `pyright` and `pylint` on `lib/` using the SageMath Python interpreter.

## Shell Completion

To enable tab-completion for `run.sh` in zsh, add this to your `.zshrc`:

```sh
eval "$(path/to/run.sh completion)"
```

Or source it once in the current shell session:

```sh
eval "$(./run.sh completion)"
```

## Building

Papers are compiled with LaTeX. From within a paper directory:

```sh
latexmk -pdf paper.tex
```
