-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #359 from Consensys/356-change-permutation-to-defp…
…ermutation feat: update syntax for `permutation` to `defpermutation`
- Loading branch information
Showing
17 changed files
with
106 additions
and
57 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
(defcolumns X) | ||
(module m1) | ||
(defcolumns ST (X :u16)) | ||
(permute (Y) (+X)) | ||
(defpermutation (Y) ((+ X))) | ||
;; Ensure sorted column increments by 1 | ||
(defconstraint increment () (* ST (- (shift Y 1) (+ 1 Y)))) |
This file contains 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 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 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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
(defcolumns (X :u16)) | ||
(permute (Y) (+X)) | ||
(defpermutation (Y) ((↓ X))) | ||
(defpermutation (Z) ((+ X))) | ||
;; Y == Z | ||
(defconstraint eq () (- Y Z)) |
This file contains 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
(defcolumns (X :u16)) | ||
(permute (Y) (+X)) | ||
(defpermutation (Y) ((+ X))) | ||
(defconstraint first-row (:domain {0}) Y) |
This file contains 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
(defcolumns ST (X :u16)) | ||
(permute (Y) (+X)) | ||
(defpermutation (Y) ((↓ X))) | ||
;; Ensure sorted column increments by 1 | ||
(defconstraint increment () (* ST (- (shift Y 1) (+ 1 Y)))) |
This file contains 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
(defcolumns | ||
(ST :u16) | ||
(X :u16)) | ||
(permute (ST' Y) (+ST -X)) | ||
(defpermutation (ST' Y) ((↓ ST) (↑ X))) | ||
(defconstraint first-row (:domain {-1}) (- Y 5)) |
This file contains 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
(defcolumns | ||
(X :u8) | ||
(Y :u8)) | ||
(permute (A B) (+X +Y)) | ||
(defpermutation (A B) ((+ X) (+ Y))) | ||
(defconstraint diag_ab () (- (shift A 1) B)) |
This file contains 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
(defcolumns | ||
(X :u16) | ||
(Y :u16)) | ||
(permute (A B) (+X +Y)) | ||
(defpermutation (A B) ((+ X) (+ Y))) | ||
(defconstraint diag_ab () (- (shift A 1) B)) |
This file contains 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 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
(defcolumns | ||
(X :u16) | ||
(Y :u16)) | ||
(permute (A B) (+X -Y)) | ||
(defpermutation (A B) ((+ X) (- Y))) | ||
(defconstraint diag_ab () (* A (- (shift A 1) B))) |
This file contains 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