Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support cycle detection in topological_sortTheory #1197

Merged
merged 3 commits into from
Feb 22, 2024

Conversation

Gordon-Sau
Copy link
Contributor

  • add has_cycle which checks if there are cycles in the graph
  • prove that any pair of elements in a partition of the output of the top_sort is connected.
  • add predicats TC_depends_on (a TC version of depends_on) and TC_depends_on_weak (which removes the MEM b (MAP FST graph) condition from TC_depends_on)
  • prove the correctness of has_cycle (has_cycle_correct and has_cycle_correct2)

@Gordon-Sau
Copy link
Contributor Author

Gordon-Sau commented Feb 14, 2024

I am going to add some theorems related to strongly connected components to make it more reusable. The definition of SCC is SCC E x y = RTC E x y /\ RTC E y x.

@Gordon-Sau Gordon-Sau closed this Feb 14, 2024
@Gordon-Sau Gordon-Sau reopened this Feb 15, 2024
@mn200
Copy link
Member

mn200 commented Feb 22, 2024

Thanks for this. The SCC notion feels like it could be moved to relationTheory, but that can be done later.

@mn200 mn200 merged commit e85cc65 into HOL-Theorem-Prover:develop Feb 22, 2024
2 checks passed
@Gordon-Sau Gordon-Sau deleted the cycle_detection branch March 6, 2024 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants