Sequent and AtomSet¶
pynmms.sequent.AtomSet
¶
Bases: Set[str]
Persistent set of atom names: a shared base plus small diffs.
Source code in src/pynmms/sequent.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | |
pynmms.sequent.Sequent
dataclass
¶
A proof node Γ ⇒ Δ with each side partitioned into atoms and complex sentences.
Source code in src/pynmms/sequent.py
from_strings(antecedent, consequent)
classmethod
¶
Parse each side once and partition it. Raises ValueError on a bad sentence.
Partitions are cached for the most recently seen side sets, so repeated queries against the same (large) antecedent object pay the O(|Γ|) parse only once.
Source code in src/pynmms/sequent.py
pynmms.sequent.TraceEntry
dataclass
¶
One structured line of a proof trace; formatted only when str() is called.
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
str
|
|
depth |
int
|
Proof depth of the node (used for indentation). |
sequent |
Sequent | None
|
The node's sequent ( |
rule |
str | None
|
Rule label such as |
principal |
Sentence | None
|
The principal sentence a rule was applied to. |