问题
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