位相空間

与えられた台集合と空間が、位相空間の条件を満たすかどうかを調べる関数を
作っている途中。

(use '[clojure.contrib.combinatorics :only (subsets)])
(use '[clojure.set :only (subset? superset? intersection union)])

(defn equalset? [set1 set2]
  (and (subset? set1 set2) (superset? set1 set2)))

(defn contains-emptyset? [u]
  (some #(empty? %) u))

(defn contains-wholeset? [x u]
  (some #(equalset? x %) u))

(defn contains-intersection? [u]
  (every? #(contains? u %) (for [u1 u u2 u] (intersection u1 u2))))

(defn contains-union? [u]
  (every? #(contains? u %) (for [u1 u u2 u] (union u1 u2))))

(defn topological-space? [x u]
  (and (contains-emptyset? u)
       (contains-wholeset? x u)
       (contains-intersection? u)
       (contains-union? u)))

(defn t0-space? [x u]
  (for [x1 x y1 y :when (not= x y)] ))
(defn t1-space? [x u])
(defn t2-space? [x u])
(defn t3-space? [x u])
(defn t4-space? [x u])