Library HoTT.Homotopy.HSpace.Coherent

Require Import Basics HSpace.Core Pointed.Core Pointed.Loops.

Local Open Scope mc_mult_scope.
Local Open Scope pointed_scope.

Coherent H-space structures

An H-space is coherent when the left and right identities agree at the base point.
A type equivalent to a coherent H-space is a coherent H-space.
Definition iscohhspace_equiv_cohhspace {X Y : pType} `{IsCohHSpace Y} (f : X <~>* Y)
  : IsCohHSpace X.
Proof.
  snrapply Build_IsCohHSpace.
  - rapply (ishspace_equiv_hspace f).
    apply ishspace_cohhspace; assumption.
  - unfold IsCoherent; cbn.
    refine (_ @@ 1).
    refine (ap (ap f^-1) _).
    pelim f.
    refine (1 @@ _).
    apply iscoherent.
Defined.

Every loop space is a coherent H-space.
Definition iscohhspace_loops {X : pType} : IsCohHSpace (loops X).
Proof.
  snrapply Build_IsCohHSpace.
  - apply ishspace_loops.
  - reflexivity.
Defined.