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

Using 'hd' function in nostutter #76

Closed
HyeongMee opened this issue Apr 23, 2015 · 3 comments
Closed

Using 'hd' function in nostutter #76

HyeongMee opened this issue Apr 23, 2015 · 3 comments

Comments

@HyeongMee
Copy link

Hi

I used 'hd' function for the nostutter problem, and succeded in proving all the examples presented. But to do that I copied and pasted the hd function in coqIde. I thought that Lists.v is already required in our homework but it seems like it is not because if I compile the homework without hd function pasted, an error msg that hd has no reference keeps appearing. What should I do? Can I just define hd function in the homework file? - I mean, outside of the given problems, as a separate function. But I am worried becuase the professor said that TA would just copy the given problems only and not the other functions or lemmas outside of the given ones - I guess I heard so;;
or Is there any problem in how I compiled the file or edited the file?

Thanks :-D

@jeehoonkang
Copy link
Contributor

  • For grading, check your submission with the grader I made: Assignment 06 Status #69
  • It is strange your file does not recognize the hd function. Would you please make a small example code and post it?

Jeehoon

@fortunist
Copy link

In Lists.v, hd and tl functions are surrounded with Module NatList. and End NatList.. Further, they use the type natlist which was defined new in module NatList. So you cannot apply that functions in the problem using type list nat, even though you can use them by NatList.hd and NatList.tl.

Addition : I wonder how you could use them just by copying and pasting the definition, despite of the argument types.

@gilhur
Copy link
Contributor

gilhur commented Apr 23, 2015

You can just define the hd function in the homework file if you want to use it.

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

No branches or pull requests

4 participants