Skip to content

Commit

Permalink
Hz66 404 patch 2 2 (#613)
Browse files Browse the repository at this point in the history
* Create L_intersect.md

* Create apart.md

* Create participants.md

* Create party.md

* Create parts.md

* Create together.md

---------

Co-authored-by: N-J-Martin <146941515+N-J-Martin@users.noreply.github.com>
  • Loading branch information
hz66-404 and N-J-Martin committed Nov 15, 2023
1 parent da5e5f3 commit 9fb7fc4
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/bits/function/apart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# apart

test if a list of elements are not all contained in one part of the partition

```
letting P be partition({1,2},{3},{4,5,6})
find a: bool such that a = apart({3,5},P) $true
```
The result of these syntaxes is true, because elements 3 and 5 ({3,5}) are not all contained in one part of the partition ({1,2},{3},{4,5,6})

See it demonstrated [here](https://github.com/conjure-cp/conjure/blob/main/docs/Partition_operators.ipynb).
11 changes: 11 additions & 0 deletions docs/bits/function/participants.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# participants

union of all parts of a partition

```
letting P be partition({1,2},{3},{4,5,6})
find b : set of int(1..6) such that b = participants(P) ${1,2,3,4,5,6}
```
This result is getting all parts of the partition

See it demonstrated [here](https://github.com/conjure-cp/conjure/blob/main/docs/Partition_operators.ipynb).
11 changes: 11 additions & 0 deletions docs/bits/function/parts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# parts

partition to its set of parts

```
letting P be partition({1,2},{3},{4,5,6})
find d : bool such that d = ({{1,2},{3},{4,5,6}} = parts(P)) $true
```
This syntax is checking if {{1,2},{3},{4,5,6}} equals to partition P

See it demonstrated [here](https://github.com/conjure-cp/conjure/blob/main/docs/Partition_operators.ipynb).
11 changes: 11 additions & 0 deletions docs/bits/function/party.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# party

part of partition that contains specified element

```
letting P be partition({1,2},{3},{4,5,6})
find c : set of int(1..6) such that c = party(4,P) ${4,5,6}
```
This syntax is finding the part of the partition that contains 4. So the result is {4,5,6} because 4 is in the {4,5,6}.

See it demonstrated [here](https://github.com/conjure-cp/conjure/blob/main/docs/Partition_operators.ipynb).
11 changes: 11 additions & 0 deletions docs/bits/function/together.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# together

test if a list of elements are all in the same part of the partition

```
letting P be partition({1,2},{3},{4,5,6})
find e : bool such that e = together({1,2},P) $true
```
This syntax is checking if {1,2} is in the part of the partition P

See it demonstrated [here](https://github.com/conjure-cp/conjure/blob/main/docs/Partition_operators.ipynb).
1 change: 1 addition & 0 deletions docs/bits/operator/L_intersect.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ find A : set of int(0..6) such that A = {1,2,3} intersect {2,3}
This syntax is finding the intersection part of {1,2,3} and {2,3}

See it demonstrated [here](https://github.com/conjure-cp/conjure/blob/main/docs/notebooks/Set_operators.ipynb).

0 comments on commit 9fb7fc4

Please sign in to comment.