Add several is_known methods for characteristic and is_perfect#2270
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2270 +/- ##
==========================================
- Coverage 88.30% 88.22% -0.08%
==========================================
Files 126 126
Lines 31784 31798 +14
==========================================
- Hits 28068 28055 -13
- Misses 3716 3743 +27 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Since a large chunk of this is #2271, I am waiting for a rebase before looking at the changes here |
8203c9c to
bb7facd
Compare
|
I just rebased this on top of current master to exclude everything from #2271 |
| is_known(::typeof(characteristic), R::FreeAssociativeAlgebra) = is_known(characteristic, base_ring(R)) | ||
|
|
||
| is_finite(R::FreeAssociativeAlgebra) = is_trivial(base_ring(R)) || (nvars(R) == 0 && is_finite(base_ring(R))) | ||
| is_known(::typeof(is_finite), R::FreeAssociativeAlgebra) = is_known(is_trivial, base_ring(R)) || (nvars(R) == 0 && is_known(is_finite, base_ring(R))) |
There was a problem hiding this comment.
This (as well as all other isknown(::typeof(is_finite), ...) methods in this PR) are wrong.
If we know that the base ring is not trivial, we know nothing about the FreeAssAlgebra, but this is_known would return true.
| is_known(::typeof(is_finite), R::FreeAssociativeAlgebra) = is_known(is_trivial, base_ring(R)) || (nvars(R) == 0 && is_known(is_finite, base_ring(R))) | |
| is_known(::typeof(is_finite), R::FreeAssociativeAlgebra) = (is_known(is_trivial, base_ring(R)) && is_trivial(base_ring(R))) || (nvars(R) == 0 && is_known(is_finite, base_ring(R)) && is_finite(base_ring(R))) || (is_known(is_trivial, base_ring(R)) && !is_trivial(base_ring(R)) && (nvars(R) > 0 || (is_known(is_finite, base_ring(R)) && !is_finite(base_ring(R))))) |
(no guarantee of correctness, but I think this is more or less what one needs to do)
There was a problem hiding this comment.
You are of course right, argh! This is why I really prefer to have someone review my PRs. Thank you, very embarrassing.
Anyway, I have now removed the is_finite part of this PR, and will resubmit it separately, but it shouldn't hold up the other changes.
To fix things, I am contemplating introducing internal helpers is_known_to_be_trivial, is_known_to_be_nontrivial, is_known_to_be_finite, is_known_to_be_infinite or so (or maybe... is_known_to_be(is_finite, R), is_known_to_be(!is_finite, R), ... ????)
is_known methods for characteristic and is_perfect
Co-authored-by: Lars Göttgens <lars.goettgens@rwth-aachen.de>
Merge(moved to Mergecharacteristicdocstringscharacteristicdocstrings #2271)is_known(characteristic, ::NCRing)is_known(is_perfect, ::Field)Implementis_known(is_finite, ::NCRing)characteristic(R::ResidueField)methodExtracted from PR #1996