Here's Ramaswami, from his July 2010 Newsletter, with a relevant story ( you'll see why later) concerning Ganesha along with an outline of the structure of the Yoga Sutra as it is (now). I've also included some links and notes on Samkhya and the tatwas at the end.
'Ganesa. Lord Shiva with Goddess
Parvati was in his heavenly abode called Kailasa (the Himalayas). An
old devotee during a visit to Kailas, offered the Lord a delicious
mango. The Lord then turned to His sons, the elder Gajamukha/Ganesa
(the elephant headed) and the younger firebrand Sanmukha (one with six
heads) and offered the mango to the one who would travel around the
Universe quicker. Soon enough the younger Sanmukha mounted his peacock
vahana (vehicle). (In Indian mythology many gods have their vehicles,
Lord Vishnu used a particular variety of the eagle family called
Garuda; Saraswati, the goddess of learning glides around in her swan
vehicle.) Each Deva used a different vehicle as we use a Bentley or
Chevy Impala. Shanmukha had a head start, he was off to a good start
on his “around the world in.a jiffy” adventure. He was sure that he
would win the race. It was just impossible for obese Ganesa to crawl
along on his mushika vahana or mouse vehicle.
In Yoga Sutras the first chapter is intended for the highest evolved yogis-- the Uttama Adhikaris – the born yogis who could get into a samadhi state at the drop of a hat. Here there are two types of Yogis, the nirishwara Samkhya oriented philosophers who do not find the need to accept God in the creation and running of the Universe, even though it is an orthodox philosophy subscribing to the authority of the vedas, and the yogis who accept God. Patanjali in his Yoga philosophy accepts the 25 tatwas (24 tatwa of the prakriti or Universe and one distinct tatwa, the purusha) but, adds the 26th tatwa Iswara or God to facilitate the spiritual journey of some aspirants. That is why Yoga Philosophy is also known as “seswara Samkhya” or Sankhya philosophy which includes Iswara or God.) While one set of yogis have difficulty in accepting God in their equation there is considerable number who believe in God.
One interesting facet of Yoga is that it is Universal. It is for everybody, believers and non-believers alike. So, in the first chapter, Patanjali addresses the question of Chitta Vritti nirodha and
Kaivalya for both the groups. Those who follow the Samkhya path alone would practice dispassion towards the 24 tatwas in four groups (visesha avisesha lingamatra and alinga) because these 24 tatwas are the non-self and ultimately reach the stage of kaivalya. But Patanjali recommends another approach -- rather than muddling through the practice of vairagya on all these 24 tatwas, one may meditate upon the One Tatwa (eka tatwa), Iswara or God and attain Kaivalya or freedom.
People pray to God for a number things. Here Patanjali suggests praying for spiritual Freedom or kailvalya. Madhava, who wrote a book “Sarva Darsana Sangraha” or a “Concise elucidation of all philosophies”, says (following Sankara ) that the born Yogi who practices Iswarapranidhana using the Pranava mantra and also contemplates on the import of the Mantra attains salvation easily, like Ganesa who worshiped the Lord and Sakti unlike Shanmukha who took the laborious and circuitous path going around the Universe.
The implication is: those yogis who have faith in God may do well to use that devotional fervour and make spiritual progress more easily. In fact my guru Sri Krishnamacharya in spite of his enormous yogic practice was an ardent Bhakti yogi. Of course one should admit that if someone has genuine difficulty in having faith in God that person may follow the step by step yoga approach of the Samkhyas.'
from Ramaswami's July 2010 Newsletter
Here's a relatively clear outline of Samkhya philosophy on Hindunet
and the section on the tattva's from the same page
The 25 tatwas or principles
'The entire universe is composed of the three primal principles (Puruṣa, Pradhāna and Vyakta) and their manifestations. In the manifest world, there are twenty five principles in all. The enumeration of twenty five principles has Śṛti-sammata or acceptance of Śṛti, from Brihadaranyaka Upanishad (4.4.17).
The cosmic principles are explained in four groups. The primal nature, mahat (intelligence principle), ahaṃkāra (ego), five tanmātras (subtle attributes of the primal elements), eleven senses, five primal elements make twenty four principles. These are part of the world. Twenty fifth principle is Puruṣa, the eternal self. Including or excluding the Puruṣa, Sāṃkhya principles are usually mentioned as twenty four or twenty five.
Mūla Prakṛti or primal nature: She is eternal, has no source and is the source of the world.
Saptaka (mahat, ahaṃkāra and five tanmātras, making seven principles): Mahat is the intelligence principle. This is born from Prakṛti. Ahaṃkāra is the ego-sense. This emanates from Mahat. The five tanmātras emerge from Ahaṃkāra. Tanmātras are the subtle elements. These have source in the primal nature, and in turn are source for the primal elements.
Ṣodaśaka (the sixteen principles): The five primal elements of nature (earth, water, fire, air and sky) and eleven senses make the ṣodaśaka. Six jnanendriyas and five karmendriyas make eleven senses. They emanate from the tanmātras in sequence. Jnanendriyas are the five senses and mind. Karmendriyas are vāk (mouth or speech organ), pāṇi (hands), pādam (legs), upastha (reproductive organ) and pāyu (excretary organ).
Puruṣa/Cetana: All the twenty four principles are acetana or not eternally conscious. The eternal consciousness principle is the twenty fifth, the Puruṣa or the self.
In the sequence of transformation/evolution of the universe, Puruṣa is apariṇāmi or the one that never transforms. Primal nature is the primal transformation or manifestation that has no dissolution. She causes all the manifestation (abhivyakta) and transformation. The saptaka both have a source and dissolution, and are in turn source for the ṣodaśaka. Ṣodaśaka are the final transformations that are not source for anything'.