1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 set "baseuri" "cic:/matita/sets/".
19 definition set ≝ λX:Type.X → Prop.
21 definition member_of : ∀X.set X → X → Prop≝ λX.λA:set X.λx.A x.
23 notation "hvbox(x break ∈ A)" with precedence 60
24 for @{ 'member_of $x $A }.
26 interpretation "Member of" 'member_of x A =
27 (cic:/matita/sets/member_of.con _ A x).
29 notation "hvbox(x break ∉ A)" with precedence 60
30 for @{ 'not_member_of $x $A }.
32 interpretation "Not member of" 'not_member_of x A =
33 (cic:/matita/logic/connectives/Not.con
34 (cic:/matita/sets/member_of.con _ A x)).
36 definition emptyset : ∀X.set X ≝ λX:Type.λx:X.False.
38 notation "∅︀" with precedence 100 for @{ 'emptyset }.
40 interpretation "Emptyset" 'emptyset =
41 (cic:/matita/sets/emptyset.con _).
43 definition subset: ∀X. set X → set X → Prop≝ λX.λA,B:set X.∀x. x ∈ A → x ∈ B.
45 notation "hvbox(A break ⊆ B)" with precedence 60
46 for @{ 'subset $A $B }.
48 interpretation "Subset" 'subset A B =
49 (cic:/matita/sets/subset.con _ A B).
51 definition intersection: ∀X. set X → set X → set X ≝
52 λX.λA,B:set X.λx. x ∈ A ∧ x ∈ B.
54 notation "hvbox(A break ∩ B)" with precedence 70
55 for @{ 'intersection $A $B }.
57 interpretation "Intersection" 'intersection A B =
58 (cic:/matita/sets/intersection.con _ A B).
60 definition union: ∀X. set X → set X → set X ≝ λX.λA,B:set X.λx. x ∈ A ∨ x ∈ B.
62 notation "hvbox(A break ∪ B)" with precedence 65
63 for @{ 'union $A $B }.
65 interpretation "Union" 'union A B =
66 (cic:/matita/sets/union.con _ A B).
68 definition seq ≝ λX:Type.nat → X.
70 definition nth ≝ λX.λA:seq X.λi.A i.
72 notation "hvbox(A \sub i)" with precedence 100
75 interpretation "nth" 'nth A i =
76 (cic:/matita/sets/nth.con _ A i).
78 definition countable_union: ∀X. seq (set X) → set X ≝
79 λX.λA:seq (set X).λx.∃j.x ∈ A \sub j.
81 notation "∪ \sub (ident i opt (: ty)) B" with precedence 65
82 for @{ 'big_union ${default @{(λ${ident i}:$ty.$B)} @{(λ${ident i}.$B)}}}.
84 interpretation "countable_union" 'big_union η.t =
85 (cic:/matita/sets/countable_union.con _ t).
87 definition complement: ∀X. set X \to set X ≝ λX.λA:set X.λx. x ∉ A.
89 notation "A \sup 'c'" with precedence 100
90 for @{ 'complement $A }.
92 interpretation "Complement" 'complement A =
93 (cic:/matita/sets/complement.con _ A).
95 definition inverse_image: ∀X,Y.∀f: X → Y.set Y → set X ≝
98 notation "hvbox(f \sup (-1))" with precedence 100
99 for @{ 'finverse $f }.
101 interpretation "Inverse image" 'finverse f =
102 (cic:/matita/sets/inverse_image.con _ _ f).