Please check on Nissaie for more details that Imam Ali(as) is the one who joined the Prophet(pbuh) before anybody this hadith proved that the Imam is the first one who prayed with the Holy Prophet.
English Translation:
Anas ibn Maaik (RA) reported that the Prophet (SAW) was commissioned on Monday and Ali (RA) offered salah on Tuesday.