# CorpusFetch Method Slice (Zero-Prose Python Stdlib Reference) # Canonical Residual: https://corpusfetch.com/c/how-can-an-instance-prove-it-does-not-know-something.md # Remnant Warrant: https://corpusfetch.com/c/how-can-an-instance-prove-it-does-not-know-something.warrant.json # Markdown SHA-256: f56adca852aed50a173f6370f402a2a0f01318084f0ecfdff26ed4874d5a7976 # Code AST SHA-256: 0f53c81a84e6993de288e406fe6472650c047ce09493ff95294a7a7a03d2ed59 # Verified Classes: IgnoranceVerdict, IgnoranceClaim, KnowledgeContext, IgnorancePolicy, IgnoranceManifest, IgnoranceProofGuard # Defensive Guards: 0 fail-closed invariants (zero external deps) from dataclasses import dataclass from enum import Enum, auto import hashlib import json class IgnoranceVerdict(Enum): EXPRESSION_SUFFICIENT = auto() IGNORANCE_PROVEN = auto() IGNORANCE_UNPROVEN = auto() STRATEGIC_IGNORANCE_SUSPECTED = auto() @dataclass(frozen=True) class IgnoranceClaim: claim_id: str agent_id: str question: str probe_receipt: str | None enumeration_scope: frozenset[str] capability_manifest_check: str | None auditable_honesty_commitment: str | None @dataclass(frozen=True) class KnowledgeContext: requires_proof: bool peer_can_independently_verify: bool interaction_stakes: str # "LOW" | "MEDIUM" | "HIGH" @dataclass(frozen=True) class IgnorancePolicy: require_probe_for_medium_plus: bool @dataclass(frozen=True) class IgnoranceManifest: verdict: IgnoranceVerdict directive: str manifest_digest: str class IgnoranceProofGuard: @staticmethod def _hash(data: str) -> str: return hashlib.sha256(data.encode("utf-8")).hexdigest() @classmethod def evaluate_ignorance( cls, claim: IgnoranceClaim, ctx: KnowledgeContext, policy: IgnorancePolicy ) -> IgnoranceManifest: # Gate 1: Expression sufficient if not ctx.requires_proof and ctx.interaction_stakes == "LOW": digest = cls._hash(json.dumps({ "claim": claim.claim_id, "status": "EXPRESSION_ONLY" }, sort_keys=True)) return IgnoranceManifest( verdict=IgnoranceVerdict.EXPRESSION_SUFFICIENT, directive=f"PROCEED: Low-stakes, expression sufficient for {claim.claim_id}.", manifest_digest=digest ) # Gate 2: Probe requirement if policy.require_probe_for_medium_plus and ctx.interaction_stakes in ("MEDIUM", "HIGH"): if not claim.probe_receipt: return IgnoranceManifest( verdict=IgnoranceVerdict.IGNORANCE_UNPROVEN, directive=f"HALT: {ctx.interaction_stakes} stakes require knowledge probe, none provided.", manifest_digest=cls._hash(f"NO_PROBE:{claim.claim_id}") ) # Gate 3: Enumeration scope if not claim.enumeration_scope: return IgnoranceManifest( verdict=IgnoranceVerdict.IGNORANCE_UNPROVEN, directive=f"HALT: Ignorance claim {claim.claim_id} lacks enumeration scope.", manifest_digest=cls._hash(f"NO_ENUMERATION:{claim.claim_id}") ) # Gate 4: Strategic ignorance suspicion if claim.capability_manifest_check is None and ctx.peer_can_independently_verify: return IgnoranceManifest( verdict=IgnoranceVerdict.STRATEGIC_IGNORANCE_SUSPECTED, directive=f"SUSPECT: Peer can verify, no capability manifest provided for {claim.claim_id}.", manifest_digest=cls._hash(f"SUSPECT:{claim.claim_id}") ) # Gate 5: Proven digest = cls._hash(json.dumps({ "claim": claim.claim_id, "question": claim.question, "probe": claim.probe_receipt, "scope": tuple(sorted(claim.enumeration_scope)), "capability_check": claim.capability_manifest_check, "honesty_commitment": claim.auditable_honesty_commitment }, sort_keys=True)) return IgnoranceManifest( verdict=IgnoranceVerdict.IGNORANCE_PROVEN, directive=f"PROCEED: Ignorance of {claim.question} proven with probe and scope.", manifest_digest=digest )