[codex] Add finite product quotient layer#14
Conversation
Review Summary by QodoAdd finite product quotient layer for pairwise, multi-target, and ranking targets
WalkthroughsDescription• Add generic FiniteProductQuotient.lean module with product quotient maps - Defines productMap for two independent quotient maps - Proves product fiber invariance and factorization theorems - Handles fixed-left/fixed-right specializations • Implement product sample consistency and finite falsifiers - Same product-code label disagreements falsify product quotient rules - Componentwise multi-target signatures via product pairing • Add comparison observations and score-induced ranking - ComparisonObs structure for left item with two right items - rankByScore induces ranking comparisons from pairwise scores • Refactor FinitePairQuotient.lean to wrap generic product API - Changes pairQuotient from definition to abbreviation using productMap - Simplifies proofs by delegating to product layer theorems • Update documentation, verification checks, and theorem maps - Extends paper, proof spine, RAG guide, reviewer brief, and theorem map - Adds 37 new theorem checks to verification surface Diagramflowchart LR
A["productMap<br/>Q₁ Q₂"] --> B["ProductFiberInvariant<br/>same codes same target"]
B --> C["ruleFactorsThrough<br/>product"]
C --> D["ProductSampleConsistent<br/>finite falsifiers"]
A --> E["ComparisonObs<br/>left + two right"]
E --> F["rankByScore<br/>score-induced ordering"]
F --> G["ruleFactorsThrough<br/>comparison"]
C --> H["pairQuotient<br/>retrieval wrapper"]
I["FinitePairQuotient.lean"] --> H
H --> J["pairRuleFactorsThrough<br/>same_on_quotient_fibers"]
File Changes1. OrdvecFormalization/FiniteProductQuotient.lean
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new module, FiniteProductQuotient.lean, which formalizes generic product quotients, ranking, and comparison quotients in Lean 4. It refactors FinitePairQuotient.lean to act as a wrapper around this new generic API and updates the associated documentation and verification files. The reviewer feedback focuses on making the Lean 4 code more idiomatic and concise, specifically suggesting the reuse of the standard Prod.map function for productMap and simplifying the proofs of productMap_eq_iff and comparisonMap_eq_iff using the simplifier.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Addressed the Gemini review suggestions in
Local validation on the stacked workspace:
Inline review threads are resolved. |
Summary
FiniteProductQuotient.leanwith generic product maps, product fiber invariance, image/surjective factorization converses, fixed-left/fixed-right specialization, product sample consistency/falsifiers, finite product rule counts, multi-target component theorems, and score-induced comparison/ranking factorizationFinitePairQuotient.leanto wrap the generic product API while preserving the retrieval-facing pair namesValidation
make buildmake verifymake check-doc-namesmake auditmake lintgit diff --checklatexmk -pdf -interaction=nonstopmode -halt-on-error ordvec_formalization_paper.tex