Liking cljdoc? Tell your friends :D
Clojure only.

vaelii.impl.special

The special-predicate dispatch table: what each functor the engine interprets does to the derived state around the store, stated once, with every half of every behaviour side by side.

A special predicate needs behaviour in four places — reflecting a stored sentex into the caches, the removal mirror, recover's cache-only replay, and wff's per-functor well-formedness check — and the compiler cross-checks none of them, so the arms live once here, in arms, keyed by functor:

:integrate (fn [kb sentex handle]) reflect a newly stored sentex into the caches :disintegrate (fn [kb sentex]) the mirror, reference-counted on (:id sentex) :rebuild (fn [tax sentex]) recover's cache-only replay — no re-check posting, no migration, no universal lifting, because the store already holds what those side effects produced :wff (fn [tax sentence context]) structural well-formedness (vaelii.impl.wff keeps the check fns; the table points at them. context scopes the arms that read it — today only disjoint-problems)

and check-entries refuses an asymmetric entry at namespace load, so an add-side arm without its removal and rebuild halves is a build failure rather than a cache that drifts on the first retraction or restart.

The enumeration is not here. Which functors the engine interprets, in what order, what each one says — its sentence shape, the :props kind it maintains, whether its arms run on the derivation path — is one entry per term in vaelii.impl.predicates, which requires nothing and so can be read by taxonomy, wff and provers, none of which can read this namespace. That split is what lifts the four-place ceiling above: the arms need functions from four layers and can only ever live at layer three, while what a predicate says is needed at every layer there is. entries joins the two, check-declarations refuses a disagreement, and predicates_test checks the join against the live tables.

structural-integrate stays outside that framework permanently and no declaration can name its arms: they dispatch on a sentence's shape rather than on its functor — a rule, an exceptWhen meta, a visibility except, and a disjoint metatype's member, whose functor is the metatype and so is data rather than vocabulary.

What this namespace still owns is everything the arms are and everything they need: all four arm columns, the five walks over them, the exception re-check queue the taxonomy arms post to, the universal-predicate lifting, and the equality migration. Third layer of the engine stack (kb <- checks <- special <- integrate <- chain <- settle): everything here reads kb and checks, and the store-mutation choke points in vaelii.impl.integrate sit directly above.

The special-predicate dispatch table: what each functor the engine interprets
*does* to the derived state around the store, stated once, with every half of every
behaviour side by side.

A special predicate needs behaviour in four places — reflecting a stored sentex
into the caches, the removal mirror, `recover`'s cache-only replay, and `wff`'s
per-functor well-formedness check — and the compiler cross-checks none of them, so
the arms live once here, in `arms`, keyed by functor:

  :integrate    (fn [kb sentex handle])  reflect a newly stored sentex into the caches
  :disintegrate (fn [kb sentex])         the mirror, reference-counted on (:id sentex)
  :rebuild      (fn [tax sentex])        recover's cache-only replay — no re-check
                                         posting, no migration, no universal lifting,
                                         because the store already holds what those
                                         side effects produced
  :wff          (fn [tax sentence context]) structural well-formedness (vaelii.impl.wff
                                         keeps the check fns; the table points at them.
                                         `context` scopes the arms that read it — today
                                         only `disjoint-problems`)

and `check-entries` refuses an asymmetric entry **at namespace load**, so an
add-side arm without its removal and rebuild halves is a build failure rather
than a cache that drifts on the first retraction or restart.

**The enumeration is not here.**  Which functors the engine interprets, in what
order, what each one *says* — its sentence shape, the `:props` kind it maintains,
whether its arms run on the derivation path — is one entry per term in
`vaelii.impl.predicates`, which requires nothing and so can be read by `taxonomy`,
`wff` and `provers`, none of which can read this namespace.  That split is what
lifts the four-place ceiling above: the arms need functions from four layers and
can only ever live at layer three, while what a predicate *says* is needed at every
layer there is.  `entries` joins the two, `check-declarations` refuses a
disagreement, and `predicates_test` checks the join against the live tables.

`structural-integrate` stays outside that framework permanently and no declaration
can name its arms: they dispatch on a sentence's *shape* rather than on its functor
— a rule, an `exceptWhen` meta, a visibility `except`, and a disjoint metatype's
member, whose functor is the metatype and so is data rather than vocabulary.

What this namespace still owns is everything the arms are and everything they need:
all four arm columns, the five walks over them, the exception re-check queue the
taxonomy arms post to, the universal-predicate lifting, and the equality migration.
Third layer of the engine stack (kb <- checks <- special <- integrate <- chain <-
settle): everything here reads kb and checks, and the store-mutation choke points in
`vaelii.impl.integrate` sit directly above.
raw docstring

*entail-moves?*clj

False while a *bulk-load?* write settles: the drain draws no argument types over the facts a genlCx move shows (entail-under-context-edge). record-arg-types draws them after the load.

False while a `*bulk-load?*` write settles: the drain draws no argument types over the
facts a `genlCx` move shows (`entail-under-context-edge`).  `record-arg-types` draws them
after the load.
sourceraw docstring

*owed-subsumption*clj

A volatile {opts [sentence …]}: an assert under it records its sentence here, under the opts it chains with, in place of chaining its subsumption-seeds, and its binder chains each group's batch-subsumption-seeds once (edit!). Nil chains them per assert.

A volatile `{opts [sentence …]}`: an assert under it records its sentence here, under the
opts it chains with, in place of chaining its `subsumption-seeds`, and its binder chains
each group's `batch-subsumption-seeds` once (`edit!`).  Nil chains them per assert.
sourceraw docstring

*producer-moves*clj

