From set inclusion to set equality in lean

2019-07-28 11:36发布

Given a proof of set inclusion and its converse I'd like to be able to show that two sets are equal.

For example, I know how to prove the following statement, and its converse:

open set

universe u
variable elem_type : Type u
variable A : set elem_type
variable B : set elem_type

def set_deMorgan_incl : A ∩ B ⊆ set.compl ((set.compl A) ∪ (set.compl B)) :=
    sorry

Given these two inclusion proofs, how do I prove set equality, i.e.

def set_deMorgan_eq : A ∩ B = set.compl ((set.compl A) ∪ (set.compl B)) :=
    sorry

1条回答
倾城 Initia
2楼-- · 2019-07-28 11:48

You will want to use anti-symmetry of the subset relation, as proved in the stdlib package:

def set_deMorgan_eq : A ∩ B = set.compl ((set.compl A) ∪ (set.compl B)) :=
subset.antisymm (set_deMorgan_incl _ _ _) (set_deMorgan_incl_conv _ _ _)

As you can see in the proof of subset.antisymm, it combines both functional and propositional extensionality.

查看更多
登录 后发表回答