[ refactor ] (Re)define (Is)TightApartness and (Is)HeytingCommutativeRing/(Is)HeytingField#2588
[ refactor ] (Re)define (Is)TightApartness and (Is)HeytingCommutativeRing/(Is)HeytingField#2588jamesmckinna wants to merge 38 commits into
(Is)TightApartness and (Is)HeytingCommutativeRing/(Is)HeytingField#2588Conversation
MatthewDaggitt
left a comment
There was a problem hiding this comment.
Otherwise, code-wise it looks good. Can't comment on the mathematics 😄
| significantly faster. However, its reduction behaviour on open terms may have | ||
| changed. | ||
|
|
||
| * The definitions of `Algebra.Structures.IsHeyting*` and |
There was a problem hiding this comment.
I know this is a draft, but in the final version it would be good to explain broadly what the refactorings actually are here?
There was a problem hiding this comment.
See latest commits, hopefully enough, but not too much, detail now!
There was a problem hiding this comment.
I've now added more detail here since your most recent round of review, asking, as I understood it, for the CHANGELOG to better account for what's going on here.
… re-exported by `Algebra.Properties.Ring`
|
I think this is now ready for review! Many thanks to @MatthewDaggitt for the pre-review, hopefully the latest round of (many!) commits have put things on a more sound footing. As in updated preamble above:
|
JacquesCarette
left a comment
There was a problem hiding this comment.
Spent a lot of time reviewing this... and no comment to speak of. I did spot several proofs that I'd want to change, but I should add some reasoning combinators first that would show how these embody repeated patterns.
Hopefully the discussion on #2587 clarifies this? |
|
@jamesmckinna needs yet another merge. @MatthewDaggitt this is then going to be waiting on you. |
|
Thanks @JacquesCarette will look at this this evening. Battling insomnia and some slightly more urgent stuff. DONE. |
|
So... I did finally consult Troelstra and van Dalen (Vol.2, which is a bit harder to get hold of, and is also 2x length of Vol. 1...), and their chapter on 'Algebra' has this kind of thing largely based on a KNAW article by Heyting from 1941 which I have yet to read... ... nevertheless they draw attention to the need for additional axioms governing the relationship between Rationale: we're already making a breaking change as to the definitions of |
|
Candidate
All of the above, except the last perhaps, are downstream considerations, so stopping here. UPDATED: spoke too soon. Need to fix axiomatisation, and prove the extra pieces for UPDATED: extra |
Co-authored-by: jamesmckinna <31931406+jamesmckinna@users.noreply.github.com>
|
Last call for @MatthewDaggitt to (re-)review!? I think the substance of your criticism revolved round adequately accounting for (the intent behind) this refactoring in the I'd be happy to clear this off the docket before another round of merge conflicts torpedo it... |
MatthewDaggitt
left a comment
There was a problem hiding this comment.
Other than that, looks good.
| private variable | ||
| x y z : Carrier | ||
|
|
||
| invertibleˡ⇒# : LeftInvertible _≈_ 1# _*_ (x - y) → x # y |
There was a problem hiding this comment.
We seemed to have removed a lot of definitions from this file without either re-exporting them from elsewhere, deprecating them or documenting it in the CHANGELOG? Maybe I'm missing something though...
There was a problem hiding this comment.
OK, thanks for this.
I think I had (at least!) two/three/four problems:
- needing to move code from
HeytingCommutativeRingtoHeytingField(specifically, the invertibility properties you highlight) but without renaming/deprecation, because not wanting to invent 'bogus' new names for the sake of standardising things apart (or: dependency cycles!? they can't be re-exported fromHFieldtoHCRing...); this is a 'bug' in the original definitions, so, or so I thought, needing 'fixing' by putting things in the 'right' place... - changing certain other definitions (specifically
Tightas a property of anApartnessRelation) to better account for the original intention behind the(Is)Heyting*definitions - adding the 'official' Heyting-like properties of the algebra operations being suitably 'congruential' wrt apartness, by positive phrasing the analogues of the contrapositives of
Congruent(cf.Cancellableetc.) - how best to account for these things in the
CHANGELOG.
I clearly need to do better as to the last point, so I'll have another go at fleshing out what's what here...
Fixes #2587
Adds:
Algebra.Apartness.Properties.HeytingField, supersedingAlgebra.Apartness.Properties.HeytingCommutativeRingNB:
Algebra.Properties.Ring(or evenAlgebra.Properties.AbelianGroup...) DONE properties moved; module NOT deprecatedData.Rational.Unnormalised.Propertiesshould be refactored to make use ofRelation.Binary.Properties.DecSetoidfor its(Is)*ApartnessRelationdefinitions DONEIssue:
bugfix of the various APIs involved?) or v3.0 (as a largebreakingchange?)Apartnessvs.TightApartness, etc. but that the fundamental distinction should be between*CommutativeRingand*Field(and yes: perhapsHeytingLocalRingwould have been better, but see also DefineLocalRing#2219 ) in that the latter should have inverses, while the former need not. The existing APIs make the distinction turn on whether the apartness is tight or not, which seems 'wrong'... even to the point of being abug?RFC from @cspollard and @bsaul ...