-
Notifications
You must be signed in to change notification settings - Fork 11
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededphase 1 - theoryPhase 1 of the roadmap, focusing on theory completenessPhase 1 of the roadmap, focusing on theory completeness
Description
Implement CommRing instance for CMvPolynomial
Summary
Implement the CommRing instance for CMvPolynomial, extending the CommSemiring structure with subtraction. This is currently blocked by circular dependency issues.
Context
Part of Phase 1: Foundation Completion (API completeness) as outlined in ROADMAP.md line 59. The CommSemiring instance is defined in MvPolyEquiv.lean, but we cannot import it due to circular dependencies.
What to Implement
instance {n : ℕ} {R : Type} [CommRing R] [BEq R] [LawfulBEq R] : CommRing (CMvPolynomial n R)
- Extends the
CommSemiringstructure with subtraction - Location:
CompPoly/Multivariate/CMvPolynomial.leanlines 253-277 - Currently all fields are
sorrydue to circular dependency
Dependencies
CommSemiringinstance (defined inMvPolyEquiv.lean, but circular dependency prevents import)NegandSuboperations (need to verify these exist inLawful.lean)- All ring axioms (associativity, distributivity, etc.)
Implementation Notes
- Circular Dependency Problem:
MvPolyEquiv.leanimportsCMvPolynomial.lean, so we cannot importMvPolyEquiv.leanto get theCommSemiringinstance - Potential Solutions:
- Move
CommSemiringinstance to a separate file that both can import - Duplicate the instance definition (not ideal)
- Restructure files to break the circular dependency
- Move
- Need to verify that
NegandSuboperations exist inLawful.lean - Most fields can likely be proven using existing operations, once the dependency is resolved
Fields to Implement
All fields currently have sorry:
add_assoc,zero_add,add_zeronsmul,nsmul_zero,nsmul_succadd_commleft_distrib,right_distribzero_mul,mul_zeromul_assoc,one_mul,mul_onenpow,npow_zero,npow_succzsmul,zsmul_zero',zsmul_succ',zsmul_neg'neg_add_cancelmul_comm
Related Issues
- Requires resolving circular dependency with
MvPolyEquiv.lean - May need to restructure file organization
Mathlib References
MvPolynomial.instCommRingMvPolynomial- Similar instance in Mathlib
Success Criteria
- Circular dependency is resolved
-
CommRinginstance is implemented and typechecks - All ring axioms are proven (no
sorrys) -
NegandSuboperations are verified to exist
Tags
phase-1api-completenessmultivariate-polynomialsring-structureblocked(circular dependency)architecture(may require file restructuring)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededphase 1 - theoryPhase 1 of the roadmap, focusing on theory completenessPhase 1 of the roadmap, focusing on theory completeness