-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
176 changed files
with
348 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build_project: | ||
runs-on: ubuntu-latest | ||
name: Build project | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install elan | ||
run: curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain leanprover/lean4:4.5.0 | ||
|
||
- name: Get cache | ||
run: ~/.elan/bin/lake exe cache get || true | ||
|
||
- name: Build project | ||
run: ~/.elan/bin/lake build Book | ||
|
||
- name: Cache mathlib docs | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
.lake/build/doc/Init | ||
.lake/build/doc/Lake | ||
.lake/build/doc/Lean | ||
.lake/build/doc/Std | ||
.lake/build/doc/Mathlib | ||
.lake/build/doc/declarations | ||
!.lake/build/doc/declarations/declaration-data-Book* | ||
key: MathlibDoc-${{ hashFiles('lake-manifest.json') }} | ||
restore-keys: | | ||
MathlibDoc- | ||
- name: Build documentation | ||
run: ~/.elan/bin/lake -R -Kenv=dev build Book:docs | ||
|
||
- name: Build blueprint and copy to `docs/blueprint` | ||
uses: xu-cheng/texlive-action@v2 | ||
with: | ||
docker_image: ghcr.io/xu-cheng/texlive-full:20231201 | ||
run: | | ||
apk update | ||
apk add --update make py3-pip git pkgconfig graphviz graphviz-dev gcc musl-dev | ||
git config --global --add safe.directory $GITHUB_WORKSPACE | ||
git config --global --add safe.directory `pwd` | ||
python3 -m venv env | ||
source env/bin/activate | ||
pip install --upgrade pip requests wheel | ||
pip install pygraphviz --global-option=build_ext --global-option="-L/usr/lib/graphviz/" --global-option="-R/usr/lib/graphviz/" | ||
pip install leanblueprint | ||
leanblueprint pdf | ||
mkdir docs | ||
cp blueprint/print/print.pdf docs/blueprint.pdf | ||
leanblueprint web | ||
cp -r blueprint/web docs/blueprint | ||
- name: Check declarations | ||
run: | | ||
~/.elan/bin/lake exe checkdecls blueprint/lean_decls | ||
- name: Move documentation to `docs/docs` | ||
run: | | ||
sudo chown -R runner docs | ||
cp -r .lake/build/doc docs/docs | ||
- name: Upload docs & blueprint artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: docs/ | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 | ||
|
||
- name: Make sure the cache works | ||
run: | | ||
mv docs/docs .lake/build/doc |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
div.theorem_thmcontent { | ||
border-left: .15rem solid black; | ||
} | ||
|
||
div.proposition_thmcontent { | ||
border-left: .15rem solid black; | ||
} | ||
|
||
div.lemma_thmcontent { | ||
border-left: .1rem solid black; | ||
} | ||
|
||
div.corollary_thmcontent { | ||
border-left: .1rem solid black; | ||
} | ||
|
||
div.proof_content { | ||
border-left: .08rem solid grey; | ||
} | ||
|
||
figure.subfloat span.subref { | ||
display: none; | ||
} | ||
|
||
nav.local_toc ul { | ||
font-size: 1.2rem; | ||
} | ||
|
||
@media (min-width:1024px) { | ||
nav.toc { | ||
width: 25vw; | ||
} | ||
} | ||
|
||
@media (min-width:1024px) { | ||
div.with-toc { | ||
margin-left:25vw; | ||
} | ||
} | ||
|
||
@font-face { | ||
font-family: 'Open Sans'; | ||
font-style: normal; | ||
font-weight: 400; | ||
font-stretch: 100%; | ||
font-display: swap; | ||
src: url(https://fonts.gstatic.com/s/opensans/v29/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2) format('woff2'); | ||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; | ||
} | ||
|
||
body, h1, h2, h3, h4, h5, h6, p, text { | ||
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif !important; | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
$pdf_mode = 1; | ||
$pdflatex = 'xelatex -synctex=1 -output-directory=../print/'; | ||
@default_files = ('print.tex'); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[general] | ||
renderer=HTML5 | ||
copy-theme-extras=yes | ||
plugins=leanblueprint | ||
|
||
[document] | ||
toc-depth=2 | ||
toc-non-files=True | ||
|
||
[files] | ||
directory=../web/ | ||
split-level=0 | ||
|
||
[html5] | ||
localtoc-level=0 | ||
extra-css=extra_styles.css | ||
mathjax-dollars=True |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
% This file makes a printable version of the blueprint | ||
|
||
\documentclass[a4paper]{report} | ||
|
||
\usepackage[utf8]{inputenc} | ||
\usepackage[english]{babel} | ||
\usepackage{charter} | ||
\usepackage{fancyhdr} | ||
\usepackage{epsf} | ||
\usepackage[bookmarks=true]{hyperref} | ||
\usepackage[textwidth=14cm]{geometry} | ||
\usepackage{xfrac} | ||
\usepackage{polyglossia} | ||
\setdefaultlanguage{english} | ||
\usepackage{amsmath,amssymb} | ||
\usepackage{enumitem} | ||
\usepackage{tikz-cd} | ||
\usepackage{mathtools} | ||
\usepackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math} | ||
\usepackage{fontspec} | ||
|
||
\usepackage[nameinlink, capitalize]{cleveref} | ||
|
||
\usepackage{amsthm} | ||
\usepackage{etexcmds} | ||
\usepackage{thmtools} | ||
|
||
\input{preamble/print} | ||
|
||
\title{The First Book of Euclid's Elements---Commentary and Lean Formalization} | ||
\author{Logan Murphy and Kaiyu Yang} | ||
|
||
\begin{document} | ||
\maketitle | ||
\input{main} | ||
\end{document} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
% This file makes the web version of the blueprint. | ||
% This file can be built locally. | ||
|
||
\documentclass{report} | ||
|
||
\usepackage[utf8]{inputenc} | ||
\usepackage[english]{babel} | ||
\usepackage{charter} | ||
\usepackage{fancyhdr} | ||
\usepackage{epsf} | ||
\usepackage[bookmarks=true]{hyperref} | ||
\usepackage{amsmath,amsfonts,amsthm,amssymb} | ||
\usepackage{graphicx} | ||
\DeclareGraphicsExtensions{.svg,.png,.jpg} | ||
\usepackage[capitalize]{cleveref} | ||
\usepackage[showmore, dep_graph, project=../../]{blueprint} | ||
\usepackage{tikz-cd} | ||
\usepackage{tikz} | ||
|
||
\input{preamble/web} | ||
|
||
\github{https://github.com/loganrjmurphy/lean-geo-lib/} | ||
\dochome{https://loganrjmurphy.github.io/lean-geo-lib/docs} | ||
|
||
\title{The First Book of Euclid's Elements---Commentary and Lean Formalization} | ||
\author{ | ||
Logan Murphy$^{1}$, Jack Sun$^{1}$, Zhaoyu Li$^{1}$, Anima Anandkumar$^{2}$, Xujie Si$^{1\,\dagger}$, and Kaiyu Yang$^{2\,\dagger}$\\ | ||
$^1$University of Toronto, ~$^2$Caltech\\ | ||
$^\dagger$ Equal advising \\ | ||
} | ||
|
||
\begin{document} | ||
\maketitle | ||
\input{main} | ||
\end{document} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
\DeclareOption*{} | ||
\ProcessOptions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
% In this file you should put the actual content of the blueprint. | ||
% It will be used both by the web and the print version. | ||
% It should *not* include the \begin{document} | ||
% | ||
% If you want to split the blueprint content into several files then | ||
% the current file can be a simple sequence of \input. Otherwise It | ||
% can start with a \section or \chapter for instance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# This file configures the latexmk command you can use to compile | ||
# the pdf version of the blueprint | ||
$pdf_mode = 1; | ||
$pdflatex = 'xelatex -synctex=1 -output-directory=../print/'; | ||
@default_files = ('print.tex'); | ||
$pdflatex = 'xelatex -synctex=1'; | ||
@default_files = ('print.tex'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
% In this file you should put all LaTeX macros to be used | ||
% both by the pdf version and the web version. | ||
% This should be most of your macros. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
% In this file you should put macros to be used only by | ||
% the printed version. Of course they should have a corresponding | ||
% version in macros/web.tex. | ||
% Typically the printed version could have more fancy decorations. | ||
% This should be a very short file. | ||
% | ||
% This file starts with dummy macros that ensure the pdf | ||
% compiler will ignore macros provided by plasTeX that make | ||
% sense only for the web version, such as dependency graph | ||
% macros. | ||
|
||
|
||
% Dummy macros that make sense only for web version. | ||
\newcommand{\lean}[1]{} | ||
\newcommand{\discussion}[1]{} | ||
\newcommand{\leanok}{} | ||
\newcommand{\mathlibok}{} | ||
\newcommand{\notready}{} | ||
% Make sure that arguments of \uses and \proves are real labels, by using invisible refs: | ||
% latex prints a warning if the label is not defined, but nothing is shown in the pdf file. | ||
% It uses LaTeX3 programming, this is why we use the expl3 package. | ||
\ExplSyntaxOn | ||
\NewDocumentCommand{\uses}{m} | ||
{\clist_map_inline:nn{#1}{\vphantom{\ref{##1}}}% | ||
\ignorespaces} | ||
\NewDocumentCommand{\proves}{m} | ||
{\clist_map_inline:nn{#1}{\vphantom{\ref{##1}}}% | ||
\ignorespaces} | ||
\ExplSyntaxOff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
% In this file you should put macros to be used only by | ||
% the web version. Of course they should have a corresponding | ||
% version in macros/print.tex. | ||
% Typically the printed version could have more fancy decorations. | ||
% This will probably be a very short file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
[general] | ||
renderer=HTML5 | ||
copy-theme-extras=yes | ||
plugins=leanblueprint | ||
plugins=plastexdepgraph plastexshowmore leanblueprint | ||
|
||
[document] | ||
toc-depth=2 | ||
toc-depth=3 | ||
toc-non-files=True | ||
|
||
[files] | ||
directory=../web/ | ||
split-level=0 | ||
split-level= 0 | ||
|
||
[html5] | ||
localtoc-level=0 | ||
extra-css=extra_styles.css | ||
mathjax-dollars=True | ||
mathjax-dollars=False |
Oops, something went wrong.