-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zorn lemma for inclusion #978
Conversation
Co-authored-by: Takafumi Saikawa <[email protected]>
classical/classical_sets.v
Outdated
Section Zorn_subset. | ||
Variables (T : Type) (P : set T -> Prop). | ||
Let sigP := {x | P x}. | ||
Let R (sA sB : sigP) := sval sA `<=` sval sB. | ||
|
||
Lemma Zorn_bigcup : | ||
(forall F, total_on F R -> P (\bigcup_(x in F) sval x)) -> | ||
exists A, P A /\ forall B, A `<` B -> ~ P B. | ||
Proof. | ||
move=> totR. | ||
have {}totR F : total_on F R -> exists sB, forall sA, F sA -> R sA sB. | ||
by move=> FR; exists (exist _ _ (totR _ FR)) => sA FsA; exact: bigcup_sup. | ||
have [| | |sA sAmax] := Zorn _ _ _ totR. | ||
- by move=> ?; exact: subset_refl. | ||
- by move=> ? ? ?; exact: subset_trans. | ||
- by move=> [A PA] [B PB]; rewrite /R /= => AB BA; exact/eq_exist/seteqP. | ||
- exists (sval sA); case: sA => A PA in sAmax *; split => //= B AB PB. | ||
have [BA] := sAmax (exist _ B PB) (properW AB). | ||
by move: AB; rewrite BA; exact: properxx. | ||
Qed. | ||
|
||
End Zorn_subset. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks strange to me to introduce the artifact R
in the statement.
I would rather phrase it like this:
Section Zorn_subset.
Variables (T : Type) (P : set (set T)).
Lemma Zorn_bigcup :
(forall F : set (set T), F `<=` P -> total_on F subset -> P (\bigcup_(X in F) X)) ->
exists A, P A /\ forall B, A `<` B -> ~ P B.
Proof.
move=> totP; pose R (sA sB : P) := sval sA `<=` sval sB.
have {}totR F (FR : total_on F R) : exists sB, forall sA, F sA -> R sA sB.
have FP : [set val x | x in F] `<=` P.
by move=> _ [X FX <-]; apply: set_mem; apply: valP.
have totF : total_on [set val x | x in F] subset.
by move=> _ _ [X FX <-] [Y FY <-]; apply: FR.
exists (SigSub (mem_set (totP _ FP totF))) => A FA; rewrite /R/=.
exact: (bigcup_sup (imageP val _)).
have [| | |sA sAmax] := Zorn _ _ _ totR.
- by move=> ?; exact: subset_refl.
- by move=> ? ? ?; exact: subset_trans.
- by move=> [A PA] [B PB]; rewrite /R /= => AB BA; exact/eq_exist/seteqP.
- exists (val sA); case: sA => A PA /= in sAmax *; split; first exact: set_mem.
move=> B AB PB; have [BA] := sAmax (SigSub (mem_set PB)) (properW AB).
by move: AB; rewrite BA; exact: properxx.
Qed.
End Zorn_subset.
Is it better or worse in the real usecases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The effect of the change can be observed in the diff of the commit
f2a57df
file before: lines 2260-2270
file after: lines 2302-2311
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see... I still think it's worth it ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I guess we can merge?
Co-authored-by: Cyril Cohen <[email protected]>
* Zorn lemma for inclusion Co-authored-by: Takafumi Saikawa <[email protected]> Co-authored-by: Cyril Cohen <[email protected]>
* Zorn lemma for inclusion Co-authored-by: Takafumi Saikawa <[email protected]> Co-authored-by: Cyril Cohen <[email protected]>
* Zorn lemma for inclusion Co-authored-by: Takafumi Saikawa <[email protected]> Co-authored-by: Cyril Cohen <[email protected]>
Motivation for this change
Corollary of Zorn's lemma.
It has a new on its own (https://fr.wikipedia.org/wiki/Lemme_de_Zorn#Principes_de_maximalit%C3%A9_pour_l'inclusion) and happens to be exactly what we need for Vitali's lemma (PR #973 )
@t6s
Things done/to do
CHANGELOG_UNRELEASED.md
Compatibility with MathComp 2.0
TODO: HB port
to make sure someone ports this PR tothe
hierarchy-builder
branch or I already opened an issue or PR (please cross reference).Automatic note to reviewers
Read this Checklist and put a milestone if possible.