Cutting out one clause of an encoded formula #
Reading the j-th clause of an encoded formula is the same two-bit scan that
counts the clauses, with two additions: a target index to compare against, and a
buffer that collects tokens while the count matches.
The state is pair (pair target count) (pair collected unread).
Main definitions #
Complexity.segStep— one two-bit step of the extractionComplexity.segFrom— the tokens of one segment
Main results #
Complexity.segStep_mem_FP— the extraction is polynomial timeComplexity.segAtFn_mem_FP,Complexity.segAtFn_eq— the packaged extractionComplexity.litSegFn_eq— thep-th literal of thej-th clauseComplexity.litVarFn_eq,Complexity.litSignFn_eq— its variable and sign
The tokens of the segment with index t, having already passed c
separators, where the separator is the token s0 s1.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.segFrom s0 s1 t c x✝ = []
Instances For
The target index carried by the state.
Equations
Instances For
The number of separators already passed.
Equations
Instances For
The tokens collected so far.
Equations
Instances For
The unread suffix.
Equations
Instances For
Is this token the separator?
Equations
- Complexity.segIsSep s0 s1 z = Complexity.andBit (Complexity.matchBit s0 (Complexity.segRest z)) (Complexity.matchBit s1 (Complexity.dropOne (Complexity.segRest z)))
Instances For
Are we inside the segment we want?
Equations
Instances For
What the scan collects #
The scan as one function #
Down to a literal #
The variable a literal names, in unary.
Equations
Instances For
The sign a literal carries, as a flag.