From mathcomp
From mathcomp
From mathcomp
From mathcomp
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Local Open Scope ring_scope.
Section Aux.
Definition andb_assoc := Bool.andb_assoc.
Variable R : realFieldType.
Variable n : nat.
Definition Vector := 'rV[R]_(n.+1).
Implicit Types (v : Vector).

Lemma cosine_rule' v1 v2 v3 :
2%:R * ((v1 - v2) *m (v3 - v1)^T) =
(v3 - v2) *m (v3 - v2)^T
- ((v3 - v1) *m (v3 - v1)^T + (v2 - v1) *m (v2 - v1)^T).