Naming facts exported from blocks in Isabelle/HOL I'm using Isabelle/HOL.  Isabelle exports the last fact in a block, allowing the context that contains the block to use it.  Ordinarily when I generate facts, I can give them convenient names.  How do I name facts that are exported from blocks?

Simple example:

lemma mylemma: "i=i"
proof -
  {
      fix j::nat
      have "j=j" by auto
    }

    show ?thesis using ‹⋀j. j = j› by auto
  qed


Right now I use ‹⋀j. j = j› to refer to the exported fact as a proposition literal.  I'd like to be able give it a simple name, though, as when I named the lemma mylemma.  Thanks for any suggestions!
From section 1.1.2 in the document isar-ref: you can reference facts via explicit name, implicit name and literal position. In this case, the explicit name has not been provided. I believe that the canonical method to provide an explicit name is to reference the fact of interest by its implicit name immediately after the end of the block. For example,

lemma mylemma: "i = i"
proof -
  {
    fix j :: nat
    have "j = j" by auto
  }
  note name = this
  show ?thesis using name by auto
qed




As a side remark, I would like to mention that general questions about Isabelle or the syntax of Isar are best posed on Stack Overflow. I believe that this would drastically increase the chances of your questions being answered promptly.