subtractFoldedEvidence

abstract fun subtractFoldedEvidence(propositionId: String, provenanceRefs: List<String>, grounding: Collection<String>, sourceIds: Collection<String>): Proposition?

Take exactly the fold a collapse carried off propositionId in one atomic step: the evidence named by provenanceRefs, the grounding chunk ids in grounding, and the source ids in sourceIds. Everything else on the proposition is left alone.

This is the operation collector undo actually needs. A fold onto a survivor is never evidence alone, it also carries grounding and source ids, and reversing it has to take all three off together, in the same step the evidence subtraction promises, or a later save of the grounding/source-id change would write the survivor's evidence back from a stale copy and lose whatever another extraction added since.

Return

the proposition as the subtraction left it, or null when the store holds no proposition under that id, which a caller reads as "somebody deleted it".

Parameters

propositionId

the proposition to subtract from

provenanceRefs

evidence keys or bare locator keys naming which evidence entries go

grounding

chunk ids to remove from the proposition's grounding

sourceIds

source ids to remove from the proposition's abstraction sources