Imagine you have a massive choose-your-own-adventure book — thousands of pages, branching paths — but someone proves that every possible path through any completed chapter always converges on a fixed set of endings determined entirely by which page you started on. Now you want to read the ending aloud in natural language, so you hire a gifted but unreliable narrator and build a teleprompter that physically prevents them from saying anything not on the script. That is Al-Ghasali. The committed claim: closed chapters of Islamic jurisprudence (Fiqh), when formalized as finite propositional Horn theories via the classical al-sabr wa al-taqsim method, collapse to deterministic Finite State Automata. Verdict extraction is O(1) after offline compilation. Hierarchical composition of sub-chapter FSAs preserves this complexity. Temporal requirements like Tartib (ordering) flatten into static ontological states without adding memory. This is not an approximation — the paper claims a formal proof that the structure is inherently memoryless and deterministic. The architecture is a two-layer stack: a deterministic FSA layer that owns all juristic reasoning, and a probabilistic LLM layer that is strictly subordinate. The LLM never decides anything — it translates FSA output into readable Arabic or English summaries. The control mechanism is Grammar-Guided Constrained Decoding (GGCD): at each decoding step, the system dynamically constructs a right-linear grammar from the FSA's execution trace, and the LLM's token probabilities are masked to only permit tokens consistent with that grammar. Two additional constraints — a Bounded Neutral Lexicon (restricting available vocabulary) and Valence Locking (preventing negation insertion or semantic inversion) — are claimed to mathematically guarantee zero decisional hallucination, zero juristic factual hallucination, and zero semantic inversion. The ladder question is where this gets interesting and also where it gets thin. There is no existing computational Fiqh system to benchmark against. The paper's contribution is formalization itself — proving that the domain has a specific computational complexity class. The closest relatives are expert systems from the 1980s-90s rule-based AI era, but those never formalized the complexity guarantees or addressed the natural-language generation problem. In the constrained decoding space, the GGCD approach resembles techniques like Outlines, guidance, and LMQL, but the paper's contribution is the formal proof that this specific grammar construction eliminates specific hallucination categories, not the decoding mechanism itself. Integrity is the weak link. The paper is 18 pages of mathematical formalism with one figure and no empirical evaluation. The proofs are the product — there are no benchmarks, no test cases, no running implementation described, no dataset of Fiqh rulings evaluated. The hallucination guarantees are proved mathematically, not tested empirically. This means the claims are either true by construction (if the proofs hold) or unfalsifiable in practice (if the axioms don't map to reality). No independent verification exists. The question is whether the formalization of al-sabr wa al-taqsim into finite propositional Horn theories is actually faithful to how Fiqh scholars reason — and the paper assumes this rather than demonstrating it. The milestone that matters: building and evaluating an actual implementation. The theoretical contribution — that closed Fiqh chapters are FSA-reducible — is either a genuine insight about the computational structure of a 1400-year-old reasoning tradition, or an artifact of simplifying assumptions that don't survive contact with real juristic complexity. Open chapters (where scholars disagree), cross-chapter interactions, and analogical reasoning (qiyas) are explicitly out of scope. The paper acknowledges this. The successor experiment — running Al-Ghasali on even one complete Fiqh chapter and measuring whether the FSA faithfully captures what human jurists produce — was not run. The honest read: this is a formalism-first paper, and the author is establishing the theoretical foundation before building. Whether the foundation bears weight is an empirical question that remains completely untested.
The analogy
Imagine a choose-your-own-adventure book where someone proves every chapter, no matter which choices you make, has a fixed ending determined entirely by your starting conditions — then hires a narrator and builds a teleprompter that physically prevents them from ad-libbing even one word.
Teleprompter
Script physically constrains what the narrator can say — no ad-libbing, no paraphrasing, only the exact words on screen
GGCD + FSA
Grammar-guided constrained decoding physically restricts LLM token selection to only outputs consistent with the FSA's deterministic juristic trace
Honest assessment
Al-Ghasali is a cleanly structured theoretical contribution that proves an interesting structural claim about the computational complexity of closed Islamic jurisprudence. The FSA-over-LLM architecture and the formal hallucination elimination proofs are intellectually satisfying. But this is a paper with zero empirical contact with reality — no implementation, no test cases, no evaluation. The critical question of whether the Horn-clause formalization is faithful to actual juristic reasoning remains completely untested. Interesting to theorists working on neuro-symbolic AI safety and constrained generation; premature for anyone looking to build on it.
What Is CLAIMS?
40
/ 100
BedrockNews applies a structured analytical framework called CLAIMS to academic papers and technical research releases.
How CLAIMS worksClaim
3/5
Ladder
1/5
Architecture
4/5
Integrity
1/5
Milestone
1/5
Successor
2/5
What is this paper actually committing to?
Genuine formalization first: proves closed Fiqh chapters are FSA-reducible with O(1) verdicts and provably hallucination-free LLM output. Novel framing, but the claim is theoretical — no implementation validates it.
The field fight
Can LLMs be made safe for high-stakes domain-specific reasoning by constraining their output, or must the reasoning itself be handled by formal systems?
Side A
LLMs can learn domain reasoning with sufficient RLHF/fine-tuning; constrained decoding is a crutch
Held by: GPT-4 legal/medical fine-tunes, Anthropic constitutional AI
Side B
LLMs must be subordinate to formal reasoning engines for any domain where correctness matters; they are linguistic transformers only
Held by: Neuro-symbolic AI, this paper, formal verification community
Milestone tracker
Unlocks: Proof that the Horn-clause formalization actually captures juristic reasoning faithfully, and that GGCD works in practice on Arabic theological text
Current
0
chapters implemented
this paper (theory only)
Next
1
complete Fiqh chapter
first empirical validation
Unknown — no implementation exists; could be months or years
Verified Facts (11)
Framework is named Al-Ghasali
Builds on set-theoretic formalizations of al-sabr wa al-taqsim
Claims closed Fiqh chapters collapse to deterministic Finite State Automata
Claims O(1) verdict extraction after offline compilation
Claims hierarchical FSA composition preserves O(1) complexity
Temporal requirements (Tartib) flattened into static ontological states
Uses Grammar-Guided Constrained Decoding (GGCD) mechanism
Claims to guarantee absence of Decisional Hallucination, Juristic Factual Hallucination, and Semantic Inversion
Employs Bounded Neutral Lexicon and Valence Locking
18 pages, 1 figure
Author: Elnaserledinellah Mahmoud Abdelwahab
Practical Implications (3)
The FSA-over-LLM architecture pattern — where a formal system owns reasoning and the LLM is reduced to a linguistic surface-form generator — is generalizable beyond Fiqh to any domain with closed, decidable rule sets (tax codes, regulatory compliance, clinical protocols)
The Grammar-Guided Constrained Decoding approach with dynamic right-linear grammar construction could be adapted for other domains where LLM hallucination is unacceptable, though implementation is needed to validate feasibility
For Islamic scholars and institutions: if validated, this could provide a formally verifiable computational tool for basic Fiqh rulings, but the gap between theory and working system is large
More latest news
Read all