The CoqEAL / Trocq example suite #
Worked examples demonstrating the engine on the CoqEAL data-refinement patterns — a computational representation of a proof-oriented Mathlib object, related by a refinement across which statements, terms, and computations transfer.
This suite is a separate library (TransferCoqEAL) from the core engine
(Transfer), so its dependency on CompPoly
stays out of the core graph: a consumer of the engine does not build CompPoly. For
CompPoly's own documentation, see that repository's handbook and wiki.
Members:
ComputePolynomial— compute with Mathlib'sPolynomialthrough CompPoly's array-backedCPolynomialand itsRingEquiv(the Kaliszyk–O'Connor / CoqEAL "refinements for free" move).SeqPoly— CoqEALseqpoly: polynomials refined to coefficient lists.BinNat— CoqEALbinnat: binary naturals refined to unaryℕ.BinInt— CoqEALbinint: sign + magnitude refined toℤ.BinRat— CoqEALrational: numerator/denominator pairs refined toℚ.SeqMatrix— CoqEALseqmatrix: matrices refined to lists of lists (addition).SeqMatrixMul— theseqmatrixmultiplication refinement (row-column product).Strassen— Strassen's2×2block matrix multiply (7 multiplications).StrassenRec— the recursive Strassen multiply over⊕-doubled dimensions.Karatsuba— Karatsuba polynomial multiplication over CompPoly, refined to Mathlib'sPolynomial.KaratsubaRec— the fuel-recursive Karatsuba multiply.GaussPivotStep— one Gaussian-elimination pivot step, solution-set preserving.GaussSweep— the multi-row forward-elimination sweep.BareissDet— CoqEALbareiss: a fraction-free determinant certified againstMatrix.detat the base sizes.Rank— CoqEALrank: matrix rank certified againstMatrix.rank.ToomCook— CoqEALtoomcook: the evaluate–multiply–interpolate core.Multipoly— CoqEALmultipoly: multivariate polynomials as finite maps.
The Trocq examples (including summable) live in the sibling Examples/Trocq suite.
Frontier (documented, not ported) #
The following upstream members are larger developments — CoqEAL's research contribution — recorded here rather than ported:
- the general elimination algorithms behind
BareissDet/Rank(arbitrary size, certified againstMatrix.det/Matrix.rank) and the fullToomCookinterpolation; - normal-form theory (CoqEAL) — Smith, Jordan, Frobenius forms, the EDR hierarchy.
Trocq's setoid_rewrite (rewriting up to a registered relation) is already
exercised by param_cc in Examples/ExampleField.