---
title: "Operations on Points and Blocks"
canonical: "https://docs.magma-maths.org/v2.30-1/Combinatorics/Designs/operation-point-block.html"
source: "https://docs.magma-maths.org/v2.30-1/Combinatorics/Designs/operation-point-block.md"
part: "Combinatorics"
chapter: "Incidence Structures and Designs"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Combinatorics", "source": "https://docs.magma-maths.org/v2.30-1/Combinatorics/index-combinatorics.md"}
  - {"title": "Incidence Structures and Designs", "source": "https://docs.magma-maths.org/v2.30-1/Combinatorics/Designs/index-designs.md"}
prev: {"title": "Elementary Invariants of a Design", "source": "https://docs.magma-maths.org/v2.30-1/Combinatorics/Designs/design-invariant.md"}
next: {"title": "Elementary Properties of Incidence Structures and Designs", "source": "https://docs.magma-maths.org/v2.30-1/Combinatorics/Designs/boolean.md"}
intrinsics:
  - {"name": "in", "signature": "p in B: IncPt, IncBlk -> BoolElt"}
  - {"name": "notin", "signature": "p notin B: IncPt, IncBlk -> BoolElt"}
  - {"name": "subset", "signature": "S subset B: { IncPt }, IncBlk -> BoolElt"}
  - {"name": "notsubset", "signature": "S notsubset B: { IncPt }, IncBlk -> BoolElt"}
  - {"name": "PointDegree", "signature": "PointDegree(D, p): Inc, IncPt -> RngIntElt"}
  - {"name": "BlockDegree", "signature": "BlockDegree(D, B): Inc, IncBlk -> RngIntElt"}
  - {"name": "BlockSize", "signature": "BlockSize(D, B): Inc, IncBlk -> RngIntElt"}
  - {"name": "#", "signature": "# B: IncBlk -> RngIntElt"}
  - {"name": "Set", "signature": "Set(B): IncBlk -> { IncPt }"}
  - {"name": "Support", "signature": "Support(B): IncBlk -> { Elt }"}
  - {"name": "IsBlock", "signature": "IsBlock(D, S): Inc, IncBlk -> BoolElt, IncBlk"}
  - {"name": "IsBlock", "signature": "IsBlock(D, S): Inc, SetEnum -> BoolElt, IncBlk"}
  - {"name": "Line", "signature": "Line(D, p, q): Inc, IncPt, IncPt -> IncBlk"}
  - {"name": "Block", "signature": "Block(D, p, q): Inc, IncPt, IncPt -> IncBlk"}
  - {"name": "ConnectionNumber", "signature": "ConnectionNumber(D, p, B): Inc, IncPt, IncBlk -> RngIntElt"}
examples:
  - "ex-f06ff8"
---

# Operations on Points and Blocks

In incidence structures, particularly simple ones, blocks are basically sets. For this reason, the elementary set operations such as `join, meet` and `subset` have been made to work on blocks. However, blocks are not true Magma enumerated sets, and so the functions `Set` and `Support` below have been provided to convert a block to an enumerated set of points for other uses.

<a id="operation-op-in-incpt-incblk"></a>
## `p in B: IncPt, IncBlk -> BoolElt`

Returns `true` if point $p$ lies in block $B$, otherwise `false`.

<a id="operation-op-notin-incpt-incblk"></a>
## `p notin B: IncPt, IncBlk -> BoolElt`

Returns `true` if point $p$ does not lie in block $B$, otherwise `false`.

<a id="operation-op-subset-incpt-incblk"></a>
## `S subset B: { IncPt }, IncBlk -> BoolElt`

Given a subset $S$ of the point set of the incidence structure $D$ and a block $B$ of $D$, return `true` if the subset $S$ of points lies in $B$, otherwise `false`.

<a id="operation-operation-notsubset-incpt-incblk-boolelt"></a>
## `S notsubset B: { IncPt }, IncBlk -> BoolElt`

Given a subset $S$ of the point set of the incidence structure $D$ and a block $B$ of $D$, return `true` if the subset $S$ of points does not lie in $B$, otherwise `false`.

<a id="function-pointdegree-inc-incpt"></a>
## `PointDegree(D, p): Inc, IncPt -> RngIntElt`

The number of blocks of the incidence structure $D$ that contain the point $p$.

<a id="function-blockdegree-inc-incblk"></a>
## `BlockDegree(D, B): Inc, IncBlk -> RngIntElt`

<a id="function-blocksize-inc-incblk"></a>
## `BlockSize(D, B): Inc, IncBlk -> RngIntElt`

<a id="operation-operation-incblk-rngintelt"></a>
## `# B: IncBlk -> RngIntElt`

The number of points contained in the block $B$ of the incidence structure $D$.

<a id="function-set-incblk"></a>
## `Set(B): IncBlk -> { IncPt }`

The set of points contained in the block $B$.

<a id="function-support-incblk"></a>
## `Support(B): IncBlk -> { Elt }`

The set of underlying points contained in the block $B$ (i.e., the elements of the set have their “real” types; they are no longer from the category IncPt).

<a id="function-isblock-inc-incblk"></a>
## `IsBlock(D, S): Inc, IncBlk -> BoolElt, IncBlk`

<a id="function-isblock-inc-setenum"></a>
## `IsBlock(D, S): Inc, SetEnum -> BoolElt, IncBlk`

Returns `true` iff the set (or block) $S$ represents a block of the incidence structure $D$. If `true`, also returns one such block.

<a id="function-line-inc-incpt-incpt"></a>
## `Line(D, p, q): Inc, IncPt, IncPt -> IncBlk`

<a id="function-block-inc-incpt-incpt"></a>
## `Block(D, p, q): Inc, IncPt, IncPt -> IncBlk`

A block of the incidence structure $D$ containing the points $p$ and $q$ (if one exists). In linear spaces, such a block exists and is unique (assuming $p$ and $q$ are different).

<a id="function-connectionnumber-inc-incpt-incblk"></a>
## `ConnectionNumber(D, p, B): Inc, IncPt, IncBlk -> RngIntElt`

The connection number $c(p, B)$; i.e., the number of blocks joining $p$ to $B$ in the incidence structure $D$.

<a id="example-ex-f06ff8"></a>
## `Example: Operations on Points and Blocks (ex-f06ff8)`

The following examples uses some of the functions of the previous section.

```magma
> D, P, B := Design< 2, 7 | {3, 5, 6, 7}, {2, 4, 5, 6}, {1, 4, 6, 7},
>   {2, 3, 4, 7}, {1, 2, 5, 7}, {1, 2, 3, 6}, {1, 3, 4, 5} >;
> D: Maximal;
2-(7, 4, 2) Design with 7 blocks
Points: {@ 1, 2, 3, 4, 5, 6, 7 @}
Blocks:
    {3, 5, 6, 7},
    {2, 4, 5, 6},
    {1, 4, 6, 7},
    {2, 3, 4, 7},
    {1, 2, 5, 7},
    {1, 2, 3, 6},
    {1, 3, 4, 5}
> P.1 in B.1;
false
> P.1 in B.3;
true
> {P| 1, 2} subset B.5;
true
> Block(D, P.1, P.2);
{1, 2, 5, 7}
> b := B.4;
> b;
{2, 3, 4, 7}
> b meet {2, 8};
{ 2 }
> S := Set(b);
> S, Universe(S);
{ 2, 3, 4, 7 }
Point-set of 2-(7, 4, 2) Design with 7 blocks
> Supp := Support(b);
> Supp, Universe(Supp);
{ 2, 3, 4, 7 }
Integer Ring
```
