forked from readablesystems/cs260r-17
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathl05.v
41 lines (27 loc) · 797 Bytes
/
l05.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Require Import Arith.
Require Import Omega.
Require Import Recdef.
Require Import List.
Require Import Program.Tactics.
Import ListNotations.
Section Lecture5.
(* Define some local variables to this section. *)
Definition A := nat.
Definition LE := le.
Hint Unfold LE.
(* Some facts about lists. *)
Check In.
Print In.
Check app.
Print app.
(* Let's prove our own list fact. *)
Lemma in_middle: forall (a:A) xs1 xs2,
In a (xs1 ++ a :: xs2).
Admitted.
(* Now, write an inductive Prop `Dec`, with a single
`list A` argument, where `Dec l` is true iff the
elements of `l` are in decreasing order by `LE`. *)
(* Do it again. *)
(* Prove the definitions equivalent. *)
(* Now, prove a lemma about appending decreasing lists. *)
End Lecture5.