-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (37 loc) 路 1.38 KB
/
Copy pathMakefile
File metadata and controls
47 lines (37 loc) 路 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# SPDX-FileCopyrightText: Copyright (c) 2026 Objectionary.com
# SPDX-License-Identifier: MIT
SHELL := bash
.SHELLFLAGS := -e -o pipefail -c
.ONESHELL:
.PHONY: all test build axioms difftest clean
.SILENT:
RULES := PhiConfluence/Rules.lean PhiConfluence/RuleData.lean
MATHLIB := .lake/packages/mathlib/.lake/build/lib/lean/Mathlib.olean
all: test build axioms
count=$$(cat $$(find PhiConfluence -name '*.lean') | grep -cE '^[[:space:]]*(private |protected )?(theorem|lemma)[[:space:]]')
echo "馃憤馃徎 CONFLUENCE IS PROVEN BY $$count THEOREMS, ALL CHECKED BY LEAN"
test:
python3 -m pytest -p no:cacheprovider .github
$(MATHLIB): lake-manifest.json
lake exe cache get
touch $@
$(RULES) &: .phino-version .github/regen-rules.sh .github/gen-rules.py .github/gen-rule-data.py .github/phino_render.py
bash .github/regen-rules.sh
build: $(MATHLIB) $(RULES)
lake build
lake build demo difftest
axioms: build
if grep -REn '\bsorry\b|\badmit\b|^[[:space:]]*axiom[[:space:]]' PhiConfluence Main.lean Difftest.lean; then
echo "found sorry, admit or axiom in project sources" >&2
exit 1
fi
out=$$(lake env lean .github/axioms.lean 2>&1)
echo "$$out"
if grep -qiE 'sorryAx|Classical\.choice|native_decide|ofReduceBool|ofReduceNat' <<< "$$out"; then
echo "a headline theorem depends on a forbidden axiom" >&2
exit 1
fi
difftest: $(RULES)
bash .github/difftest.sh
clean:
rm -f $(RULES)