Repository navigation
Description
Background
Multi-step constructive-cryptography proofs chain exact constructions ๐ก โ[ฯ]โ ๐ฎ, approximate constructions ๐ก โ[ฯ; ฮต]โ ๐ฎ, and intermediate specification equalities ๐ก = ๐ก'. In ConstructiveCryptography.Tactics.Substitution, cc_calc already supports paper-style chains for substitution relations and statistical/quantitative bounds, whereas ConstructiveCryptography.Tactics.Categorical currently offers only cc_compose and cc_chain [hโ, hโ, ...], which do not display intermediate specifications, mix exact and approximate steps, interleave specification equalities, or normalize scalar budgets (0 + ฮต, ฮต + 0) and whiskered converter compositions.
Proposed change
Add cc_calc constructs in ConstructiveCryptography.Tactics.Categorical (alongside Constructs.toConstructsWithin, Constructs.serial_within, and ConstructsWithin.serial_exact in ConstructiveCryptography.CryptographicAlgebra.PseudoMetric) to assemble paper-style MR16 construction chains alternating:
- exact specification equalities
๐ก = ๐ก' := h - exact construction steps
๐ก โ[ฯ]โ ๐ฎ := h - approximate construction steps
๐ก โ[ฯ; ฮต]โ ๐ฎ := h(accepting eitherConstructsWithinorConstructsintoepsilonRelaxation ฮต ๐ฎ)
with _ reusing the preceding specification, automatic serial composition in attachment order (ฯโ โซ ฯโ for inner ฯโ followed by outer ฯโ), additive scalar budget assembly (ฮตโ + ฮตโ), structural normalization of converter compositions (Category.assoc, Category.id_comp, Category.comp_id, MonoidalCategory.comp_whiskerRight, whiskerLeft_comp, id_whiskerRight, whiskerLeft_id) and scalar budgets (add_assoc, zero_add, add_zero), and full-goal closure (never leaving partial open goals or sorry).
cc_calc constructs
๐กโ = ๐กโ' := hโ
_ โ[ฯโ]โ ๐กโ := hโ
_ โ[ฯโ; ฮต]โ ๐กโ := hโ
_ โ[ฯโ; ฮด]โ ๐กโ := hโAcceptance criteria
- Pure exact chains (
โ[ฯ]โand=) closeConstructsgoals in anyResourceTheory(without requiring a metric) and also close zero-errorConstructsWithin/epsilonRelaxation 0goals. - Pure approximate and mixed exact/approximate chains (
โ[ฯ]โ,โ[ฯ; ฮต]โ,=) close bothConstructsWithingoals andConstructsgoals targetingepsilonRelaxation, normalizing converter reassociations/whiskerings ((ฮบ โซ ฯ) โท P) and zero budgets (0 + ฮต,ฮต + 0) automatically. - Works seamlessly under CC custom notation (
โ[ฯ]โ,โ[ฯ; ฮต]โ,โข,โฅ,โ,โท,โโ,โซ) on both abstractCryptographicAlgebraand concreteInterface(including multi-stepActiveUserBankandIndifferentiabilitychains), and coexists unambiguously withcc_calc statistical/cc_calc quantitative/cc_calc mixed/cc_calc counted. - Negative tests confirm that missing steps, incomplete proofs (
sorry/by skip/_), mismatched intermediate specifications, approximate steps against an unrelaxed exact goal, and wrong final converters or budgets fail cleanly without leaving open goals.
Activity