Topology (topology v0.1.5)

Returns a topology of the given set.

Link to this section Summary

Functions

Returns a closed set system of the given topological space.

Returns a discrete space of the given set.

Returns a discreate topology of the given set.

Returns a discrete space of the given set.

Returns a indiscreate topology of the given set.

Returns a boolean indicating whether the given set is an closed set of the given topological space.

Returns a boolean indicating whether the given set is an open set of the given topological space.

Returns a topological spaces of the given set.

Returns a topology of the given set.

Link to this section Types

Link to this type

topological_space()

@type topological_space() :: {underlying_set(), topology()}
@type topology() :: MapSet.t()
Link to this type

underlying_set()

@type underlying_set() :: MapSet.t()

Link to this section Functions

Link to this function

closed_set_system(arg)

@spec closed_set_system({underlying_set(), topology()}) :: MapSet.t()

Returns a closed set system of the given topological space.

mathematical-expression

Mathematical expression

$$ \mathfrak{U} $$

theorem

Theorem

A closed set system is a topology if and only if it satisfies the following conditions:

  1. $$S \in \mathfrak{U},\ \phi \in \mathfrak{U}$$

  2. $$A_1, A_2 \in \mathfrak{U} \implies A_1 \cup A_2 \in \mathfrak{U}$$

  3. $$A_1, A_2 \in \mathfrak{U} \implies A_1 \cap A_2 \in \mathfrak{U}$$

examples

Examples

iex> topological_space =
...>  {
...>   MapSet.new([:a, :b, :c]),
...>   MapSet.new([
...>     MapSet.new([]),
...>     MapSet.new([:b]),
...>     MapSet.new([:a, :b]),
...>     MapSet.new([:a, :b, :c])
...>   ])
...>  }
iex> Topology.closed_set_system(topological_space)
MapSet.new([
  MapSet.new([:a, :b, :c]),
  MapSet.new([:a, :c]),
  MapSet.new([:c]),
  MapSet.new([]),
])
Link to this function

discrete_space(set)

@spec discrete_space(MapSet.t()) :: topological_space()

Returns a discrete space of the given set.

mathematical-expression

Mathematical expression

$$ (S, \mathfrak{O}^\ast) $$

examples

Examples

iex> Topology.discrete_space(MapSet.new([:a, :b]))
{MapSet.new([:a, :b]), MapSet.new([MapSet.new([]), MapSet.new([:a]), MapSet.new([:b]), MapSet.new([:a, :b])])}
Link to this function

discrete_topology(set)

@spec discrete_topology(MapSet.t()) :: topology()

Returns a discreate topology of the given set.

mathematical-expression

Mathematical expression

$$ \mathfrak{O}^\ast $$

examples

Examples

iex> Topology.discrete_topology(MapSet.new([:a, :b]))
MapSet.new([MapSet.new([]), MapSet.new([:a]), MapSet.new([:b]), MapSet.new([:a, :b])])
Link to this function

indiscrete_space(set)

@spec indiscrete_space(MapSet.t()) :: topological_space()

Returns a discrete space of the given set.

mathematical-expression

Mathematical expression

$$ (S, \mathfrak{O}_\ast) $$

examples

Examples

iex> Topology.indiscrete_space(MapSet.new([:a, :b]))
{MapSet.new([:a, :b]), MapSet.new([MapSet.new([]), MapSet.new([:a, :b])])}
Link to this function

indiscrete_topology(set)

@spec indiscrete_topology(MapSet.t()) :: topology()

Returns a indiscreate topology of the given set.

mathematical-expression

Mathematical expression

$$ \mathfrak{O}_\ast $$

examples

Examples

iex> Topology.indiscrete_topology(MapSet.new([:a, :b]))
MapSet.new([MapSet.new(), MapSet.new([:a, :b])])
Link to this function

is_closed_set?(set, arg)

@spec is_closed_set?(
  MapSet.t(),
  {underlying_set(), topology()}
) :: boolean()

Returns a boolean indicating whether the given set is an closed set of the given topological space.

examples

Examples

iex> topological_space =
...>  {
...>   MapSet.new([:a, :b, :c]),
...>   MapSet.new([
...>     MapSet.new([]),
...>     MapSet.new([:b]),
...>     MapSet.new([:a, :b]),
...>     MapSet.new([:a, :b, :c])
...>   ])
...>  }
iex> Topology.is_closed_set?(MapSet.new([:c]), topological_space)
true
Link to this function

is_open_set?(set, arg)

@spec is_open_set?(
  MapSet.t(),
  {underlying_set(), topology()}
) :: boolean()

Returns a boolean indicating whether the given set is an open set of the given topological space.

examples

Examples

iex> topological_space =
...>  {
...>   MapSet.new([:a, :b, :c]),
...>   MapSet.new([
...>     MapSet.new([]),
...>     MapSet.new([:b]),
...>     MapSet.new([:a, :b]),
...>     MapSet.new([:a, :b, :c])
...>   ])
...>  }
iex> Topology.is_open_set?(MapSet.new([:a, :b]), topological_space)
true
Link to this function

open_set_systems(set)

See Topology.topologies/1.

Link to this function

topological_spaces(set)

Returns a topological spaces of the given set.

mathematical-expression

Mathematical expression

$$ (S, \mathfrak{O}) $$

examples

Examples

iex> Topology.topological_spaces(MapSet.new([:a, :b]))
[
  {MapSet.new([:a, :b]), MapSet.new([MapSet.new([]), MapSet.new([:a, :b])])},
  {MapSet.new([:a, :b]), MapSet.new([MapSet.new([]), MapSet.new([:a]), MapSet.new([:a, :b])])},
  {MapSet.new([:a, :b]), MapSet.new([MapSet.new([]), MapSet.new([:b]), MapSet.new([:a, :b])])},
  {MapSet.new([:a, :b]), MapSet.new([MapSet.new([]), MapSet.new([:a]), MapSet.new([:b]), MapSet.new([:a, :b])])}
]
Link to this function

topologies(set)

@spec topologies(MapSet.t()) :: topology()

Returns a topology of the given set.

mathematical-expression

Mathematical expression

$$ \mathfrak{O} \subset \mathfrak{P}(S) $$

examples

Examples

iex> Topology.topologies(MapSet.new([:a, :b]))
MapSet.new([
  MapSet.new([MapSet.new([]), MapSet.new([:a, :b])]),
  MapSet.new([MapSet.new([]), MapSet.new([:a]), MapSet.new([:a, :b])]),
  MapSet.new([MapSet.new([]), MapSet.new([:b]), MapSet.new([:a, :b])]),
  MapSet.new([
    MapSet.new([]),
    MapSet.new([:a]),
    MapSet.new([:b]),
    MapSet.new([:a, :b])
  ])
])