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

Improved subtree_equiv_lemma without subtree_equiv' #1378

Merged
merged 2 commits into from
Dec 23, 2024

Conversation

binghe
Copy link
Member

@binghe binghe commented Dec 22, 2024

Hi,

This PR improves the previous #1367. With an improved construction of Böhm transform (beyond textbook), I have removed the needs of subtree_equiv' and proved a better version of subtree_equiv_lemma (NOTE: In previous PR the theorem name was wrongly written in the code as subterm_equiv_lemma, this typo is fixed here.):

[subtree_equiv_lemma]
⊢ ∀X Ms p r.
    FINITE X ∧ p ≠ [] ∧ 0 < r ∧ Ms ≠ [] ∧
    BIGUNION (IMAGE FV (set Ms)) ⊆ X ∪ RANK r ∧
    EVERY (λM. subterm X M p r ≠ NONE) Ms ⇒
    ∃pi.
      Boehm_transform pi ∧ EVERY is_ready' (MAP (apply pi) Ms) ∧
      (∀M. MEM M Ms ⇒ p ∈ ltree_paths (BT' X (apply pi M) r)) ∧
      ∀M N q.
        MEM M Ms ∧ MEM N Ms ∧ q ≼ p ⇒
        (subtree_equiv X M N q r ⇔
         subtree_equiv X (apply pi M) (apply pi N) q r)

The previous added definitions subtree_equiv' and ltree_equiv', etc. are now useless and removed.

NOTE: For the next applications of this lemma, the antecedent EVERY (λM. subterm X M p r ≠ NONE) Ms may still need to be weaken to p ∈ ltree_paths (BT' X M r)) or even completely eliminated, and the involved is_ready' (a variant of is_ready) can then be recovered to the original is_ready. These changes will bring a few more trivial cases and further increases the proof size (now boehmScript.sml has more than 10K lines.)

--Chun

@mn200
Copy link
Member

mn200 commented Dec 23, 2024

Seems promising!

@mn200 mn200 merged commit c268923 into HOL-Theorem-Prover:develop Dec 23, 2024
4 checks passed
@binghe binghe deleted the subtree_equiv branch January 23, 2025 06:26
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