(* reverse of a multivector each basis element is reversed *)
Fixpoint rev n : vect n -> vect n :=
match n return vect n ->  vect n with
|    0 => fun a => a
| S n1 => fun v => let (x,y) := v in (rev n1 x ^_'f, rev n1 y)
end.
Notation "''R[' x ]" := (rev _ x).

(* Specifications: *)
Lemma rev0 n : 'R[0] = 0 :> vect n.
Lemma revk n k : 'R[[k]] = [k] :> vect n.
Lemma rev_scal n k x : 'R[(k .* x)] =  k .* 'R[x] :> vect n.
Lemma rev_add n x y : 'R[x + y] =  'R[x] + 'R[y] :> vect n.
Lemma rev_conj n x : 'R[x ^_'f] = 'R[x]^_'f :> vect n.
Lemma rev_invo n x : 'R['R[x]] = x :> vect n.
Lemma rev_hom  n m x : (m <= n)%nat -> hom p n m x ->
'R[x] = ((-(1)) ^ (div2 (m * (m - 1))))%f .* x.
Lemma rev_join n x y : 'R[x ∧ y] = 'R[y] ∧ 'R[x] :> vect n.
Definition pseudo_inv n l :=
let a := (E : vect n) in let b := 'R[a] in (a [* l] b) [* l] b.