Section defs.
Definition is_symmetric (F : field) (n : Nat) (M : matrix F n n) :=
forall i j : fin n, M i j =' M j i in _.
Definition is_symmetric' (F : field) (n : Nat) (M : matrix F n n) :=
M =' transpose M in _.
Definition is_symmetric_pred :
forall (F : field) (n : Nat), Predicate (Mmn F n n).
intros; apply (Build_Predicate (Pred_fun:=is_symmetric (F:=F) (n:=n))).
red in |- *; simpl in |- *; red in |- *.
intros; red in H.
apply Trans with (x i j); auto with algebra.
apply Trans with (x j i); auto with algebra.
apply Sym; auto with algebra.
Defined.
Definition is_symmetric'_pred :
forall (F : field) (n : Nat), Predicate (Mmn F n n).
intros; apply (Build_Predicate (Pred_fun:=is_symmetric' (F:=F) (n:=n))).
red in |- *; simpl in |- *; red in |- *.
intros; red in H.
destruct x; destruct y.
simpl in |- *; simpl in H, H0.
intros.
apply Trans with (Ap2 a b); auto with algebra.
apply Trans with (Ap2 b a); auto with algebra.
apply Trans with (Ap0 b a); auto with algebra.
apply Sym; auto with algebra.
Defined.
(** - Remember that (part_set X) really has (Predicate X)'s as members *)
intros.
simpl in |- *.
red in |- *.
split; simpl in |- *; intro; red in H; red in |- *.
unfold transpose in |- *; destruct x; simpl in |- *.
simpl in H; intros; (apply Trans with (Ap2 b a); auto with algebra).
unfold transpose in H; destruct x; simpl in |- *.
simpl in H; intros.
auto with algebra.
Qed.
End defs.

Lemma symm_matr_subspace :
forall (n : Nat) (F : field), is_subspace (is_symmetric_pred F n).