A volatile of {:edges #{[sub super]} :arrived #{handle} :departed #{handle} :derived {functor #{handle}} :seeds #{handle}}, or nil: the belief moves a write's settles make that the structural genlCx producer reads once the write has settled (context-nat/reconcile-moves). A write entry point binds it to producer-moves. The context-move drain adds the edges it read, and a settle pass the datums it revived, those it took OUT and the targets a defeat took from belief. derived-sentex-added adds each derivation, and the producer the restatements a merge it derived stored (take-producer-seeds!).

A volatile of `{:edges #{[sub super]} :arrived #{handle} :departed #{handle} :derived
{functor #{handle}} :seeds #{handle}}`, or nil: the belief moves a write's settles make
that the structural genlCx producer reads once the write has settled
(`context-nat/reconcile-moves`).  A write entry point binds it to `producer-moves`.  The
context-move drain adds the edges it read, and a settle pass the datums it revived, those
it took OUT and the targets a defeat took from belief.  `derived-sentex-added` adds each
derivation, and the producer the restatements a merge it derived stored
(`take-producer-seeds!`).
sourceraw docstring

*recheck-reads*clj

nil, or a volatile {key rule-handles} of the watched rules a re-check trigger reads for one predicate, which recheck-read answers from. A sweep that mints many memberships of few types binds one (with-recheck-reads), as does chain/sync-arity-classes! placing class memberships: each placement posts the trigger of its type, and the rules read for a type are the same for every placement of it. The key carries the genl generation, since a sweep can mint a genl edge (genlArg); the sweeps store no rule and no declaration a read here names.

nil, or a volatile `{key rule-handles}` of the watched rules a re-check trigger reads
for one predicate, which `recheck-read` answers from.  A sweep that mints many
memberships of few types binds one (`with-recheck-reads`), as does
`chain/sync-arity-classes!` placing class memberships: each placement posts the trigger
of its type, and the rules read for a type are the same for every placement of it.  The key
carries the `genl` generation, since a sweep can mint a `genl` edge (`genlArg`); the
sweeps store no rule and no declaration a read here names.
sourceraw docstring

*release-withheld?*clj

False under *bulk-load?* and in the settles an open, a recover or an upgrade runs, the first settle after a trusted image install among them (defer-first-release!): withheld-releases then draws nothing and keeps the departures and arrivals it would have read owed (:owed in mint-queues, which the image carries), and release-withheld! draws them.

False under `*bulk-load?*` and in the settles an open, a recover or an upgrade runs,
the first settle after a trusted image install among them (`defer-first-release!`):
`withheld-releases` then draws nothing and keeps the departures and arrivals it would
have read owed (`:owed` in `mint-queues`, which the image carries), and
`release-withheld!` draws them.
sourceraw docstring

*seed-moves?*clj

False while a write asserted with {:chain? false} settles: the drain re-checks what a genlCx move moves and seeds no chaining from it (drain-context-moves!).

False while a write asserted with `{:chain? false}` settles: the drain re-checks what a
`genlCx` move moves and seeds no chaining from it (`drain-context-moves!`).
sourceraw docstring

antisym-equate-existingclj

(antisym-equate-existing kb sentence)

When an (anti_symmetric P) declaration arrives, hand every stored fact of P's spec subtree to derive-antisymmetric-equalities, as equate-existing does for the functional family. nil when sentence declares nothing antisymmetric.

When an `(anti_symmetric P)` declaration arrives, hand every stored fact of `P`'s spec
subtree to `derive-antisymmetric-equalities`, as `equate-existing` does for the
functional family.  nil when `sentence` declares nothing antisymmetric.
sourceraw docstring

antisym-equate-under-context-edgeclj

(antisym-equate-under-context-edge kb m)

When a (genlCx sub super) edge arrives, derive the equalities an (anti_symmetric …) mark licenses over the facts the widened ancestor set newly makes jointly visible: the twin of equate-under-context-edge, over derive-antisymmetric-equalities.

When a `(genlCx sub super)` edge arrives, derive the equalities an `(anti_symmetric …)`
mark licenses over the facts the widened ancestor set newly makes jointly visible: the
twin of `equate-under-context-edge`, over `derive-antisymmetric-equalities`.
sourceraw docstring

antisym-equate-under-edgeclj

(antisym-equate-under-edge kb sentence)

When a (genl sub super) edge arrives, derive the equalities an (anti_symmetric …) mark above super now licenses over the (sub …) facts already stored — the twin of equate-under-edge. Free for an edge no anti_symmetric mark stands above, decided before the subtree is read. nil when sentence is not a genl edge.

When a `(genl sub super)` edge arrives, derive the equalities an `(anti_symmetric …)`
mark above `super` now licenses over the `(sub …)` facts already stored — the twin of
`equate-under-edge`.  Free for an edge no `anti_symmetric` mark stands above, decided
before the subtree is read.  nil when `sentence` is not a `genl` edge.
sourceraw docstring

any-declaring?clj

(any-declaring? kb)
(any-declaring? kb kinds)

Does any predicate carry an entailing argument declaration, of kinds when given? Read off the taxonomy's global :props sets (tax/arg-declaration-props), so the check every settle runs reads no index and builds no set. The two kind sets every caller passes have their :props keys resolved once (declaring-props), and the taxonomy is read once per call: a retraction asks this three times, and per kind the sorted-map lookup and a taxonomy read cost more than the answer.

Does any predicate carry an entailing argument declaration, of `kinds` when given?  Read
off the taxonomy's global `:props` sets (`tax/arg-declaration-props`), so the check every
settle runs reads no index and builds no set.  The two kind sets every caller passes
have their `:props` keys resolved once (`declaring-props`), and the taxonomy is read
once per call: a retraction asks this three times, and per kind the sorted-map lookup
and a taxonomy read cost more than the answer.
sourceraw docstring

arg-type-extentsclj

(arg-type-extents kb)

The facts the argument-type pass draws, as [[functor handles] …]: every functor an entailing declaration reaches, in content order (declared-functors), with the handles stored now. Empty under VAELII_ASSERTIVE_ARG_TYPES=0. A store loaded around assert (a dump import, *bulk-load?*, bulk-assert-facts!) holds no derived memberships; the pass draws them per fact (draw-fact).

The facts the argument-type pass draws, as `[[functor handles] …]`: every functor an
entailing declaration reaches, in content order (`declared-functors`), with the handles
stored now.  Empty under `VAELII_ASSERTIVE_ARG_TYPES=0`.  A store loaded around `assert`
(a dump import, `*bulk-load?*`, `bulk-assert-facts!`) holds no derived memberships; the
pass draws them per fact (`draw-fact`).
sourceraw docstring

arrival-releasable-rule?clj

(arrival-releasable-rule? kb rh)

Can an arriving fact release a block on the rule stored at rh? True when rules/arrival-releasable? holds of it, or rules/exception-arrival-releasable? of its exceptions. The settle loop owes such a rule a re-join, and the two edge triggers below exempt it from their firing-side narrowing.

Can an arriving fact release a block on the rule stored at `rh`?  True when
`rules/arrival-releasable?` holds of it, or `rules/exception-arrival-releasable?` of
its exceptions.  The settle loop owes such a rule a re-join, and the two edge triggers
below exempt it from their firing-side narrowing.
sourceraw docstring

batch-subsumption-seedsclj

(batch-subsumption-seeds kb sentences)

subsumption-seeds of every sentence of sentences at once: an edge two of them install, and a functor two edges' subtrees share, are read once, and each seed appears once.

`subsumption-seeds` of every sentence of `sentences` at once: an edge two of them install,
and a functor two edges' subtrees share, are read once, and each seed appears once.
sourceraw docstring

bearing-equalitiesclj

(bearing-equalities kb sentence)

The handles of every equality edge and schematic rewrite rule that could bear on sentence: the supporters across the whole class of each merged symbol it names (docs/equality.md, "The reader is not the fact's own context"), unbelieved ones included, since each candidate reader re-reads belief and visibility. Empty when no symbol of sentence is merged and no rule applies, decided before any class walk or record read: the assert path offers every sentex to migration.

The handles of every equality edge and schematic rewrite rule that could bear on
`sentence`: the supporters across the whole **class** of each merged symbol it names
(docs/equality.md, "The reader is not the fact's own context"), unbelieved ones
included, since each candidate reader re-reads belief and visibility.  Empty when no
symbol of `sentence` is merged and no rule applies, decided before any class walk or
record read: the assert path offers every sentex to migration.
sourceraw docstring

believed-again-sweepsclj

(believed-again-sweeps kb handles)

Run, for each symbol-merge supporter in handles that is stored and believed, what its arrival runs over the stored facts: the re-check of the merged class (recheck-equality-edge) and the migration (equality-arrival-sweep). Returns one {:new :superseded :violations}. handles is tax/take-believed-again!'s answer: a supporter whose firing was held void met its arrival with nothing to restate, and a relabel brings it IN with no arrival. Walked in content order, and scoped to each supporter's class.

Run, for each symbol-merge supporter in `handles` that is stored and believed, what
its arrival runs over the stored facts: the re-check of the merged class
(`recheck-equality-edge`) and the migration (`equality-arrival-sweep`).  Returns one
`{:new :superseded :violations}`.  `handles` is `tax/take-believed-again!`'s answer: a
supporter whose firing was held void met its arrival with nothing to restate, and a
relabel brings it IN with no arrival.  Walked in content order, and scoped to each
supporter's class.
sourceraw docstring

call-with-pass-cachesclj

(call-with-pass-caches kb f)

(f) holding, across the facts a pass over kb draws, the admission checks' answers (*admission-memo*), each context's reader state (exc/with-reader-states) and the justification dedup index (jtms/with-dedup-cache); the ones already bound are kept.

`(f)` holding, across the facts a pass over `kb` draws, the admission checks' answers
(`*admission-memo*`), each context's reader state (`exc/with-reader-states`) and the
justification dedup index (`jtms/with-dedup-cache`); the ones already bound are kept.
sourceraw docstring

check-declarationsclj

(check-declarations entries)
(check-declarations entries arm-functors)

Refuse a table whose arms and declarations disagree, at namespace load, as the cross-layer half of check-entries: a functor with arms and no declaration or the reverse (arm-functors is read before entries filters to pr/in-special-table; the one-argument arity reads the functors off entries); a :cached declaration whose arms have no cache triple, or the reverse; a :checked declaration whose arms have no :wff, or the reverse. Throws :bad-table-entry with :mismatch. The two validators stay separate (docs/predicates.md).

Refuse a table whose arms and declarations disagree, at namespace load, as the
cross-layer half of `check-entries`: a functor with arms and no declaration or the
reverse (`arm-functors` is read before `entries` filters to `pr/in-special-table`; the
one-argument arity reads the functors off `entries`); a `:cached` declaration whose arms
have no cache triple, or the reverse; a `:checked` declaration whose arms have no
`:wff`, or the reverse.  Throws `:bad-table-entry` with `:mismatch`.  The two validators
stay separate (docs/predicates.md).
sourceraw docstring

check-entriesclj

(check-entries entries)

Refuse an ill-formed table at namespace load: an entry with some of the cache arms (:integrate, :disintegrate, :rebuild) and not all, or with no arm at all. Throws :bad-table-entry with :mismatch :partial-cache-triple or :no-arm. Returns entries unchanged.

Refuse an ill-formed table at namespace load: an entry with some of the cache arms
(`:integrate`, `:disintegrate`, `:rebuild`) and not all, or with no arm at all.  Throws
`:bad-table-entry` with `:mismatch` `:partial-cache-triple` or `:no-arm`.  Returns
`entries` unchanged.
sourceraw docstring

check-wffclj

(check-wff tax sentence context)

Throw :not-well-formed naming every wff-problems problem of sentence, else nil. A nil tax checks the sentence alone.

Throw `:not-well-formed` naming every `wff-problems` problem of `sentence`, else nil.  A
nil `tax` checks the sentence alone.
sourceraw docstring

class-moved-mergesclj

(class-moved-merges kb region asked drop?)

Re-ask the collision merges of the handles in region (a delay over jtms/touched) whose class can have moved: drop each collision justification whose members are all IN and one at :default (off when drop? is false), and re-derive from each member IN at :monotonic but a premise this settle created at that class. asked is the settle's volatile set of [handle class] asked already. {:new :superseded :violations :removed :members}, :removed the merged removals for the caller's stores and :members the dropped justifications' members; nil, with region unforced, when no merge mark is declared. See docs/equality.md, "functional infers equality instead of throwing".

Re-ask the collision merges of the handles in `region` (a delay over `jtms/touched`)
whose class can have moved: drop each collision justification whose members are all IN
and one at `:default` (off when `drop?` is false), and re-derive from each member IN at
`:monotonic` but a premise this settle created at that class.  `asked` is the settle's
volatile set of `[handle class]` asked already.  `{:new :superseded :violations :removed
:members}`, `:removed` the merged removals for the caller's stores and `:members` the
dropped justifications' members; nil, with `region` unforced, when no merge mark is
declared.  See docs/equality.md, "`functional` infers equality instead of throwing".
sourceraw docstring

clear-except-moves!clj

(clear-except-moves! kb)

Empty :except-moves outright — a rebuild reconciles every supersession from scratch.

Empty `:except-moves` outright — a rebuild reconciles every supersession from scratch.
sourceraw docstring

closure-edge-relationclj

(closure-edge-relation sentence)

The closure relation sentence puts edges into: its functor for a binary genl or genlCx edge, genl for a cover (tax/installed-edges), and nil for any other sentence.

The closure relation `sentence` puts edges into: its functor for a binary `genl` or
`genlCx` edge, `genl` for a cover (`tax/installed-edges`), and nil for any other sentence.
sourceraw docstring

computed-reading-rulesclj

(computed-reading-rules kb bfn s)

The forward rules a datum on bfn re-joins and re-checks because bfn is a predicate a registered SupportingProver reads: the rules carrying an antecedent that a prover reading bfn answers (provers/support-answers-reading). bfn is the functor of the sentence's underlying body, so a believed (not (conversionFactor …)) counts. Reads the rules stated in every context; one map lookup for a datum no prover reads. s is the sentence: a genl edge moves only the expression kinds at or above its upper end.

The forward rules a datum on `bfn` re-joins and re-checks because `bfn` is a
predicate a registered `SupportingProver` reads: the rules carrying an antecedent that a
prover reading `bfn` answers (`provers/support-answers-reading`).  `bfn` is the functor
of the sentence's underlying body, so a believed `(not (conversionFactor …))` counts.
Reads the rules stated in every context; one map lookup for a datum no prover reads.
`s` is the sentence: a `genl` edge moves only the expression kinds at or above its
upper end.
sourceraw docstring

context-moveclj

(context-move kb sub super)

What the move of the genlCx edge [sub super] shows or hides (tax/context-move), with the reader classes the stored excepts on genlCx supporters' support split the readers into (exc/genlCx-except-contexts). The walks without the edge do not cross an edge stored in both polarities, so that edge can only enlarge the answer.

What the move of the `genlCx` edge `[sub super]` shows or hides (`tax/context-move`),
with the reader classes the stored `except`s on `genlCx` supporters' support split the
readers into (`exc/genlCx-except-contexts`).  The walks without the edge do not cross an
edge stored in both polarities, so that edge can only enlarge the answer.
sourceraw docstring

conviction-generationsclj

(conviction-generations kb)

taxonomy-generations with the separations (tax/separation-inputs): the value an argument conviction is decided under, an argument hold's (checks/refresh-argument-holds!). A conviction reads a type the taxonomy separates from the declared one, so a separation moving re-asks it.

`taxonomy-generations` with the separations (`tax/separation-inputs`): the value an
argument conviction is decided under, an argument hold's
(`checks/refresh-argument-holds!`).  A conviction reads a type the taxonomy separates
from the declared one, so a separation moving re-asks it.
sourceraw docstring

covered-mergesclj

(covered-merges kb moved)

The collision justifications, in id order, of every merge copy covered-copies finds in a class the equality partition moved since the last call (tax/take-equality-moves! as :covers, every merged term after a recover's replay) or in the class of a merge of moved (move-covered-merges). A reader that sees a pair in one class derives no merge of it, so a covered copy is one that an arrival order placing the more general merges first never stores (docs/equality.md, "A merge copy that a more general merge covers is dropped"). nil when no merge mark is declared; the moved terms are taken either way.

The collision justifications, in id order, of every merge copy `covered-copies` finds
in a class the equality partition moved since the last call (`tax/take-equality-moves!`
as `:covers`, every merged term after a `recover`'s replay) or in the class of a merge
of `moved` (`move-covered-merges`).  A reader that sees a pair in one class derives no
merge of it, so a covered copy is one that an arrival order placing the more general
merges first never stores (docs/equality.md, "A merge copy that a more general merge
covers is dropped").  nil when no merge mark is declared; the moved terms are taken
either way.
sourceraw docstring

cycle-keys!clj

(cycle-keys! kb moved)

The refusal-record keys indexed under a handle of moved whose entries still name it, in content order, for chain/release-stratified! to re-decide. Takes each such handle out of the index: a re-decision that finds the cycle closed still indexes it again. A rule whose record overflowed is queued for the re-join an overflow owes.

The refusal-record keys indexed under a handle of `moved` whose entries still name it, in
content order, for `chain/release-stratified!` to re-decide.  Takes each such handle out
of the index: a re-decision that finds the cycle closed still indexes it again.  A rule
whose record overflowed is queued for the re-join an overflow owes.
sourceraw docstring

cycle-movedclj

(cycle-moved kb moved)

The handles of moved that index a refusal for a cycle through negation (index-cycle!), in moved's order. One map read when no such refusal is recorded.

The handles of `moved` that index a refusal for a cycle through negation
(`index-cycle!`), in `moved`'s order.  One map read when no such refusal is recorded.
sourceraw docstring

declared-types-rehomedclj

(declared-types-rehomed kb pred)

The declaredType memberships stored where unary-entailments no longer places them, drawn again where it does: {:new [handle …] :violations [v …] :dropped [jid …]}, the records the draw created, and the justifications of the (unary_predicate T) records stored outside storage-context that the caller drops. The draw runs first, so the record at the new home holds the declaration before the old justification goes. Empty unless pred is unary_predicate: a (forced_decontextualized_predicate unary_predicate) arriving after a declaration below CxUniverse minted there leaves the KB the other order builds (core/rehome-forced-extent!).

The `declaredType` memberships stored where `unary-entailments` no longer places them,
drawn again where it does: `{:new [handle …] :violations [v …] :dropped [jid …]}`, the
records the draw created, and the justifications of the `(unary_predicate T)` records
stored outside `storage-context` that the caller drops.  The draw runs first, so the
record at the new home holds the declaration before the old justification goes.
Empty unless `pred` is `unary_predicate`: a `(forced_decontextualized_predicate
unary_predicate)` arriving after a declaration below CxUniverse minted there leaves
the KB the other order builds (`core/rehome-forced-extent!`).
sourceraw docstring

deduce-arg-typesclj

(deduce-arg-types kb entailments handle context)
(deduce-arg-types kb entailments handle context pre-checked?)

Materialize the entailments checks/constraint-entailments drew over a sentence stored at handle in context: {:new [handles] :violations [v]}. Called from assert and from forward chaining's place-conclusion. pre-checked? skips the definitional constraint check of each mint (inadmissible); only the assert path's first level passes true.

Materialize the entailments `checks/constraint-entailments` drew over a sentence
stored at `handle` in `context`: `{:new [handles] :violations [v]}`.  Called from
`assert` and from forward chaining's `place-conclusion`.  `pre-checked?` skips the
definitional constraint check of each mint (`inadmissible`); only the assert path's
first level passes true.
sourceraw docstring

deduce-belowclj

(deduce-below kb sentence handle context)
(deduce-below kb sentence handle context keep?)

Materialize what the declarations declarations-below finds say about the fact sentence stored at handle in context, at each of their placements: {:new [handles] :violations [v]}. Each mint names the fact, the declaration and the genlCx edges its placement sees both through (checks/declaration-entailments). The assert path and chain/place-conclusion call it beside deduce-arg-types. keep?, when given, takes an entailment and its placement.

Materialize what the declarations `declarations-below` finds say about the fact
`sentence` stored at `handle` in `context`, at each of their placements:
`{:new [handles] :violations [v]}`.  Each mint names the fact, the declaration and the
`genlCx` edges its placement sees both through (`checks/declaration-entailments`).  The
assert path and `chain/place-conclusion` call it beside `deduce-arg-types`.  `keep?`,
when given, takes an entailment and its placement.
sourceraw docstring

deduce-liftsclj

(deduce-lifts kb sentence handle context)
(deduce-lifts kb sentence handle context sweep?)

Deduce the literal sentence (stored at handle in context) into CxUniverse when lifts-to-universe? holds of it, and into what its slice slices when the KB believes its predicate eternal (slice-lift), as {:new [handles] :violations [v]}; nil when neither does. sweep? (default true) adds the copies the arrival of sentence owes the stored literals (eternal-arrival-sweep). assert and place-conclusion call it. A permuting mark is lifted to CxUniverse on its statement alone, and any other literal is lifted once per sentex declaring its predicate (docs/contexts.md#decontextualized_predicate-a-fact-that-belongs-to-the-kb-not-to-one-theory).

Deduce the literal `sentence` (stored at `handle` in `context`) into CxUniverse when
`lifts-to-universe?` holds of it, and into what its slice slices when the KB believes its
predicate eternal (`slice-lift`), as `{:new [handles] :violations [v]}`; nil when neither
does.  `sweep?` (default true) adds the copies the arrival of `sentence` owes the stored
literals (`eternal-arrival-sweep`).  `assert` and `place-conclusion` call it.  A permuting
mark is lifted to CxUniverse on its statement alone, and any other literal is lifted once per
sentex declaring its predicate
(docs/contexts.md#decontextualized_predicate-a-fact-that-belongs-to-the-kb-not-to-one-theory).
sourceraw docstring

defer-first-release!clj

(defer-first-release! kb)

Make kb's next settle run with *release-withheld?* false (take-first-deferral!).

Make `kb`'s next settle run with `*release-withheld?*` false (`take-first-deferral!`).
sourceraw docstring

departed-edge-seedsclj

(departed-edge-seeds kb handles)

The chaining seeds a settle owes the records among handles that hold witness edges (witness-edge?) and went IN to OUT: resubsumption-seeds for an edge that lost belief rather than its record. Runs per edge only when a dependent is now OUT (docs/nmtms.md, "Where the layer stops").

The chaining seeds a settle owes the records among `handles` that hold witness edges
(`witness-edge?`) and went IN to OUT: `resubsumption-seeds` for an edge that
lost belief rather than its record.  Runs per edge only when a dependent is now OUT
(docs/nmtms.md, "Where the layer stops").
sourceraw docstring

derive-antisymmetric-equalitiesclj

(derive-antisymmetric-equalities kb sentence context handle)
(derive-antisymmetric-equalities kb sentence context handle readers)

derive-antisymmetric-equalities-in run from every reader at or below context, with the presence checks and the readers narrowing derive-functional-equalities takes.

`derive-antisymmetric-equalities-in` run from every reader at or below `context`, with
the presence checks and the `readers` narrowing `derive-functional-equalities` takes.
sourceraw docstring

derive-functional-equalitiesclj

(derive-functional-equalities kb sentence context handle)
(derive-functional-equalities kb sentence context handle readers)

derive-functional-equalities-in run from every reader at or below context (merge-readers). readers, when given, narrows that set; only equate-under-context-edge-via passes it. Two presence checks precede the reader sweep: tax/functional-family-declared? and functional-mark-relevant?.

`derive-functional-equalities-in` run from every reader at or below `context`
(`merge-readers`).  `readers`, when given, narrows that set; only
`equate-under-context-edge-via` passes it.  Two presence checks precede the reader
sweep: `tax/functional-family-declared?` and `functional-mark-relevant?`.
sourceraw docstring

derive-mergeclj

(derive-merge kb sentence context informant antes)

Store the equality sentence in context as a derivation from antes under informant, and merge with it. Returns the migration result. The antecedents are ordered by content (kb/antecedent-order), so the list why prints does not depend on which fact arrived first. The equality's handle goes to a bound observe/*fired-sink*, so a write check reads it as it reads a rule's conclusion.

Store the equality `sentence` in `context` as a derivation from `antes` under
`informant`, and merge with it.  Returns the migration result.  The antecedents are
ordered by content (`kb/antecedent-order`), so the list `why` prints does not depend on
which fact arrived first.  The equality's handle goes to a bound `observe/*fired-sink*`,
so a write check reads it as it reads a rule's conclusion.
sourceraw docstring

derived-sentex-addedclj

(derived-sentex-added kb sentex handle)

The derivation-path add choke point: the integration arms a derived sentex may reach (integrate-transitive for a functor the table keys; the structural walk minus the rule arm otherwise) and the exception re-check post. The except arm's reconcile-belief-change runs inline mid-fixpoint: it only swaps the taxonomy and writes cache entries. mark-premise runs before integrate/sentex-added, with no read between the store and the justification. Callers: forward chaining's place-conclusion, the decontextualized_predicate lift, the argument-constraint entailment and derive-equality. See docs/taxonomy.md and docs/exceptions.md.

The derivation-path add choke point: the integration arms a derived sentex may reach
(`integrate-transitive` for a functor the table keys; the structural walk minus the rule
arm otherwise) and the exception re-check post.  The except arm's
`reconcile-belief-change` runs inline mid-fixpoint: it only swaps the taxonomy and
writes cache entries.  `mark-premise` runs before `integrate/sentex-added`, with no
read between the store and the justification.  Callers: forward chaining's
`place-conclusion`, the `decontextualized_predicate` lift, the argument-constraint
entailment and `derive-equality`.  See docs/taxonomy.md and docs/exceptions.md.
sourceraw docstring

descent-surplus-placementsclj

(descent-surplus-placements kb moved)

The mint justifications, in id order, that a record among moved left at a context no longer a placement of their fact and declaration (pair-placements): a genl route or trigger membership stated in a more general context places the pair above, and the placement below goes. A record installing genl edges whose super reaches a declaration (super-reaches-declaration?) reads its subs' facts; a membership whose type reaches a trigger type (trigger-types, through tax/genls-global, E17) reads the facts naming its term.

The mint justifications, in id order, that a record among `moved` left at a context
no longer a placement of their fact and declaration (`pair-placements`): a `genl` route
or trigger membership stated in a more general context places the pair above, and the
placement below goes.  A record installing `genl` edges whose `super` reaches a
declaration (`super-reaches-declaration?`) reads its `sub`s' facts; a membership whose
type reaches a trigger type (`trigger-types`, through `tax/genls-global`, E17) reads the
facts naming its term.
sourceraw docstring

different-only-rule?clj

(different-only-rule? kb rh)

Is the rule at rh re-checked for a (different …) antecedent and for nothing else: no unknown antecedent, no aggregate, no closed-extent negative and no exceptWhen stored naming it? A merge can only withdraw such a rule's firings, never release one.

Is the rule at `rh` re-checked for a `(different …)` antecedent and for nothing else:
no `unknown` antecedent, no aggregate, no closed-extent negative and no `exceptWhen`
stored naming it?  A merge can only withdraw such a rule's firings, never release one.
sourceraw docstring

different-rechecked-termsclj

(different-rechecked-terms kb rh triggers)

The terms a firing or a refusal of the rule at rh must bind for one of its queued triggers to have flipped it, or nil when the triggers say nothing that narrow. Only a different-only-rule? narrows, and only when every trigger is a merge's {::merged class} marker or a sentence sentence-moved-terms reads.

The terms a firing or a refusal of the rule at `rh` must bind for one of its queued
`triggers` to have flipped it, or nil when the triggers say nothing that narrow.  Only
a `different-only-rule?` narrows, and only when every trigger is a merge's
`{::merged class}` marker or a sentence `sentence-moved-terms` reads.
sourceraw docstring

disintegrate-sentex!clj

(disintegrate-sentex! kb sentex)

The mirror walk: reverse a departing sentex's cache effects through the :disintegrate column, or the matching structural arm. Every cache below is reference-counted on the departing sentex's id, so an entry survives while another sentex still asserts the same claim.

The mirror walk: reverse a departing sentex's cache effects through the
`:disintegrate` column, or the matching structural arm.  Every cache below is
reference-counted on the departing sentex's id, so an entry survives while
another sentex still asserts the same claim.
sourceraw docstring

drain-context-moves!clj

(drain-context-moves! kb read rebuilding?)

Once a settle pass: read the genlCx moves since the placement cursor (decide/take-edge-cursor!), compute each one's context-move once, and hand it to every row of move-families the move reads. The edges are moved-edges'; the placement families read :reach, a delay of {:under :below} over the unscoped closures (decide/unscoped-closures); the active edges an except that moved reaches are moves of their own (excepted-edges). read is the settle's volatile of supporter labels drained. Each row a move runs is a step (dur/check-abort!), and a drain past progress/first-line-ms logs a line per doubling. Returns {:reach :first? :seeds :covered :mig}. A rebuild takes the departures, leaves the cursor and runs no row. See docs/contexts.md, "One context move".

Once a settle pass: read the `genlCx` moves since the placement cursor
(`decide/take-edge-cursor!`), compute each one's `context-move` once, and hand it to
every row of `move-families` the move reads.  The edges are `moved-edges`'; the
placement families read `:reach`, a delay of `{:under :below}` over the unscoped
closures (`decide/unscoped-closures`); the active edges an `except` that moved reaches
are moves of their own (`excepted-edges`).  `read` is the settle's volatile of supporter
labels drained.  Each row a move runs is a step (`dur/check-abort!`), and a drain past
`progress/first-line-ms` logs a line per doubling.  Returns `{:reach :first? :seeds
:covered :mig}`.  A rebuild takes the departures, leaves the cursor and runs no row.  See
docs/contexts.md, "One context move".
sourceraw docstring

drain-departures!clj

(drain-departures! kb)

The records note-departure! queued since the last drain, and the queue emptied.

The records `note-departure!` queued since the last drain, and the queue emptied.
sourceraw docstring

drain-except-moves!clj

(drain-except-moves! kb sweep?)

Take the pending handles off :except-moves, sweep them (except-move-sweeps, with sweep?), and keep the handles, the supersessions the sweeps found and the region the moves can change (except-move-region) for take-except-moves!. Returns the sweeps' result, its :new joined by the believed facts and rules of the targets' consequence closure, and :rejoin, the other believed facts the justifications resting on that closure name, to chain from, or nil when nothing was pending.

Take the pending handles off `:except-moves`, sweep them (`except-move-sweeps`, with
`sweep?`), and keep the handles, the supersessions the sweeps found and the region the
moves can change (`except-move-region`) for `take-except-moves!`.  Returns the sweeps' result,
its `:new` joined by the believed facts and rules of the targets' consequence closure,
and `:rejoin`, the other believed facts the justifications resting on that closure name,
to chain from, or nil when nothing was pending.
sourceraw docstring

draw-factclj

(draw-fact kb h deadline)

Draw the argument-type entailments of the stored fact at h, at its placements (deduce-placed): {:new [h …] :violations [v …]}, nothing for a rule, a negation or a handle the store no longer holds. A mint the draw would leave as it is (changed-only) is not asked about, so a violation of one already stored is not reported again. With deadline, a budget/now instant, a draw whose checks run past it stops at the next mint and adds :deferred {:phase :transitions}: the part of the checks that ran out, and every mint it brought IN, whose own entailments the re-run draws (redraw-deferred). Run under call-with-pass-caches.

Draw the argument-type entailments of the stored fact at `h`, at its placements
(`deduce-placed`): `{:new [h …] :violations [v …]}`, nothing for a rule, a negation or a
handle the store no longer holds.  A mint the draw would leave as it is
(`changed-only`) is not asked about, so a violation of one already stored is not
reported again.  With `deadline`, a `budget/now` instant, a draw whose checks run past
it stops at the next mint and adds `:deferred {:phase :transitions}`: the part of the
checks that ran out, and every mint it brought IN, whose own entailments the re-run
draws (`redraw-deferred`).  Run under `call-with-pass-caches`.
sourceraw docstring

drop-replaced-routes!clj

(drop-replaced-routes! kb just)
(drop-replaced-routes! kb just route)

Drop the justifications the one just added as just replaces: the same firing over a route the witness rule no longer names. Returns the merged jtms/drop-justification! results for the caller to apply to its stores; the dropped records are deleted here. A justification is replaced when it has just's informant, consequence, bindings and subsumptions (same-pairing?), holds every antecedent of just outside route, and differs only in believed genl / genlCx edges. route is just's route handles; nil reads them off the antecedents. An edge that is OUT keeps its justification (docs/nmtms.md, "Where the layer stops").

Drop the justifications the one just added as `just` replaces: the same firing over
a route the witness rule no longer names.  Returns the merged
`jtms/drop-justification!` results for the caller to apply to its stores; the dropped
records are deleted here.  A justification is replaced when it has `just`'s informant,
consequence, bindings and subsumptions (`same-pairing?`), holds every antecedent of
`just` outside `route`, and differs only in believed `genl` / `genlCx` edges.  `route`
is `just`'s route handles; nil reads them off the antecedents.  An edge that is OUT
keeps its justification (docs/nmtms.md, "Where the layer stops").
sourceraw docstring

edge-descended-justificationsclj

(edge-descended-justifications kb gone removed-jids)

The justifications among removed-jids that a departing route edge (route-functors) or trigger membership invalidated while the fact and the declaration survive, as records: the derivations a teardown owes a re-derivation (rederive-descended). gone is the sentexes the sweep removed. Read before the teardown deletes the records. Runs only when gone holds a route edge, or a membership while a trigger declaration is stored. An entailment qualifies when a removed antecedent is past its fact and declaration (past-the-pair?) and neither is removed; a descended equality or a restatement (:migration) when a removed route edge is its only removed antecedent (a removed equality counts as one).

The justifications among `removed-jids` that a departing route edge (`route-functors`)
or trigger membership invalidated while the fact and the declaration survive, as
records: the derivations a teardown owes a re-derivation (`rederive-descended`).
`gone` is the sentexes the sweep removed.  Read before the teardown deletes the
records.  Runs only when `gone` holds a route edge, or a membership while a trigger
declaration is stored.  An entailment qualifies when a removed antecedent is past its
fact and declaration (`past-the-pair?`) and neither is removed; a descended equality
or a restatement (`:migration`) when a removed route edge is its only removed
antecedent (a removed equality counts as one).
sourceraw docstring

entail-existingclj

(entail-existing kb sentence dh)

When an (arg P n T) / (genlArg P n T) / (interArg P n T m U) declaration arrives, draw what it now says about the (P …) sentexes already stored. Same {:new :violations} result; nil when sentence is not an argument constraint. Sweeps what is stored, not believed, over P's whole spec subtree (subtree-sentexes, snapshotted before the first mint); (resultArg F n) reads the natFormula facts of F's applications (result-arg-extent) and an interArgEqual the tuples holding its value at its trigger position (trigger-extent). A declaration naming a type no membership can be minted in (arity/mint-target?), or whose every type is thing, reads no extent. An inert sentex or computed genlCx edge draws nothing (retroactive-mints). A declaration that mints entails its types' unary_predicate memberships (unary-entailments). triggered-mints reaches a trigger arriving last. See docs/argtypes.md.

When an `(arg P n T)` / `(genlArg P n T)` / `(interArg P n T m U)` declaration
arrives, draw what it now says about the `(P …)` sentexes already stored.  Same
`{:new :violations}` result; nil when `sentence` is not an argument constraint.  Sweeps
what is stored, not believed, over `P`'s whole spec subtree (`subtree-sentexes`,
snapshotted before the first mint); `(resultArg F n)` reads the `natFormula` facts of
`F`'s applications (`result-arg-extent`) and an `interArgEqual` the tuples holding its
value at its trigger position (`trigger-extent`).  A declaration naming a type no
membership can be minted in (`arity/mint-target?`), or whose every type is `thing`,
reads no extent.  An inert sentex or computed `genlCx` edge draws nothing
(`retroactive-mints`).  A declaration that mints entails its types'
`unary_predicate` memberships (`unary-entailments`).  `triggered-mints` reaches a trigger
arriving last.  See docs/argtypes.md.
sourceraw docstring

entail-under-context-edgeclj

(entail-under-context-edge kb m)

When the genlCx move m (context-move) shows contexts, draw what the declarations it makes visible say about the facts already stored in sub and every context under it, the fourth arrival order beside the fact, the declaration and the genl edge. Each derivation names the genlCx edges it sees its declaration through (checks/entailment-support). Facts and declarations stated in below draw at their new common placements (deduce-placed, declarations-meeting); the settle drops a placement left below a more general one (surplus-placements). Off unless *assertive-arg-types?* and *entail-moves?* hold, some predicate declares, and a context of :moved stores a sentex older than :floor. Per group of readers (move-groups) one side is read (move-entail-side, trigger-named-facts, declared-facts-in). :floor (seed-floor) excludes content that arrived with the edge; :entailed (a volatile set, one per drain) excludes facts an earlier move drew.

When the `genlCx` move `m` (`context-move`) shows contexts, draw what the declarations
it makes visible say about the facts already stored in `sub` and every context under
it, the fourth arrival order beside the fact, the declaration and the `genl` edge.  Each
derivation names the `genlCx` edges it sees its declaration through
(`checks/entailment-support`).  Facts and declarations stated in `below` draw at their
new common placements (`deduce-placed`, `declarations-meeting`); the settle drops a
placement left below a more general one (`surplus-placements`).  Off unless
`*assertive-arg-types?*` and `*entail-moves?*` hold, some predicate declares, and a
context of `:moved` stores a sentex older than `:floor`.  Per group of readers
(`move-groups`) one side is read (`move-entail-side`, `trigger-named-facts`,
`declared-facts-in`).  `:floor` (`seed-floor`) excludes content that arrived with the
edge; `:entailed` (a volatile set, one per drain) excludes facts an earlier move drew.
sourceraw docstring

entail-under-edgeclj

(entail-under-edge kb sentence)

When a (genl sub super) edge arrives, draw what the declarations on super now say about the (sub …) sentexes already stored, the third arrival order beside deduce-arg-types and entail-existing. A covering, separating or partition installs an edge per part (tax/installed-edges), each read as an arriving edge. nil when sentence installs no edge. Covers the whole spec subtree of sub (subtree-sentexes), each sentex put back through checks/constraint-entailments in its own context. Off unless *assertive-arg-types?*, some predicate carries an entailing declaration (any-declaring?) and a genl-ancestor of super does (super-reaches-declaration?).

When a `(genl sub super)` edge arrives, draw what the declarations on `super` now say
about the `(sub …)` sentexes already stored, the third arrival order beside
`deduce-arg-types` and `entail-existing`.  A `covering`, `separating` or `partition`
installs an edge per part (`tax/installed-edges`), each read as an arriving edge.  nil
when `sentence` installs no edge.  Covers the whole spec subtree of `sub`
(`subtree-sentexes`), each sentex put back through `checks/constraint-entailments` in
its own context.  Off unless `*assertive-arg-types?*`, some predicate carries an
entailing declaration (`any-declaring?`) and a genl-ancestor of `super` does
(`super-reaches-declaration?`).
sourceraw docstring

entriesclj

The special-predicate dispatch table: an ordered vector of [functor spec] pairs, joined from the arms above and the declarations in vaelii.impl.predicates. The order is the declaration's (predicates/entries filtered to the functors this table holds), and post-taxonomy-supporters! replays it top to bottom. The four walks (integrate, disintegrate, rebuild, wff) all walk this vector; table is the lookup table.

The special-predicate dispatch table: an ordered vector of `[functor spec]` pairs,
joined from the arms above and the declarations in `vaelii.impl.predicates`.  The order
is the declaration's (`predicates/entries` filtered to the functors this table holds),
and `post-taxonomy-supporters!` replays it top to bottom.  The four walks (integrate,
disintegrate, rebuild, wff) all walk this vector; `table` is the lookup table.
sourceraw docstring

equate-existingclj

(equate-existing kb sentence)

When a (functional P) or (functionalInArg P n) declaration arrives, derive the equalities the stored facts of P's spec subtree license, each handed to derive-functional-equalities (docs/equality.md, "Four directions"). nil when sentence declares neither.

When a `(functional P)` or `(functionalInArg P n)` declaration arrives, derive the
equalities the stored facts of `P`'s spec subtree license, each handed to
`derive-functional-equalities` (docs/equality.md, "Four directions").  nil when
`sentence` declares neither.
sourceraw docstring

equate-under-context-edgeclj

(equate-under-context-edge kb m)

When a (genlCx sub super) edge arrives, derive the equalities a (functional …) mark licenses over facts the readers under sub newly see together: the context twin of equate-under-edge. Hands each stored fact of :seen that functional-mark-relevant? admits to derive-functional-equalities at its own context. Free for a KB that declares nothing functional. Budgeted (budgeted-context-edge-candidates) and idempotent. The equality rests on the genlCx edges its reader sees each fact and the declaration through (pair-antecedents).

When a `(genlCx sub super)` edge arrives, derive the equalities a `(functional …)`
mark licenses over facts the readers under `sub` newly see together: the context twin
of `equate-under-edge`.  Hands each stored fact of `:seen` that
`functional-mark-relevant?` admits to `derive-functional-equalities` at its own context.
Free for a KB that declares nothing functional.  Budgeted
(`budgeted-context-edge-candidates`) and idempotent.  The equality rests on the `genlCx`
edges its reader sees each fact and the declaration through (`pair-antecedents`).
sourceraw docstring

equate-under-edgeclj

(equate-under-edge kb sentence)

When a (genl sub super) edge arrives, derive the equalities a functional or functionalInArg mark at or above super now licenses over the stored facts of sub's spec subtree (equate-under-edge-via). nil when sentence is not a genl edge, and no subtree read when no mark of the family stands over super.

When a `(genl sub super)` edge arrives, derive the equalities a `functional` or
`functionalInArg` mark at or above `super` now licenses over the stored facts of `sub`'s
spec subtree (`equate-under-edge-via`).  nil when `sentence` is not a `genl` edge, and
no subtree read when no mark of the family stands over `super`.
sourceraw docstring

eternal-declaration?clj

(eternal-declaration? kb sentence)

Does storing sentence make a predicate eternal for a sliced context that sees it: a membership (S P) with S in eternal-types, or a sentence installing a genl edge up to one?

Does storing `sentence` make a predicate eternal for a sliced context that sees it: a
membership `(S P)` with `S` in `eternal-types`, or a sentence installing a `genl` edge up
to one?
sourceraw docstring

except-move-regionclj

(except-move-region kb pending)

The superseded data whose supersession an except that moved can change: the ones naming a term an equality in the excepted handles' reach re-spells (except-move-terms), stored in a context that sees one of the contexts the moving excepts are stated in. pending is {target #{except-context}}.

The superseded data whose supersession an `except` that moved can change: the ones
naming a term an equality in the excepted handles' reach re-spells
(`except-move-terms`), stored in a context that sees one of the contexts the moving
`except`s are stated in.  `pending` is `{target #{except-context}}`.
sourceraw docstring

except-move-sweepsclj

(except-move-sweeps kb handles sweep? whole scoped)

Run, for each handle in handles whose visibility an except moved and each equality in their consequence closure, the sweep its arrival runs over the facts already stored: the equality migration for an equality sentex (equality-arrival-sweep) and revived-declaration-sweeps' for a merge or lift mark (docs/equational.md, "An except of an equation"). Returns one {:new :superseded :violations :removed}, or nil when handles is empty. With sweep?, the argument-type derivations resting on a record an except now hides are dropped (drop-hidden-mints!, :removed for the caller to apply) and the records it stopped hiding draw again (docs/argtypes.md, "An except of an ingredient"): for a handle in whole, every context and the record's own arrival sweep (revealed-entailments); for one only in scoped, {handle #{[sub super]}}, the contexts under each sub (entail-under-context-edge).

Run, for each handle in `handles` whose visibility an `except` moved and each equality
in their consequence closure, the sweep its arrival runs over the facts already stored:
the equality migration for an equality sentex (`equality-arrival-sweep`) and
`revived-declaration-sweeps`' for a merge or lift mark (docs/equational.md, "An except
of an equation").  Returns one `{:new :superseded :violations :removed}`, or nil when
`handles` is empty.  With `sweep?`, the argument-type derivations resting on a record an
`except` now hides are dropped (`drop-hidden-mints!`, `:removed` for the caller to
apply) and the records it stopped hiding draw again (docs/argtypes.md, "An except of an
ingredient"): for a handle in `whole`, every context and the record's own arrival sweep
(`revealed-entailments`); for one only in `scoped`, `{handle #{[sub super]}}`, the
contexts under each `sub` (`entail-under-context-edge`).
sourceraw docstring

except-movedclj

(except-moved kb)

The handles an except of which arrived, left or flipped since the last drain-except-moves!, read without emptying the queue (note-except-move!).

The handles an `except` of which arrived, left or flipped since the last
`drain-except-moves!`, read without emptying the queue (`note-except-move!`).
sourceraw docstring

exception-recheck-predicatesclj

(exception-recheck-predicates tx meta)

The re-check keys of the exceptWhen meta-sentence meta, read against the taxonomy tx: the predicates its query mentions, the types a separation's denial and the predicates a negates denial move a negated conjunct of it on (rules/separation-denial-predicates, rules/negates-denial-predicates), and the predicates of its closed-extent negatives (rules/closed-extent-query-predicates).

The re-check keys of the exceptWhen meta-sentence `meta`, read against the taxonomy
`tx`: the predicates its query mentions, the types a separation's denial and the
predicates a `negates` denial move a negated conjunct of it on
(`rules/separation-denial-predicates`, `rules/negates-denial-predicates`), and the
predicates of its closed-extent negatives (`rules/closed-extent-query-predicates`).
sourceraw docstring

firing-informant?clj

(firing-informant? kb informant)

Is informant a rule a forward or backward run fired: a rule handle that is not one of kv/mint-rules, which no engine runs.

Is `informant` a rule a forward or backward run fired: a rule handle that is not one of
`kv/mint-rules`, which no engine runs.
sourceraw docstring

firing-seedsclj

(firing-seeds kb js edge? gone?)

The antecedents of the rule firings (firing-informant?) among the justification records js that name a handle edge? holds as an antecedent, less the handles gone? holds, as chaining seeds. The re-chain a departing edge owes a firing that named it as its witness: sighting-seeds here, and vaelii.impl.record-edit/sweep! for the firings a record edit left to its settle.

The antecedents of the rule firings (`firing-informant?`) among the justification
records `js` that name a handle `edge?` holds as an antecedent, less the handles `gone?`
holds, as chaining seeds.  The re-chain a departing edge owes a firing that named it as
its witness: `sighting-seeds` here, and `vaelii.impl.record-edit/sweep!` for the firings
a record edit left to its settle.
sourceraw docstring

hold-type-mints!clj

(hold-type-mints! kb ts)

Hold void each justification minting in a type of ts (type-mint-justifications) that arity/mintable-type? refuses, and release each minting in a type it admits, so a record only such a justification supports is stored and OUT while its type is not mintable (docs/argtypes.md, "Where it does not mint"). ts is :all, every predicate a length binding is stored for, after a recover, whose network holds no forced membership; otherwise arity/drain!'s :bound, of which a type is read only when a moved binding can move its mintability (binds-another-length?). A type no justification mints in reads no length. Answers the records a release brought IN, for the settle to chain from.

Hold void each justification minting in a type of `ts` (`type-mint-justifications`) that
`arity/mintable-type?` refuses, and release each minting in a type it admits, so a record
only such a justification supports is stored and OUT while its type is not mintable
(docs/argtypes.md, "Where it does not mint").  `ts` is `:all`, every predicate a length
binding is stored for, after a `recover`, whose network holds no forced membership;
otherwise `arity/drain!`'s `:bound`, of which a type is read only when a moved binding can
move its mintability (`binds-another-length?`).  A type no justification mints in reads
no length.  Answers the records a release brought IN, for the settle to chain from.
sourceraw docstring

inadmissibleclj

(inadmissible kb sentence context)
(inadmissible kb sentence context constraint-arm)

The violation that stops sentence from being stored in context, or nil: naming, the definitional constraints, well-formedness, and the stratification of an edge or a grant (checks/fact-stratification-violation). Returns a value and never throws, since its callers run after their triggering sentex is stored (argument-type entailment, the computed genlCx edge of context-nat) or must refuse a hypothesis without failing the query (abduction). constraint-arm is checks/constraint-violation by default; a nil arm omits the definitional-constraint check for a caller that already ran it. See docs/argtypes.md.

The violation that stops `sentence` from being stored in `context`, or nil: naming, the
definitional constraints, well-formedness, and the stratification of an edge or a grant
(`checks/fact-stratification-violation`).  Returns a value and never throws, since its
callers run after their triggering sentex is stored (argument-type entailment, the
computed `genlCx` edge of `context-nat`) or must refuse a hypothesis without failing the
query (abduction).  `constraint-arm` is `checks/constraint-violation` by default; a nil
arm omits the definitional-constraint check for a caller that already ran it.  See
docs/argtypes.md.
sourceraw docstring

index-cycle!clj

(index-cycle! kb k members)

Index the refusal-record key k under each handle of members, the handles a refusal for a cycle through negation rests on (checks/fact-stratification-violation), so a move of one finds it (cycle-keys!). The index is the record's ::cycles entry.

Index the refusal-record key `k` under each handle of `members`, the handles a refusal
for a cycle through negation rests on (`checks/fact-stratification-violation`), so a
move of one finds it (`cycle-keys!`).  The index is the record's `::cycles` entry.
sourceraw docstring

index-exceptWhen-metaclj

(index-exceptWhen-meta kb meta-sentex)

Register the exceptWhen meta-sentex meta-sentex in the re-check index: post the rule it names under its keys (exception-recheck-predicates) and into the :rules set, queue the rule for a blanket re-check (a fact may already have arrived that its new exception blocks), lower the rule's firings to :default (restrength-firings!), and hold void the firings of a forced-monotonic rule it convicts (checks/force-sentexes!).

Register the exceptWhen meta-sentex `meta-sentex` in the re-check index: post the
rule it names under its keys (`exception-recheck-predicates`) and into the `:rules`
set, queue the rule for a blanket re-check (a fact may already have arrived that its
new exception blocks), lower the rule's firings to `:default`
(`restrength-firings!`), and hold void the firings of a forced-monotonic rule it convicts
(`checks/force-sentexes!`).
sourceraw docstring

index-rule-sentexclj

(index-rule-sentex kb handle rule-sentex)

Index a rule handle by all of its predicates (antecedent and consequent), so reads/as-stored-rules-by-consequent-in answers "what could conclude P?" for a forward-only rule too, and in the re-check index under the keys rule-recheck-keys names. A variable consequent functor is filed under p/var-consequent-key (rules/consequent-index-pred); resolution/concluding-rule-handles unions that bucket. The record holds :engines and :defeasible; no rule index keys on them. This is the add half of the structural arm of integrate-sentex.

Index a rule handle by all of its predicates (antecedent and consequent), so
`reads/as-stored-rules-by-consequent-in` answers "what could conclude P?" for a
forward-only rule too, and in the re-check index under the keys `rule-recheck-keys`
names.  A variable consequent functor is filed under `p/var-consequent-key`
(`rules/consequent-index-pred`); `resolution/concluding-rule-handles` unions that
bucket.  The record holds `:engines` and `:defeasible`; no rule index keys on them.
This is the add half of the structural arm of `integrate-sentex`.
sourceraw docstring

integrate-equality-sentexclj

(integrate-equality-sentex kb sentex handle)

The three equality relations' add arm on every entry point, asserted or derived. Returns the migration result {:new :superseded :violations}, which the derivation path seeds chaining with and files (docs/equality.md, "A rule concluding one of the three relations merges"). A schematic (equals L R) goes to integrate-rewrite-rule, and so does a (rewriteOf T E) with T an argument of a ground E (rewrite/equation-rule). A compound E is a NAT reify-to-term declaration the partition holds no part of (equality-entry).

The three equality relations' add arm on every entry point, asserted or derived.
Returns the migration result `{:new :superseded :violations}`, which the derivation
path seeds chaining with and files (docs/equality.md, "A rule concluding one of the
three relations merges").  A schematic `(equals L R)` goes to
`integrate-rewrite-rule`, and so does a `(rewriteOf T E)` with `T` an argument of a
ground `E` (`rewrite/equation-rule`).  A compound `E` is a NAT reify-to-term
declaration the partition holds no part of (`equality-entry`).
sourceraw docstring

integrate-sentexclj

(integrate-sentex kb sentex handle)

Reflect a newly stored sentex into the taxonomy, rule index and disjointness: the :integrate column of the table, walked, plus the structural arms. Returns {:new [handles] :superseded [[datum reason]] :violations [v]} for an equality sentex, whose twins are chaining seeds, and nil for everything else.

Reflect a newly stored sentex into the taxonomy, rule index and disjointness: the
`:integrate` column of the table, walked, plus the structural arms.  Returns
`{:new [handles] :superseded [[datum reason]] :violations [v]}` for an equality sentex,
whose twins are chaining seeds, and nil for everything else.
sourceraw docstring

integrate-transitiveclj

(integrate-transitive kb sentex handle)

The table half of derived-sentex-added: for a functor the table keys, only the arms flagged :derived? run for a rule-derived conclusion. A derived equality is reached through integrate-equality-sentex by name, since this fn discards what an arm returns. A functor the table does not key is the structural walk's. See docs/taxonomy.md.

The table half of `derived-sentex-added`: for a functor the table keys, only the arms
flagged `:derived?` run for a rule-derived conclusion.  A derived equality is reached
through `integrate-equality-sentex` by name, since this fn discards what an arm returns.
A functor the table does not key is the structural walk's.  See docs/taxonomy.md.
sourceraw docstring

integrate-twinclj

(integrate-twin kb sentex handle)

Full integration for a migrated twin (migrate-sentex): the same arms integrate-sentex runs, so a twin reaches the same caches an asserted declaration does. derived-sentex-added narrows the table half to the :derived? entries. The equality arm is skipped (kb/rewritable-sentex? holds equalities back from migration), then the re-check post every derived sentex gets. Migration can run inside a forward-chaining pass; none of the arms re-enter assert or chain.

Full integration for a migrated twin (`migrate-sentex`): the same arms
`integrate-sentex` runs, so a twin reaches the same caches an asserted declaration
does.  `derived-sentex-added` narrows the table half to the `:derived?` entries.  The
equality arm is skipped (`kb/rewritable-sentex?` holds equalities back from migration),
then the re-check post every derived sentex gets.  Migration can run inside a
forward-chaining pass; none of the arms re-enter `assert` or `chain`.
sourceraw docstring

inverse-inclusionsclj

Per meet order, the predicates whose stored (P b a) places a below b under it: includesInstant places an instant below the time that includes it, as time.txt's subtimeOf rule concludes for a time, and a meet's arguments are times.

Per meet order, the predicates whose stored `(P b a)` places `a` below `b` under it:
`includesInstant` places an instant below the time that includes it, as time.txt's
`subtimeOf` rule concludes for a time, and a meet's arguments are times.
sourceraw docstring

lifts-to-universe?clj

(lifts-to-universe? kb sentence)

Does deduce-lifts deduce the literal sentence into CxUniverse? A (P …) lifts when P is a permuting mark (inherit/permuting-marks) or a predicate the KB declares decontextualized, and a (not (P …)) when P is declared and is not a permuting mark. The declaration is read unscoped: a decontextualized predicate's facts belong to the KB, not to the context that declares it.

Does `deduce-lifts` deduce the literal `sentence` into CxUniverse?  A `(P …)` lifts when
`P` is a permuting mark (`inherit/permuting-marks`) or a predicate the KB declares
decontextualized, and a `(not (P …))` when `P` is declared and is not a permuting mark.
The declaration is read unscoped: a decontextualized predicate's facts belong to the KB,
not to the context that declares it.
sourceraw docstring

lost-descended-derivationsclj

(lost-descended-derivations kb handles edges-only?)

The edge-descended derivations among the dependents of handles whose conclusion is OUT, as justification records: edge-descended-justifications for an ingredient that lost belief rather than its record. edges-only? keeps a dependent only where its handle is a route edge (route-functors), an entailment antecedent past the pair (past-the-pair?), or an equality a restatement rests on. Only a justification whose conclusion is OUT, or withdrawn at its own context (exc/believed-own?), qualifies. The network filter runs before the record fetch.

The edge-descended derivations among the dependents of `handles` whose conclusion is
OUT, as justification records: `edge-descended-justifications` for an ingredient that
lost belief rather than its record.  `edges-only?` keeps a dependent only where its
handle is a route edge (`route-functors`), an entailment antecedent past the pair
(`past-the-pair?`), or an equality a restatement rests on.  Only a justification whose
conclusion is OUT, or withdrawn at its own context (`exc/believed-own?`), qualifies.
The network filter runs before the record fetch.
sourceraw docstring

materialize-defn-rulesclj

(materialize-defn-rules kb sentence defn-handle context)

Materialize the forward rules a defn* fact stored at defn-handle in context expands into (sx/defn-companion-rules), each a derived rule sentex justified by the defn* fact alone: {:new [handles] :violations [v]}. Called from assert-one. A non-defn* sentence returns the empty result after one defn-sentence? read.

Materialize the forward rules a `defn*` fact stored at `defn-handle` in `context`
expands into (`sx/defn-companion-rules`), each a derived rule sentex justified by the
`defn*` fact alone: `{:new [handles] :violations [v]}`.  Called from `assert-one`.  A
non-`defn*` sentence returns the empty result after one `defn-sentence?` read.
sourceraw docstring

migrate-handle-metasclj

(migrate-handle-metas kb orig twin eqs reader)
(migrate-handle-metas kb orig twin informant witnesses reader)

Carry every believed handle-naming meta of sentex orig onto its migrated twin twin (docs/equality.md, "Handle-naming metas travel with their target"): each meta gets a twin naming twin, its terms rewritten to reader's representatives, registered through integrate-twin and justified by the meta and each of witnesses under informant (justify-twin!). The 5-arity takes eqs, the migrating equalities, under rewriteOf. Public for integrate/commute-existing.

Carry every believed handle-naming meta of sentex `orig` onto its migrated twin `twin`
(docs/equality.md, "Handle-naming metas travel with their target"): each meta gets a
twin naming `twin`, its terms rewritten to `reader`'s representatives, registered through
`integrate-twin` and justified by the meta and each of `witnesses` under `informant`
(`justify-twin!`).  The 5-arity takes `eqs`, the migrating equalities, under `rewriteOf`.
Public for `integrate/commute-existing`.
sourceraw docstring

migrate-meta-onto-twinsclj

(migrate-meta-onto-twins kb sentex)

The handle-naming meta sentex was just stored: when its target already has twins, the merge ran before the meta existed, so replay migrate-handle-metas onto each twin. Idempotent for the metas already carried. nil, and a no-op when sentex names nothing or its target has no twin.

The handle-naming meta `sentex` was just stored: when its target already has twins, the
merge ran before the meta existed, so replay `migrate-handle-metas` onto each twin.
Idempotent for the metas already carried.  nil, and a no-op when `sentex` names nothing
or its target has no twin.
sourceraw docstring

migrate-sentexclj

(migrate-sentex kb sentex)

Restate one stored sentex under its terms' representatives: in its context's home when CxUniverse's equalities retire the context (migrate-home), else once per reader whose election differs (migrate-into; docs/equality.md, "What a merge does"). {:new [handles] :superseded [[datum reason]] :violations [v]}. Each twin is re-canonicalized through find-or-create and checked as a derivation (checks/derivation-violation). Only the fact's own context supersedes. An inadmissible twin is dropped into :violations, and its original stays believed.

Restate one stored sentex under its terms' representatives: in its context's home when
CxUniverse's equalities retire the context (`migrate-home`), else once per reader whose
election differs (`migrate-into`; docs/equality.md, "What a merge does").  `{:new
[handles] :superseded [[datum reason]] :violations [v]}`.  Each twin is re-canonicalized
through find-or-create and checked as a derivation (`checks/derivation-violation`).  Only
the fact's own context supersedes.  An inadmissible twin is dropped into `:violations`,
and its original stays believed.
sourceraw docstring

migrate-under-context-edgeclj

(migrate-under-context-edge kb m)

When the genlCx move m (context-move) shows contexts, restate the sentexes the widened ancestor set newly exposes to a merge: the edge-arriving-last order (docs/equality.md, "A late genlCx edge is a third arrival order"). Both halves run: a merge in the shown contexts meets the facts the readers already saw, and a fact there meets the merges they already saw. Each half is enumerated from the merges through the term index.

When the `genlCx` move `m` (`context-move`) shows contexts, restate the sentexes the
widened ancestor set newly exposes to a merge: the edge-arriving-last order
(docs/equality.md, "A late `genlCx` edge is a third arrival order").  Both halves
run: a merge in the shown contexts meets the facts the readers already saw, and a fact
there meets the merges they already saw.  Each half is enumerated from the merges
through the term index.
sourceraw docstring

mint-rule-retraction-problemclj

(mint-rule-retraction-problem kb handle where)

The :mint-rule refusal of retracting the sentex at handle (kb/mint-rule-refusal), as a value, or nil. The engine stores the rule again at the next mint (mint-rule-handle!). where names the entry point.

The `:mint-rule` refusal of retracting the sentex at `handle` (`kb/mint-rule-refusal`), as
a value, or nil.  The engine stores the rule again at the next mint (`mint-rule-handle!`).
`where` names the entry point.
sourceraw docstring

minted-seedsclj

(minted-seeds kb handles)

handles — sentexes an entailment minted — as chaining seeds, followed by the subsumption-seeds of each one that is a genl edge. A genlArg mint is an edge like an asserted one, and the facts under it become matchable at the new supertype whichever of the two stored it: seeding the handle alone fires the rules keyed on genl, not the rules the edge connected, so (wolf Rex) and a rule on (animal ?x) stored before a minted (genl wolf animal) would derive nothing in that order only.

`handles` — sentexes an entailment minted — as chaining seeds, followed by the
`subsumption-seeds` of each one that is a `genl` edge.  A `genlArg` mint is an edge
like an asserted one, and the facts under it become matchable at the new supertype
whichever of the two stored it: seeding the handle alone fires the rules keyed on
`genl`, not the rules the edge connected, so `(wolf Rex)` and a rule on `(animal ?x)`
stored before a minted `(genl wolf animal)` would derive nothing in that order only.
sourceraw docstring

move-seedsclj

(move-seeds kb m filtered?)

The stored facts the genlCx move m (context-move) newly makes matchable, as chaining seeds: the context twin of subsumption-seeds. up is super's ancestor set (:up), seen what the contexts below sub that gain a context see beside it (:gained-below; :below in the unfiltered arity), fresh the contexts some reader below sub sees through the edge alone (:moved). The unfiltered arity seeds every such fact of up and seen. With m's :floor (seed-floor), content stored at or above the floor arrived after the edge and is excluded. See docs/contexts.md, "A genlCx edge owes the same debt".

The stored facts the `genlCx` move `m` (`context-move`) newly makes matchable, as
chaining seeds: the context twin of `subsumption-seeds`.  `up` is `super`'s ancestor
set (`:up`), `seen` what the contexts below `sub` that gain a context see beside it
(`:gained-below`; `:below` in the unfiltered arity), `fresh` the contexts some reader
below `sub` sees through the edge alone (`:moved`).  The unfiltered arity seeds every
such fact of `up` and `seen`.  With `m`'s `:floor` (`seed-floor`), content stored at or
above the floor arrived after the edge and is excluded.  See docs/contexts.md, "A
`genlCx` edge owes the same debt".
sourceraw docstring

names-any?clj

(names-any? terms b)

Does the binding map b of a firing or a refusal bind a variable to one of terms, at any depth?

Does the binding map `b` of a firing or a refusal bind a variable to one of `terms`,
at any depth?
sourceraw docstring

naming-violationclj

(naming-violation kb sentence context)

The :naming violation sentence in context carries under kb's naming policy, or nil: nm/blocking-problems as the value a caller that may not throw drops a sentence for. Nil under :warn and :off.

The `:naming` violation `sentence` in `context` carries under `kb`'s naming policy, or
nil: `nm/blocking-problems` as the value a caller that may not throw drops a sentence
for.  Nil under `:warn` and `:off`.
sourceraw docstring

note-departure!clj

(note-departure! kb sentex)

Queue sentex, leaving the store, when it is a genlCx edge, whose [sub super] the context-move drain reads (drain-context-moves!), or a record that can have subsumed a mint (subsumer-shaped?) with pruning on, for withheld-releases. Called from integrate/sentex-removed!, the one place a record leaves.

Queue `sentex`, leaving the store, when it is a `genlCx` edge, whose `[sub super]` the
context-move drain reads (`drain-context-moves!`), or a record that can have subsumed a
mint (`subsumer-shaped?`) with pruning on, for `withheld-releases`.  Called from
`integrate/sentex-removed!`, the one place a record leaves.
sourceraw docstring

note-except-move!clj

(note-except-move! kb h context edge)

Queue handle h on :except-moves: an except of it stated in context arrived, left or flipped, so what h restates or merges is visible to a different set of readers there and below. edge, a (genlCx sub super) edge's [sub super], says the move is that edge's and reaches the contexts under sub alone (:scoped); nil says the except itself moved (:whole). The settle drains the queue (drain-except-moves!, take-except-moves!).

Queue handle `h` on `:except-moves`: an `except` of it stated in `context` arrived,
left or flipped, so what `h` restates or merges is visible to a different set of
readers there and below.  `edge`, a `(genlCx sub super)` edge's `[sub super]`, says the
move is that edge's and reaches the contexts under `sub` alone (`:scoped`); nil says the
`except` itself moved (`:whole`).  The settle drains the queue (`drain-except-moves!`,
`take-except-moves!`).
sourceraw docstring

note-producer-moves!clj

(note-producer-moves! k xs)

Add xs under k of *producer-moves*, when it is bound.

Add `xs` under `k` of `*producer-moves*`, when it is bound.
sourceraw docstring

note-reasks!clj

(note-reasks! kb entries)

Queue the re-asks entries (reask-entries) on :except-moves' :reask, for the settle to run (settle/reask-seeds).

Queue the re-asks `entries` (`reask-entries`) on `:except-moves`' `:reask`, for the
settle to run (`settle/reask-seeds`).
sourceraw docstring

note-relabelled-correspondences!clj

(note-relabelled-correspondences! kb region)

Queue [:correspondence F P] on :respell for each stored declaration among the settle's touched set region whose label moved: in jtms/touched-in and not believed now, or the converse. A declaration a firing concludes moves with no store when the firing turns valid or void, and re-spells the rules applying F as a stored or removed one does (note-correspondence-move!, which also covers a node the settle created). region is a delay; reads one record per older handle whose label moved, and no index.

Queue `[:correspondence F P]` on `:respell` for each stored declaration among the
settle's touched set `region` whose label moved: in `jtms/touched-in` and not believed
now, or the converse.  A declaration a firing concludes moves with no store when the
firing turns valid or void, and re-spells the rules applying `F` as a stored or removed
one does (`note-correspondence-move!`, which also covers a node the settle created).
`region` is a delay; reads one record per older handle whose label moved, and no index.
sourceraw docstring

note-removed-firings!clj

(note-removed-firings! kb jids)

Queue the re-ask each justification of jids owes its rule when that rule stores one justification per conclusion, before the caller deletes the records.

Queue the re-ask each justification of `jids` owes its rule when that rule stores one
justification per conclusion, before the caller deletes the records.
sourceraw docstring

note-unpremised!clj

(note-unpremised! kb h)

Queue the record at h, whose premise mark a retraction removed while a derivation still holds it up, for the settle's withdrawal question: a record an author stated beside a mint of the same sentence is not the entailment's to withdraw, and once the statement goes it is (mint-only?), so a believed record that says it more specifically withdraws it as it withdraws a mint it meets on arrival.

Queue the record at `h`, whose premise mark a retraction removed while a derivation
still holds it up, for the settle's withdrawal question: a record an author stated
beside a mint of the same sentence is not the entailment's to withdraw, and once the
statement goes it is (`mint-only?`), so a believed record that says it more
specifically withdraws it as it withdraws a mint it meets on arrival.
sourceraw docstring

offer-marked-existingclj

(offer-marked-existing kb sentence)

When a functional, functionalInArg, asymmetric, anti_transitive or negates mark arrives, offer every stored fact of the spec subtree of each predicate it names (the first argument, both of a negates) to decide/offer!, which reads the nogoods each forms under the mark. nil.

When a `functional`, `functionalInArg`, `asymmetric`, `anti_transitive` or `negates`
mark arrives, offer every stored fact of the spec subtree of each predicate it names
(the first argument, both of a `negates`) to `decide/offer!`, which reads the nogoods
each forms under the mark.  nil.
sourceraw docstring

offer-marked-under-edgeclj

(offer-marked-under-edge kb sentence)

When a (genl sub super) edge arrives under an offered-marks mark on super or above it, offer the stored facts of sub's spec subtree to decide/offer!. nil, and free for a KB declaring none of the marks.

When a `(genl sub super)` edge arrives under an `offered-marks` mark on `super` or
above it, offer the stored facts of `sub`'s spec subtree to `decide/offer!`.  nil, and
free for a KB declaring none of the marks.
sourceraw docstring

one-justification-rulesclj

(one-justification-rules kb)

The handles of the stored rules whose :engines take :one-justification, as a set; nil when the store holds none.

The handles of the stored rules whose `:engines` take `:one-justification`, as a set;
nil when the store holds none.
sourceraw docstring

owed-releasesclj

(owed-releases kb)

How many departures and arrivals withheld-releases left owed (*release-withheld?*).

How many departures and arrivals `withheld-releases` left owed (`*release-withheld?*`).
sourceraw docstring

pair-placementsclj

(pair-placements kb fsx dsx)

The contexts a mint drawn over the fact fsx through the declaration dsx (sentexes) is placed in, in content order: each maximal context that sees every ingredient of the derivation where no except hides one (docs/argtypes.md, "Where a mint is placed"). Empty when no context sees them all. Ingredients beyond the fact and declaration are a genl route's supporters (tax/general-reach-supports) and a trigger's (trigger-alternatives); placements are taken per combination and the most general kept. Past an except, res/exception-aware-placements places each combination.

The contexts a mint drawn over the fact `fsx` through the declaration `dsx` (sentexes)
is placed in, in content order: each maximal context that sees every ingredient of the
derivation where no `except` hides one (docs/argtypes.md, "Where a mint is placed").
Empty when no context sees them all.  Ingredients beyond the fact and declaration are a
`genl` route's supporters (`tax/general-reach-supports`) and a trigger's
(`trigger-alternatives`); placements are taken per combination and the most general
kept.  Past an `except`, `res/exception-aware-placements` places each combination.
sourceraw docstring

pending-supersession-movesclj

(pending-supersession-moves kb)

The datums whose supersession entry changed since the last take-supersession-moves!, read without emptying them.

The datums whose supersession entry changed since the last `take-supersession-moves!`,
read without emptying them.
sourceraw docstring

place-collision-closure!clj

(place-collision-closure! kb eqs)

place-collision-merges! for each of the merge sentences eqs, then for each merge that stored new, to a fixpoint. Returns the handles that are new content.

`place-collision-merges!` for each of the merge sentences `eqs`, then for each merge
that stored new, to a fixpoint.  Returns the handles that are new content.
sourceraw docstring

place-collision-merges!clj

(place-collision-merges! kb sentence)

Derive each merge nat/collision-merges finds for sentence under natFormula, from the two rows it reconciles and the genlCx edges its context sees them over (place-merge!). Returns {:merges n :new handles :eqs merge-sentences-stored-new}.

Derive each merge `nat/collision-merges` finds for `sentence` under `natFormula`, from
the two rows it reconciles and the `genlCx` edges its context sees them over
(`place-merge!`).  Returns `{:merges n :new handles :eqs merge-sentences-stored-new}`.
sourceraw docstring

place-merge!clj

(place-merge! kb sentence ctx informant antes)

Store the merge sentence in ctx from antes under informant (derive-merge), apply the supersessions it starts and file its violations, and return the handles that are new content.

Store the merge `sentence` in `ctx` from `antes` under `informant` (`derive-merge`),
apply the supersessions it starts and file its violations, and return the handles that
are new content.
sourceraw docstring

post-declaration-supporters!clj

(post-declaration-supporters! kb sxs)

Post the supporter families of the stored literal declarations sxs alone, each a sentex carrying its :id: the :rebuild column post-taxonomy-supporters! replays, over a scratch taxonomy whose index store is kb's. The index half of a declaration's arrival on a KB whose taxonomy is not built (vaelii.impl.record-edit), the mirror of tax/retire-stored-supporter!. A functor with no :rebuild arm and an equality relation post nothing, and a posting already present is posted again unchanged.

Post the supporter families of the stored literal declarations `sxs` alone, each a
sentex carrying its `:id`: the `:rebuild` column `post-taxonomy-supporters!` replays,
over a scratch taxonomy whose index store is `kb`'s.  The index half of a declaration's
arrival on a KB whose taxonomy is not built (`vaelii.impl.record-edit`), the mirror of
`tax/retire-stored-supporter!`.  A functor with no `:rebuild` arm and an equality
relation post nothing, and a posting already present is posted again unchanged.
sourceraw docstring

post-mint!clj

(post-mint! index sentence context h)

File record h, holding sentence in context and concluded by a stored justification kb/mint-informant? accepts, in index's mint family, when the sentence has a mint-term. Posted from the sentence in hand: entail-arg-type as it stores the justification, and reindex from the record it is indexing.

File record `h`, holding `sentence` in `context` and concluded by a stored justification
`kb/mint-informant?` accepts, in `index`'s mint family, when the sentence has a
`mint-term`.  Posted from the sentence in hand: `entail-arg-type` as it stores the
justification, and `reindex` from the record it is indexing.
sourceraw docstring

post-taxonomy-supporters!clj

(post-taxonomy-supporters! kb)

Post the taxonomy's supporter families (tax/post!) for every stored declaration in kb: the :rebuild column replayed in entry order over a scratch taxonomy whose index store is kb's, then each stored disjoint metatype's members, then the re-check keys of every stored rule and exceptWhen (post-recheck-keys!). kb's own taxonomy is untouched and the equality relations post nothing. A malformed genl / genlCx row is dropped (replay-edge) and the count warned once.

Post the taxonomy's supporter families (`tax/post!`) for every stored declaration in
`kb`: the `:rebuild` column replayed in entry order over a scratch taxonomy whose index
store is `kb`'s, then each stored disjoint metatype's members, then the re-check keys of
every stored rule and `exceptWhen` (`post-recheck-keys!`).  `kb`'s own taxonomy is
untouched and the equality relations post nothing.  A malformed `genl` / `genlCx` row is
dropped (`replay-edge`) and the count warned once.
sourceraw docstring

producer-movesclj

(producer-moves)

A fresh value for a write entry point to bind *producer-moves* to.

A fresh value for a write entry point to bind `*producer-moves*` to.
sourceraw docstring

reader-contexts-atclj

(reader-contexts-at kb pctx sentence)

The contexts whose election could restate sentence, stated in pctx, differently: pctx, and every context where it meets an equality that bears on sentence or an except of one. Migration passes a stored sentex's own; a guard passes its placement and its substituted condition (chain/guard-solutions).

The reader is not the fact's own context. A merge holds where it is visible, and who reads the fact is any context below it — each electing a representative over a different set of visible edges (tax/scoped-class). A single normal form computed at the fact's context serves only that one reader; one computed globally serves none reliably, since it can be elected by an edge no reader of the fact inherits. So the parties are tax/meet-closure of the fact's context with the equalities' — the same enumeration a qualitative network takes (docs/qcn.md) and for the same reason. The contexts holding an except of one of those equalities are parties too: a reader below the fact that reads the except sees less than the fact's context, and migrate-into stores the fact's spelling there when the fact's context supersedes it.

Filtered to contexts that see the fact: a context the fact is invisible from has nothing of it to restate. Ordered most-general first, by the size of the context's own up-closure and then by name — a content-keyed order, so which twin a duplicate form collapses into cannot depend on arrival. The fact's own context leads explicitly rather than by that key: it is the only reader that supersedes, and two mutually-visible contexts have up-closures of a size that would otherwise let a name decide which of them is the fact's.

No equality bearing on the sentence means no reader, and that is the presence check: nothing can restate it, so migration reads no closure and runs no rewrite. One equality context closes almost as fast — meet-closure of a comparable pair is the pair, and the filter leaves the fact's own context alone.

The contexts whose election could restate `sentence`, stated in `pctx`, differently:
`pctx`, and every context where it meets an equality that bears on `sentence` or an
`except` of one.  Migration passes a stored sentex's own; a guard passes its placement
and its substituted condition (`chain/guard-solutions`).

**The reader is not the fact's own context.**  A merge holds where it is visible, and
who reads the fact is any context below it — each electing a representative over a
different set of visible edges (`tax/scoped-class`).  A single normal form computed
at the fact's context serves only that one reader; one computed globally serves none
reliably, since it can be elected by an edge no reader of the fact inherits.  So the
parties are `tax/meet-closure` of the fact's context with the equalities' — the same
enumeration a qualitative network takes (docs/qcn.md) and for the same reason.  The
contexts holding an `except` of one of those equalities are parties too: a reader
below the fact that reads the except sees less than the fact's context, and
`migrate-into` stores the fact's spelling there when the fact's context supersedes it.

Filtered to contexts that **see** the fact: a context the fact is invisible from has
nothing of it to restate.  Ordered most-general first, by the size of the context's
own up-closure and then by name — a content-keyed order, so which twin a duplicate
form collapses into cannot depend on arrival.  The fact's own context leads
explicitly rather than by that key: it is the only reader that supersedes, and two
mutually-visible contexts have up-closures of a size that would otherwise let a name
decide which of them is the fact's.

**No equality bearing on the sentence means no reader**, and that is the presence check:
nothing can restate it, so migration reads no closure and runs no rewrite.  One equality
context closes almost as fast — `meet-closure` of a comparable pair is the pair, and
the filter leaves the fact's own context alone.
sourceraw docstring

reask-entriesclj

(reask-entries kb rhs jids)

[rule-handle sentence] for each justification of jids a rule of rhs informs: the rule and the conclusion it is asked again for (chain/reask!). The JTMS's informant filters first; a justification the JTMS no longer holds is read off its record, so a caller deleting the justifications reads them first.

`[rule-handle sentence]` for each justification of `jids` a rule of `rhs` informs: the
rule and the conclusion it is asked again for (`chain/reask!`).  The JTMS's informant
filters first; a justification the JTMS no longer holds is read off its record, so a
caller deleting the justifications reads them first.
sourceraw docstring

rebuild-taxonomyclj

(rebuild-taxonomy kb)

Rebuild the in-memory taxonomy over a cleared one: the believed side of every key the index's supporter families hold (tax/refresh-beliefs with no region), and the equality partition and rewrite rules replayed from their stored declarations by the :rebuild column. Drops every cache first.

Rebuild the in-memory taxonomy over a cleared one: the believed side of every key the
index's supporter families hold (`tax/refresh-beliefs` with no region), and the equality
partition and rewrite rules replayed from their stored declarations by the `:rebuild`
column.  Drops every cache first.
sourceraw docstring

recheck-defeat-targetclj

(recheck-defeat-target kb sx)

Post what a (defeat (sentexHandle H)) sentex sx owes when it is stored, removed or relabelled. The defeat moves H's belief at the contexts that see it with no relabel of H, so H's sentence posts what its own arrival posts (recheck-on-sentence), and the argument holds read H again (argument/note-defeated!). A permuting mark resting on H re-spells its facts (note-mark-reach!), and a tagged rule's firing concluding H or resting on H is asked again (note-reasks!). It does nothing for any other sentex, or for an H no longer stored.

Post what a `(defeat (sentexHandle H))` sentex `sx` owes when it is stored, removed or
relabelled.  The defeat moves H's belief at the contexts that see it with no relabel of
H, so H's sentence posts what its own arrival posts (`recheck-on-sentence`), and the
argument holds read H again (`argument/note-defeated!`).  A permuting mark resting on H
re-spells its facts (`note-mark-reach!`), and a tagged rule's firing concluding H or
resting on H is asked again (`note-reasks!`).  It does nothing for any other sentex, or for an H no
longer stored.
sourceraw docstring

recheck-every-exceptionclj

(recheck-every-exception kb)

Queue :all every rule carrying a re-check condition. recover takes it.

Queue `:all` every rule carrying a re-check condition.  `recover` takes it.
sourceraw docstring

recheck-exceptclj

(recheck-except kb except-sentex)
(recheck-except kb except-sentex edge)

An (except (sentexHandle H)) fact arrived or left, or the genlCx edge edge, a [sub super], moved which contexts see it: queue what the visibility change touches.

  • The firings resting on H through any chain (jtms/consequence-closure) are queued under {::except-closure c}.
  • :except-moves records H with edge, and the drain re-joins from the closure (note-except-move!, drain-except-moves!).
  • A rule H is queued :all, an except H re-checks its own target down the cascade, and a declaration H is queued for a respell (note-excepted-correspondence!). Re-runs H's arrival sweep for the restatements the move reaches (docs/exceptions.md).
An `(except (sentexHandle H))` fact arrived or left, or the `genlCx` edge `edge`, a
`[sub super]`, moved which contexts see it: queue what the visibility change touches.
  * The firings resting on H through any chain (`jtms/consequence-closure`) are queued
    under `{::except-closure c}`.
  * `:except-moves` records H with `edge`, and the drain re-joins from the closure
    (`note-except-move!`, `drain-except-moves!`).
  * A rule H is queued `:all`, an except H re-checks its own target down the cascade, and
    a declaration H is queued for a respell (`note-excepted-correspondence!`).
Re-runs H's arrival sweep for the restatements the move reaches (docs/exceptions.md).
sourceraw docstring

recheck-except-ancestorsclj

(recheck-except-ancestors kb {:keys [edge raw]})

Re-check each except the genlCx move m (context-move) moves (recheck-except, over its target's consequence closure): one stated in a context of the move's raw stratum (:raw), where the excepts in force at a reader under the edge's sub are read, and the except each of those names, whose cascade moves with it. An edge whose sub already sees every context stating an except re-checks none (lein perf's genlcx-edge-beside-excepted-declarations, genlcx-edge-beside-seen-excepts).

Re-check each `except` the `genlCx` move `m` (`context-move`) moves (`recheck-except`,
over its target's consequence closure): one stated in a context of the move's raw stratum
(`:raw`), where the excepts in force at a reader under the edge's `sub` are read, and
the `except` each of those names, whose cascade moves with it.  An edge whose `sub`
already sees every context stating an `except` re-checks none (`lein perf`'s
`genlcx-edge-beside-excepted-declarations`, `genlcx-edge-beside-seen-excepts`).
sourceraw docstring

recheck-on-lengthsclj

(recheck-on-lengths kb moved)

The settle pass moved the length of the relations moved (arity/drain!'s :moved, a set or :all): queue :all-rejoin every rule carrying an antecedent a relation's length can move (provers/relation-moved-answers). Reads nothing while moved is empty.

The settle pass moved the length of the relations `moved` (`arity/drain!`'s `:moved`,
a set or `:all`): queue `:all-rejoin` every rule carrying an antecedent a relation's
length can move (`provers/relation-moved-answers`).  Reads nothing while `moved` is
empty.
sourceraw docstring

recheck-on-sentenceclj

(recheck-on-sentence kb sentence)

The re-check trigger for a whole sentence: post it under its functor and, for a negation, under the functor of its underlying-body, both with the whole sentence as the narrowing trigger; then post the declaration, qualitative, computed, separation, preservation and closed-extent grant triggers on the body, and for a unary body the typed-admission trigger. underlying-body rather than positive-body, because a (not (penguin X)) arriving defeats a believed (penguin X) and moves a condition that reads belief with no fact stored or removed.

The re-check trigger for a whole sentence: post it under its functor and, for a
negation, under the functor of its `underlying-body`, both with the whole sentence as
the narrowing trigger; then post the declaration, qualitative, computed, separation,
preservation and closed-extent grant triggers on the body, and for a unary body the
typed-admission trigger. `underlying-body` rather than `positive-body`, because a
`(not (penguin X))` arriving defeats a believed `(penguin X)` and moves a condition that
reads belief with no fact stored or removed.
sourceraw docstring

recheck-rewrite-sourceclj

(recheck-rewrite-source kb source)

A support-only source change owes full rewrite-consumer rechecks. Called at the existing queue drain, never from inside a network mutation.

A support-only source change owes full rewrite-consumer rechecks. Called at the
existing queue drain, never from inside a network mutation.
sourceraw docstring

recheck-route-gains!clj

(recheck-route-gains! kb)

Re-check, as an arrival does (recheck-except), each stored except naming a handle in the support, premises passed, of a datum route-gain-sink noted since the last call: the route can show the datum, and what rests on it, to a reader the except hid it from. Empties the note, and reads nothing more when no except is stored. A settle pass calls it before it drains the re-check queue, where an arrival posts.

Re-check, as an arrival does (`recheck-except`), each stored `except` naming a handle in
the support, premises passed, of a datum `route-gain-sink` noted since the last call:
the route can show the datum, and what rests on it, to a reader the `except` hid it
from.  Empties the note, and reads nothing more when no `except` is stored.  A settle
pass calls it before it drains the re-check queue, where an arrival posts.
sourceraw docstring

recheck-subjectsclj

declaration-subjects' functors as a set — which declarations post to the exception re-check queue through the shared path rather than from arms of their own.

Public because predicates/check-facets holds every declaration that answers goals about a predicate to posting by one route or the other, and the two routes live in different namespaces: a :retriggers facet says the arms do it, this says recheck-declaration does. A declaration in neither decides by arrival order, which is what that rule refuses at load.

`declaration-subjects`' functors as a set — which declarations post to the exception
re-check queue through the shared path rather than from arms of their own.

Public because `predicates/check-facets` holds every declaration that answers goals
about a predicate to posting by one route or the other, and the two routes live in
different namespaces: a `:retriggers` facet says the arms do it, this says
`recheck-declaration` does.  A declaration in neither decides by arrival order, which
is what that rule refuses at load.
sourceraw docstring

reconcile-belief-changeclj

(reconcile-belief-change kb)
(reconcile-belief-change kb moved)

Reconcile every belief-derived taxonomy cache after moved may have changed truth. Stores nothing; re-running it recomputes from current belief. moved may name declaration handles or except handles (expanded to their targets by belief-change-region). The scoped read filters through res/supporter-believed? and is keyed on the change clock, which every write moves.

Reconcile every belief-derived taxonomy cache after `moved` may have changed truth.
Stores nothing; re-running it recomputes from current belief.  `moved` may name
declaration handles or except handles (expanded to their targets by
`belief-change-region`).  The scoped read filters through `res/supporter-believed?` and
is keyed on the change clock, which every write moves.
sourceraw docstring

reconcile-removed-supersession!clj

(reconcile-removed-supersession! kb sentex)

The supersession reconcile sentex leaving the store owes, from the removal choke point: the full pass for a genlCx edge or a schematic rewrite rule while any spelling is superseded, and the narrowed one over sentex and the classes it moved for a superseded datum or an equality sentence. A superseded datum leaving drops its entry, and an equality leaving gives back the spellings its class displaced.

The supersession reconcile `sentex` leaving the store owes, from the removal choke
point: the full pass for a `genlCx` edge or a schematic rewrite rule while any spelling
is superseded, and the narrowed one over `sentex` and the classes it moved for a
superseded datum or an equality sentence.  A superseded datum leaving drops its entry,
and an equality leaving gives back the spellings its class displaced.
sourceraw docstring

rederive-descendedclj

(rederive-descended kb justs)

Draw each of justs (edge-descended-justifications) again from the taxonomy as it now stands, and return the handles it created as chaining seeds, with violations reported and displaced spellings refreshed. An entailment is asked through retroactive-mints narrowed to its declaration; a descended equality through derive-functional-equalities or derive-antisymmetric-equalities over the fact at the head of its antecedents; a restatement through migrate-sentex over its original or the target a restated meta names; a slice's copy through deduce-lifts over the literal it copies; a collision merge through place-collision-closure!. Each task is drawn once.

Draw each of `justs` (`edge-descended-justifications`) again from the taxonomy as it
now stands, and return the handles it created as chaining seeds, with violations
reported and displaced spellings refreshed.  An entailment is asked through
`retroactive-mints` narrowed to its declaration; a descended equality through
`derive-functional-equalities` or `derive-antisymmetric-equalities` over the fact at the
head of its antecedents; a restatement through `migrate-sentex` over its original or the
target a restated meta names; a slice's copy through `deduce-lifts` over the literal it
copies; a collision merge through `place-collision-closure!`.  Each task is drawn once.
sourceraw docstring

rederive-refused!clj

(rederive-refused! kb [route h :as k])

Derive again what the refusal-record key k holds refused for a cycle through negation, and answer the new handles to chain from. [:mint src] draws the entailments of the fact src (entail-over), and [:restatement id] the restatements of the sentex id (migrate-sentex). The key's entries are dropped first, and a derivation still closing a cycle records its refusal again. Reports the violations and reconciles the supersessions the derivation found. Nothing is derived once the fact or sentex is gone.

Derive again what the refusal-record key `k` holds refused for a cycle through negation,
and answer the new handles to chain from.  `[:mint src]` draws the entailments of the
fact `src` (`entail-over`), and `[:restatement id]` the restatements of the sentex `id`
(`migrate-sentex`).  The key's entries are dropped first, and a derivation still closing
a cycle records its refusal again.  Reports the violations and reconciles the
supersessions the derivation found.  Nothing is derived once the fact or sentex is gone.
sourceraw docstring

redraw-deferredclj

(redraw-deferred kb h transitions deadline)

Draw again what draw-fact set aside for h: the fact, then each mint of transitions it brought IN, whose entailments are drawn and, for one it created, its restatement at a merged term (restate-retired), as the cascade it stopped in would have. The answer is draw-fact's; a draw deferred again names the transitions of both attempts.

Draw again what `draw-fact` set aside for `h`: the fact, then each mint of
`transitions` it brought IN, whose entailments are drawn and, for one it created, its
restatement at a merged term (`restate-retired`), as the cascade it stopped in
would have.  The answer is `draw-fact`'s; a draw deferred again names the transitions of
both attempts.
sourceraw docstring

redraw-mintsclj

(redraw-mints kb h)

Draw the argument-type entailments of the stored literal fact at h over the spelling it holds now, after a store mutation moved that spelling (integrate/move-row!): [drawn stale]. drawn is deduce-placed's {:new :violations}. stale holds the ids of the mint justifications h triggers that this spelling does not draw, for the caller to drop. A declaration reads the argument at its own position, so a mint drawn over the spelling the row held before can name the declaration of another position (docs/canonicalization.md).

Draw the argument-type entailments of the stored literal fact at `h` over the spelling
it holds now, after a store mutation moved that spelling (`integrate/move-row!`):
`[drawn stale]`.  `drawn` is `deduce-placed`'s `{:new :violations}`.  `stale` holds the
ids of the mint justifications `h` triggers that this spelling does not draw, for the
caller to drop.  A declaration reads the argument at its own position, so a mint drawn
over the spelling the row held before can name the declaration of another position
(docs/canonicalization.md).
sourceraw docstring

refile-mint!clj

(refile-mint! kb old h)

Bring record h's entry in the mint family to its stored spelling: out from under the filing term of old, the record h held before (nil when its spelling did not move), and under the current one while a mint justification concludes it. The callers are the store mutations that move a record's spelling (integrate/respell!) or the justifications concluding it (integrate/fold-row!).

Bring record `h`'s entry in the mint family to its stored spelling: out from under the
filing term of `old`, the record `h` held before (nil when its spelling did not move),
and under the current one while a mint justification concludes it.  The callers are the
store mutations that move a record's spelling (`integrate/respell!`) or the
justifications concluding it (`integrate/fold-row!`).
sourceraw docstring

refresh-supersessionsclj

(refresh-supersessions kb)
(refresh-supersessions kb extra)
(refresh-supersessions kb extra region)

Reconcile the superseded set with the equality closure (supersession-map), on the write path: where a migration hands over extra (the two-arity, which examines extra and the moved classes), where a sentence leaves the store (reconcile-removed-supersession!), and at recover, which passes nil for the full pass. The settle calls it for a genlCx move that shows contexts (reconcile-move, from drain-context-moves!), for an except that moved and for an equality edge that moved in belief (settle/settle-finish).

Reconcile the superseded set with the equality closure (`supersession-map`), on the
write path: where a migration hands over `extra` (the two-arity, which examines `extra`
and the moved classes), where a sentence leaves the store
(`reconcile-removed-supersession!`), and at `recover`, which passes nil for the full
pass.  The settle calls it for a `genlCx` move that shows contexts (`reconcile-move`,
from `drain-context-moves!`), for an `except` that moved and for an equality edge that
moved in belief (`settle/settle-finish`).
sourceraw docstring

release-withheld!clj

(release-withheld! kb)

Draw what the departures and arrivals withheld-releases left owed can have withheld (owed-releases), and empty the debt: {:terms n :released n :new [handle …]}, the terms the owed rows release and the records drawn. The caller settles.

Draw what the departures and arrivals `withheld-releases` left owed can have withheld
(`owed-releases`), and empty the debt: `{:terms n :released n :new [handle …]}`, the
terms the owed rows release and the records drawn.  The caller settles.
sourceraw docstring

rerecord-cycle-drops!clj

(rerecord-cycle-drops! kb)

Derive again, at recover, each mint and restatement that is a genl edge or a closed-extent grant (checks/cycle-closing-fact?), so the ones a cycle through negation drops record their refusals again. The edge mints are those of the facts a genlArg, argsGenl or argAndRestGenl declaration covers. The grant mints are those of the facts naming a predicate a grant would close (checks/grant-closable-predicates). The restatements are those of the stored edges and grants naming a merged term. Answers the new handles to chain from. Reads nothing where no cycle is possible (checks/cycle-possible?).

Derive again, at `recover`, each mint and restatement that is a `genl` edge or a
closed-extent grant (`checks/cycle-closing-fact?`), so the ones a cycle through negation
drops record their refusals again.  The edge mints are those of the facts a `genlArg`,
`argsGenl` or `argAndRestGenl` declaration covers.  The grant mints are those of the facts
naming a predicate a grant would close (`checks/grant-closable-predicates`).  The
restatements are those of the stored edges and grants naming a merged term.  Answers the new handles to chain from.
Reads nothing where no cycle is possible (`checks/cycle-possible?`).
sourceraw docstring

restate-retiredclj

(restate-retired kb sx)

Restate the derived row sx just stored (a mint entail-arg-type draws, or a correspondence derivation chain/sync-values! places) when its sentence names a term the equality closure already displaces, as assert-one restates an asserted fact (docs/equality.md, "What a merge does"): sx is superseded and its twin under the representative is stored (migrate-sentex). {:new [twin handles] :violations [v]}, empty when nothing in the sentence merged.

Restate the derived row `sx` just stored (a mint `entail-arg-type` draws, or a
correspondence derivation `chain/sync-values!` places) when its sentence names a term
the equality closure already displaces, as `assert-one` restates an asserted fact
(docs/equality.md, "What a merge does"): `sx` is superseded and its twin under the
representative is stored (`migrate-sentex`).  `{:new [twin handles] :violations [v]}`,
empty when nothing in the sentence merged.
sourceraw docstring

restrength-firings!clj

(restrength-firings! kb rh)
(restrength-firings! kb rh dropping-id)

Set the strength of every justification rule rh informs to the rule's current provers/firing-strength, in both copies: the record store's justification records (what supporting-justifications shows and what recover rebuilds the network from) and the network's (jtms/restrength-informant, which relabels the region). A rule's firing strength moves when its defeasibility resolves or an exceptWhen arrives or leaves; dropping-id is the exception meta-sentex leaving, if any.

Set the strength of every justification rule `rh` informs to the rule's current
`provers/firing-strength`, in both copies: the record store's justification records
(what `supporting-justifications` shows and what `recover` rebuilds the network from)
and the network's (`jtms/restrength-informant`, which relabels the region).  A rule's
firing strength moves when its defeasibility resolves or an `exceptWhen` arrives or
leaves; `dropping-id` is the exception meta-sentex leaving, if any.
sourceraw docstring

resubsumption-seedsclj

(resubsumption-seeds kb removed removed-jids)

The chaining seeds a teardown owes, given the removed sentexes its sweep collected and the removed-jids justifications: subsumption-seeds and visibility-seeds in the retraction direction. A departing genl or swap edge seeds its spec subtree, read before the teardown, and the rules with an antecedent on the edge's own relation (closure-reader-rules), both only when the sweep took something besides the records asked for (edge-own-mints excluded). A departing genlCx edge seeds the antecedents of the firings that named it (sighting-seeds) and its closure-reading rules. See docs/contexts.md, "A genlCx edge owes the same debt".

The chaining seeds a teardown owes, given the `removed` sentexes its sweep collected
and the `removed-jids` justifications: `subsumption-seeds` and `visibility-seeds` in
the retraction direction.  A departing `genl` or swap edge seeds its spec subtree, read
before the teardown, and the rules with an antecedent on the edge's own relation
(`closure-reader-rules`), both only when the sweep took something besides the records
asked for (`edge-own-mints` excluded).  A departing `genlCx` edge seeds the antecedents
of the firings that named it (`sighting-seeds`) and its closure-reading rules.  See
docs/contexts.md, "A `genlCx` edge owes the same debt".
sourceraw docstring

resync-slice-liftsclj

(resync-slice-lifts kb readings)

The copies an edge reading of (eternal_predicate P) arriving or leaving owes P's slice facts, for each such sentence among readings. For each, sweep-eternal brings every copy's justifications to the witnesses its sliced context reads now. A reading answers for the membership it rests on. Returns {:new :violations :removed}, :removed the merged jtms/drop-justification! results for the caller to apply; nil when no reading is one.

The copies an edge reading of `(eternal_predicate P)` arriving or leaving owes `P`'s
slice facts, for each such sentence among `readings`.  For each, `sweep-eternal` brings
every copy's justifications to the witnesses its sliced context reads now.  A reading
answers for the membership it rests on.  Returns `{:new :violations :removed}`, `:removed`
the merged `jtms/drop-justification!` results for the caller to apply; nil when no
reading is one.
sourceraw docstring

retire-mint!clj

(retire-mint! kb sentex)

Take the departing sentex out of the mint family, when it is filed there.

Take the departing `sentex` out of the mint family, when it is filed there.
sourceraw docstring

retire-unjustified-mints!clj

(retire-unjustified-mints! kb removals)

Take out of the mint family each record a mint justification removed in removals concluded, once no other mint justification concludes it. removals is a jtms/retract!-shaped result, whose :removed-supports names each removed justification's consequence and informant, read off the network before the removal. A consequence the removal swept leaves through retire-mint!; one still in the network is retired here, and its record is the one fetch.

Take out of the mint family each record a mint justification removed in `removals`
concluded, once no other mint justification concludes it.  `removals` is a
`jtms/retract!`-shaped result, whose `:removed-supports` names each removed
justification's consequence and informant, read off the network before the removal.  A
consequence the removal swept leaves through `retire-mint!`; one still in the network
is retired here, and its record is the one fetch.
sourceraw docstring

revived-declaration-sweepsclj

(revived-declaration-sweeps kb handles)

Run, for each sentex in handles the settle just brought back OUT to IN, the sweeps its arrival runs over the facts already stored: equate-existing and antisym-equate-existing for a merge mark, revived-edge-sweep for a genl edge under one, lift-existing for a decontextualized_predicate (docs/equality.md, "A mark that revives runs its arrival sweep again"), and eternal-arrival-sweep. Returns one {:new :superseded :violations}, or nil when the KB declares no merge, nogood-candidate or lift mark and no handle is an eternal arrival. The sweeps read stored content and are idempotent; handles are walked in content order.

Run, for each sentex in `handles` the settle just brought back OUT to IN, the sweeps
its arrival runs over the facts already stored: `equate-existing` and
`antisym-equate-existing` for a merge mark, `revived-edge-sweep` for a `genl` edge under
one, `lift-existing` for a `decontextualized_predicate` (docs/equality.md, "A mark that
revives runs its arrival sweep again"), and `eternal-arrival-sweep`.  Returns one `{:new
:superseded :violations}`, or nil when the KB declares no merge, nogood-candidate or lift
mark and no handle is an eternal arrival.  The sweeps read stored content and are
idempotent; handles are walked in content order.
sourceraw docstring

rewrite-reading-rulesclj

(rewrite-reading-rules kb source)

Positive rewrite consumers moved by source: always a full rejoin. A new rival can expose a fallback whose proof does not name it. Keep these rules separate from ordinary supporting-delta routing; the no-consumer presence check is in memory.

Positive rewrite consumers moved by `source`: always a full rejoin.
A new rival can expose a fallback whose proof does not name it. Keep these rules
separate from ordinary supporting-delta routing; the no-consumer presence check is in memory.
sourceraw docstring

route-gain-sinkclj

(route-gain-sink kb)

The observe/*route-gain-sink* a write over kb binds: the one bound when it mirrors kb's reasoning state, else one noting on kb's :except-moves each believed datum of kb's network that gains a route (recheck-route-gains!). Reads no state until the network calls it.

The `observe/*route-gain-sink*` a write over `kb` binds: the one bound when it mirrors
`kb`'s reasoning state, else one noting on `kb`'s `:except-moves` each believed datum of
`kb`'s network that gains a route (`recheck-route-gains!`).  Reads no state until the
network calls it.
sourceraw docstring

rule-recheck-keysclj

(rule-recheck-keys tx rule-sentex)

The keys the re-check index posts the rule rule-sentex under, read against the taxonomy tx: rules/recheck-predicates, the closed-extent, separation-denial and negates-denial keys of its sentence, and rules/nonempty-recheck-predicates. Nil when the rule carries none of them, no re-check condition (rules/rechecked?) and no antecedent read through a mention probe (mention-read-rule?); a rule with a condition and no key answers an empty vector, which posts it into the :rules set alone.

The keys the re-check index posts the rule `rule-sentex` under, read against the
taxonomy `tx`: `rules/recheck-predicates`, the closed-extent, separation-denial and
negates-denial keys of its sentence, and `rules/nonempty-recheck-predicates`.  Nil when
the rule carries none of them, no re-check condition (`rules/rechecked?`) and no
antecedent read through a mention probe (`mention-read-rule?`); a rule with a condition
and no key answers an empty vector, which posts it into the `:rules` set alone.
sourceraw docstring

sentence-edgesclj

(sentence-edges sentence)

The [sub super] pairs sentence adds to the signed genl closure.

The `[sub super]` pairs `sentence` adds to the signed `genl` closure.
sourceraw docstring

slice-lift-targetsclj

(slice-lift-targets kb sentence context)

The contexts deduce-lifts copies the literal sentence, stored in context, into (slice-lift), in step order: each step's sliced context while it reads a witness.

The contexts `deduce-lifts` copies the literal `sentence`, stored in `context`, into
(`slice-lift`), in step order: each step's sliced context while it reads a witness.
sourceraw docstring

sliced-contextsclj

(sliced-contexts kb context)

The contexts slice-lift copies an eternal predicate's literal stored in context into, in step order (sliced-steps). context is a stored context or a (CxTimeFn C T) application, whose first step is C.

The contexts `slice-lift` copies an eternal predicate's literal stored in `context` into,
in step order (`sliced-steps`).  `context` is a stored context or a `(CxTimeFn C T)`
application, whose first step is `C`.
sourceraw docstring

storage-contextclj

(storage-context kb pred context)

The context a fact whose functor is pred is stored in when written in context: CxUniverse for a forced_decontextualized_predicate, context otherwise. The mark is read KB-wide: a storage context decides what the store holds, which every reader shares, so no reader's view may move it. assert-entry/storage-context stores with it, and unary-entailments places a declaration's arity-class memberships with it.

The context a fact whose functor is `pred` is stored in when written in `context`:
CxUniverse for a `forced_decontextualized_predicate`, `context` otherwise.  The mark is
read KB-wide: a storage context decides what the store holds, which every reader
shares, so no reader's view may move it.  `assert-entry/storage-context` stores with
it, and `unary-entailments` places a declaration's arity-class memberships with it.
sourceraw docstring

subsumed-mint-blocksclj

(subsumed-mint-blocks kb moved was-in asked believed? routes? whole)

The justifications to block because the records they hold up are redundant: {:blocked #{jid} :withdrawn #{handle}}, plus :surplus (surplus-placements) for the settle to drop, over the records the sentexes in moved can have displaced. Blocks every justification of a withdrawn record. moved is a delay, forced only when the entailment is on, the mint is prunable and the mint family is non-empty; forced, it is filtered by subsumer-shaped? and read through withdrawal-candidates and edge-route-candidates. Only a record that became believed is asked, and also each record a retraction left standing on a derivation alone (note-unpremised!). asked is the settle's record of the records already asked, so each is asked once per settle. believed? is belief now. With routes?, descent-surplus-placements is asked too. whole is the region's size for a recover, else nil; with fewer mints stored than that, moved is never forced. See docs/argtypes.md.

The justifications to block because the records they hold up are redundant:
`{:blocked #{jid} :withdrawn #{handle}}`, plus `:surplus` (`surplus-placements`) for the
settle to drop, over the records the sentexes in `moved` can have displaced.  Blocks
every justification of a withdrawn record.  `moved` is a delay, forced only when the
entailment is on, the mint is prunable and the mint family is non-empty; forced, it is
filtered by `subsumer-shaped?` and read through `withdrawal-candidates` and
`edge-route-candidates`.  Only a record that became believed is asked, and also each
record a retraction left standing on a derivation alone (`note-unpremised!`).  `asked`
is the settle's record of the records already asked, so each is asked once per settle.
`believed?` is belief now.  With `routes?`, `descent-surplus-placements` is asked too.
`whole` is the region's size for a `recover`, else nil; with fewer mints stored than
that, `moved` is never forced.  See docs/argtypes.md.
sourceraw docstring

subsumption-seedsclj

(subsumption-seeds kb sentence)

The stored facts the genl edges sentence installs newly make matchable, as chaining seeds: the taxonomy twin of lift-existing. The edges are tax/installed-edges' (a genl edge, or one per part of a cover). The seeds are sub's whole spec subtree, believed only, and per edge only when its super passes rule-reads-above. The negated half is negative-subsumption-seeds; the removal side is resubsumption-seeds. See docs/inference.md and docs/taxonomy.md.

The stored facts the `genl` edges `sentence` installs newly make matchable, as
chaining seeds: the taxonomy twin of `lift-existing`.  The edges are
`tax/installed-edges`' (a `genl` edge, or one per part of a cover).  The seeds are
`sub`'s whole spec subtree, believed only, and per edge only when its `super` passes
`rule-reads-above`.  The negated half is `negative-subsumption-seeds`; the removal side is
`resubsumption-seeds`.  See docs/inference.md and docs/taxonomy.md.
sourceraw docstring

surplus-placementsclj

(surplus-placements kb edges)
(surplus-placements kb edges plans)

The mint justifications, in id order, that a genlCx edge among edges (sentexes) left at a context that is no longer a placement of their fact and declaration (pair-placements). plans maps an edge record to its edge-mint-plan, whose :displaced contexts are the only ones read. The caller checks that the entailment is on and the mint family holds a record.

The mint justifications, in id order, that a `genlCx` edge among `edges` (sentexes)
left at a context that is no longer a placement of their fact and declaration
(`pair-placements`).  `plans` maps an edge record to its `edge-mint-plan`, whose
`:displaced` contexts are the only ones read.  The caller checks that the entailment is
on and the mint family holds a record.
sourceraw docstring

tableclj

entries as the lookup map the walks below dispatch through.

`entries` as the lookup map the walks below dispatch through.
sourceraw docstring

take-except-moves!clj

(take-except-moves! kb)

Empty :except-moves but its :gained note and its :reask queue, and return what the settle owes it, {:extra [[datum reason]] :region #{datum} :full? bool :moved #{h}}. :extra holds the supersessions except-move-sweeps found, :region the superseded data a moved except can change (except-move-region), and :moved the handles the drained moves hid or showed. :full? says a move is still pending undrained, which leaves the supersession reconcile nothing narrower than a full pass. It answers nil when nothing moved.

Empty `:except-moves` but its `:gained` note and its `:reask` queue, and return what the
settle owes it, `{:extra [[datum reason]] :region #{datum} :full? bool :moved #{h}}`.
`:extra` holds the supersessions `except-move-sweeps` found, `:region` the superseded
data a moved `except` can change (`except-move-region`), and `:moved` the handles the
drained moves hid or showed.  `:full?` says a move is still pending undrained, which
leaves the supersession reconcile nothing narrower than a full pass.  It answers nil
when nothing moved.
sourceraw docstring

take-first-deferral!clj

(take-first-deferral! kb)

Whether defer-first-release! marked this settle, with the mark cleared.

Whether `defer-first-release!` marked this settle, with the mark cleared.
sourceraw docstring

take-producer-moves!clj

(take-producer-moves!)

*producer-moves*' moves, emptied, or nil when it is unbound.

`*producer-moves*`' moves, emptied, or nil when it is unbound.
sourceraw docstring

take-producer-seeds!clj

(take-producer-seeds!)

The handles under :seeds of *producer-moves*, removed from it, for the caller to re-chain before it settles.

The handles under `:seeds` of `*producer-moves*`, removed from it, for the caller to
re-chain before it settles.
sourceraw docstring

take-reasks!clj

(take-reasks! kb)

Empty :except-moves' :reask and answer what it held.

Empty `:except-moves`' `:reask` and answer what it held.
sourceraw docstring

take-supersession-moves!clj

(take-supersession-moves! kb)

{:moved #{datum} :was {datum entry}}: the datums whose supersession entry changed since the last call, each with its entry before the first change (nil when it was not superseded), emptied; nil when the KB keeps no supersession moves. settle-finish reads it once per settle: a supersession moves belief with no relabel, so jtms/touched does not name these.

`{:moved #{datum} :was {datum entry}}`: the datums whose supersession entry changed
since the last call, each with its entry before the first change (nil when it was not
superseded), emptied; nil when the KB keeps no supersession moves.  `settle-finish`
reads it once per settle: a supersession moves belief with no relabel, so
`jtms/touched` does not name these.
sourceraw docstring

taxonomy-generationsclj

(taxonomy-generations kb)

The genl and genlCx generations with the rebuild epoch (tax/relation-epoch), the value conviction-generations extends with the separations. A caller re-asks an entry only when this moves from the value the entry records, so the recorded value and the comparison are this one function. The epoch moves at every recover, which restarts the generations at 0.

The `genl` and `genlCx` generations with the rebuild epoch (`tax/relation-epoch`), the
value `conviction-generations` extends with the separations.  A caller re-asks an entry
only when this moves from the value the entry records, so the recorded value and the
comparison are this one function.  The epoch moves at every `recover`, which restarts the generations at 0.
sourceraw docstring

transitive-rule-seedsclj

(transitive-rule-seeds kb rule-sentex)

The stored facts a newly forward-capable rule needs back on the agenda when one of its antecedents reads a declared-transitive predicate: the third arrival order of transitive-seeds. Off unless an antecedent is declared transitive. Read unscoped.

The stored facts a newly forward-capable rule needs back on the agenda when one of its
antecedents reads a declared-transitive predicate: the third arrival order of
`transitive-seeds`.  Off unless an antecedent is declared transitive.  Read unscoped.
sourceraw docstring

transitive-seedsclj

(transitive-seeds kb sentence)

The stored facts a declared-transitive predicate's closure makes newly matchable, as chaining seeds: the TransitivePredicateProver's twin of subsumption-seeds. Two arrival orders: a link (pred a b) with pred already transitive seeds the believed facts mentioning a left end (transitive-left-ends); a declaration (transitive pred) over stored links seeds every believed fact on a partner functor. Off unless some rule takes a pred antecedent. The removal side needs no twin. The mark is read unscoped. See docs/inference.md, "Seeding a transitive closure".

The stored facts a declared-transitive predicate's closure makes newly matchable, as
chaining seeds: the `TransitivePredicateProver`'s twin of `subsumption-seeds`.  Two
arrival orders: a link `(pred a b)` with `pred` already transitive seeds the believed
facts mentioning a left end (`transitive-left-ends`); a declaration `(transitive pred)`
over stored links seeds every believed fact on a partner functor.  Off unless some rule
takes a `pred` antecedent.  The removal side needs no twin.  The mark is read unscoped.
See docs/inference.md, "Seeding a transitive closure".
sourceraw docstring

triggered-mintsclj

(triggered-mints kb moved was-in asked believed?)

Draw what the memberships and genl edges among moved that came IN this settle trigger (trigger-entailments): {:new [handle …] :violations [v …]}. A membership (T x) arriving after a fact and an interArg or homogeneity declaration over it is the trigger's arrival order, which the fact and the declaration cannot reach because the trigger did not hold when each arrived. was-in and believed? are belief before the settle and now; asked holds the records this settle has asked.

Draw what the memberships and `genl` edges among `moved` that came IN this settle
trigger (`trigger-entailments`): `{:new [handle …] :violations [v …]}`.  A membership
`(T x)` arriving after a fact and an `interArg` or homogeneity declaration over it is
the trigger's arrival order, which the fact and the declaration cannot reach because
the trigger did not hold when each arrived.  `was-in` and `believed?` are belief before
the settle and now; `asked` holds the records this settle has asked.
sourceraw docstring

unindex-exceptWhen-metaclj

(unindex-exceptWhen-meta kb meta-sentex)

The mirror of index-exceptWhen-meta: withdraw the departing exceptWhen meta-sentex's postings, then re-post the rule from the predicates its remaining exceptions and NAF antecedents still need — a set re-add restores any shared predicate the blanket withdraw over-removed, and leaves the rule out of the :rules set exactly when nothing watches it any more. Queues the rule for re-check, since losing an exception may revive what it was blocking, restores the rule's firing strength when no guard remains (restrength-firings!), and releases the firings of a forced-monotonic rule no exception convicts any more (checks/force-sentexes!).

The mirror of `index-exceptWhen-meta`: withdraw the departing exceptWhen
meta-sentex's postings, then re-post the rule from the predicates its *remaining*
exceptions and NAF antecedents still need — a set re-add restores any shared
predicate the blanket withdraw over-removed, and leaves the rule out of the `:rules`
set exactly when nothing watches it any more.  Queues the rule for re-check, since
losing an exception may revive what it was blocking, restores the rule's firing
strength when no guard remains (`restrength-firings!`), and releases the firings of a
forced-monotonic rule no exception convicts any more (`checks/force-sentexes!`).
sourceraw docstring

universal-contextclj

source

unpost-mint!clj

(unpost-mint! index sentence context h)

The mirror of post-mint!: take record h, holding sentence in context, out of index's mint family, when the sentence has a mint-term.

The mirror of `post-mint!`: take record `h`, holding `sentence` in `context`, out of
`index`'s mint family, when the sentence has a `mint-term`.
sourceraw docstring

visibility-seedsclj

(visibility-seeds kb sentence)
(visibility-seeds kb sentence filtered?)

move-seeds for sentence, a genlCx edge between two symbols, and nil for any other sentence.

`move-seeds` for `sentence`, a `genlCx` edge between two symbols, and nil for any other
sentence.
sourceraw docstring

wff-problemsclj

(wff-problems tax sentence context)

Structural well-formedness problems for sentence (empty if OK): the :wff column of the table, walked. A functor with no entry or no :wff arm is structurally unconstrained here. context is passed to every arm. A nil tax skips the checks that read stored content (the genl, genlCx, cover and rewriteOf cycles and the transitivity a preservation names), as an import does. A not over a pr/query-only term, at any depth, is checked by that term's arm. With tax, a literal or a denial of a predicate a believed (not_assertible P) marks, read KB-wide, is refused.

Structural well-formedness problems for `sentence` (empty if OK): the `:wff` column of
the table, walked.  A functor with no entry or no `:wff` arm is structurally
unconstrained here.  `context` is passed to every arm.  A nil `tax` skips the checks that
read stored content (the `genl`, `genlCx`, cover and `rewriteOf` cycles and the
transitivity a preservation names), as an import does.  A `not` over a `pr/query-only`
term, at any depth, is checked by that term's arm.  With `tax`, a literal or a denial of
a predicate a believed `(not_assertible P)` marks, read KB-wide, is refused.
sourceraw docstring

wff-violationclj

(wff-violation kb sentence context)

wff-problems as a value, for content a rule derived: nil when sentence is well-formed, else a violation map in the shape checks/constraint-violation returns. Dropped and reported rather than thrown, since chaining is a fixpoint.

`wff-problems` as a value, for content a rule derived: nil when `sentence` is
well-formed, else a violation map in the shape `checks/constraint-violation` returns.
Dropped and reported rather than thrown, since chaining is a fixpoint.
sourceraw docstring

with-recheck-readscljmacro

(with-recheck-reads & body)

Run body with a *recheck-reads* memo, the one already bound if there is one. The caller's body stores no rule and no declaration.

Run `body` with a `*recheck-reads*` memo, the one already bound if there is one.  The
caller's body stores no rule and no declaration.
sourceraw docstring

withdrawn-edge-seedsclj

(withdrawn-edge-seeds kb handles)

The chaining seeds a settle owes the witness edges (witness-edge?) among handles, mints it is about to withdraw as redundant (subsumed-mint-blocks) or spellings a merge retired (settle/withdraw-retired-firings!), that a rule firing names as its witness: departed-edge-rejoin's facts and rules for each such edge and each of its twins (handle-twins). The condition is a dependent justification whose informant is a rule, read before the sweep deletes it. See docs/argtypes.md.

The chaining seeds a settle owes the witness edges (`witness-edge?`) among `handles`,
mints it is about to withdraw as redundant (`subsumed-mint-blocks`) or spellings a merge
retired (`settle/withdraw-retired-firings!`), that a rule firing names as its witness:
`departed-edge-rejoin`'s facts and rules for each such edge and each of its twins
(`handle-twins`).  The condition is a dependent justification whose informant is a rule,
read before the sweep deletes it.  See docs/argtypes.md.
sourceraw docstring

withheld-releasesclj

(withheld-releases kb moved was-in asked withdrawn believed?)

The mints no longer withheld because a record that subsumed them left, and the justifications a withheld mint owes a record of its sentence that arrived: {:new [handle …]}, drawn by rederive-mints (docs/argtypes.md, "Nothing records a withheld mint"). Pruning only; a genlCx edge's departure is the drain's (departed-context-edge-mints). Under *release-withheld?* false the departures and arrivals stay owed (owe-releases!) and nothing is drawn. Departures are the records note-departure! queued and the records in moved (a delay) that went IN to OUT against was-in; arrivals came IN. withdrawn holds the mints this settle withdrew, which release nothing; asked holds the records already asked, so each is asked once per settle. A term is re-drawn only for the mints one of its departures could have withheld (may-release).

The mints no longer withheld because a record that subsumed them left, and the
justifications a withheld mint owes a record of its sentence that arrived:
`{:new [handle …]}`, drawn by `rederive-mints` (docs/argtypes.md, "Nothing records a
withheld mint").  Pruning only; a `genlCx` edge's departure is the drain's
(`departed-context-edge-mints`).  Under `*release-withheld?*` false the departures and
arrivals stay owed (`owe-releases!`) and nothing is drawn.  Departures are the records
`note-departure!` queued and the records in `moved` (a delay) that went IN to OUT against
`was-in`; arrivals came IN.  `withdrawn` holds the mints this settle withdrew, which
release nothing; `asked` holds the records already asked, so each is asked once per
settle.  A term is re-drawn only for the mints one of its departures could have
withheld (`may-release`).
sourceraw docstring

witness-edge?clj

(witness-edge? sentence)

Does sentence hold an edge a firing names as its witness: a closure edge (closure-edge-relation) or a swap edge (swap-edges)? A departing one owes a re-join, since a second path can license the firings that named it.

Does `sentence` hold an edge a firing names as its witness: a closure edge
(`closure-edge-relation`) or a swap edge (`swap-edges`)?  A departing one owes a re-join,
since a second path can license the firings that named it.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close