Skip to content

Instantly share code, notes, and snippets.

@Naruyoko
Created October 20, 2023 05:23
Show Gist options
  • Save Naruyoko/391d40a9297cc85a7c7c3f6d36268f79 to your computer and use it in GitHub Desktop.
Save Naruyoko/391d40a9297cc85a7c7c3f6d36268f79 to your computer and use it in GitHub Desktop.
Attempting to run mathport script on my project
#! /usr/bin/bash
rm -rf googology mathport
# Set up mathport
git clone https://github.com/leanprover-community/mathport.git
cd mathport
lake exe cache get
make build
make source
./download-release.sh
cd ..
# Set up my project
git clone -b mathport-test https://github.com/Naruyoko/googology.git
cd googology/misc/lean/googology3
leanproject upgrade-mathlib
leanproject mk-all
# leanproject build
leanpkg configure # generate leanpkg.path
sed -i "s|path _target/deps/mathlib/src|path ../../../../mathport/sources/mathlib/src|" leanpkg.path
# leanproject clean
lean --make --recursive --ast --tlean src
cd ../../../..
# Run
cd mathport
sed -i 's|"Project": "[^"]\+"|"Project": "../googology/misc/lean/googology3/src"|' config-project.json
./build/bin/mathport --make config-project.json Project::all
cd ..
#! /usr/bin/bash
# Rerun with edited all.lean
cd googology/misc/lean/googology3
lean --make --recursive --ast --tlean src
cd ../../../..
cd mathport
rm -rf Outputs/oleans/project
./build/bin/mathport --make config-project.json Project::all
cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment