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

Write a tactic to copy a structure while updating some fields. #1847

Open
urkud opened this issue Jan 2, 2020 · 0 comments
Open

Write a tactic to copy a structure while updating some fields. #1847

urkud opened this issue Jan 2, 2020 · 0 comments
Labels
feature-request This issue is a feature request, either for mathematics, tactics, or CI t-meta Tactics, attributes or user commands

Comments

@urkud
Copy link
Member

urkud commented Jan 2, 2020

Currently we have various functions like complete_lattice.copy in order/filter/basic and emetric_space.replace_uniformity in topology/metric_space/emetric_space. I think that these functions should be generalized to a tactic (copy_struct?) that does the following:

  1. Takes a structure and a partially filled structure (like in refine_struct).
  2. Add all explicitly specified fields to the resulting structure.
  3. For each updated field test if the new value is not defeq to the old one, then create a goal stating that they are actually equal. Otherwise do not treat this field as updated.
  4. For other fields:
    a) if its type does not depend on updated fields, then copy it from the old structure;
    b) otherwise if its type is a Type*, fail; the user should explicitly specify the desired value in this case;
    c) otherwise prove this proposition using some rewrites on equalities from step 2.
@semorrison semorrison added t-meta Tactics, attributes or user commands feature-request This issue is a feature request, either for mathematics, tactics, or CI and removed tactic feature labels Mar 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request This issue is a feature request, either for mathematics, tactics, or CI t-meta Tactics, attributes or user commands
Projects
None yet
Development

No branches or pull requests

2 participants