Require Import List. Open Scope list_scope. Fixpoint length {A:Type} (s:list A) : nat := match s with | nil => 0 | _::t => S (length t) end. Fixpoint map {A B:Type} (f: A -> B) (s:list A) : list B := match s with | nil => nil | h::t => (f h)::(map f t) end. Check 3. Check nat. Check Set. Check Type. Check true. Check bool. Check True. Check Prop. Theorem map_length: forall (A B:Type) (f: A -> B) (s:list A), length (map f s) = length s. Proof. intros. induction s. reflexivity. simpl. rewrite IHs. reflexivity. Qed. Check map_length. Check @map. Check map (fun x => x+1). Check map_length bool. Check map_length bool nat. Inductive color : Type := | Red: color | Blue: color | Dark (c:color): color | Light (c:color): color. Inductive sorted : list nat -> Prop := | SortNil: sorted nil | SortUnit (x:nat): sorted (x::nil) | SortCons (x:nat) (y:nat) (t:list nat) (LE: x <= y) (H: sorted (y::t)): sorted (x::y::t). Theorem sorted123: sorted (1::2::3::nil). Proof. apply SortCons. apply le_S. apply le_n. apply SortCons. apply le_S. apply le_n. apply SortUnit. Qed. Theorem mysort_works: forall (s:list nat), sorted (mysort s). Print "<=". Axiom myaxiom: forall (P:Prop), P.