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

Named induction hypotheses #15

Open
jwaldmann opened this issue Mar 23, 2017 · 5 comments
Open

Named induction hypotheses #15

jwaldmann opened this issue Mar 23, 2017 · 5 comments

Comments

@jwaldmann
Copy link
Contributor

I made this example https://gitlab.imn.htwk-leipzig.de/waldmann/cyp/tree/master/test-data/pos/bintree

and I was surprised that I could write two IHs:

    Case Branch l k r
       To show: (inorder . mirror) (Branch l k r) .=. (reverse . inorder) (Branch l k r)
       IH: (inorder . mirror) l .=. (reverse . inorder) l
       IH: (inorder . mirror) r .=. (reverse . inorder) r

and that I could refer to them just by IH (and cyp picks the right one)

@larsrh
Copy link
Contributor

larsrh commented Mar 23, 2017

What would you expect here?

@jwaldmann
Copy link
Contributor Author

Not sure. An optional name after the "IH"? (So it rhymes with lemma and axiom).

  • We want the user (the student) to be specific (no "by auto", but always "by this lemma, by that axiom").
  • in this case, "IH" is one name for two different things (it could be "IH.1", "IH.2")
  • but the same already happens at "by def ": there can be several defs (equations) for one name, and cyp picks the one that matches.

Anyway, does cyp have nested induction proofs? Then "IH" would be overloaded as well.

@larsrh
Copy link
Contributor

larsrh commented Mar 23, 2017

Good idea; sounds reasonably easy to implement.

Anyway, does cyp have nested induction proofs? Then "IH" would be overloaded as well.

This should work (with the outer "IH" being shadowed), but I'm sure it's not tested anywhere.

@larsrh larsrh changed the title add example for induction on trees Named induction hypotheses Mar 23, 2017
@larsrh
Copy link
Contributor

larsrh commented Mar 23, 2017

Would you mind if I included your tree example in this repository?

@jwaldmann
Copy link
Contributor Author

jwaldmann commented Mar 23, 2017

Feel free to pull/cherry-pick/whatever.

I will certainly make more examples, but I might want to hide their full proofs from my students ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants