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

Free module does not correctly check domains #34380

Closed
tscrim opened this issue Aug 17, 2022 · 7 comments
Closed

Free module does not correctly check domains #34380

tscrim opened this issue Aug 17, 2022 · 7 comments

Comments

@tscrim
Copy link
Collaborator

tscrim commented Aug 17, 2022

Consider

sage: R.<x,y> = QQ[]
sage: I = R.ideal([x^2 - y^2 - 1])
sage: Q = R.quo(I)
sage: Q.is_integral_domain()
True

However

sage: Q2 = FreeModule(Q, 2)
sage: Q2.__class__.__mro__
(<class 'sage.modules.free_module.FreeModule_ambient_with_category'>,
 <class 'sage.modules.free_module.FreeModule_ambient'>,
 <class 'sage.modules.free_module.FreeModule_generic'>,
 <class 'sage.modules.free_module.Module_free_ambient'>,
 <class 'sage.modules.module.Module'>,
 ...

does not know it is a module over a domain. Contrast this with

sage: R2 = FreeModule(R, 2)
sage: R2.__class__.__mro__
(<class 'sage.modules.free_module.FreeModule_ambient_domain_with_category'>,
 <class 'sage.modules.free_module.FreeModule_ambient_domain'>,
 <class 'sage.modules.free_module.FreeModule_generic_domain'>,
 <class 'sage.modules.free_module.FreeModule_ambient'>,
 <class 'sage.modules.free_module.FreeModule_generic'>,
 <class 'sage.modules.free_module.Module_free_ambient'>,
 <class 'sage.modules.module.Module'>,
 ...

The issue is because the try-except block encapsulates too many things:

sage: Q.is_field()
...
NotImplementedError:

causes it to bail out too early. We need to test more things.

CC: @kwankyu @videlec @simonbrandhorst @yyyyx4

Component: linear algebra

Author: Travis Scrimshaw

Branch/Commit: bb5e329

Reviewer: Kwankyu Lee

Issue created by migration from https://trac.sagemath.org/ticket/34380

@tscrim tscrim added this to the sage-9.7 milestone Aug 17, 2022
@tscrim
Copy link
Collaborator Author

tscrim commented Aug 17, 2022

comment:1

cc-ing some people who might be interested.


New commits:

bb5e329Refine the try-except block in FreeModuleFactoy to run subsequent tests as they might work even if one of the earlier ones fail.

@tscrim
Copy link
Collaborator Author

tscrim commented Aug 17, 2022

Commit: bb5e329

@tscrim
Copy link
Collaborator Author

tscrim commented Aug 17, 2022

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 17, 2022

Reviewer: Kwankyu Lee

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 17, 2022

comment:2

Looks good to me. Set positive review when all badges are green.

@tscrim
Copy link
Collaborator Author

tscrim commented Aug 19, 2022

comment:4

Thank you.

@vbraun
Copy link
Member

vbraun commented Aug 30, 2022

Changed branch from public/linear_algebra/refined_free_module_check-34380 to bb5e329

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants