⚙️ ISABELLE RUNE DIFFICULTY: Adept Creational

The Singleton

Ensure that a theoretical construct has only one instance, and provide a global point of access to it.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Singleton
ARCANUM SCHOOL: Conjuration // Monism
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// ISABELLE PATTERN //
theory Singleton
  imports Main
begin

datatype unique_grimoire = TheGrimoire

lemma only_one_grimoire: "\<forall>x y. x = (y :: unique_grimoire)"
  by (metis unique_grimoire.exhaust)

end
Runic Tags: #isabelle #hol #conjuration #design-patterns