Isabelle报错‘Cannot update finished theory "HOL.Finite_Set"’含义及解决咨询
Hey there, let's clear up this confusion with Isabelle's Finite_Set theory! I've run into this exact issue before, so here's what's going on and how to fix it:
What Does "Cannot update finished theory" Mean?
Isabelle marks core library theories (like HOL.Finite_Set) as finished—these are foundational components of the HOL distribution maintained by the Isabelle development team. Once a theory is finished, you can't modify it, recompile it, or even open it in the editor with intent to make changes. This is a safeguard to keep the logical consistency of the entire HOL library intact.
Why Your Import Isn't Working
Your import line uses a file system path ($ISABELLE_HOME/SRC/HOL/Finite_Set), which isn't the right way to reference Isabelle's library theories. Isabelle relies on logical namespaces for imports, not direct file paths.
Step-by-Step Fix
Correct Your Import Statement
Replace your current import line with the logical namespace reference:imports HOL.Finite_SetIsabelle will automatically locate the correct theory file in its standard library without you needing to specify the exact file path.
Access Finite_Set's Content (Without Editing)
If you want to view definitions or theorems inFinite_Set, don't try to open the raw.thyfile directly. Instead:- In your own theory, hover over references like
finiteorcard(from Finite_Set) and use Isabelle's "jump to source" feature (usually Ctrl+click or Cmd+click) to view the code in read-only mode. - Use commands like
find_theorems "finite"to search for theorems related to finite sets without opening the core theory file.
- In your own theory, hover over references like
Verify the Fix
After updating your import, reload your theory. You should now be able to use all definitions, lemmas, and theorems fromHOL.Finite_Setwithout parsing errors.
内容的提问来源于stack exchange,提问作者david streader

