Specific example: Let's say I have demonstrated that I have a graph
in the sense of https://www.isa-afp.org/theories/category3/#FreeCategory.html :
lemma i_have_a_graph: shows "graph Obj Arr Dom Cod"
sorry
where the symbols Obj
, Arr
, Dom
, and Cod
were defined earlier in the file. This gives me access to the lemmas and theorems stated within the graph
locale.
How do I use the symbol path
defined within the graph
locale?
Related question with no answers: Access definitions from sublocale
You don't do it using a lemma but by the interpretation
command:
interpretation MyGraph: graph Obj Are Dom Cod <proof>
Of course, the <proof>
could use your lemma, but you don't need to prove such a lemma separately.
Now MyGraph.path
refers to the path
component of this instance.
See https://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/Isabelle/doc/locales.pdf