Skip to content
New issue

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

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

Already on GitHub? # to your account

add number_of_generators for UniversalPolyRing #1795

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/src/univpolynomial.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,14 @@ Universal Polynomial Ring over Integers
julia> x = gen(S, "x")
x

julia> number_of_generators(S)
1

julia> y, z = gens(S, ["y", "z"])
(y, z)

julia> number_of_generators(S)
3
```

## Universal polynomial functionality
Expand Down
2 changes: 2 additions & 0 deletions src/generic/UnivPoly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

number_of_variables(S::UniversalPolyRing) = length(S.S)

number_of_generators(S::UniversalPolyRing) = length(S.S)

Check warning on line 39 in src/generic/UnivPoly.jl

View check run for this annotation

Codecov / codecov/patch

src/generic/UnivPoly.jl#L39

Added line #L39 was not covered by tests

symbols(S::UniversalPolyRing) = S.S

function vars(p::UnivPoly{T}) where {T}
Expand Down
Loading