Dantaponasikkhāpada

Vinayapiṭaka · Bhikkhu Vibhaṅga (2) · Vol. 2 · Section 545

[545] When it is a woman (mātugāma), a bhikkhu perceiving her as a woman sits down in private, one with one, he commits an offense of pācittiya. When it is a woman, a bhikkhu in doubt sits down in private, one with one, he commits an offense of pācittiya. When it is a woman, a bhikkhu perceiving her as not a woman sits down in private, one with one, he commits an offense of pācittiya. If a bhikkhu sits down in private, one with one, with a female yakkha (yakkhinī), or a female peta (petī), or a paṇḍaka, or a female animal having a human form, he commits an offense of dukkaṭa. When it is not a woman, a bhikkhu perceiving her as a woman: an offense of dukkaṭa. When it is not a woman, a bhikkhu in doubt: an offense of dukkaṭa. When it is not a woman, a bhikkhu perceiving her as not a woman: no offense.

English translation from the Pali (Siam Raṭṭha edition) — under review, not for citation.

This passage also appears in 2 other places