Skip to content
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

[real] sup/inf lemmas using set notations #1360

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

binghe
Copy link
Member

@binghe binghe commented Dec 2, 2024

Hi,

It's a little strange that, in realTheory, the sup and inf of set of real numbers, definitions and lemmas are not using set notations at all. Instead of, P x is used instead of x IN P and ?x. P x is used instead of P <> {}, etc. I found these lemmas hard to use, especially when the involved sets are defined in gspec notations (e.g. {x | P x}, the simplifier can rewrite x IN {x | P x} but cannot deal with the equivalent {x | P x} x.

Therefore now I added a variant for each of these lemmas using set notations (the "primed" version is new):

   [REAL_SUP_UBOUND]  Theorem (existing)
      ⊢ ∀P. (∃x. P x) ∧ (∃z. ∀x. P x ⇒ x < z) ⇒ ∀y. P y ⇒ y ≤ sup P
   
   [REAL_SUP_UBOUND']  Theorem (new)
      ⊢ ∀P. P ≠ ∅ ∧ (∃z. ∀x. x ∈ P ⇒ x < z) ⇒ ∀y. y ∈ P ⇒ y ≤ sup P
   
   [REAL_SUP_UBOUND_LE]  Theorem (existing)
      ⊢ ∀P. (∃x. P x) ∧ (∃z. ∀x. P x ⇒ x ≤ z) ⇒ ∀y. P y ⇒ y ≤ sup P
   
   [REAL_SUP_UBOUND_LE']  Theorem (new)
      ⊢ ∀P. P ≠ ∅ ∧ (∃z. ∀x. x ∈ P ⇒ x ≤ z) ⇒ ∀y. y ∈ P ⇒ y ≤ sup P

Perhaps the original intent was to prevent explicitly using pred_setTheory but this is no more any issue. Also, the versions of set notation is actually more foundamental. If we were having these lemmas with set notations, the original versions can be obtained by a simple rewrite with IN_APP and GSYM MEMBER_NOT_EMPTY. The other side of rewriting is impossible (or hard), because all lambda-applications x y can be interpreted as y IN x.

P.S. In extrealTheory (or extreal_baseTheory), the original sup/inf lemmas are also in similar shapes, and I have already added a lot of such variants using set notations (and then use them in new probability proofs).

Chun

@mn200
Copy link
Member

mn200 commented Dec 9, 2024

Thanks for this!

@mn200 mn200 merged commit 2673c02 into HOL-Theorem-Prover:develop Dec 9, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants