(* Hodge Duality *)
Fixpoint dual 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 (dual n1 (y ^_'f), dual n1 x)
end.
Notation "'@ x " := (dual _ x) (at level 9).

(* Specifications: *)
Lemma dual0 n : '@0 = 0 :> vect n.
Hint Rewrite dual0: GRm0.
Lemma dual0E n (x: vect n) : '@x = 0 -> x = 0.
Lemma dual_hom n k v : hom n k v -> hom n (n - k) '@v.
Hint Resolve dual_hom.
Lemma dual_scal n k (v: vect n) : '@(k .* v) = k .* '@v.
Lemma dual_add n (v1 v2: vect n) : '@(v1 + v2) = '@v1 + '@v2.
Lemma dual_invo n k (v: vect n): hom n k v ->  '@('@v) = (-(1)) ^(k * n.+1) .* v.
Lemma dual_invoE n k (v: vect n) : hom n k v ->  v = ((-(1)) ^(k * n.+1)) .* '@('@v).
Lemma dual_all n : '@E = 1 :> vect n.
Lemma dual1 n : '@1 =  E :> vect n.
Lemma homn_ex n v : hom n n v -> exists k, v = '@[k].
Lemma dual_base n k v :
In v (base n k) -> In '@v (base n (n - k)) \/ In ((-(1)) .* '@v) (base n (n - k)).