Skip to content

Farāʾiḍ Engine

Islamic inheritance computed from 4 irreducible axioms — not case-by-case if/else.

4 Irreducible Axioms

Every blocking rule, every share, every normalization step follows from α₁, α₂, β, γ. No hardcoded cases.

27 Heir Types

All recognized heirs in classical fiqh mapped to a 5-dimensional integer vector (g, j, d, q, c).

6 Extension Families

Munāsakhat, Mafqūd, Dhawī al-Arḥām, Ḥaml, Khunthā, Gharqā — all instances of one unified (S, w, A) schema.

Exact Arithmetic

Shares computed as exact rationals over ℚ using BigInt. No floats, no rounding errors.

PackagePurpose
@faraid/corePure math engine — 4 axioms, 6 phases, no strings
@faraid/domainCanonical types: HeirType, schemas, madhhab presets
@faraid/extensions12 extension instances via the (S, w, A) primitive
@faraid/apiUser-facing wrappers + BaseSolver class hierarchy
@faraid/serverHono HTTP server (Cloudflare Workers)
@faraid/clientGenerated RPC client
@faraid/webInteractive web application
faraid/ ← Primary Arabic source texts (16 files, ~940 KB)
└─ findings/ ← Mathematical formalism derived from sources (17 docs)
└─ packages/core/ ← Engine implementing the formalism
└─ packages/api/ packages/server/ packages/web/

The engine never hardcodes juristic decisions found in faraid/. Every rule is derived through findings/ and encoded as a mathematical axiom or exception.