Documentation

LeanPool.PointwiseComposition.CategoricalRiceShapiro.Evaluator.TableLookupEvaluation

Supporting results for pointwise provable equality.

Evaluation of the table-lookup code #

This module states two results with different assumptions and different content.

eval_codeTableLookup_query_congr assumes no more than ORingStructure M. The query argument of codeTableLookup occurs only inside the Cantor pair that indexes the table, and every constructor between that occurrence and the whole code has a valuation-local congruence law. Composing those laws replaces the query by an equivalent one. That statement is local in every respect: one assignment v, one changed argument, and an equivalence quantified only over the possible query values. The three remaining arguments are never evaluated there, and it computes no value of the lookup.

eval_codeTableLookup_exists_of_values assumes 𝐏𝐀 and does produce a value: from values for all four arguments it builds one for the whole lookup, through the two encoded-list reads and the two subtractions of the option offset. It asserts existence only. The value is not identified with a decoded table entry, and no list semantics is attached to an arbitrary element of the model.

Replacing the query code by one with the same graph at v does not change the graph of the lookup at v.

The table lookup has a value at any values of its four arguments.

The Cantor pair indexing the table is reached through the public cons existence theorem: codeListCons dk dq is codeSucc (codePair dk dq), so eliminating eval_codeSucc_iff hands back an evaluation of the pair itself without a separate pairing lemma. The two encoded-list reads then supply the optional row and the optional entry, and eval_codeSub removes each option offset. Only existence is asserted.