feat(Test): computational graph invariants, prove 25 tests#3660
Open
XC0R wants to merge 1 commit intogoogle-deepmind:mainfrom
Open
feat(Test): computational graph invariants, prove 25 tests#3660XC0R wants to merge 1 commit intogoogle-deepmind:mainfrom
XC0R wants to merge 1 commit intogoogle-deepmind:mainfrom
Conversation
Collaborator
|
For all these graph tests, might it be better to implement computational variants of the definitions of the graph properties and then prove once and for all graphs that the computational variants are equivalent? |
Add computable variants (BFS distance, powerset-based independence/domination numbers, Wiener/Szeged indices) to Definitions.lean with equivalence theorems in Invariants.lean. Refactor graph test proofs for 5 invariants across all 5 graphs to use 'rw [equiv]; decide +native' per google-deepmind#3676 approach. Supersedes google-deepmind#3659, google-deepmind#3658.
This was referenced Apr 4, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements computational variants of graph property definitions (per the approach suggested in #3676) and uses them to prove 25 test theorems across all 5 graphs.
Definitions.lean: BFS-based
computable_dist, powerset-basedcomputable_indep_num,computable_dom_num,computable_wiener,computable_avg_dist,computable_szeged_aux,computable_szeged_indexInvariants.lean: 6 equivalence theorems linking noncomputable spec definitions to computable variants
Test.lean: 25 theorems proved via
rw [equiv]; decide +nativeTheorems proved (5 invariants × 5 graphs)
Supersedes #3659, #3658.
Notes