[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"N9CmIwYhqK":3},"# Transfer — relational proof transfer in Lean\n\nTransfer is a Lean 4 + Mathlib library for reasoning up to a registered relation.\nA user declares once how an abstract value relates to a concrete representation of\nit. The library then synthesizes witnesses of that relation, transfers statements\nand terms across it, and decides it structurally by congruence. Every step\nproduces a kernel-checked proof term.\n\nThe design follows **Trocq**'s modular parametricity: its lattice of relation\nstrengths and its combinators. It also draws on relational congruence closure, on\nfunctorial type casts and description-based deriving from **AdapTT**, on\nheterogeneous congruence (the set-level form of cubical `hcongr`), and on data\nrefinement from **CoqEAL**. It builds on Lean's relational automation: `grind`,\n`gcongr`, `simp`/`norm_cast`, type classes, `conv`, `aesop` and `mvcgen`. The\nlibrary adds the witness synthesis, the transfer tactics, and one\ncoordinating tactic, `param_auto`, that dispatches to all of these surfaces.\n\nThe library is used in compiler verification, to relate emitted low-level code to\nits algebraic specification, and in program verification, to transfer `mvcgen` /\n`Std.Do` triples and to reason about code extracted from Rust by hax up to its\nrepresentation.\n\nUsed by: the [CatCrypt verified compiler](https://github.com/spitters/catcrypt-compiler),\nwhere transfer is one of three correctness techniques beside the compiler's descent\nand ascent ([CORRECTNESS.md](https://github.com/spitters/catcrypt-compiler/blob/master/CORRECTNESS.md)).\n\nSingle entry point: `import Transfer`. The example suites are the separate library\n`TransferExamples` (`import Transfer.Examples`). Released under **LGPL-3.0** (see\n`LICENSE`).\n\n## Documentation\n\n- **[Manual](https://spitters.github.io/ParamTransfer/)** — concepts, tactics, and worked examples\n- **[API reference](https://spitters.github.io/ParamTransfer/api/)** — per-declaration signatures and docstrings, no proof bodies\n\nCI publishes both from `main` to GitHub Pages. To build them locally, see the\nmanual and API-reference subsections under [Building](#building).\n\nThe Lean code blocks in this README are verbatim excerpts of\n[`Transfer/Examples/Readme.lean`](Transfer/Examples/Readme.lean), which compiles\nthem against the library.\n\n## Building\n\nSee [BUILDING.md](BUILDING.md) for the full instructions: the library, use as a\ndependency, the manual, and the API reference. The short form:\n\n```sh\nlake exe cache get            # fetch prebuilt Mathlib oleans — run this FIRST\nLEAN_NUM_THREADS=6 lake build Transfer\n```\n\n## One relation, three uses\n\nThe library operates on a single object: a **relation `R`** between a value and a\nrepresentation of it. The relation takes one of two forms: `Related enc a b`\n(`enc a = b`, the encoding view) or, graded, `Param (m n) A B` (relation + maps).\nIt is registered once through attributes (`@[param]`, `@[transfer]`,\n`RelatedBinOp` instances, `deriving Param`). Three operations then act on it.\n\n**1 — Build `R a b` (synthesis).** Type-class resolution finds or composes a\nwitness. `HasParam`/`Related` instance search composes registered witnesses\nthrough the structure of a term, as Trocq's Elpi search does in Coq.\n\n```lean\nexample (a b c : F) : Related (id : F → F) (a * b + c) (bbFieldAdd (bbFieldMul a b) c) :=\n  inferInstance        -- composed from the registered RelatedBinOp squares\n```\n\n**2 — Transfer a goal along `R` (parametricity).** `param_transfer` moves a\n`∀`-statement to the other representation, and `#transfer` emits the `⟦·⟧`\ntranslation of a term.\n\n```lean\n-- ℤ ↠ ZMod p: an integer fact transfers to its modular image.\nexample (p : ℕ) [NeZero p] :\n    (∀ i : ℤ, (Int.cast i : ZMod p) + 0 = (Int.cast i : ZMod p)) →\n      (∀ x : ZMod p, x + 0 = x) := by\n  param_transfer\n  intro i x (hix : (Int.cast i : ZMod p) = x) h\n  rw [← hix]; exact h\n\n#transfer (fun x : Nat => Nat.succ x * x)   -- ⟦·⟧ : the term + its relatedness proof\n```\n\n**3 — Decide `R a b` structurally (congruence).** Relational congruence closure\nrelates two structurally similar terms.\n\n```lean\nexample (a b c : F) : a * b + c = bbFieldAdd (bbFieldMul a b) c := by param_solve\n```\n\nIn these examples `F` is `ZMod p` for the prime `p = 2^31 - 2^27 + 1`, and\n`bbFieldMul`/`bbFieldAdd` are two operations (`Transfer/Examples/ExampleField.lean`)\nregistered as realizations of `*` and `+` (`Transfer/Base/Related.lean`).\n\n## The unifying inference rule\n\nAll three uses run on one inference rule:\n\n> **related arguments give related applications** — from `R aᵢ bᵢ` infer\n> `R (f a…) (g b…)`  (`R_arrow` / `R_forall`).\n\nThe same rule appears in four places:\n\n* as the **application/λ rule** of the parametricity translation (use 2),\n* as the **congruence step** of the closure tactics (use 3),\n* as **AdapTT's functoriality** of type formers, which lets `R` compose through\n  `→`, `×`, and inductive types,\n* and as **heterogeneous congruence**: the general `R_forall` relates outputs of\n  *different* fiber types across a representation change (`hcongr_hetero`,\n  `HCongrConnection`).\n\nEach use bottoms out in existing Lean machinery. Type classes discharge synthesis,\n`grind` discharges the equational congruence-closure core, and\n`simp`/`norm_cast`/`gcongr`/`conv`/`aesop`/`mvcgen` are native surfaces the\nlibrary connects to.\n\nThe library has two axes. The vertical axis is transfer *across* representations\n(parametricity). The horizontal axis is congruence *within* a representation. The\nfunctoriality rule above connects them.\n\n## The coordinating tactic — `param_auto`\n\n`param_auto` dispatches to every surface above, so one call site closes goals in\n*different* relations. It routes each goal to the tactic that closes it\n(`param_solve`, `rcongr`, `norm_cast`, `gcongr`, `grind`):\n\n```lean\nexample (a : Nat) : a + 0 = a := by param_auto                    -- Eq\nexample (a b : Nat) (h : a ≤ b) : a + 1 ≤ b + 1 := by param_auto  -- ≤, via gcongr\nexample (a b : Nat) :                                             -- cast graph, via norm_cast\n    ((a + b : Nat) : Int) = (a : Int) + b := by param_auto\nexample (a b c : F) :                                             -- registered rep. change, via rcongr\n    a * b + c = bbFieldAdd (bbFieldMul a b) c := by param_auto\n```\n\nThe dispatch strategy can be reordered or made goal-directed without changing any\nproof that calls `param_auto`. The specialized tactics below remain available for\na proof that names one strategy.\n\n## The relation, graded\n\nA relation carries more or less structure, and a transfer uses only as much as\nthe goal requires. `Param (m n) A B` grades this:\n\n| What `R` carries | Use it for |\n|---|---|\n| a bare relation | relate values that share no maps |\n| a forward map (a **cast** `A → B`) | push a value/computation to its representation |\n| a backward **decoder** (`B → A`) | a **retraction** — pull a representation back (e.g. `ℤ ↠ ZMod p`) |\n| both, coherent | an **equivalence** (e.g. `ℕ ↔ binary`) |\n\nA relation is registered at the strength that can be proved. The level solver\n(`ParamInfer`) then picks the *minimum* strength a given goal needs and weakens\ndown the lattice (`ParamWeaken`, `auto_weaken`). Worked examples: `ParamRetraction`\n(`ℤ↠ZMod p` / `ℕ↠ZMod p`), `ParamCryptoExamples` (ℕ↔binary, `Num↦ℕ`), and\n`ExampleField`, a registered-operation demo with the identity encoding. The\ncross-type field retraction `BitVec 64 ↠ ZMod p` is in `MachineLimbField`.\n\n## Composition & derivation (functoriality)\n\nTransfer composes and extends through three mechanisms:\n\n* **The relation `R` composes.** `Param_trans` glues `A↔B` and `B↔C` into `A↔C`.\n* **Casts compose and preserve identity.** `cast_trans` is AdapTT's `AdaptComp`\n  (`cast (R∘S) = cast S ∘ cast R`) and `cast_id` is `AdaptId`; the combinators\n  distribute over composition (`ParamCoherence`). These theorems certify the\n  functor laws. In Lean the composite's forward map is function composition, so\n  the laws hold by `rfl`, and composition through nested type formers needs no\n  further proof. AdapTT obtains the same laws from a definitional cast calculus.\n  The laws are cited explicitly where a proof builds a chain of casts by hand.\n  The dependent formers extend the non-dependent `→`/`×`/`List` laws:\n  `paramForall` (Π) and `paramSigma` (Σ, `sigma_cast_eq` = `Adapt Σ = Σ Adapt`)\n  carry the same functoriality to dependent types.\n* **Inductive `R` is derived.** `deriving Param` reads an inductive's constructor\n  signature (AdapTT's `IndDesc`) and generates its constructor-wise relation and a\n  full `Param` instance. It rejects mixed-variance inductives (AdapTT's\n  Non-example). It covers records, enums, and uniform-recursive\n  (`List`/`Tree`-shape) types.\n\n```lean\ninductive Pair (A B : Type) | mk : A → B → Pair A B\n  deriving Param\n```\n\n## The congruence layer\n\nFour tactics act on one relation with two strategies and their union (full\nreference: [`TACTICS.md`](TACTICS.md)):\n\n| Tactic | Strategy | Closes |\n|---|---|---|\n| `rcongr` / `hgcongr` | top-down **descent** | a registered cross-head op-tree, leaving per-argument relatedness subgoals |\n| `param_cc` | bottom-up **closure** (via `grind`) | transitivity / context-hypothesis chains |\n| `param_solve` | **descent + closure-leaf** | the union of the above — the default |\n| `param_guard` | **descent through guarded squares** | op-trees whose squares hold only under a side condition; open guards are returned as goals |\n\n### Guarded squares\n\nA square that holds only on a range is registered with its guard, a proposition\non the abstract operands (`Base/RelatedOn.lean`): the class\n`RelatedBinOpOn enc P op bop` has the single field\n`comm : ∀ x y, P x y → enc (op x y) = bop (enc x) (enc y)`, with `P` an `outParam`.\n`RelatedUnOpOn enc P op uop` and `RelatedRelOn enc P r br`\n(`P x y → (r x y ↔ br (enc x) (enc y))`) are the unary and relation forms. Every\ntotal `RelatedBinOp`/`RelatedUnOp` is a guarded square with guard `True`\n(`RelatedBinOp.toOn`), and `BinOpHomOn.toRelatedBinOpOn` converts a\n`ReprTransfer.BinOpHomOn`. The guard of a node is stated on that node's\noperands, so the guards of a composite are ordinary side conditions:\n\n```lean\n-- truncated `ℕ` subtraction and shift against wrapping 64-bit words\nexample (a b s : ℕ) (ha : a \u003C 2 ^ 64) (hb : b ≤ a) (hs : s \u003C 64) :\n    enc64 ((a - b) >>> s) = (enc64 a - enc64 b) >>> enc64 s := by\n  param_guard          -- guards `b ≤ a` and `a - b \u003C 2 ^ 64 ∧ s \u003C 64`, closed by omega\n```\n\n`param_guard` discharges each guard with `transfer_guard_disch`\n(`first | trivial | assumption | omega | bv_omega | decide`, extensible by\n`macro_rules`) or with `param_guard (disch := tac)`, and returns the guards it\ncannot close as goals. When a subterm has no square, the error names that subterm\nand its head pair. `param_solve` also descends through guarded squares, with the\ndefault discharger. Examples: `Examples/GuardedSquares.lean`.\n\nA function whose argument and result have different encodings is related to its\nmodel by a carrier-changing square (`Base/RelatedFun.lean`):\n`RelatedFun encA encB f g` states `encB (f a) = g (encA a)`, and `RelatedFun2`,\n`RelatedFun3` are the forms with two and three arguments, each argument with its\nown encoding; `RelatedFunOn`, `RelatedFun2On` and `RelatedFun3On` are the guarded\nforms. The module also registers data squares for `Option`, `Prod`, `Except`,\nlists and `if`-`then`-`else`. Their rules are alternatives of\n`transfer_guard_leaf`, so `param_guard` descends through them. `param_guard` also\nsplits an equation whose left-hand side is a constructor application into the\nequations of its fields, by constructor congruence or by structure eta, and\ndescends into each.\n\n`hgcongr` is the **heterogeneous generalization of `gcongr`**. It is\nattribute-driven (`@[hgcongr]`) and keyed on a *pair* of heads, so it relates\n*different* head functions `f ≠ g`, a case `gcongr` rejects by construction.\n`HGCongr.lean` carries the upstream `Mathlib.Tactic.GCongr.Core` patch that would\nadd this to `gcongr`.\n\n## Plugging into Lean\n\nThe library reuses native Lean machinery. Transfer is only as sound as the\n*registered* witnesses, so a missing witness remains a **visible residual goal**.\nFor the same reason the `aesop` rule set is opt-in: it never searches for a square\non its own.\n\n| Mechanism | Role |\n|---|---|\n| **type classes** | the synthesis engine (`HasParam`/`Related` resolution) |\n| **`grind`** | the equational congruence-closure backend for `param_cc` (foundation squares dual-tagged `@[grind =]`) |\n| **`gcongr`** | homogeneous congruence; `hgcongr` is its cross-head generalization |\n| **`simp` / `norm_cast`** | the closed-equation fast path; a `@[norm_cast]` move-lemma *is* a transfer witness over the cast graph (`ParamNormCast`) |\n| **`conv`** | focused sub-term transfer (`transferConv`) |\n| **`aesop`** | an opt-in `Transfer` rule set bundling the transfer rules |\n| **`Std.Do` / `mvcgen`** | Hoare-triple transfer via the Kleisli relation `RComp` (`ParamTripleTransfer`); `rcomp` (folded into `param_transfer`) assembles the witness |\n| **coercions** | a `Coe`/`CoeTC` derived from a forward map (`ParamCoe`) |\n\n`RComp Rα c c'` is the Kleisli lift of a value relation `Rα` to monadic\ncomputations: for every pair of postconditions related pointwise by `Rα`, the\nweakest precondition of `c` entails that of `c'`. `RCompOk` is its\nsuccess-restricted variant: each value that `c` returns without an exception has\nan `Rα`-related partner among the results of `c'` (`ParamRCompOk`, tactic\n`rcomp_ok`). Both are instances of `Param`, and both compose (`ParamRCompParam`).\n\n## Quick start\n\nA file that uses the library starts with\n\n```lean\nimport Transfer\nopen Transfer Transfer.Param Transfer.ExampleField\n```\n\nand can then register witnesses, transfer statements, derive relations, and close\ngoals by congruence:\n\n```lean\n-- register a witness\ndef double (n : ℕ) : ℕ := 2 * n\n@[param] theorem doubleR : RArrow Eq Eq double double := fun _ _ h => congrArg double h\n\n-- transfer a ∀-statement across ℤ ↠ ZMod p (domain relation auto-resolved)\nexample (p : ℕ) [NeZero p] :\n    (∀ i : ℤ, (Int.cast i : ZMod p) + 0 = (Int.cast i : ZMod p)) →\n      (∀ x : ZMod p, x + 0 = x) := by\n  param_transfer\n  intro i x (hix : (Int.cast i : ZMod p) = x) h\n  rw [← hix]; exact h\n\n-- derive the relation for a data type\ninductive Pair (A B : Type) | mk : A → B → Pair A B deriving Param\n\n-- close a representation-change equation by congruence\nexample (a b c : F) : a * b + c = bbFieldAdd (bbFieldMul a b) c := by param_solve\n```\n\nFull per-tactic / per-attribute reference: [`TACTICS.md`](TACTICS.md).\n\n## File map (reference)\n\nThe source under `Transfer/` is organized into concept subdirectories. The root\n`Transfer.lean` is the single entry point.\n\n**`Base/`** — the `Related`/`RelatedBinOp` substrate and the class-hierarchy,\nlevel and tactic substrate the engine reuses.\n\n| Module | Content |\n|---|---|\n| `Core` | the `repr` registry and the `repr_transfer` tactic |\n| `FieldRegistry` | the Baby Bear field kernels as registered operations |\n| `Hierarchy` | the relation hierarchy as classes |\n| `HigherOrderTransfer` | binder / higher-order / `∀` transfer as lemmas |\n| `LevelRefusal` | the univalence-free refusal guard |\n| `Levels` | relatedness levels: the three-point view of the Trocq lattice |\n| `Related` | `Related`: transfer by instance resolution |\n| `RelatedAt` | level-annotated relatedness |\n| `RelatedFun` | carrier-changing function squares `RelatedFun`, `RelatedFun2`, `RelatedFun3` and their guarded forms |\n| `TransferInduction` | transported induction, the equiv-level combinator |\n| `TransferLevel` | the level-aware `transfer!` elaborator |\n| `TransferTactic` | the `transfer` tactic (automatic binder translation) |\n| `UnivalenceStatus` | univalence in Lean 4 and the relation between universes |\n\n**`Hierarchy/`**\n\n| Module | Content |\n|---|---|\n| `ParamEquiv` | the equivalence bridge and `Param` weakening |\n| `ParamHierarchy` | the `Param` relation hierarchy |\n| `ParamLevel` | the level lattice and the minimal-`(m,n)` solver core |\n| `ParamWeaken` | the `⊑`-driven `Param` weakening (level navigation) |\n\n**`Combinators/`**\n\n| Module | Content |\n|---|---|\n| `ParamArray` | the `Array` container rule and relational `foldl` transfer |\n| `ParamArrow` | the arrow (`app` / function) parametricity rule |\n| `ParamCoherence` | the coherence-law suite (functor laws) |\n| `ParamData` | the data-type (`×` / `Option` / `List`) parametricity rules |\n| `ParamForall` | the dependent-Π (`∀`) parametricity rule; `mapHas_forall` and `paramForallAt` give it at every output level, with the inputs the tables `forallReq` and `forallFiberReq` compute, none of which asks for `map4` |\n| `ParamSigma` | the dependent-pair (`Σ`) parametricity rule |\n| `ParamTrans` | relation composition (`Param_trans`) |\n\n**`Synthesis/`**\n\n| Module | Content |\n|---|---|\n| `ParamInfer` | variable-level minimal-class inference |\n| `ParamInferMeta` | level inference over `Expr` |\n| `ParamResolve` | the upward level search (`param_resolve`) |\n| `ParamSynth` | the `Param`-witness synthesizer |\n| `ParamSynthExt` | the multi-level `Param`-witness synthesizer |\n\n**`Translate/`**\n\n| Module | Content |\n|---|---|\n| `ParamDB` | the persistent `@[param]` constant database |\n| `ParamTranslate` | the term-level `⟦·⟧` synthesizer (the parametricity translation) |\n| `ParamTranslateFull` | the integrated term-level translator `⟦·⟧` |\n| `ParamTranslateOp` | the operator/arity rule for the term-level translator |\n| `ParamTranslateTy` | the binder type-translation rule (change of representation) |\n\n**`Statements/`**\n\n| Module | Content |\n|---|---|\n| `ParamForallNested` | dependent-Π transfer for nested `∀`-statements |\n| `ParamTransfer` | `∀`-transfer through the `Param` engine (`Map1_forall`) |\n| `ParamTransferTac` | `param_transfer`, end-to-end `∀`-transfer |\n\n**`Congruence/`**\n\n| Module | Content |\n|---|---|\n| `GCongrProbe` | whether `@[gcongr]` accepts cross-head realization lemmas |\n| `HCongrConnection` | a set-level analogue of cubical heterogeneous congruence (`hcongr`) |\n| `HGCongr` | `hgcongr`: heterogeneous (cross-head) generalized congruence |\n| `HGCongrInit` | the `hgcongr` engine: head-pair-keyed database, attribute, and tactic |\n| `ParamAuto` | `param_auto`: one coordinator over every congruence surface |\n| `ParamCompose` | `param_compose`: descend-and-dispatch congruence |\n| `ParamCongrClosure` | `param_cc`: relational congruence closure over `Related` |\n| `ParamSolve` | `param_solve`: the common generalization of `rcongr` and `param_cc` |\n| `ParamGuard` | `param_guard`: descent through guarded squares, open guards returned as goals |\n| `RCongr` | `rcongr`: relational (cross-head) congruence descent |\n\n**`Deriving/`**\n\n| Module | Content |\n|---|---|\n| `ParamCongr` | `derive_param_congr`: a constructor-congruence `Related` deriver |\n| `ParamDerive` | hand-ported `Param` lifts and the specification of the `@[derive Param]` handler |\n| `ParamDeriveHandler` | the description-based `@[derive Param]` handler |\n\n**`Integrations/`**\n\n| Module | Content |\n|---|---|\n| `AesopIntegration` | the `Transfer` aesop rule set |\n| `AesopRuleSet` | the declaration module of the `Transfer` aesop rule set |\n| `GrindIntegration` | `grind` as a transfer leaf discharger |\n| `ParamAutoWeaken` | auto-weakening of witnesses and a unified transfer entry |\n| `ParamCoe` | the coercion integration (`Param` witness → `Coe`) |\n| `ParamConv` | `conv`-mode transfer |\n| `ParamForIn` | `forIn` / `do`-loop transfer: `foldlR` meets `RComp` |\n| `ParamNormCast` | `norm_cast` move-lemmas as `Param` relatedness witnesses |\n| `ParamRComp` | `rcomp`: structural assembly of an `RComp` witness |\n| `ParamRCompOk` | `RCompOk`: the success-restricted Kleisli relation |\n| `ParamRCompParam` | `RComp`/`RCompOk` as instances of `Param`, and their composition |\n| `ParamRelatedBridge` | one witness, both engines: `RelatedBinOp` ⇒ `RArrow` |\n| `ParamTripleTransfer` | transferring a Hoare/`wp` triple through a `Param` relation; defines the Kleisli relation `RComp` |\n\n**`Examples/`**\n\n| Module | Content |\n|---|---|\n| `EffectfulTransfer` | an effectful transfer across a value-type change, proved by `mvcgen` |\n| `ExampleField` | a self-contained example field for the engine demos |\n| `IsogenyBoundedProbe` | BLS12-381 hash-to-curve isogeny identity: bounded per-coefficient probe |\n| `MachineLimbField` | machine limbs ↔ prime field: a non-diagonal heterogeneous dependent example |\n| `ParamCryptoDomains` | the Baby Bear field as a first-class transfer domain |\n| `ParamCryptoExamples` | cryptographic representation examples: coherence laws and `deriving Param` |\n| `ParamRetraction` | the `ℤ ↠ ZMod p` retraction transfer domain (non-diagonal) |\n| `PeanoBinNat` | the `peano_bin_nat` example, first-order slice |\n| `RCompOkExamples` | `RCompOk` over a two-outcome test monad |\n| `Readme` | the examples of this README |\n| `StrongExamples` | congruence that the native tactics cannot do |\n| `Trocq` | the Trocq example suite (index) |\n| `Trocq/Summable` | Trocq `summable`: summability transfers across an equivalence |\n\n*Hex suite*: worked refinements on the carriers of `leanprover/hex`.\n\n| Module | Content |\n|---|---|\n| `HexArrayCompute` | `hex`'s `Array`-backed storage: carrier-agnostic refinement and verified compute |\n| `HexDecide` | discharging a `hex` side condition by computation on the concrete representation |\n| `HexEffectful` | transferring a `hex` elimination step across dense storage, effectfully |\n| `HexMatrixCorrespondence` | `hex`-style dense-storage ↔ Mathlib correspondence, generated by the engine |\n| `HexSeqPoly` | `hex`'s dense polynomial storage: a non-injective refinement at `map2a` |\n\n*ZMod suite*: deciding modular identities by bounded computation.\n\n| Module | Content |\n|---|---|\n| `ZModDecide` | `decide_zmod`: ground ring identities over `ZMod m` by bounded residue computation |\n| `ZModPolyDecide` | `decide_zmod_poly`: univariate polynomial identities over `ZMod m` |\n| `ZModPowMod` | `powMod`: binary modular exponentiation for kernel-`decide` modular arithmetic |\n\n*CoqEAL suite*: the library `TransferCoqEAL`, rooted at `Transfer.Examples.CoqEAL`,\nwhich depends on CompPoly.\n\n| Module | Content |\n|---|---|\n| `CoqEAL` | the CoqEAL / Trocq example suite (index) |\n| `CoqEAL/BareissDet` | CoqEAL `bareiss`: a fraction-free determinant certified against `Matrix.det` |\n| `CoqEAL/BinInt` | CoqEAL `binint`: sign + magnitude refines `ℤ` |\n| `CoqEAL/BinNat` | CoqEAL `binnat`: `List Bool` refines the natural numbers |\n| `CoqEAL/BinRat` | CoqEAL `rational`/`binrat`: num/den pairs refine `ℚ` |\n| `CoqEAL/ComputePolynomial` | computing with Mathlib's `Polynomial` through a CompPoly refinement |\n| `CoqEAL/GaussPivotStep` | Gaussian elimination: single forward-elimination pivot step |\n| `CoqEAL/GaussSweep` | Gaussian elimination: multi-row forward sweep |\n| `CoqEAL/Karatsuba` | CoqEAL Karatsuba polynomial multiplication |\n| `CoqEAL/KaratsubaRec` | recursive Karatsuba on `CPolynomial R` |\n| `CoqEAL/Multipoly` | CoqEAL `multipoly`: multivariate polynomials as finite maps |\n| `CoqEAL/Rank` | CoqEAL `rank`: matrix rank certified against `Matrix.rank` |\n| `CoqEAL/SeqMatrix` | CoqEAL `seqmatrix`: `List (List R)` refines the entry function |\n| `CoqEAL/SeqMatrixMul` | CoqEAL `seqmatrix` multiplication: `List (List R)` row-column product |\n| `CoqEAL/SeqPoly` | CoqEAL `seqpoly`: `List R` refines the coefficient function |\n| `CoqEAL/Strassen` | Strassen one-level 2×2 block multiplication identity |\n| `CoqEAL/StrassenRec` | recursive (fuel-driven) Strassen block multiplication |\n| `CoqEAL/ToomCook` | CoqEAL `toomcook`: the evaluate–multiply–interpolate core |\n\n**Top-level modules and libraries**\n\n| Module | Content |\n|---|---|\n| `Transfer` | the single entry point |\n| `Transfer/Audit` | axiom ledger: a build-time hygiene check (`lake build Transfer.Audit`) |\n| `ReprTransfer` (library) | representation transfer for emit-realization bridges |\n| `ReprTransferExpr` (library) | compositional transfer via the abstraction theorem |\n\n## Provenance\n\nThe library builds on the work credited in [`ATTRIBUTION.md`](ATTRIBUTION.md):\n**Trocq** (Cohen–Crance–Mahboubi), whose parametricity lattice and combinators the\nengine's core adapts; **AdapTT** (functorial casts and description-based\nderiving); **CoqEAL** (data refinement); the **cubical congruence** of\nGjørup–Spitters; and **Lean 4 / Mathlib**.\n",1795981097854]