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
//! Coinductive proofs and greatest fixed points — types.
/// A lazy, eventually-periodic stream.
///
/// The stream is defined by a finite `prefix` followed by an infinitely
/// repeating `cycle`. If `cycle` is empty, the stream is exactly `prefix`
/// (i.e. finite for practical purposes but the API treats it as an
/// infinite stream repeating the last element when both slices are exhausted,
/// which is handled in the accessor functions).
/// A set of state pairs representing a candidate bisimulation relation.
///
/// A `BisimulationRelation<S>` is *valid* if for every pair `(s, t)` in the
/// relation, every transition from `s` has a matching transition from `t`
/// (and vice-versa) such that the resulting states are again in the relation.
/// A completed coinductive proof certificate.
///
/// Contains the bisimulation relation that was found to be valid, plus a
/// trace of the progress steps made during the proof search.
/// A coalgebra map S → O × S represented as an explicit transition table.
///
/// Each entry `(src, obs, dst)` means: when in state `src`, emit observation
/// `obs` and move to state `dst`.
/// A Greibach Normal Form grammar used for coinductive context-free grammars.
///
/// Each rule `(lhs, terminal, rhs)` expands non-terminal `lhs` by consuming
/// terminal `terminal` and pushing `rhs` non-terminals onto the stack.
/// `Codata<F>` represents the greatest fixed point of the functor `F`.
///
/// Because Rust does not support infinite types directly, we model it as an
/// explicit thunk: call `unfold()` to expose one layer of the codata on demand.
/// A finite approximation of an infinite stream (one unrolled cons cell).
/// A finite approximation of a stream (either `Nil` or a `Cons`).