01 — The 5-Tuple and Family Graph
01 — The 5-Tuple and Family Graph
Section titled “01 — The 5-Tuple and Family Graph”Core claim: Every heir in Islamic inheritance law is uniquely identified by a 5-dimensional vector $\vec{h} = (g, j, d, q, c)$ computed via BFS traversal of a kinship DAG.
1. The Vector Space
Section titled “1. The Vector Space”Each potential heir is a point in a 5-dimensional space:
$$\vec{h} = (g, ; j, ; d, ; q, ; c)$$
| Component | Name | Domain | Meaning |
|---|---|---|---|
| $g$ | Gender (جنس) | ${0, 1}$ | 0 = female, 1 = male |
| $j$ | Jiha (جهة / Direction) | ${0, 1, 2, 3, 4}$ | Relationship class to the deceased |
| $d$ | Daraja (درجة / Degree) | $\mathbb{N}^+$ | Generational distance from the deceased |
| $q$ | Quwwa (قوة / Strength) | ${1, 2, 3, 9}$ | Bond type through the connecting ancestor |
| $c$ | Chain validity (صحة السلسلة) | ${0, 1}$ | Whether the heir has a valid inheritance path |
1.1 Jiha (Direction) — $j$
Section titled “1.1 Jiha (Direction) — $j$”The jiha classifies the structural relationship between the heir and the deceased:
| $j$ | Name | Arabic | Members |
|---|---|---|---|
| 0 | Spouse | زوجية | Husband, Wife |
| 1 | Descendant | بنوة | Son, Daughter, Son’s Son, Son’s Daughter, … |
| 2 | Ascendant | أبوة | Father, Mother, Grandfather, Grandmother, … |
| 3 | Sibling | أخوة | Brothers, Sisters (full, paternal, maternal), their sons |
| 4 | Uncle | عمومة | Paternal uncles (full, paternal), their sons |
Source: The classical ordering of ʿaṣaba directions is: بنوة → أبوة → أخوة → عمومة (see
faraid/asaba.md). Spouses ($j=0$) are added as a zeroth class because they exist outside the agnatic hierarchy.
1.2 Daraja (Degree) — $d$
Section titled “1.2 Daraja (Degree) — $d$”The daraja is the number of generational links between the heir and the deceased:
| Heir | $d$ |
|---|---|
| Son, Daughter, Father, Mother | 1 |
| Son’s Son, Grandfather, Grandmother | 2 |
| Son’s Son’s Son, Great-Grandfather | 3 |
For spouses, $d = 0$ (direct contractual bond, no generational distance).
1.3 Quwwa (Strength) — $q$
Section titled “1.3 Quwwa (Strength) — $q$”The quwwa encodes the type of blood bond through the connecting ancestor:
| $q$ | Name | Arabic | Meaning |
|---|---|---|---|
| 1 | Full | شقيق | Connected through both parents |
| 2 | Paternal | لأب | Connected through father only |
| 3 | Maternal | لأم | Connected through mother only |
| 9 | N/A | — | Not applicable (direct ancestors/descendants, spouses) |
Design note: The value $q = 9$ (rather than $\bot$) ensures that heirs without a quwwa distinction sort last in any lexicographic comparison on this dimension, which is the correct behavior — direct ancestors/descendants are never disambiguated by quwwa.
1.4 Chain Validity — $c$
Section titled “1.4 Chain Validity — $c$”The chain validity flag is a computed boolean: $c = 1$ if the heir has a valid inheritance path (is a farḍ or ʿaṣaba heir), $c = 0$ if the heir is dhawī al-arḥām (distant kindred).
This is the output of the eligibility test (see §3 below), not a raw coordinate.
Architectural advantage over alternatives: An earlier model used a
linecomponent (agnatic/uterine/bilateral) as the 5th dimension. But this information is already encoded in $(j, d, q, g)$. The $c$ flag answers the question the engine actually needs at runtime: is this person a real heir?
2. The Physical Layer: Kinship DAG
Section titled “2. The Physical Layer: Kinship DAG”2.1 Structure
Section titled “2.1 Structure”The family is represented as a Directed Acyclic Graph (DAG):
- Each person is a node.
- Each node stores pointers to its biological parents (at most two edges: father, mother).
- The graph must be acyclic (no person is their own ancestor).
2.2 BFS Path Resolution
Section titled “2.2 BFS Path Resolution”When an heir is added to an inheritance case, the system performs a Breadth-First Search from the heir node to the deceased node. The path is characterized by:
- Pivot: The lowest common ancestor (LCA) of the heir and the deceased.
- upSteps: Generations from the deceased up to the Pivot.
- downSteps: Generations from the Pivot down to the heir.
| Heir | Pivot | upSteps | downSteps |
|---|---|---|---|
| Son | Deceased | 0 | 1 |
| Father | Father | 1 | 0 |
| Brother | Father | 1 | 1 |
| Cousin | Grandfather | 2 | 2 |
| Son’s Daughter | Deceased | 0 | 2 |
2.3 From Path to 5-Tuple
Section titled “2.3 From Path to 5-Tuple”The BFS resolver converts the physical path into the mathematical 5-tuple:
| Component | Derivation |
|---|---|
| $g$ | Biological sex of the heir node |
| $j$ | Determined by path shape: $\text{upSteps}=0 \Rightarrow j=1$; $\text{downSteps}=0 \Rightarrow j=2$; $\text{upSteps}=1, \text{downSteps} \ge 1 \Rightarrow j=3$; $\text{upSteps} \ge 2, \text{downSteps} \ge 1 \Rightarrow j=4$; marital bond $\Rightarrow j=0$ |
| $d$ | $\max(\text{upSteps}, \text{downSteps})$ for $j \in {1,2}$; $\text{downSteps}$ for $j \in {3,4}$ |
| $q$ | Determined by the gender composition of the path through the pivot |
| $c$ | Computed by the eligibility predicates (§3) |
3. Computing $c$: The Eligibility Predicates
Section titled “3. Computing $c$: The Eligibility Predicates”The chain validity $c$ cannot be read directly from the graph — it must be computed from the path sequence. The rules decompose into three axis-specific predicates:
3.1 Descendant axis ($j = 1$)
Section titled “3.1 Descendant axis ($j = 1$)”$$c = 1 \iff \text{no female intermediary in the path from deceased to heir}$$
| Path | Sequence | $c$ |
|---|---|---|
| Son | M | 1 |
| Son’s Daughter | M → F | 1 |
| Daughter’s Son | F → M | 0 (dhawī al-arḥām) |
Source:
faraid/hajb.md— descendants through a female intermediary are not among the prescribed heirs.
3.2 Ascendant axis ($j = 2$)
Section titled “3.2 Ascendant axis ($j = 2$)”$$c = 1 \iff \text{no male between two females in the ascending path}$$
This is the grandmother path-sequence rule. By consensus (ijmāʿ):
“اتفق العلماء على عدم توريث: الجدة المدلية بذكر بين أنثيين” —
faraid/jaddah.md
| Path | Gender Sequence | $c$ | Reason |
|---|---|---|---|
| Mother of Mother | F → F | 1 | Valid |
| Mother of Father | F → M | 1 | Valid (Ḥanbalī: not excluded by father) |
| Mother of Mother of Father | F → F → M | 1 | Valid |
| Mother of Father of Mother | F → M → F | 0 | Invalid: male between two females |
| Father of Mother | M → F | 0 | Male ascendant through female = dhawī al-arḥām |
Critical implementation constraint: The BFS resolver must output the full gender sequence of the ascending path, not just the scalar $d$. The boolean $c$ is then computed by a pattern-match on this sequence (checking for the substring $[\text{F}, \text{M}, \text{F}]$ or a male ancestor reached through a female).
3.3 Collateral axis ($j \in {3, 4}$)
Section titled “3.3 Collateral axis ($j \in {3, 4}$)”$$c = 1 \iff \text{the path is purely agnatic AND the type constraints are met}$$
Specifically:
- The path from the deceased up to the pivot must be through males only (agnatic ascent).
- The path from the pivot down to the heir must be through males only, except for sisters (one step down, female).
- $q \ne 3$ (maternal siblings inherit by farḍ only, not by ʿaṣaba; but they are valid heirs with $c = 1$).
For collaterals, the constraint is more precisely:
- Brothers/sisters of all types ($d=1$): always $c = 1$ (including maternal siblings who inherit by farḍ).
- Sons of brothers ($d \ge 2$): $c = 1$ only if the path downward from the pivot is through males and $q \ne 3$.
4. Universality: The 5-Tuple as Complete Invariant
Section titled “4. Universality: The 5-Tuple as Complete Invariant”4.1 Claim
Section titled “4.1 Claim”Every heir recognized by classical Islamic inheritance law is uniquely characterized by its 5-tuple. Two persons with identical $(g, j, d, q, c)$ receive identical treatment.
4.2 Verification Against Classical Heir Types
Section titled “4.2 Verification Against Classical Heir Types”| Classical Heir | $g$ | $j$ | $d$ | $q$ | $c$ |
|---|---|---|---|---|---|
| Husband | 1 | 0 | 0 | 9 | 1 |
| Wife | 0 | 0 | 0 | 9 | 1 |
| Son | 1 | 1 | 1 | 9 | 1 |
| Daughter | 0 | 1 | 1 | 9 | 1 |
| Son’s Son | 1 | 1 | 2 | 9 | 1 |
| Son’s Daughter | 0 | 1 | 2 | 9 | 1 |
| Father | 1 | 2 | 1 | 9 | 1 |
| Mother | 0 | 2 | 1 | 9 | 1 |
| Paternal Grandfather | 1 | 2 | 2 | 9 | 1 |
| Maternal Grandmother | 0 | 2 | 2 | 9 | 1 |
| Paternal Grandmother | 0 | 2 | 2 | 9 | 1 |
| Full Brother | 1 | 3 | 1 | 1 | 1 |
| Full Sister | 0 | 3 | 1 | 1 | 1 |
| Paternal Brother | 1 | 3 | 1 | 2 | 1 |
| Paternal Sister | 0 | 3 | 1 | 2 | 1 |
| Maternal Brother | 1 | 3 | 1 | 3 | 1 |
| Maternal Sister | 0 | 3 | 1 | 3 | 1 |
| Full Brother’s Son | 1 | 3 | 2 | 1 | 1 |
| Paternal Uncle | 1 | 4 | 1 | 1 | 1 |
| Paternal Uncle (half) | 1 | 4 | 1 | 2 | 1 |
| Daughter’s Son | 1 | 1 | 2 | 9 | 0 |
| Mother’s Father | 1 | 2 | 2 | 9 | 0 |
Note on the Grandmother Ambiguity: Maternal grandmother and paternal grandmother both resolve to $(0, 2, 2, 9, 1)$ in the scalar tuple. They are distinguished by the path sequence stored in the resolver layer, which feeds into share assignment (the mother’s mother and the father’s mother may share the $\frac{1}{6}$). The 5-tuple determines eligibility and priority; the path origin determines which pool they share within.
4.3 “Unknown Heirs” Property
Section titled “4.3 “Unknown Heirs” Property”Because the engine operates on the abstract 5-tuple rather than a hardcoded list of named relationships, any heir whose tuple can be resolved — even a “10th-degree great-grandson” — is handled correctly by the same axioms. This is the strongest practical evidence that the 5-tuple is the complete invariant.
5. The Priority Ordering
Section titled “5. The Priority Ordering”For any two heir vectors $\vec{h}_1$ and $\vec{h}_2$, define the priority (used in Axiom $\alpha$ for ḥajb):
$$\pi(\vec{h}) = (1 - c, ; j, ; d, ; q)$$
Evaluated lexicographically (lower = higher priority):
- Valid heirs ($c=1$, so $1-c=0$) always outrank invalid ones ($c=0$, so $1-c=1$).
- Among valid heirs: lower jiha wins (descendants before ascendants before siblings before uncles).
- Same jiha: lower daraja wins (closer to the deceased).
- Same daraja: lower quwwa wins (full before paternal before maternal).
Within the same priority class, heirs coexist — they share according to Axiom $\beta$.
References
Section titled “References”- Architecture design:
my findings/architercture-summary.md - Grandmother path rules:
faraid/jaddah.md - Exclusion rules:
faraid/hajb.md - ʿAṣaba ordering:
faraid/asaba.md - Primary reference: Talkhīṣ Fiqh al-Farāʾiḍ (Ibn ʿUthaymīn)