Module L.
Include Coq.Lists.List.
Definition null {A : Type} (l : list A) : bool :=
match l with
| L.nil => true
| L.cons _ _ => false
end.
#[global] Hint Rewrite null_spec in_map_iff in_app_iff : simplication_hints.
#[global] Hint Rewrite in_remove_iff : simplication_hints.
Fixpoint mk_edge_seq {V : Type} (v : V) (vs : list V) : list (V * V) :=
match vs with
| [] => []
| v' :: vs' => (v, v') :: mk_edge_seq v' vs'
end.
Fixpoint lookup {A : Type} {B : Type} {EQ_DEC : hasEqDec A} (x : A) (zs : list (A * B)) : option B :=
match zs with
| [] => None
| (x', y) :: zs' => if eq_dec x x' then Some y else lookup x zs'
end.
Notation is_finsubset_of xs X := (forall x, L.In x xs -> x \in X).
Notation is_listrep_of xs X := (forall x, L.In x xs <-> x \in X).
Class topology (A : Type) : Type :=
{ isOpen (O : ensemble A) : Prop
; topologyLaws :: AxiomsForTopology A isOpen
}.
#[global]
Add Parametric Morphism {A : Type} `{TOPOLOGY : topology A}
: (@isOpen A TOPOLOGY) with signature (eqProp ==> iff)
as isOpen_compatWith_eqProp.

Lemma empty_in_T {A : Type} `{TOPOLOGY : topology A}
: isOpen (@E.empty A).