From set inclusion to set equality in lean

Deadly 提交于 2019-12-24 09:39:38

问题


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:


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.



来源:https://stackoverflow.com/questions/45658919/from-set-inclusion-to-set-equality-in-lean

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!