File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,16 @@ variable {α : Type u}
1010-- This corresponds to the "axiom of specification".
1111def Set (X : Type u) : Type u := X → Prop
1212
13+ example : Set Nat := fun n => n > 5
14+
15+ example : Set (Nat × Nat) := fun ⟨m, n⟩ => m + n = 10
16+
17+ example (α : Type u) : Set (List α) := fun xs => xs.length ≤ 3
18+
19+ example : Set (Set Nat) := fun s => ∃ n, s = fun k => k < n
20+
21+ example (P Q : Nat → Prop ) : Set Nat := fun n => P n ∧ Q n
22+
1323namespace Set
1424
1525-- The empty set: no element satisfies the predicate
@@ -58,8 +68,6 @@ notation "⋂ " f => Set.iInter f
5868notation " ⋃[" i " ] " f => Set.iUnion (fun i => f)
5969notation " ⋂[" i " ] " f => Set.iInter (fun i => f)
6070
61- #check Set.iUnion
62-
6371-- Basic subset relation
6472def subset (s t : Set X) : Prop := ∀ x, x ∈ s → x ∈ t
6573
You can’t perform that action at this time.
0 commit comments