Skip to content

Commit ba9f7cd

Browse files
authored
Process complex LHS patterns in function rules (#4757)
Eliminates patterns that are not supported by Lean from the LHS of function rules. For example, since `_List_` is a function, instead of matching the last item of a list as ```lean noncomputable def _2ede380 : SortList → Option SortInt | _List_ _Gen0 (ListItem (SortKItem.inj_SortInt I)) => ... | _ => none ``` the following definition is generated: ```lean noncomputable def _2ede380 : SortList → Option SortInt | _Pat0 => match (ListHook SortKItem).split _Pat0.coll 0 1 with | some ([], _Gen0, [SortKItem.inj_SortInt I]) => ... | _ => none ``` where `split` is repsonsible for deconstructing the list into prefix, middle and suffix.
1 parent eebad2b commit ba9f7cd

File tree

5 files changed

+428
-10
lines changed

5 files changed

+428
-10
lines changed

pyk/poetry.lock

Lines changed: 20 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyk/pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ cookiecutter = "^2.6.0"
2323
filelock = "^3.9.0"
2424
graphviz = "^0.20.1"
2525
hypothesis = "^6.103.1"
26+
networkx = "^3.4.2"
2627
psutil = "^5.9.5"
2728
pybind11 = "^2.10.3"
2829
pytest = "*"
@@ -97,3 +98,7 @@ ignore_missing_imports = true
9798
[[tool.mypy.overrides]]
9899
module = "cookiecutter.*"
99100
ignore_missing_imports = true
101+
102+
[[tool.mypy.overrides]]
103+
module = "networkx"
104+
ignore_missing_imports = true

0 commit comments

Comments
 (0)