-
Notifications
You must be signed in to change notification settings - Fork 113
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
import StraightLinePrograms package #125
Conversation
Otherwise, we were getting stuff like "11x" actually meaning "1*1*x", which is too confusing.
…list Similar to GAP's `IntegratedStraightLineProgram`.
I.e. we use evalutate to get the result of compose directly, instead of using a "lazy" Compose structure. There is currently no "lazy" mode for SLProgram and it's unclear whether such a mode is useful, so let's have a non-lazy mode for `Free` to keep 1-1 correspondence with SLProgram (better for tests among other things).
Codecov Report
@@ Coverage Diff @@
## master #125 +/- ##
=======================================
Coverage 28.01% 28.01%
=======================================
Files 18 18
Lines 2802 2802
=======================================
Hits 785 785
Misses 2017 2017
|
@fieker and me just discussed this, we really want it in Oscar.jl for now as we are using it there, and the purpose of merging this in was to gain the ability to make it easy to use, and easy to quickly iterate on the SLP code based on how Claus needs it to work. If we merge it into AA, we don't really gain much if anything. That said, as discussed yesterday this is not necessarily a permanent thing: since you used |
Many thanks - it is merged, the Oscar/GaloisGrp is fixed to
automatically use this.
Now, if you have "add Oscar@master" or "dev Oscar" you automatically
get the galois groups, ie.
galois_group(wildanger_field(3, 13)[1])
should work "out of the box" and return s.th. like
(Group([ (), (2,3), (1,2) ]), Galois Context for x^3-13*x^2+13*x-13 and
prime 1048583)
…On Wed, Jul 08, 2020 at 08:14:22AM -0700, Rafael Fourquet wrote:
As discussed with @fingolfin and @fieker, this is copied (via `git subtree`) from https://github.com/rfourquet/StraightLinePrograms.jl to ease development.
This copy might eventually become a proper subpackage (in the Julia 1.5 "subdir" meaning), which can be used independently of `Oscar`, and be registered.
Should this go in `AbstractAlgebra.jl` instead? (maybe @wbhart has a suggestion)
You can view, comment on, or merge this pull request online at:
#125
-- Commit Summary --
* add Project.toml
* add LazyPolyRing
* add Const <: RecPoly
* add Gen <: RecPoly
* add PlusPoly <: RecPoly
* add MinusPoly <: RecPoly
* add UniMinusPoly <: RecPoly
* add TimesPoly <: RecPoly
* add ExpPoly <: RecPoly
* add + for RecPoly
* add - for RecPoly
* add * for RecPoly
* add ^ for RecPoly
* add adhoc * for RecPoly
* add LazyPoly <: MPolyElem
* LazyPolyRing: add gen and call syntax on symbols
* LazyPolyRing: add call syntax on constants
* LazyPoly: add unary/binary ops
* re-indent to 4 spaces
* add SLPolyRing
* add SLPoly <: MPolyElem
* add (::SLPolyRing)()
* SLPoly: add copy
* add SL constants
* add pushconst!
* add pack
* add pushop!
* add instructions constants
* add unpack
* add SL.input
* add pushfinalize!
* add isinput
* add isunary & isquasiunary
* add pushinit!
* add evaluate! for SLPoly
* add 3-arg show for SLPoly
* add conversion SLPoly -> MPoly
* add conversion LazyPoly -> SLPoly
* SLPoly: add mutating ops (addeq! etc.)
* SLPoly: add unary/binary ops
* add conversion MPoly -> SLPoly
* add native compilation of SLP
* add evaluate(::SLPoly, v)
* import evaluate from AbstractAlgebra
* add README.md
* fix creation of SLPoly from single Const or Gen
* make (::SLPolyRing)() return a valid zero
* add 2-arg show for SLPoly
* add gen(::SLPolyRing, ::Integer)
* add gens(::SLPolyRing)
* add (::SLPolyRing)(constant)
* SLPoly: add adhoc ops
* add an explicit uniplus (== return) to SLP with empty lines
* fix display of constant SLPolys
* add explicit return (uniplus) only for trivial programs
* simple 3-arg show for trivial programs
* evaluate!(res, ::SLPoly, v): type-annotate results, way faster
* update README.md
* conversion MPoly -> SLPoly: add option to limit exponentiations
* fix bug in conversion MPoly -> SLPoly
* use more types: Line, Op, Arg
* fix conversion MPoly -> SLPoly for 0
* fix SLPoly printing (remove spurious "Arg(0x...)")
* SLPoly printing: align fields
* update README.md
* split RecPoly into recpolys.jl and remove `RingElement` from it
* simplify SLP representation: constants get a bit flag
* add show for Line, Op, Arg
* introduce basic SLProgram type
* move building blocks from SLPoly -> SLProgram
* move evalutate! (SLPoly) -> execute! (SLProgram)
* mv SLProgram, Line, Op, Arg into straightline.jl
* move compile! from SLPoly -> SLProgram
* move evaluate (SLPoly) -> execute (SLProgram)
* allow evaluate of SLPoly{T} with input S != T
* add SLProgram{T}() constructor
* rename RecPoly -> Lazy, PlusPoly -> Plus etc.
* Lazy: remove type parameter
* add basic show for SLProgram
* add SLProgram{T}(i::Integer) for trivial SLP returning i-th input
* add SLProgram(Const(c)) for trivial SLP returning c
* print constants when showing SLProgram
* add mutating ops for SLProgram
* add gens(::Lazy)
* add conversion Lazy -> SLProgram
* rename execute[!] -> evaluate[!]
* add evaluates(::SLProgram, xs)
* add ninputs(::SLProgram)
* Lazy: add adhoc - and +
* SLProgram mutating ops: allow mixing different types (via conversions)
* SLProgram: add copy / copy_oftype
* SLProgram: add *, -, +, ^
* add ==(::Lazy, ::Lazy)
* add convenience aslazy to convert SLProgram -> Lazy
* add `SLProgram(i::Integer) = SLProgram{Union{}}(i)` constructor
* copy SLPoly's show for SLProgram
* allow passing input symbols via SLPgens IOContext attribute
* SLPoly's show uses SLProgram's show
* add slpcst, slpgen, slpgens convenience functions
* rename uniplus -> assign
* add copy! for SLProgram
* SLProgram: move return info out of lines, into .ret field
* better and simpler showsimple
* SLProgram: add a .ptr field, to keep track of next store location
* remove not-ideal use of assign
* add full support for assign
* allocate upfront res vector with enough space
* SLProgram: rename .ptr -> .len and decrease by one
* enable multiple return from evaluate (was only in evaluates)
* factorize code into updatelen!
* add keep, to shrink the result array
* split runtest.jl file
* add GAPSLProgram basics
* GAPSLProgram: check return list only at the end
* GAPSLProgram: try conform constructors to SLPs in GAP
* GAPSLProgram: fix bug in validation in constructor
* GAPSLProgram: check for undef slots when ngens is passed
* add `SLProgram() = SLProgram{Bottom}()` constructor
* GAPSLProgram: add compile! for simple lines
* SLProgram: fix tiny bug in show
* GAPSLProgram: add compile! for assign lines
* GAPSLProgram: add compile! for return lines
* GAPSLProgram: test also with Lazy
* GAPSLProgram: add native evaluate[!]
* GAPSLProgram: add show
* add AtlasSLProgram for parsing Atlas SLPs
* AtlasSLProgram: merge :cj and :cjr commands
* SLProgram: support negative exponents
* GAPSLProgram: fix show for "assign" lines
* SLProgram: support assign doing a push!
* AtlasSLProgram: add show
* GAPSLProgram: support negative exponents in compile!
* Lazy: define trivially literal_pow
* AtlasSLProgram creation: fix bug with "pwr" command
* AtlasSLProgram: add evaluate
* AtlasSLProgram: add compilation -> GAPSLProgram
* SLProgram: add support for storing integers
* SLProgram show: use Any instead of Lazy for res
* SLProgram show: implement showarg in terms of retrieve
* SLProgram evaluate! : conv defaults to identity and is always called
* GAPSLDecision: add basic construction
* GAPSLProgram/Decision: more tolerant constructors
* GAPSLDecision: add evaluate!
* add AtlasSLDecision
* support "decisions" in SLProgram
* add compilation GAPSLDecision -> SLProgram
* add support for Lazy "decisions"
* show SLProgram: delete vestigial condition
* give SL decisions a dedicated SLProgram.ret code
* Arg: allow construction from Integer
* fix show for SLProgram with decisions
* GAPSLProgram: fix return value in show
* implement SLProgram(l::Lazy) where l is a decision
* add evaluate for Lazy
* rename a couple of files
* add .travis.yml file
* README: add build status badge
* showsimple: fix return value for decisions
* SLProgram: fix bug related to .int in _combine
* SLProgram: implement test and &
* add non-mutating compile methods, and allow giving destination type
* make SLProgram(::Lazy) into a compile method
* make AbstractSLProgram, and type ctor defaults to compile
* add Free SLPs (and demote Lazy as an SLP)
* add freegens(::Vector{Symbol})
* add compile(SLProgram, ::Free)
* SLProgram: add adhoc operations
* Free: support decisions
* add gens(::Type{SLProgram|Free}, ::Integer)
* SLProgram: add literal_pow for negative exponents
* SLProgram: fix show for negative exponents
* gens(::Type{Free}, n): return a Free array
* export: gens, evaluate, Free
* update README
* Atlas: support "echo" lines
* GAPSLProgram: fix bug with "unordered" outputs which were overwritten
* add ngens(::SLPolyRing)
* add nvars(::SLPolyRing)
* SLPolyRing: add show
* add SLPolyRing(::Ring, ::Vector{<:AbstractString}) ctor
* add SLPolyRing(::Ring, ::AbstractVector{<:AbstractChar}) ctor
* add PolynomialRing(::Ring, symbols) constructor
* SLPoly: don't show underlying SLP, just the (final) formula
* SLProgram: add permute_inputs!
* SLPoly: add ==
* add SLPoly^perm to permute generators
* add nsteps for SLProgram and SLPoly
* add (::SLPolyRing)(x::RingElement) constructor
* SLProgram: remove `conv` argument from evaluate[!]
* SLProgram evaluate: support `conv` as 3-rd arg to convert constants
* SLPoly: fix ambiguities with adhoc binary operators
* SLPoly: add 3rd arg to evaluate to convert constants
* SLPoly: evaluate: don't convert result using inputs array
* SLPolyRing: add zero & one
* SLPoly: add zero & one
* SLProgram: allow 0 as exponent
* enable evaluating MPoly with SLPoly inputs
* define (::SLPolyRing{T})(::SLPoly{T})
* ^(::SLPoly, perm) : support GAP's permutations available in Oscar
* show: use explicit '*' for multiplication
* SLProgram: create "list": "integrate" multiple SLPs and return their list
* Free: create "list": "integrate" multiple SLPs and return their list
* Free: add tests for lists
* Free: add compose
* SLProgram: add compose
* Free: compose: add "flatten-mode" to avoid getting a `Compose` object
* Free: add getindex
* SLProgram: add getindex
* add Free(x) ctor to create a constant equal to x
* Free: add adhoc getindex
* support getindex in Free->SLProgram compilation
* Free: getindex: support multi-indices
* Free: support indexing by integer array
* Free: support integer-indexing for lists
* SLProgram: support getindex(::SLProgram, ::Integer)
* add SLPolyRing(ring, n) ≡ SLPolyRing(ring, ["x1", ..., "x$n"])
* add SLPolyRing(r, :x => 1:3, :y => 2:4) etc.
* Add 'StraightLinePrograms/' from commit 'b59c059300aa5ba070fff9232ad653b96d5f6181'
* include `StraightLinePrograms` within Oscar
-- File Changes --
A StraightLinePrograms/.travis.yml (16)
A StraightLinePrograms/Project.toml (12)
A StraightLinePrograms/README.md (419)
A StraightLinePrograms/src/StraightLinePrograms.jl (28)
A StraightLinePrograms/src/atlas.jl (266)
A StraightLinePrograms/src/gap.jl (312)
A StraightLinePrograms/src/lazy.jl (582)
A StraightLinePrograms/src/lazypolys.jl (42)
A StraightLinePrograms/src/slpolys.jl (371)
A StraightLinePrograms/src/straightline.jl (839)
A StraightLinePrograms/test/atlas.jl (182)
A StraightLinePrograms/test/gap.jl (189)
A StraightLinePrograms/test/runtests.jl (4)
A StraightLinePrograms/test/setup.jl (12)
A StraightLinePrograms/test/straightline.jl (1056)
M examples/GaloisGrp.jl (2)
M src/Oscar.jl (2)
-- Patch Links --
https://github.com/oscar-system/Oscar.jl/pull/125.patch
https://github.com/oscar-system/Oscar.jl/pull/125.diff
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#125
|
As discussed with @fingolfin and @fieker, this is copied (via
git subtree
) from https://github.com/rfourquet/StraightLinePrograms.jl to ease development.This copy might eventually become a proper subpackage (in the Julia 1.5 "subdir" meaning), which can be used independently of
Oscar
, and be registered.Should this go in
AbstractAlgebra.jl
instead? (maybe @wbhart has a suggestion)