I agree Our site saves small pieces of text information (cookies) on your device in order to deliver better content and for statistical purposes. You can disable the usage of cookies by changing the settings of your browser. By browsing our website without changing the browser settings you grant us permission to store that information on your device.

i.e. find a function rev and prove the following lemma:

rev (rev (rev xs)) = xs

Making sure you do not use the identity function, if your input is longer than 1.

length xs >= 2 ==> rev xs ~= xs

Download Files
### Definitions File

### Template File

### Check File

theory Defs imports Main begin end

theory Submission imports Defs begin lemma showmewhatyougot: "\<exists>f::(nat list \<Rightarrow> nat list). (\<forall> xs. (length xs \<ge> 2 \<longrightarrow> f xs \<noteq> xs)) \<and> (\<forall> xs. (f (f (f xs))) = xs)" sorry end

theory Check imports Submission begin lemma "\<exists>f::(nat list \<Rightarrow> nat list). (\<forall> xs. (length xs \<ge> 2 \<longrightarrow> f xs \<noteq> xs)) \<and> (\<forall> xs. (f (f (f xs))) = xs)" by (rule Submission.showmewhatyougot) end

Terms and Conditions