Expand description
Paraconsistent Eτ Evidential Logic & W3C VCs — plan §7.3 A7.
Extends the existing paraconsistent logic (paraconsistent.rs) with
evidential (μ, λ) packing and W3C Verifiable Credential artifact outputs.
§Evidential (μ, λ) packing
Per plan review note 1, evidential data is packed as two f16 values into the NQuin metadata modality payload area [0..31] (16 bits each = 32 bits), preserving the Lamport clock [32..60] and routing lane [61..62].
- μ (mu): evidential support — degree of positive evidence [0, 1].
- λ (lambda): evidential refutation — degree of negative evidence [0, 1].
- G (combined): paraconsistent truth value = μ - λ, in [-1, 1]. G ≥ 0.5 → route to quarantine (contradiction), G ≤ -0.5 → reject.
§Opcodes
Extends the paraconsistent opcode range (0x30-0x32 in paraconsistent.rs):
OP_EVIDENTIAL_PACK(0x33): pack (μ, λ) into a Quin’s metadata.OP_EVIDENTIAL_SCORE(0x34): compute G from a Quin’s packed (μ, λ).OP_EVIDENTIAL_VC(0x35): emit a W3C Verifiable Credential artifact containing the evidential claim.
§W3C VC integration
Evidential claims can be sealed into crypto::verifiable_credential::Credential
artifacts, providing tamper-evident attestation of evidential assessments.
Structs§
- Evidential
Claim - An evidential claim suitable for sealing into a W3C Verifiable Credential.
- Evidential
Pair - Evidential (μ, λ) pair — support and refutation degrees.
Enums§
- Evidential
Error - Evidential
Route - Route an evidential Quin based on its G score:
Constants§
- OP_
EVIDENTIAL_ PACK - Pack (μ, λ) evidential values into a Quin’s metadata.
- OP_
EVIDENTIAL_ SCORE - Compute the evidential score G from packed (μ, λ).
- OP_
EVIDENTIAL_ VC - Emit a W3C Verifiable Credential artifact for an evidential claim.
Functions§
- evidential_
saturation - Evidential saturation: the fraction of Quins that are contradictions
or in quarantine. Uses the existing
global_saturationfunction. - evidential_
score - Compute the evidential score G from a Quin’s packed (μ, λ).
- extract_
evidential - Extract the evidential (μ, λ) pair from a Quin’s metadata.
- f16_
to_ f32 - Convert a 16-bit half-precision float to f32.
- f32_
to_ f16 - Convert an f32 to a 16-bit half-precision float (IEEE 754 binary16). This is a pure-Rust implementation with no external dependency.
- is_
evidentially_ saturated - Check if evidential saturation exceeds a threshold.
- pack_
evidential - Pack (μ, λ) evidential values into a Quin’s metadata. The opcode is set in the predicate’s low byte.
- route_
evidential - Determine the routing for an evidential Quin.
- route_
evidential_ batch - Route a batch of evidential Quins into normal, quarantine, reject, and contradiction buckets. Returns counts for each.