strg_prune() removes redundant relations from a stratigraphic graph by computing its transitive reduction. The result is a 'pruned' graph that follows Harris' "Law of Stratigraphical Succession": that only the uppermost and undermost relations are significant when placing a unit in a stratigraphic sequence.

## Arguments

- strg
A

`stratigraph()`

object to prune.

## Value

A stratigraph with redundant relations removed.

## Examples

```
bushy_stratigraphy <- stratigraph(
tibble::tibble(
id = letters[1:5],
above = list(NA, "a", "a", c("a", "b", "c"), c("a", "c", "d"))
),
"id", "above"
)
strg_prune(bushy_stratigraphy)
#> # A tbl_graph: 5 nodes and 5 edges
#> #
#> # A directed acyclic simple graph with 1 component
#> #
#> # A tibble: 5 × 2
#> id above
#> <chr> <list>
#> 1 a <lgl [1]>
#> 2 b <chr [1]>
#> 3 c <chr [1]>
#> 4 d <chr [3]>
#> 5 e <chr [3]>
#> #
#> # A tibble: 5 × 2
#> from to
#> <int> <int>
#> 1 1 2
#> 2 1 3
#> 3 2 4
#> # ℹ 2 more rows
```