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

Implement the data structure #2

Draft
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

jeltsch
Copy link
Owner

@jeltsch jeltsch commented Feb 9, 2021

This will ultimately resolve #1.

@jeltsch jeltsch self-assigned this Feb 9, 2021
@jeltsch
Copy link
Owner Author

jeltsch commented Feb 9, 2021

As next steps we should do the following:

  • For element labels:
    • Simplify the proof of non-emptiness of the set of element labeling functions
    • Switch to using the Lifting and the Transfer package, which will enable us to easily use the constraints of the subtype
    • Prove element_of_after_label_of and label_of_after_element_of
  • For supertrees:
    • Instantiate the semilattice_sup class for vertices
    • Change the definition of sup_vertex to always use single steps, which will enable us to use parent
    • Switch to using Isar syntax for the conditions in sup_vertex
    • Prove totality of sup_vertex
    • Prove the following properties about parent:
      • A node of zero height (a leaf) has no children.
      • A node of non-zero height (an inner node) has two certain children.
    • Prove the following properties about index_at_height and labels_under:
      • They are kind of inverses of each other.
      • The label set of a tree of zero height is the singleton set containing the index of the tree’s root.
      • The label set of a tree of non-zero height is the disjoint union of the label sets of its immediate subtrees.
    • Show the connection between index_at_height and parent

The key to have a short, largely automatic proof is to explicitly
specify that the witness for the existential statement is `Map.empty`.
This enables us to easily use the constraints of the `element_labeling`
subtype in future proofs.
The new definition consistently uses `parent`. For this to be possible,
it uses small steps also in the first two clauses.
Previously, the conditions in the definition of `lowest_common_ancestor`
were specified using Pure implications.
We do not want to make `nat × nat` an instance of `semilattice_sup`,
since there are lattice structures for this type that are more standard
than our structure.
The previous version did not outrule cycles as such but only outruled
that all vertices have cycles of a certain common size.
@jeltsch jeltsch marked this pull request as draft February 12, 2021 21:49
@jeltsch jeltsch changed the title Add support for core data structures Implement the data structure Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement the data structure
1 participant