Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor multivariate polynomials to map-of-maps #323

Open
echatav opened this issue Oct 30, 2024 · 0 comments
Open

Refactor multivariate polynomials to map-of-maps #323

echatav opened this issue Oct 30, 2024 · 0 comments
Assignees

Comments

@echatav
Copy link
Contributor

echatav commented Oct 30, 2024

This definition is demonstrated in #177 . A (multivariate) polynomial is a linear combination of (multivariate) monomials. (Ord var, Ring coeff) => Poly var Natural coeff is the free commutative algebra generated by var over coeff.

newtype Mono var pow = UnsafeMono {fromMono :: Map var pow}

newtype Combo var coef = UnsafeCombo {fromCombo :: Map var coef}

type Poly var pow = Combo (Mono var pow)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant