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

README.md example is broken #1030

Closed
fingolfin opened this issue Jan 29, 2022 · 3 comments · Fixed by #1044
Closed

README.md example is broken #1030

fingolfin opened this issue Jan 29, 2022 · 3 comments · Fixed by #1044
Labels
bug Something isn't working

Comments

@fingolfin
Copy link
Member

I wanted to update the README.md example to match the current "reality". Unfortunately, it seems to have been broken by the modules changes by @AlexD97 and @jankoboehm (CC @fieker). I am now getting this:

julia> k, a = quadratic_field(-5)
(Imaginary quadratic field defined by x^2 + 5, sqrt(-5))

julia> zk = maximal_order(k)
Maximal order of Imaginary quadratic field defined by x^2 + 5
with basis nf_elem[1, sqrt(-5)]

julia> factorisations(zk(6))
2-element Vector{Fac{NfOrdElem}}:
 -1 * (sqrt(-5) + 1) * (sqrt(-5) - 1)
 -1 * 2 * -3

julia> Qx, x = PolynomialRing(QQ, [:x1,:x2])
(Multivariate Polynomial Ring in x1, x2 over Rational Field, fmpq_mpoly[x1, x2])

julia> R = grade(Qx, [1,2])[1]
Multivariate Polynomial Ring in x1, x2 over Rational Field graded by
  x1 -> [1]
  x2 -> [2]

julia> f = R(x[1]^2+x[2])
x1^2 + x2

julia> degree(f)
graded by [2]

julia> F = FreeModule(R, 1)
Free module of rank 1 over R

julia> s = sub(F, [f*F[1]])
(Submodule over R with 1 generator and no relations
, Module homomorphism with
Domain: Submodule over R with 1 generator and no relations

Codomain: F)

julia> H, mH = hom(s, quo(F, s))
ERROR: MethodError: no method matching quo(::AbstractAlgebra.Generic.FreeModule{MPolyElem_dec{fmpq, fmpq_mpoly}}, ::Tuple{AbstractAlgebra.Generic.Submodule{MPolyElem_dec{fmpq, fmpq_mpoly}}, AbstractAlgebra.Generic.ModuleHomomorphism{MPolyElem_dec{fmpq, fmpq_mpoly}}})
Closest candidates are:
  quo(::S, ::Hecke.AbsAlgAssIdl{S, T, U}) where {S, T, U} at ~/.julia/packages/Hecke/M7nVW/src/AlgAss/Ideal.jl:428
  quo(::AbstractAlgebra.FPModule{T}, ::AbstractAlgebra.FPModule{T}) where T<:RingElement at ~/.julia/packages/AbstractAlgebra/KPT2D/src/QuotientModule.jl:22
Stacktrace:
 [1] top-level scope
   @ REPL[11]:1

Perhaps PR #1021 helps ? I didn't try yet.

@fingolfin fingolfin added the bug Something isn't working label Jan 29, 2022
@thofma
Copy link
Collaborator

thofma commented Jan 29, 2022

It must be free_module instead of FreeModule. But it ultimately shows that we now have plenty of free module implementations with incompatible APIs.

@AlexD97
Copy link
Contributor

AlexD97 commented Jan 29, 2022

Yes, it must be free_module or FreeMod instead of FreeModule. #1021 doesn't help here. The problem is (as pointed out) that there are incompatible free module types.

@fingolfin fingolfin mentioned this issue Feb 1, 2022
6 tasks
@fingolfin fingolfin linked a pull request Feb 3, 2022 that will close this issue
@fingolfin
Copy link
Member Author

There is another problem, grading_group(H) fails (for details, see PR #1044)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants