(* Realizer (mkmonoid Mat2 Id2 Mat_mult). Program_all. *)
exact Mat_assoc.
simple induction a.
intros M13 M14 M23 M24.
unfold Id2, Mat_mult in |- *; simpl in |- *.
repeat elim Zplus_0_r_reverse.
case M13; case M14; case M23; case M24; auto.
simple induction a.
intros.
unfold Id2, Mat_mult in |- *; simpl in |- *.
repeat elim Zmult_0_r_reverse.
repeat rewrite Zmult_1_r.
simpl in |- *; repeat elim Zplus_0_r_reverse.
auto with arith.
Defined.
(* Fibonacci numbers *)
(* definition *)
Fixpoint Fib (n : nat) : nat :=
match n return nat with
| O => (* O *)  1
(* (S p ) *)
| S p =>
match p return nat with
| O => (* O *)  1
(* S q *)
| S q => Fib q + Fib p
end
end.

(* Specifications: *)
Lemma Unfold_FibO : Fib 0 = 1.
Lemma Unfold_Fib1 : Fib 1 = 1.
Lemma Unfold_FibSSn : forall n : nat, Fib (S (S n)) = Fib (S n) + Fib n.
Definition shift_Fib (n : nat) :=
match n return nat with
| O => 0
| S p => Fib p
end.