Module
Baskerville.Explain
- Package
- purescript-baskerville-core
- Repository
- afcondon/purescript-baskerville
Reading the proof structure back out: the derivation DAG behind a claim, and the transitive closures a UI scrubs along.
Everything here exploits acyclicity-by-construction (premises point at
strictly smaller ids): explain is a single backward scan over the
feed prefix ending at the root — no recursion, no visited set beyond
the growing needed-set.
#explain Source
explain :: forall residue claim rule axiom. Ord claim => claim -> KB residue claim rule axiom -> Maybe (DerivationDag claim rule axiom)#explainFact Source
explainFact :: forall residue claim rule axiom. KB residue claim rule axiom -> Fact claim rule axiom -> DerivationDag claim rule axiomThe DAG below a fact: scan the feed prefix backwards from the root; a fact is in the proof iff some already-needed fact cites it.
#supporters Source
supporters :: forall residue claim rule axiom. KB residue claim rule axiom -> Fact claim rule axiom -> Array (Fact claim rule axiom)Direct premises of a fact, resolved.