Documentation
FormaleSystemeInLean
.
Set
Search
return to top
source
Imports
Init
FormaleSystemeInLean.Fintype
Imported by
Set
instEmptyCollectionSet
instMembershipSet
instUnionSet
instInterSet
instHasSubsetSet
instHasSSubsetSet
instSDiffSet
List
.
toSet
Set
.
powerset
Set
.
map
Set
.
ext
Set
.
inter_commutative
Set
.
union_commutative
Set
.
distr_inter_union
Set
.
distr_union_inter
Set
.
not_empty_contains_element
Set
.
empty_eq
Set
.
empty_iff
Set
.
ne_empty_contains_element
Set
.
empty_set_if_empty_type
Set
.
complete_set_iff
Set
.
complete_set_eq_fintype_elems
Set
.
exists_not_mem_if_ne_complete_set
Set
.
ssubset_of_complete_set
Set
.
mem_iff
source
def
Set
(
α
:
Type
u)
:
Type
u
Equations
Set
α
=
(
α
→
Prop
)
Instances For
source
instance
instEmptyCollectionSet
{
α
:
Type
u_1}
:
EmptyCollection
(
Set
α
)
Equations
instEmptyCollectionSet
=
{
emptyCollection
:=
fun (
x
:
α
) =>
False
}
source
instance
instMembershipSet
{
α
:
Type
u_1}
:
Membership
α
(
Set
α
)
Equations
instMembershipSet
=
{
mem
:=
fun (
S
:
Set
α
) (
a
:
α
) =>
S
a
}
source
instance
instUnionSet
{
α
:
Type
u_1}
:
Union
(
Set
α
)
Equations
instUnionSet
=
{
union
:=
fun (
A
B
:
Set
α
) (
e
:
α
) =>
e
∈
A
∨
e
∈
B
}
source
instance
instInterSet
{
α
:
Type
u_1}
:
Inter
(
Set
α
)
Equations
instInterSet
=
{
inter
:=
fun (
A
B
:
Set
α
) (
e
:
α
) =>
e
∈
A
∧
e
∈
B
}
source
instance
instHasSubsetSet
{
α
:
Type
u_1}
:
HasSubset
(
Set
α
)
Equations
instHasSubsetSet
=
{
Subset
:=
fun (
A
B
:
Set
α
) =>
∀ (
e
:
α
),
e
∈
A
→
e
∈
B
}
source
instance
instHasSSubsetSet
{
α
:
Type
u_1}
:
HasSSubset
(
Set
α
)
Equations
instHasSSubsetSet
=
{
SSubset
:=
fun (
A
B
:
Set
α
) =>
A
⊆
B
∧
¬
B
⊆
A
}
source
instance
instSDiffSet
{
α
:
Type
u_1}
:
SDiff
(
Set
α
)
Equations
instSDiffSet
=
{
sdiff
:=
fun (
A
B
:
Set
α
) (
e
:
α
) =>
e
∈
A
∧
¬
e
∈
B
}
source
def
List
.
toSet
{
α
:
Type
u_1}
(
l
:
List
α
)
:
Set
α
Equations
l
.
toSet
e
=
(
e
∈
l
)
Instances For
source
def
Set
.
powerset
(
α
:
Type
u)
(
S
x
:
Set
α
)
:
Prop
Equations
Set.powerset
α
S
x
=
(
x
⊆
S
)
Instances For
source
def
Set
.
map
{
α
:
Type
u_1}
{
β
:
Type
u_2}
(
f
:
α
→
β
)
(
S
:
Set
α
)
[
Fintype
α
]
:
Set
β
Equations
Set.map
f
S
b
=
∃
(
a
:
α
)
,
a
∈
S
∧
f
a
=
b
Instances For
source
theorem
Set
.
ext
{
α
:
Type
u_1}
(
X
Y
:
Set
α
)
:
(∀ (
e
:
α
),
e
∈
X
↔
e
∈
Y
)
→
X
=
Y
source
theorem
Set
.
inter_commutative
{
α
:
Type
u_1}
(
X
Y
:
Set
α
)
:
X
∩
Y
=
Y
∩
X
source
theorem
Set
.
union_commutative
{
α
:
Type
u_1}
(
X
Y
:
Set
α
)
:
X
∪
Y
=
Y
∪
X
source
theorem
Set
.
distr_inter_union
{
α
:
Type
u_1}
(
X
Y
Z
:
Set
α
)
:
X
∩
(
Y
∪
Z
)
=
X
∩
Y
∪
X
∩
Z
source
theorem
Set
.
distr_union_inter
{
α
:
Type
u_1}
(
X
Y
Z
:
Set
α
)
:
X
∪
Y
∩
Z
=
(
X
∪
Y
)
∩
(
X
∪
Z
)
source
theorem
Set
.
not_empty_contains_element
{
α
:
Type
u_1}
(
X
:
Set
α
)
:
X
≠
∅
→
∃
(
e
:
α
)
,
e
∈
X
source
theorem
Set
.
empty_eq
{
α
:
Type
u_1}
(
A
:
Set
α
)
:
(∀ (
x
:
α
),
¬
x
∈
A
)
→
A
=
∅
source
theorem
Set
.
empty_iff
{
α
:
Type
u_1}
(
A
:
Set
α
)
:
A
=
∅
↔
∀ (
a
:
α
),
¬
a
∈
A
source
theorem
Set
.
ne_empty_contains_element
{
α
:
Type
u_1}
(
B
:
Set
α
)
[
DecidableEq
(
Set
α
)
]
:
(
B
!=
∅
)
=
true
→
∃
(
a
:
α
)
,
a
∈
B
source
theorem
Set
.
empty_set_if_empty_type
{
α
:
Type
u_1}
(
T
:
Fintype
α
)
(
S
:
Set
α
)
:
Fintype.elems
=
[
]
→
S
=
∅
source
theorem
Set
.
complete_set_iff
{
α
:
Type
u_1}
[
Fintype
α
]
(
S
:
Set
α
)
:
(
S
=
fun (
x
:
α
) =>
True
)
↔
∀ (
x
:
α
),
x
∈
S
source
theorem
Set
.
complete_set_eq_fintype_elems
{
α
:
Type
u_1}
(
T
:
Fintype
α
)
:
Fintype.elems
.
toSet
=
fun (
x
:
α
) =>
True
source
theorem
Set
.
exists_not_mem_if_ne_complete_set
{
α
:
Type
u_1}
(
T
:
Fintype
α
)
(
S
:
Set
α
)
:
(
S
≠
fun (
x
:
α
) =>
True
) →
∃
(
a
:
α
)
,
¬
a
∈
S
source
theorem
Set
.
ssubset_of_complete_set
{
α
:
Type
u_1}
(
T
:
Fintype
α
)
(
S
:
Set
α
)
:
(
S
≠
fun (
x
:
α
) =>
True
) →
S
⊂
fun (
x
:
α
) =>
True
source
theorem
Set
.
mem_iff
{
α
:
Type
u_1}
{
S
:
Set
α
}
(
x
:
α
)
:
x
∈
S
↔
S
x