-
Notifications
You must be signed in to change notification settings - Fork 242
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
[ add ] Algebra.Definitions.Integral
and its consequences
#2563
base: master
Are you sure you want to change the base?
Conversation
James, |
@mechvel you can download an archive at that commit here: https://github.com/agda/agda-stdlib/archive/3f6bdbb86b3c45f8eb1af8e9d042dac26893123f.zip I found this link by clicking the commit, pressing the "Browse files" button, and then looking in the green "Code" button drop down |
@mechvel Sergei, I chose to begin pushing to this PR before it was finished (so, properly, I should have marked it as |
James, please inform me when it appears a reasonable moment for me to download the library version (I hope I will be able to download the archive of the source). |
Taneb wrote
Thank you. I shall try this, after James signals that the commit is ready. |
@jamesmckinna asks
For But how do you derive I suspect now that it is possible to prove. But this is currently under question for me. |
|
||
noZeroDivisors⇒x≉0∧y≉0⇒xẏ≉0 : NoZeroDivisors _≈_ 0# _∙_ → | ||
x ≉ 0# → y ≉ 0# → (x ∙ y) ≉ 0# | ||
noZeroDivisors⇒x≉0∧y≉0⇒xẏ≉0 noZeroDivisors x≉0 y≉0 xy≈0 with noZeroDivisors xy≈0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't have time to fully try, but could this be
either x≉0 y≉0 (noZeroDivisors xy≈0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah!? Will investigate tomorrow...
... which function/property is either
in this context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other than the one item, this is looking nice to me.
James wrote
Is |
@JacquesCarette : thanks for the early review Also: your comments about |
@mechvel writes:
No, this is new to this v2.3-badged PR. |
I wrote about trying to derive Integral ==> LeftCancellative for Semiring. |
The definition of AlmostLeft(Right)Cancellative |
I'm not convinced these should directly be in |
NoZeroDivisors z _∙_ = ∀ {x y} → (x ∙ y) ≈ z → x ≈ z ⊎ y ≈ z | ||
|
||
Integral : A → A → Op₂ A → Set _ | ||
Integral 1# 0# _∙_ = 1# ≈ 0# ⊎ NoZeroDivisors 0# _∙_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming that 0#
and 1#
have their normal properties wrt multiplication, 1# ≈ 0#
implies all other equalities:
x = 1*x = 0*x = 0 = 0*y = 1*y = y
In particular, this means that it satisfies NoZeroDivisors 0#
anyway. So we don't need to special-case 1# ≈ 0#
I think Taneb is right.
Therefore
We cannot remove (I), because the classical definition requires Neither we need to remove (I) with changing (II) to It comes out that we have to Do I mistake? |
But I have lost the first archive that I uploaded to here. Can people find it on GitHub? |
Ai! What can I have been thinking/doing!? |
James writes
Today I fixed my Version 2 of proposal to the Version 3, which returns to the initial definition
of which I wrote above. |
Fixes #2554 . With thanks to @mechvel for discussion and his contributions on #2559 , from which this obviously diverges slightly.
TODO:
Algebra.Definitions.Integral
etc. and oneAlgebra.Consequences.Base
(Is)Semiring
etc. up to(Is)IntegralCommutativeRing
(Is)IntegralDomain
as the orthodox special case of(Is)IntegralCommutativeRing
satisfying1#≉0# : 1# ≉ 0#
, and henceNoZeroDivisors 0# _•_
outrightWON'T DO (from #2559 ):
NonZero
properties of a generalproduct
defined onIntegralSemiring.monoid
: this should be a downstream PR after the dust has settled on [ refactor ] AddData.Nat.ListAction
#2558 and [ refactor ] AddData.Bool.ListAction
#2561 , and once we can agree a strategy for replacing/augmentingAlgebra.Definitions.RawMonoid.sum
, with which such things overlap...Nat
etc. (but could be done, once we agree the overall shape of this PR)Issues: possible refactoring/deprecation opportunities
(Is)CancellativeCommutativeSemiring
in favour ofIntegral
versions?Trivial
better intoAlgebra.Definitions
so thatAlgebra.Definitions.Integral
can make use of itbreaking
rephraseAlgebra.Properties.Semiring.Primality
in terms ofTrivial
?Algebra.Consequences.*
? #2502 etc.Also:
Algebra.Structures
andAlgebra.Bundles
: have we got everything?