Timings for CayleyDickson.v
Require Import Classes.interfaces.abstract_algebra.
Require Import Pointed.Core Pointed.pSusp.
Require Import Homotopy.HSpace.Core.
Require Import Homotopy.Suspension.
Require Import Homotopy.Join.Core.
Local Open Scope pointed_scope.
Local Open Scope mc_mult_scope.
(** A Cayley-Dickson Spheroid is a pointed type X which is an H-space, with two operations called negation and conjugation, satisfying the seven following laws.
--x=x x**=x 1*=1 (-x)*=-x* x(-y)=-(xy) (xy)* = y* x* x* x=1 *)
Class CayleyDicksonSpheroid (X : pType) := {
cds_hspace : IsHSpace X;
cds_negate : Negate X;
cds_conjug : Conjugate X;
cds_negate_inv : Involutive cds_negate;
cds_conjug_inv : Involutive cds_conjug;
cds_conjug_unit_pres : IsUnitPreserving cds_conjug;
cds_conjug_left_inv : LeftInverse (.*.) cds_conjug mon_unit;
cds_conjug_distr : DistrOpp (.*.) cds_conjug;
cds_swapop : SwapOp (-) cds_conjug;
cds_factorneg_r : FactorNegRight (-) (.*.);
}.
#[export] Existing Instances
cds_hspace
cds_negate
cds_conjug
cds_negate_inv
cds_conjug_inv
cds_conjug_unit_pres
cds_conjug_left_inv
cds_conjug_distr
cds_swapop
cds_factorneg_r.
Section CayleyDicksonSpheroid_Properties.
Context {X : pType} `(CayleyDicksonSpheroid X).
Global Instance cds_factorneg_l : FactorNegLeft (-) (.*.).
transitivity (conj (conj (-x * y))).
1: symmetry; apply involutive.
Global Instance cds_conjug_right_inv
: RightInverse (.*.) cds_conjug mon_unit.
rewrite <- (involutive x).
End CayleyDicksonSpheroid_Properties.
Global Instance conjugate_susp (A : Type) `(Negate A)
: Conjugate (Susp A).
Global Instance negate_susp (A : Type) `(Negate A)
: Negate (Susp A).
Class CayleyDicksonImaginaroid (A : Type) := {
cdi_negate : Negate A;
cdi_negate_involutive : Involutive cdi_negate;
cdi_susp_hspace : IsHSpace (psusp A);
cdi_susp_factorneg_r : FactorNegRight (negate_susp A cdi_negate) hspace_op;
cdi_susp_conjug_left_inv : LeftInverse hspace_op (conjugate_susp A cdi_negate) mon_unit;
cdi_susp_conjug_distr : DistrOpp hspace_op (conjugate_susp A cdi_negate);
}.
#[export] Existing Instances
cdi_negate
cdi_negate_involutive
cdi_susp_hspace
cdi_susp_factorneg_r
cdi_susp_conjug_left_inv
cdi_susp_conjug_distr.
Global Instance involutive_negate_susp {A} `(CayleyDicksonImaginaroid A)
: Involutive (negate_susp A cdi_negate).
srapply Susp_ind; try reflexivity.
rewrite Susp_rec_beta_merid.
rewrite Susp_rec_beta_merid.
Global Instance involutive_conjugate_susp {A} `(CayleyDicksonImaginaroid A)
: Involutive (conjugate_susp A cdi_negate).
srapply Susp_ind; try reflexivity.
rewrite 2 Susp_rec_beta_merid.
Global Instance isunitpreserving_conjugate_susp {A} `(CayleyDicksonImaginaroid A)
: @IsUnitPreserving _ _ pt pt (conjugate_susp A cdi_negate).
Global Instance swapop_conjugate_susp {A} `(CayleyDicksonImaginaroid A)
: SwapOp negate (conjugate_susp A cdi_negate).
srapply Susp_ind; try reflexivity.
rewrite (ap_compose negate).
rewrite Susp_rec_beta_merid.
rewrite 3 Susp_rec_beta_merid.
(** Every suspension of a Cayley-Dickson imaginaroid gives a Cayley-Dickson spheroid. *)
Global Instance cds_susp_cdi {A} `(CayleyDicksonImaginaroid A)
: CayleyDicksonSpheroid (psusp A) := {}.
Global Instance cdi_conjugate_susp_left_inverse {A} `(CayleyDicksonImaginaroid A)
: LeftInverse hspace_op (conjugate_susp A cdi_negate) mon_unit.
srapply cds_conjug_left_inv.
Global Instance cdi_conjugate_susp_right_inverse {A} `(CayleyDicksonImaginaroid A)
: RightInverse hspace_op (conjugate_susp A cdi_negate) mon_unit.
srapply cds_conjug_right_inv.
Global Instance cdi_susp_left_identity {A} `(CayleyDicksonImaginaroid A)
: LeftIdentity hspace_op mon_unit.
Global Instance cdi_susp_right_identity {A} `(CayleyDicksonImaginaroid A)
: RightIdentity hspace_op mon_unit.
Global Instance cdi_negate_susp_factornegleft {A} `(CayleyDicksonImaginaroid A)
: FactorNegLeft (negate_susp A cdi_negate) hspace_op.
(** A Cayley-Dickson imaginaroid A whose multiplciation on the suspension is associative gives rise to a H-space structure on the join of the suspension of A with itself. *)
Section ImaginaroidHSpace.
(* Let A be a Cayley-Dickson imaginaroid with associative H-space multiplication on Susp A *)
Context {A} `(CayleyDicksonImaginaroid A)
`(!Associative hspace_op).
(** Declaring these as local instances so that they can be found *)
Local Instance hspace_op' : SgOp (Susp A) := hspace_op.
Local Instance hspace_unit' : MonUnit (Susp A) := hspace_mon_unit.
(** First we make some observations with the context we have. *)
Context (a b c d : Susp A).
Local Definition f := (fun x => a * (c * -x)).
Local Definition g := (fun y => c * (y * b)).
Lemma lemma1 : f (- mon_unit) = a * c.
exact (hspace_right_identity c).
Lemma lemma2 : f (conj c * conj a * d * conj b) = (-d) * conj b.
rewrite 3 simple_associativity.
rewrite (right_inverse (a * c)).
rewrite (left_identity d).
Lemma lemma3 : g mon_unit = c * b.
Lemma lemma4 : g (conj c * conj a * d * conj b) = conj a * d.
rewrite 2 simple_associativity.
rewrite <- simple_associativity.
rewrite 2 simple_associativity.
rewrite <- simple_associativity.
(** Here is the multiplication map in algebraic form:
(a,b) * (c,d) = (a * c - d * b*, a* * d + c * b)
the following is the spherical form. *)
Global Instance cd_op
: SgOp (pjoin (psusp A) (psusp A)).
unfold psusp, pjoin; cbn.
exact (joinr (conj a * d)).
exact (joinl ((-d) * conj b)).
1: intro; cbn; symmetry; apply jglue.
refine (sq_ccGG _^ _^ _).
1,2: apply Join_rec_beta_jglue.
change (PathSquare (jglue (a * c) (c * b)) (jglue ((- d) * conj b) (conj a * d))^
(jglue (a * c) (conj a * d)) (jglue ((- d) * conj b) (c * b))^).
rewrite <- (lemma1 a c), <- (lemma2 a b c d),
<- (lemma3 b c), <- (lemma4 a b c d).
refine (sq_GGGG _ _ _ _ _).
1,2,3,4: srapply (Join_rec_beta_jglue _ _ (fun a b => jglue (f a) (g b))).
1,2: exact (ap_V _ (jglue _ _ )).
refine (@sq_ap _ _ _ _ _ _ _ (jglue _ _) (jglue _ _)^
(jglue _ _) (jglue _ _)^ _).
generalize (conj c * conj a * d * conj b).
change (forall s : Susp A,
Diamond (-mon_unit) s (mon_unit) s).
1: by apply diamond_v_sq.
1: by apply diamond_h_sq.
Global Instance cd_op_left_identity
: LeftIdentity cd_op pt.
1,2: exact (fun _ => ap _ (hspace_left_identity _)).
lhs refine (ap _ (ap_idmap _)).
exact (Join_rec_beta_jglue
(fun c => joinl (pt * c))
(fun d => joinr (conj pt * d))
(fun x y => jglue (pt * x) (conj pt * y))
a b).
Global Instance cd_op_right_identity
: RightIdentity cd_op pt.
1: exact (fun _ => ap joinl (hspace_right_identity _)).
1: exact (fun _ => ap joinr (hspace_left_identity _)).
refine (whiskerR _ _ @ _).
refine (ap _ (ap_idmap _) @ _).
simpl; rapply Join_rec_beta_jglue.
Global Instance hspace_cdi_susp_assoc
: IsHSpace (pjoin (psusp A) (psusp A))
:= {}.