(* 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" := (Vdual p x) (at level 100).(* Ad-hoc conjugate function in order to define the join *)
Fixpoint dconj (n : nat) (b: bool) {struct n} : vect n -> vect n :=
  match n return (vect n -> vect n) with
  | 0%nat => fun a => if b then (- a)%f else a
  | S n1 =>
      fun l1 =>
      let (l2, l3) := l1 in (dconj n1 b l2, dconj n1 (negb b) l3)
  end.Notation "x ^d_ b" := (dconj _ b x)  (at level 29, left associativity).Notation "x ^d_'t" := (dconj _ true x)  (at level 29, left associativity).Notation "x ^d_'f" := (dconj _ false x)  (at level 29, left associativity).

(* Specifications: *)
Lemma dconj0 n b : 0 ^d_ b = 0 :> vect n.
Lemma dconj_add n b (x y: vect n) : (x + y) ^d_ b = x ^d_ b + y ^d_ b.
Lemma dconj_invo n b (v: vect n) : v ^d_ b ^d_ b = v.
Lemma dconj_swap n b1 b2 (x: vect n) : x ^d_ b2 ^d_ b1 = x ^d_ b1 ^d_ b2.
Lemma dconj_conj_swap n b1 b2 (x: vect n) : (x ^_ b2) ^d_ b1 = x ^d_ b1 ^_ b2.
Lemma dconj_hom n b k (x: vect n) : hom n k x -> hom n k (x ^d_ b).