Halachah · Shulchan Aruch

Shulchan Arukh, Even HaEzer 8/שולחן ערוך·אבן העזר ח׳

אבכל ספק הולד הולך אחר הזכר. ובו ה סעיפים:
כהנים לוים וישראלים מותרין לבא זה בזה והולד הולך אחר הזכר:
1Cohanim, Leviim, and Yisraelim are permitted to cohabit with one another and the child retains the (ancestral) status of the man
בלוים וישראלים וחללים מותרים לבא זה בזה והולד הולך אחר הזכר:
2Leviim, Yisraelim, and Challim (those whose father is a Cohen and whose mother is someone forbidden to Cohanim) are permitted to cohabit with one another and the child retains the (ancestral) status of the man
גלוים וישראלים וחללים גרים ועבדים משוחררים מותרים לבא זה בזה והגר והמשוחרר שנשא לויה או ישראלי' או חללה הרי הבן ישראלי וישראלי או לוי או חלל שנשא גיורת או משוחררת הולד הולך אחר הזכר:
3Leviim, Yisraelim, Challim, converts, and freed slaves are permitted to cohabit with one another. A male convert or freed slave who marry a female Levi, Yisraelite, of Chalilit, their son is an Yisraelite. A male Yisraelite, Levi, or Chalil who marries a female convert or freed slave, the child retains the (ancestral) status of the man.
דכל הנישאת באיסור הולד הולך אחר הפגום שבשניהם שאם אחד מהם מפסולי כהונה הולד פסול לכהונה ואם אחד מהם מפסולי קהל הולד אסור לבא בקהל:
4Anyone who marries someone who is forbidden to them, the child retains that status of the one who has a defect. If one of them is invalid to a Cohen then the offspring (of their union) will be invalid to a Cohen. If one of them is invalid to the community of Israel (ex. a Mamzer), their offspring will be invalid to the community of Israel.
הולד שפחה ונכרית כמותן בין שנתעברו מכשר בין שנתעברו מפסול:
5The child of a female maidservant, non-Jewish woman retain their status (lit. are just like them) whether or not she became pregnant in a valid way (kasher) or an invalid way (pasal).