subtractFoldedEvidence

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

Takes a whole collapse's fold off in one atomic step, honouring ProvenanceSubtractionCapable's contract.

ConcurrentHashMap.compute holds the bin for this id while the remapping function runs, and every other write here goes through the same map, so a concurrent addProvenance or save on this proposition waits its turn. Whichever of the two lands first, both effects are on the proposition when they finish.

Handing back null for an absent id also leaves the map alone, so a proposition another writer has deleted stays deleted. Embeddings are keyed on text, which a subtraction never changes, so the embedding cache needs no attention here.