How Mutual authentication and Forward secrecy in The X3DH Key Agreement Protocol work? Can someone explain the statement below from section 3.3 in The X3DH Key Agreement Protocol?


  DH1 = DH(IKA, SPKB)
  
  DH2 = DH(EKA, IKB)
  
  DH3 = DH(EKA, SPKB) 
  
  DH4 = DH(EKA, OPKB)
  
  SK = KDF(DH1 || DH2 || DH3 || DH4)
  
  DH1 and DH2 provide mutual authentication, while DH3 and DH4 provide
  forward secrecy


How do DH1 and DH2 provide mutual authentication, and how do DH3 and DH4 provide forward secrecy?

Are these also providing integrity of keys in X3DH exchange between server and Alice while fetching the prekey bundle ?
Bob uploads his signed prekey along with its signature to the server. This can be used to check the key integrity.

After Alice does this, Bob learns who Alice is because she sends him her public identity key $IK_A$ and they compute a shared secret ($DH_1$). Then Alice tells Bob who she is by generating an ephemeral public key $EK_A$ and they generate another shared secret ($DH_2$) that they can both confirm. Notice that at this point, Bob and Alice have authenticated themselves to each other, but since Alice is using an ephemeral key which will be discarded, they cannot prove themselves to a third party (deniability). This is why they don't just compute $DH(IK_A, IK_B)$.

Right after she calculates the secret key $SK$ Alice deletes her private ephemeral key and the DH outputs, but she sends the public part $EK_A$ as part of the initial message to Bob, who does the exact same calculations. The important part is that $EK_A$ is ephemeral and so will be deleted, providing forward secrecy. 

If there's a one-time prekey and you get a $DH_4$, that only gives the $KDF$ more key material to enhance the security of the secret key. But it serves the same purpose of forward security that $DH_3$ does.