1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
* SPDX-License-Identifier: MIT
* Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved.
*/
//! The verdict carrier: a bounded lattice with complement — the output type of `Collection`
//! aggregation.
/// A **verdict**: a bounded lattice with complement (a Boolean algebra for `bool`; an MV-algebra
/// for the probability carrier, where `complement(p) = 1 − p`).
///
/// The aggregation output type is a `Verdict`: `All` folds `meet`, `Any` folds `join`, and `None`
/// is `Any` post-composed with `complement`. `bottom`/`top` are the lattice bounds (`false`/`true`
/// for `bool`).
///
/// # Laws
/// - bounded-lattice: `meet`/`join` are associative, commutative, absorptive; `bottom`/`top` are
/// the identities of `join`/`meet`.
/// - complement: involution `complement(complement(x)) == x` and (for the Boolean class) De Morgan.
/// The raw probability carrier on `[0, 1]` — the same MV-algebra as [`crate::Prob`]
/// (`meet = min`, `join = max`, `complement = 1 − p`; **not** Boolean: excluded middle fails).
/// Provided so that `f64`-valued collection aggregation satisfies the `Verdict` carrier bound
/// (`core.verdict.closure`); the caller is responsible for keeping values in `[0, 1]`, as with
/// `Prob`.
///
/// Carrier-class note: the trait admits exactly the lawful lattice classes — Boolean (`bool`),
/// MV (`Prob`/`f64`), and (planned, quantum) the orthomodular projection lattice. General
/// effects/operators (`0 ≤ E ≤ I`) form only an effect algebra with *partial* meet/join, so no
/// blanket tensor/operator instance is lawful (Stage-3 scope guard).