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

EXTENSIONAL and RESTRICTION ported from HOL-Light #1216

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

binghe
Copy link
Member

@binghe binghe commented Mar 22, 2024

Hi,

This PR ports the useful EXTENSIONAL and RESTRICTION from HOL Light. These concepts are to be used by the porting work (in progress) of HOL-Light's ringtheory.sml.

EXTENSIONAL asserts "extensional" functions, mapping to a fixed value ARB outside the domain:

   [EXTENSIONAL_def]  Definition (combinTheory)      
      ⊢ ∀s f. EXTENSIONAL s f ⇔ ∀x. x ∉ s ⇒ f x = ARB

   [EXTENSIONAL]  Theorem (pred_setTheory)
      ⊢ ∀s. EXTENSIONAL s = {f | ∀x. x ∉ s ⇒ f x = ARB}

On the other hand, RESTRICTION does restriction of a function to an EXTENSIONAL one on a subset:

   [RESTRICTION]  Definition (combinTheory)      
      ⊢ ∀s f x. RESTRICTION s f x = if x ∈ s then f x else ARB

These definitions, together with several supporting lemmas, are added in combinTheory. Then. in relationTheory, the definition of RESTRICT for relations, can now be based on the newly added RESTRICTION (and the original definition then becomes a theorem):

   [RESTRICT]  Definition (relationTheory)      
      ⊢ ∀f R x. RESTRICT f R x = RESTRICTION (λy. R y x) f

   [RESTRICT_DEF]  Theorem      
      ⊢ ∀f R x. RESTRICT f R x = (λy. if R y x then f y else ARB)

The main body of supporting theorems are then added in pred_setTheory, e.g.:

   [EXTENSIONAL_UNIV]  Theorem      
      ⊢ ∀f. EXTENSIONAL 𝕌(:α) f

   [RESTRICTION_EXTENSION]  Theorem      
      ⊢ ∀s f g. RESTRICTION s f = RESTRICTION s g ⇔ ∀x. x ∈ s ⇒ f x = g x
   
   [RESTRICTION_FIXPOINT]  Theorem      
      ⊢ ∀s f. RESTRICTION s f = f ⇔ f ∈ EXTENSIONAL s
   
   [RESTRICTION_IDEMP]  Theorem      
      ⊢ ∀s f. RESTRICTION s (RESTRICTION s f) = RESTRICTION s f
   
   [RESTRICTION_IN_EXTENSIONAL]  Theorem      
      ⊢ ∀s f. RESTRICTION s f ∈ EXTENSIONAL s

--Chun

@mn200
Copy link
Member

mn200 commented Apr 9, 2024

Thanks for these changes!

@mn200 mn200 merged commit 8605071 into HOL-Theorem-Prover:develop Apr 9, 2024
2 checks passed
@binghe binghe deleted the RESTRICTION branch April 14, 2024 11:32
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