1) Breathing in long, he discerns, 'I am breathing in long'; or breathing out long, he discerns, 'I am breathing out long.' Or breathing in short, he discerns, 'I am breathing in short'; or breathing out short, he discerns, 'I am breathing out short.'Ekottara Agama 17.1
...
A bhikṣu intent on a quiet, secluded and really lonely place [goes there], sits down cross-legged and straightens body and mind. Concentrating on the tip of his nose without letting mental proliferation (nānātva) arise, he breathes out[6] a long [breath] and is fully aware of it; breathing in a long [breath], he is fully aware of it; breathing out a short [breath], he is fully aware of it; breathing in a short [breath], he is fully aware of it; breathing out a cool [breath] … breathing in a cool [breath] …, breathing out a warm [breath] … breathing in a warm [breath], he is fully aware of it. He contemplates the whole bodily [process of] inhaling and exhaling[7] and is fully aware of everything. When there is breathing he is fully aware of its presence, and when there is no breathing, he is fully aware of its absence. In the event of breathing out conditioned by the mind, he is fully aware of it; and in the event of breathing in conditioned by the mind, he is fully aware of it. In this way, Rāhula, one can practise [mindfulness of] breathing and thereby abandon all thoughts of aversion and confusion (vikṣiptasaṁjñā), overcome all sorrow and thus obtain the taste of deathlessness as sublime result.
...
2) He trains himself, 'I will breathe in sensitive to the entire body.' He trains himself, 'I will breathe out sensitive to the entire body.'
3) He trains himself, 'I will breathe in calming bodily fabrication.' He trains himself, 'I will breathe out calming bodily fabrication[mn.118]."
(1-3) "In-&-out breaths are bodily fabrications. "In-&-out breaths are bodily; these are things tied up with the body. That's why in-&-out breaths are bodily fabrications[sn41.006].
On whatever occasion a monk breathing in long discerns, 'I am breathing in long'; or breathing out long, discerns, 'I am breathing out long'; or breathing in short, discerns, 'I am breathing in short'; or breathing out short, discerns, 'I am breathing out short'; trains himself, 'I will breathe in...&... out sensitive to the entire body '; trains himself, 'I will breathe in...&...out calming bodily fabrication': On that occasion the monk remains focused on the body in & of itself — ardent, alert, & mindful — putting aside greed & distress with reference to the world. I tell you, monks, that this — the in-&-out breath — is classed as a body among bodies, which is why the monk on that occasion remains focused on the body in & of itself — ardent, alert, & mindful — putting aside greed & distress with reference to the world[DN22].
4) He trains himself, 'I will breathe in sensitive to rapture.' He trains himself, 'I will breathe out sensitive to rapture.'
5) He trains himself, 'I will breathe in sensitive to pleasure.' He trains himself, 'I will breathe out sensitive to pleasure.'
6) 'I will breathe in sensitive to mental fabrication.' He trains himself, 'I will breathe out sensitive to mental fabrication.'
7) He trains himself, 'I will breathe in calming mental fabrication.' He trains himself, 'I will breathe out calming mental fabrication[mn.118].'
(4-7) Perceptions & feelings are mental fabrications." Perceptions & feelings are mental; these are things tied up with the mind. That's why perceptions & feelings are mental fabrications [sn41.006]."
"And how does a monk remain focused on feelings in & of themselves? There is the case where a monk, when feeling a painful feeling, discerns, 'I am feeling a painful feeling.' When feeling a pleasant feeling, he discerns, 'I am feeling a pleasant feeling.' When feeling a neither-painful-nor-pleasant feeling, he discerns, 'I am feeling a neither-painful-nor-pleasant feeling.'"When feeling a painful feeling of the flesh, he discerns, 'I am feeling a painful feeling of the flesh.' When feeling a painful feeling not of the flesh, he discerns, 'I am feeling a painful feeling not of the flesh.' When feeling a pleasant feeling of the flesh, he discerns, 'I am feeling a pleasant feeling of the flesh.' When feeling a pleasant feeling not of the flesh, he discerns, 'I am feeling a pleasant feeling not of the flesh.' When feeling a neither-painful-nor-pleasant feeling of the flesh, he discerns, 'I am feeling a neither-painful-nor-pleasant feeling of the flesh.' When feeling a neither-painful-nor-pleasant feeling not of the flesh, he discerns, 'I am feeling a neither-painful-nor-pleasant feeling not of the flesh.'"In this way he remains focused internally on feelings in & of themselves, or externally on feelings in & of themselves, or both internally & externally on feelings in & of themselves. Or he remains focused on the phenomenon of origination with regard to feelings, on the phenomenon of passing away with regard to feelings, or on the phenomenon of origination & passing away with regard to feelings. Or his mindfulness that 'There are feelings' is maintained to the extent of knowledge & remembrance. And he remains independent, unsustained by (not clinging to) anything in the world. This is how a monk remains focused on feelings in & of themselves[DN22].
8) He trains himself, 'I will breathe in sensitive to the mind.' He trains himself, 'I will breathe out sensitive to the mind.'
9) He trains himself, 'I will breathe in satisfying the mind.' He trains himself, 'I will breathe out satisfying the mind.'
10) He trains himself, 'I will breathe in steadying the mind.' He trains himself, 'I will breathe out steadying the mind.'
11) He trains himself, 'I will breathe in releasing the mind.' He trains himself, 'I will breathe out releasing the mind[mn.118].'
(8-11) "And how does a monk remain focused on the mind in & of itself? There is the case where a monk, when the mind has passion, discerns that the mind has passion. When the mind is without passion, he discerns that the mind is without passion. When the mind has aversion, he discerns that the mind has aversion. When the mind is without aversion, he discerns that the mind is without aversion. When the mind has delusion, he discerns that the mind has delusion. When the mind is without delusion, he discerns that the mind is without delusion."When the mind is restricted, he discerns that the mind is restricted. When the mind is scattered, he discerns that the mind is scattered. When the mind is enlarged, he discerns that the mind is enlarged. When the mind is not enlarged, he discerns that the mind is not enlarged. When the mind is surpassed, he discerns that the mind is surpassed. When the mind is unsurpassed, he discerns that the mind is unsurpassed. When the mind is concentrated, he discerns that the mind is concentrated. When the mind is not concentrated, he discerns that the mind is not concentrated. When the mind is released, he discerns that the mind is released. When the mind is not released, he discerns that the mind is not released. "In this way he remains focused internally on the mind in & of itself, or externally on the mind in & of itself, or both internally & externally on the mind in & of itself. Or he remains focused on the phenomenon of origination with regard to the mind, on the phenomenon of passing away with regard to the mind, or on the phenomenon of origination & passing away with regard to the mind. Or his mindfulness that 'There is a mind' is maintained to the extent of knowledge & remembrance. And he remains independent, unsustained by (not clinging to) anything in the world. This is how a monk remains focused on the mind in & of itself [DN22]
12) He trains himself, 'I will breathe in focusing on inconstancy.' He trains himself, 'I will breathe out focusing on inconstancy.'
13) He trains himself, 'I will breathe in focusing on dispassion [literally, fading].' He trains himself, 'I will breathe out focusing on dispassion.'
14) He trains himself, 'I will breathe in focusing on cessation.' He trains himself, 'I will breathe out focusing on cessation.'
15) He trains himself, 'I will breathe in focusing on relinquishment.' He trains himself, 'I will breathe out focusing on relinquishment[mn.118].'
(12-15) 'Whatever is felt comes under stress.' That I have stated simply in connection with the inconstancy of fabrications. That I have stated simply in connection with the nature of fabrications to end... in connection with the nature of fabrications to fall away... to fade away... to cease... in connection with the nature of fabrications to change [sn36.011].
Here, bhikkhus, a bhikkhu develops mindfulness as a factor of awakening that is founded on detachment, founded on dispassion, founded on cessation, resulting in relinquishment; he develops investigation of the Dhamma as a factor of awakening that is founded on detachment, founded on dispassion, founded on cessation, resulting in relinquishment; he develops energy as a factor of awakening that is founded on detachment, founded on dispassion, founded on cessation, resulting in relinquishment; he develops exaltation[rapture] as a factor of awakening that is founded on detachment, founded on dispassion, founded on cessation, resulting in relinquishment; he develops serenity as a factor of awakening that is founded on detachment, founded on dispassion, founded on cessation, resulting in relinquishment; he develops concentration as a factor of awakening that is founded on detachment, founded on dispassion, founded on cessation, resulting in relinquishment; he develops equanimity as a factor of awakening that is founded on detachment, founded on dispassion, founded on cessation, resulting in relinquishment. It is in this way, bhikkhus, that a bhikkhu endowed with fruitful considerations develops the seven factors of awakening, increases the seven factors of awakening [SN 46.32].
Jhanas:
There is the case where a monk — quite withdrawn from sensuality, withdrawn from unskillful (mental) qualities — enters & remains in the first jhana: rapture & pleasure born from withdrawal, accompanied by directed thought & evaluation [DN22]. He permeates and pervades, suffuses and fills this very body with the rapture and pleasure born from withdrawal. There is nothing of his entire body unpervaded by rapture and pleasure born from withdrawal[an05.028]. Having first directed one's thoughts and made an evaluation, one then breaks out into speech. That's why directed thought & evaluation are verbal fabrications.[SN41.6] When one has attained the first jhāna, speech has ceased [SN36.11]. When one has attained the first jhāna, speech has been calmed[sn36.011].
With the stilling of directed thoughts & evaluations, he enters & remains in the second jhana: rapture & pleasure born of composure, unification of awareness free from directed thought & evaluation — internal assurance [DN22] . When one has attained the second jhāna, directed thought & evaluation have ceased [SN36.11] . When one has attained the second jhāna, directed thought & evaluation have been calmed [sn36.011].
With the fading of rapture, he remains equanimous, mindful, & alert, and senses pleasure with the body. He enters & remains in the third jhana, of which the Noble Ones declare, 'Equanimous & mindful, he has a pleasant abiding [DN22] .' When one has attained the third jhāna, rapture has ceased [SN36.11] . When one has attained the third jhāna, rapture has been calmed [sn36.011] .
With the abandoning of pleasure & pain — as with the earlier disappearance of elation & distress — he enters & remains in the fourth jhana: purity of equanimity & mindfulness, neither pleasure nor pain [DN22] . When one has attained the fourth jhāna, in-and-out breathing has ceased [SN36.11] . When one has attained the fourth jhāna, in-and-out breathing has been calmed [sn36.011].
When one has attained the dimension of the infinitude of space, the perception of forms has ceased.
When one has attained the dimension of the infinitude of consciousness, the perception of the dimension of the infinitude of space has ceased.
When one has attained the dimension of nothingness, the perception of the dimension of the infinitude of consciousness has ceased.
When one has attained the dimension of neither-perception nor non-perception, the perception of the dimension of nothingness has ceased.
When one has attained the cessation of perception & feeling, perception & feeling have ceased [SN36.11]. When one has attained the cessation of perception & feeling, perception & feeling have been calmed [sn36.011].
One should not be negligent of discernment, should guard the truth, be devoted to relinquishment, and train only for calm [mn.140].
This state[...]is hard to see: the resolution of all fabrications, the relinquishment of all acquisitions, the ending of craving; dispassion; cessation; Unbinding [SN 6.1].