The query-code closed embedding (issue #10, Unit 0a) #
The frozen named query encoding of the López–Escobar audit (D3, v2): a fixed embedding
queryEmbedding : RelQuery L ↪ ℕ and the induced code map
queryCode : StructureSpace L → (ℕ → Bool)
sending a structure code to its bit sequence along the embedding, false outside the
embedding's range. The four gates, plus the capstone:
queryCode_embedding— every query is recovered at its encoded coordinate;queryCode_of_notMem_range— coordinates outside the embedding's range arefalse;range_queryCode— range membership is the default condition, and the range is closed as an intersection of clopen coordinate conditions (isClosed_range_queryCode);queryCode_isClosedEmbedding— the capstone, via the continuous retractiondecodeCodeandFunction.LeftInverse.isClosedEmbedding.
This is the stop/go gate's first half; the analytic tree normal form (Unit 0b) builds the
cylinder tree in (ℕ → Bool) × (ℕ → ℕ) on top of it.
The frozen query embedding RelQuery L ↪ ℕ (audit D3, v2).
Equations
- FirstOrder.Language.queryEmbedding = { toFun := Encodable.encode, inj' := ⋯ }
Instances For
The query code of a structure code: the bit at coordinate n is the code's value at
the query encoded by n, and false when n encodes no query.
Equations
- FirstOrder.Language.queryCode c n = if h : ∃ (q : L.RelQuery), FirstOrder.Language.queryEmbedding q = n then c h.choose else false
Instances For
Gate 1: every query is recovered at its encoded coordinate.
Gate 2: coordinates outside the embedding's range are false.