-
Notifications
You must be signed in to change notification settings - Fork 251
[ fix #395 ] creating Data.X.Solver
#400
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0d89243
First attempt at re-arranging Solver modules
MatthewDaggitt fdccf1d
Merge branch 'master' into Solver
MatthewDaggitt c9a0f78
Standardised solver names
MatthewDaggitt 737e7d3
Merge branch 'master' into Solver
MatthewDaggitt 56e307a
Merge branch 'master' into Solver
MatthewDaggitt 6597001
Added the solver for Function.Related.TypeIsomorphisms
MatthewDaggitt 346afd9
Tidied up imports for new Solver module
MatthewDaggitt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
------------------------------------------------------------------------ | ||
-- The Agda standard library | ||
-- | ||
-- Automatic solvers for equations over booleans | ||
------------------------------------------------------------------------ | ||
|
||
-- See README.Nat for examples of how to use similar solvers | ||
|
||
module Data.Bool.Solver where | ||
|
||
import Algebra.Solver.Ring.Simple as Solver | ||
import Algebra.Solver.Ring.AlmostCommutativeRing as ACR | ||
open import Data.Bool using (_≟_) | ||
open import Data.Bool.Properties | ||
|
||
------------------------------------------------------------------------ | ||
-- A module for automatically solving propositional equivalences | ||
-- containing _∨_ and _∧_ | ||
|
||
module ∨-∧-Solver = | ||
Solver (ACR.fromCommutativeSemiring ∨-∧-commutativeSemiring) _≟_ | ||
|
||
------------------------------------------------------------------------ | ||
-- A module for automatically solving propositional equivalences | ||
-- containing _xor_ and _∧_ | ||
|
||
module xor-∧-Solver = | ||
Solver (ACR.fromCommutativeRing xor-∧-commutativeRing) _≟_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
------------------------------------------------------------------------ | ||
-- The Agda standard library | ||
-- | ||
-- Automatic solvers for equations over integers | ||
------------------------------------------------------------------------ | ||
|
||
-- See README.Integer for examples of how to use this solver | ||
|
||
module Data.Integer.Solver where | ||
|
||
import Algebra.Solver.Ring.Simple as Solver | ||
import Algebra.Solver.Ring.AlmostCommutativeRing as ACR | ||
open import Data.Integer using (_≟_) | ||
open import Data.Integer.Properties using (+-*-commutativeRing) | ||
|
||
------------------------------------------------------------------------ | ||
-- A module for automatically solving propositional equivalences | ||
-- containing _+_ and _*_ | ||
|
||
-- A module for automatically solving propositional equivalences | ||
module +-*-Solver = | ||
Solver (ACR.fromCommutativeRing +-*-commutativeRing) _≟_ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Given that we went for
Data.X.Categorical
rather thanCategory.X
,wouldn't it make sense to go for
Algebra.X.Solver
? Or evenAlgebra.Structures.X.Solver
given that all of these are structures.It would also be more consistent with the
Data.X.Solver
naming scheme.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.
It's tricky, we're not very consistent between the "big three" (i.e.
Data
,Algebra
andRelation
). The current naming scheme is consistent within the Algebra hierarchy:Algebra.Operations.X
,Algebra.Properties.X
etc.If we were to adopt your suggestion, then we should do so for all the other
Algebra
subfolders as well... That does seem like a big change though?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.
Oh I had not realised that was the case. Better leave it as it is for the moment then!
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.
Yup, we'll leave it for the mythical version 2.0 😆