Last active
December 2, 2016 13:01
-
-
Save takeouchida/cd3a3efcc64c50eae21b92b34482b557 to your computer and use it in GitHub Desktop.
rev (rev s) = s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import mathcomp.ssreflect.ssreflect. | |
From mathcomp Require Import all_ssreflect. | |
Set Implicit Arguments. | |
Unset Strict Implicit. | |
Unset Printing Implicit Defensive. | |
Lemma cons_rcons T (x1 x2 : T) s : x1 :: rcons s x2 = rcons (x1 :: s) x2. | |
Proof. done. Qed. | |
Theorem rev_rev_id T (s : seq T) : rev (rev s) = s. | |
Proof. | |
elim: s => // x s. rewrite rev_cons. case: (rev s) => [|x1 s1] <- //=. | |
rewrite cons_rcons rev_rcons => //=. | |
Qed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment