[sage-devel] Re: Finite dimensional algebra generated by matrices

2022-06-09 Thread 'Travis Scrimshaw' via sage-devel
One thing you could consider doing is adding an option for the input of the 
finite dimensional algebra code to take the generators as input and then 
use that to generate a basis and feed that back into the finite dimensional 
algebra. I am sure I have written code to compute a basis from a generating 
set in at least one form somewhere in Sage. It seems like this code needs 
to be factored out to be used for purposes like this.

Best,
Travis


On Thursday, May 26, 2022 at 4:12:41 PM UTC+9 Yingdong Li wrote:

> Dear all,
>
> I have put my code in GitHub(with some explanation of it) so that you can 
> clearly see it. 
>
> Here's a link of my code in GitHub(see the code called "Finite generated 
> algebra as a ring")
> Dongulas/Dongulas: Config files for my GitHub profile. 
> 
>
> Best wishes,
> Li Yingdong
>
> 在2022年5月17日星期二 UTC+8 21:37:06 写道:
>
>> Dear Travis,
>>
>> Thanks for your advice! The finite dimensional algebra code in Sage need 
>> a multiplication table, so the second part of our code is used to find the 
>> multiplication table with the basis of the algebra. And the first part of 
>> our code is used to find the basis with the generators of the algebra(along 
>> with a ideal of the polynomial ring). Our aim is to find the ring structure 
>> of the algebra generated by a list of commuting matrices.
>>
>> Best wishes,
>> Li Yingdong
>>
>> 在2022年5月15日星期日 UTC+8 11:16:24 写道:
>>
>>> I would advise against having it as an external package if you plan to 
>>> integrate it into Sage. It further fragments the code and makes it more 
>>> likely to bitrot from what I have seen. I would instead create a ticket and 
>>> upload the code to that.
>>>
>>> Is this a finite dimensional commutative algebra? We already have finite 
>>> dimensional algebras (with no assumptions, e.g., associativity) in Sage. 
>>> How does your code compare with this code? Could they be combined?
>>>
>>> Best,
>>> Travis
>>>
>>>
>>> On Thursday, May 12, 2022 at 9:55:55 PM UTC+9 davida...@gmail.com wrote:
>>>
 Hello,

 Most of the SageMath developpment is explained in this guide:

   https://doc.sagemath.org/html/en/developer/index.html

 Also, I don't know exactly what is the scale of your code, but I would 
 advise you to first upload your code to Github (if it isn't already done) 
 as an external package. Github is very convenient for sharing code, so it 
 would be easier to share it with the community. Next, I think to 
 contribute 
 to SageMath it is better to start with small contribution. For example, 
 review some tickets or fix some bugs. Then, it becomes easier to 
 contribute 
 to bigger projects. 

 Anyway, welcome to the community and good job on your research project!

 David Ayotte

 Le jeudi 12 mai 2022 à 05:45:53 UTC-4, Yingdong Li a écrit :

> Dear all,
>
> I have written some codes in Sage to compute the finite-dimensional 
> algebra by a list of commuting matrices and I want to contribute it to 
> Sage. Here is the idea of my codes.
>
> 1. We can construct the algebra as a quotient of a polynomial ring(by 
> using the homomorphism which sends each x_i to t_i, where t_1,...,t_n is 
> the n matrices generate the algebra), we can also get the basis by doing 
> this.
>
> 2. With the basis of the algebra, we can also compute the 
> multiplication table then use the finite-dimensional algebra command in 
> Sage to get a description to this algebra.
>
> Once we have done with these things above, we can get the ring 
> structure of the algebra. This is very useful in dealing with some 
> problems 
> about modular forms since we can further study the prime ideals or 
> maximal 
> ideals of Hecke algebra by using its ring structure.
>
> I'm an undergraduate student and this is part of my research project. 
> I was wondering how I can contribute the codes to Sage. Could anyone give 
> me some help me with this(since I'm not so familiar about the Sage trac 
> and 
> I'm not sure where I can share my codes)? Thanks in advance!
>
> Moreover, if you have some questions or comments on this, we can 
> discuss about it here.
>
> Best wishes,
> Li Yingdong
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/d16609cd-facb-4cf6-b2fb-fdaafda313cbn%40googlegroups.com.


[sage-devel] Installing from Cygwin: make cannot find setuptools, deletes /usr/bin/env.exe

2022-06-09 Thread Jonas Bertels


*After reinstalling Cygwin and Sage 3 times, I consistently get the 
following issue:(I'm following 
: https://github.com/sagemath/sage/tree/master Readme)*
Jonas@LAPTOP-GV22BQAP ~/sage/sage-9.6
$ make

make build/make/Makefile --stop
make[1]: Entering directory '/home/jonascyg/sage/sage-9.6'
make[1]: 'build/make/Makefile' is up to date.
make[1]: Leaving directory '/home/jonascyg/sage/sage-9.6'
build/bin/sage-logger \
"cd build/make && ./install 'base-toolchain'" logs/install.log
make[1]: Entering directory '/home/jonascyg/sage/sage-9.6/build/make'
make[1]: Leaving directory '/home/jonascyg/sage/sage-9.6/build/make'
*** ALL ENVIRONMENT VARIABLES BEFORE BUILD: ***
!::=::\
ALLUSERSPROFILE=C:\ProgramData


*...*


***
make[2]: Entering directory '/home/jonascyg/sage/sage-9.6/build/make'
make --no-print-directory 
/home/jonascyg/sage/sage-9.6/local/var/lib/sage/installed/.dummy
make[3]: '/home/jonascyg/sage/sage-9.6/local/var/lib/sage/installed/.dummy' 
is up to date.
make --no-print-directory 
/home/jonascyg/sage/sage-9.6/local/var/lib/sage/installed/.dummy
make[3]: '/home/jonascyg/sage/sage-9.6/local/var/lib/sage/installed/.dummy' 
is up to date.
make --no-print-directory 
/home/jonascyg/sage/sage-9.6/local/var/lib/sage/installed/.dummy
make[3]: '/home/jonascyg/sage/sage-9.6/local/var/lib/sage/installed/.dummy' 
is up to date.
make --no-print-directory 
/home/jonascyg/sage/sage-9.6/local/var/lib/sage/installed/.dummy
make[3]: '/home/jonascyg/sage/sage-9.6/local/var/lib/sage/installed/.dummy' 
is up to date.
make --no-print-directory all-sage-docs all-sage
/usr/bin/python3 /home/jonascyg/sage/sage-9.6/build/bin/sage-venv 
"/home/jonascyg/sage/sage-9.6/local/var/lib/sage/venv-python3.9"
make --no-print-directory setuptools-SAGE_VENV-no-deps
[setuptools-59.8.0] Using cached file 
/home/jonascyg/sage/sage-9.6/upstream/setuptools-59.8.0.tar.gz
[setuptools-59.8.0] setuptools-59.8.0
[setuptools-59.8.0] 
[setuptools-59.8.0] Setting up build directory for setuptools-59.8.0
[setuptools-59.8.0] Finished extraction
[setuptools-59.8.0] No patch files found in ../patches
[setuptools-59.8.0] 
[setuptools-59.8.0] Host system:
[setuptools-59.8.0] CYGWIN_NT-10.0-19044 LAPTOP-GV22BQAP 3.3.5-341.x86_64 
2022-05-13 12:27 UTC x86_64 Cygwin
[setuptools-59.8.0] 
[setuptools-59.8.0] C compiler: gcc
[setuptools-59.8.0] C compiler version:
[setuptools-59.8.0] Using built-in specs.
[setuptools-59.8.0] COLLECT_GCC=gcc
[setuptools-59.8.0] 
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/11/lto-wrapper.exe
[setuptools-59.8.0] Target: x86_64-pc-cygwin
[setuptools-59.8.0] Configured with: 
/mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-11.3.0/configure 
--srcdir=/mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-11.3.0 --prefix=/usr 
--exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc 
--docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C 
--build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin 
--without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib 
--with-gcc-major-version-only --enable-shared --enable-shared-libgcc 
--enable-static --enable-version-specific-runtime-libs --enable-bootstrap 
--enable-__cxa_atexit --with-dwarf2 --with-tune=generic 
--enable-languages=c,c++,fortran,lto,objc,obj-c++,jit --enable-graphite 
--enable-threads=posix --enable-libatomic --enable-libgomp 
--enable-libquadmath --enable-libquadmath-support --disable-libssp 
--enable-libada --disable-symvers --with-gnu-ld --with-gnu-as 
--with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix 
--without-libintl-prefix --with-system-zlib --enable-linker-build-id 
--with-default-libstdcxx-abi=gcc4-compatible 
--enable-libstdcxx-filesystem-ts
[setuptools-59.8.0] Thread model: posix
[setuptools-59.8.0] Supported LTO compression algorithms: zlib zstd
[setuptools-59.8.0] gcc version 11.3.0 (GCC)
[setuptools-59.8.0] 
[setuptools-59.8.0] Package 'setuptools' is currently not installed
[setuptools-59.8.0] No legacy uninstaller found for 'setuptools'; nothing 
to do
make[1]: Leaving directory '/home/jonascyg/sage/sage-9.6'



*Additionally, the make process seems to mess with cygwin, and deletes 
/usr/bin/env.exe, so that when I run make again:*

Jonas@LAPTOP-GV22BQAP ~/sage/sage-9.6
$ make
make build/make/Makefile --stop
make[1]: Entering directory '/home/jonascyg/sage/sage-9.6'
make[1]: 'build/make/Makefile' is up to date.
make[1]: Leaving directory '/home/jonascyg/sage/sage-9.6'
build/bin/sage-logger \
"cd build/make && ./install 'base-toolchain'" logs/install.log
/bin/sh: build/bin/sage-logger: /usr/bin/env: bad interpreter: No such file 
or directory
make: *** [Makefile:39: base-toolchain] Error 126

*(Text in bold was added by me)*



-- 
You received thi

Re: [sage-devel] Question about factories, representations and multiple classes

2022-06-09 Thread 'Travis Scrimshaw' via sage-devel


> > The __classcall_private__() mechanism works well for this kind of 
> dispatching 
> > with lots of examples within Sage for this. 
>
> Agreed, and this is fairly standard. However, I am still skeptical about 
> the 
> fact this mechanism prevents deep copies... This limits the user's 
> abilities. 
>
> I have no idea what you mean by that. I feel like you are confusing that 
with UniqueRepresentation, which is a completely different concept 
(although they are typically paired together since we want to normalize the 
input). You can have a __classcall_*_() without being a 
UniqueRepresentation. You might also want to think about why you need to 
make (deep) copies.

Best,
Travis

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/423429c0-7ca6-4e08-b3a2-b68414722f67n%40googlegroups.com.