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

Functional vector module #1945

Draft
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

guilhermehas
Copy link
Contributor

Added structures and bundles about functional vectors and modules.

Copy link
Member

@Taneb Taneb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this addition. There's a lot of algebraic structures that you could define but don't, especially:

  • IsCommutativeMagma
  • IsCommutativeSemigroup
  • IsGroup
  • IsAbelianGroup
  • IsPrerightSemimodule
  • IsRightSemimodule
  • IsBisemimodule
  • IsRightModule
  • IsBimodule
  • IsModule

And with element-wise multiplication:

  • IsNearSemiring
  • IsSemiringWithoutOne
  • IsCommutativeSemiringWithoutOne
  • IsSemiringWithoutAnnihilatingZero
  • IsSemiring
  • IsCommutativeSemiring
  • IsRingWithoutOne
  • IsRing
  • IsCommutativeRing

Plus the corresponding bundles.

@guilhermehas
Copy link
Contributor Author

I added all of them.

@guilhermehas guilhermehas requested a review from Taneb April 18, 2023 22:05
@@ -3027,3 +3027,113 @@ This is a full list of proofs that have changed form to use irrelevant instance
```agda
<-weakInduction-startingFrom : P i → (∀ j → P (inject₁ j) → P (suc j)) → ∀ {j} → j ≥ i → P j
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In these cases we typically only mention we have added entirely new modules rather than listing their content.
Cf. https://github.com/agda/agda-stdlib/blob/master/CHANGELOG.md#new-modules

import Algebra.Structures as AS

module Data.Vec.Functional.Algebra.Base
{c ℓ} (cring : CommutativeRing c ℓ) where
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not happy about this whole module being parameterized on CommutativeRing, as many of the definitions work with smaller algebraic structures, but I'm not sure what to do about it. Maybe other people have some ideas?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't (yet) looked at this too closely, but it seems as though we might more generally want d isX implies (Vector n d) isX and then if d is suitable as X scalars for the right notion of IsYModule over X then (Vector n d) isYModule over d...?

@guilhermehas
Copy link
Contributor Author

I have changed most of my code and it is not done yet. It is still with a lot of comments.
However, I would like some feedback if I am going in the right direction.

I tried to make the code work with more cases, but I don't know if it is helpful in that way.

@guilhermehas guilhermehas marked this pull request as draft May 27, 2023 01:44
@guilhermehas guilhermehas requested a review from gallais May 27, 2023 01:45
@guilhermehas
Copy link
Contributor Author

I can remove the code that is commented on if they are not necessary.

I also would like some suggestions if something is not in the right way.

@jamesmckinna
Copy link
Contributor

Sorry not to have had time for a thorough review of this draft PR yet!
It'll be at least the week after next before I can look at it properly.

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

Successfully merging this pull request may close these issues.

4 participants