Skip to main content

Module evidential_etau

Module evidential_etau 

Source
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§

EvidentialClaim
An evidential claim suitable for sealing into a W3C Verifiable Credential.
EvidentialPair
Evidential (μ, λ) pair — support and refutation degrees.

Enums§

EvidentialError
EvidentialRoute
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_saturation function.
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.