Supporting results for pointwise provable equality.
Evaluation of arithmetic codes in an arbitrary model #
Every result in this module describes Semiformula.Evalb for the arithmetic
formula FFL.FirstOrder.Arithmetic.code c under an arbitrary assignment in an
arbitrary structure.
Two results assume a model of 𝐏𝐀⁻. eval_codeConst states the value of a
constant code, and needs that assumption already for the numeral cast
(m : M). eval_codeConst_iff characterises that value, and additionally
uses evaluator functionality (eval_unique, proved in
CategoricalRiceShapiro.ArithmeticCode.FoundationCompat, which also assumes
𝐏𝐀⁻). Every other evaluation result in this module assumes only
ORingStructure M.
The equivalences for the primitive constructors and for composition are the reusable core; the derived constructors and the congruence law under a composed-code context are proved from them.
Primitive constructors #
Composition #
Derived constructors #
Weakening and constants #
Bridges between a graph and a constant #
A code whose graph holds at the standard value m under the assignment
v has, at that same assignment, exactly the graph of the constant code m.
The hypothesis is one instance of the graph; functionality of evaluation turns it into the full equivalence.
Lifting a constant code past one argument is the constant code of the larger arity.
Graph agreement across arities and assignments #
Two codes have the same graph, each under its own assignment.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Projections agree when the selected assignment entries agree.
Zero codes have the same graph under any two assignments.
Successor-code construction preserves heterogeneous graph agreement.
Positive-test code construction preserves heterogeneous graph agreement.
Boolean-inverse code construction preserves heterogeneous graph agreement.
Addition-code construction preserves heterogeneous graph agreement.
Multiplication-code construction preserves heterogeneous graph agreement.
Equality-test code construction preserves heterogeneous graph agreement.
Order-test code construction preserves heterogeneous graph agreement.
Conjunction-code construction preserves heterogeneous graph agreement.
Disjunction-code construction preserves heterogeneous graph agreement.
A lift ignores its head, so the two heads need not agree.
One codes have the same graph under any two assignments.
Composition with a shared outer code.
Valuation-local congruence for the derived constructors #
Each lemma below fixes one assignment v and transports an equivalence of the
argument codes, quantified over the possible argument values, to an equivalence
of the constructed codes. No assignment other than v occurs, and no model
assumption beyond ORingStructure M is used. Composition is already covered
by eval_comp_congr.
An equivalence at v lifts to an equivalence at every assignment extending
v by one value.