Home /Modules/stanford-math/SMSymbolTable.sleela

SMSymbolTable.sleela

stanford-math/SMSymbolTable.sleela · 106 line(s) · sleela

<< stanford-math/SMSymbolTable.sleela
   SLeeLa Standard Library Definition.
   Definition: The standard symbols used by the catalogued Stanford formulas,
   with their established meanings. Notation is the conventional mathematical
   usage, not an invention of this archive. >>
#sleela 2.1
< Worker-class carrier with full identity metadata. >
class SMSymbolTable {
  < ---- Descriptive metadata (version 1.11 nested-friendly accessors) ---- >
  << Eleven catalogued attributes with getter/setter pairs, so a GUI, loader,
     or catalog can read and (where appropriate) override this record.
     Values are faithful to the subject's real origin where publicly known. >>
  String metaVersion = "1.0.0";
  int metaId = 9130;
  String metaAuthor = "Stanford University Department of Mathematics";
  String metaDate = "2026-10-25";
  String metaCopyright = "conventional mathematical notation";
  String metaTrademark = "none";
  String metaCorporation = "none";
  < metaOrigin: National | <nation> | International | Galactic >
  String metaOrigin = "International";
  String metaBirthDate = "2026-10-25";
  < metaScienceRating: maturity/robustness on a 1..10 scale >
  int metaScienceRating = 10;
  < metaNationalSchedule: a real, citable instrument or "none" >
  String metaNationalSchedule = "none";

  String getMetaVersion() { return metaVersion; }
  void setMetaVersion(String v) { metaVersion = v; }
  int getMetaId() { return metaId; }
  void setMetaId(int v) { metaId = v; }
  String getAuthor() { return metaAuthor; }
  void setAuthor(String v) { metaAuthor = v; }
  String getDate() { return metaDate; }
  void setDate(String v) { metaDate = v; }
  String getCopyright() { return metaCopyright; }
  void setCopyright(String v) { metaCopyright = v; }
  String getTrademark() { return metaTrademark; }
  void setTrademark(String v) { metaTrademark = v; }
  String getCorporation() { return metaCorporation; }
  void setCorporation(String v) { metaCorporation = v; }
  String getOrigin() { return metaOrigin; }
  void setOrigin(String v) { metaOrigin = v; }
  String getBirthDate() { return metaBirthDate; }
  void setBirthDate(String v) { metaBirthDate = v; }
  int getScienceRating() { return metaScienceRating; }
  void setScienceRating(int v) { metaScienceRating = v; }
  String getNationalSchedule() { return metaNationalSchedule; }
  void setNationalSchedule(String v) { metaNationalSchedule = v; }

  < ---- Scientific record (purpose / method / gains / bedrock / integrity) ---- >
  << Spec-sanctioned extension (SLEELA.syntax §15: ordinary fields + accessors).
     Written truthfully for THIS class. metaIntegrityGoal: symbols are recorded
     with their conventional meaning, not a private redefinition. >>
  String metaPurpose = "Define the standard symbols the catalogued formulas use, in their conventional meaning.";
  String metaScientificMethod = "Notation attribution: each glyph carries its established usage, not an archive-local invention.";
  String metaAuthorialGains = "None; notation is a shared commons. The table gains only clarity.";
  String metaBedrock = "Conventional mathematical/physical notation (CODATA/SI for physical symbols).";
  String metaIntegrityGoal = "Let a symbol mean what the field means by it -- record the convention faithfully, never bend it to fit.";
  String getPurpose() { return metaPurpose; }
  void setPurpose(String v) { metaPurpose = v; }
  String getScientificMethod() { return metaScientificMethod; }
  void setScientificMethod(String v) { metaScientificMethod = v; }
  String getAuthorialGains() { return metaAuthorialGains; }
  void setAuthorialGains(String v) { metaAuthorialGains = v; }
  String getBedrock() { return metaBedrock; }
  void setBedrock(String v) { metaBedrock = v; }
  String getIntegrityGoal() { return metaIntegrityGoal; }
  void setIntegrityGoal(String v) { metaIntegrityGoal = v; }

  < ---- The symbols (conventional meanings) ---- >
  String[] glyphs;
  String[] meanings;
  int filled;

  void build() {
    glyphs = new String[10];
    meanings = new String[10];
    filled = 0;
    add("N", "number of cards / size of the state space");
    add("log2", "base-2 logarithm (riffle-shuffle mixing scale)");
    add("Z^d", "the d-dimensional integer lattice");
    add("d", "spatial dimension");
    add("G", "a group acting on a set (Polya enumeration)");
    add("c(g)", "number of cycles of group element g as a permutation");
    add("S", "entropy (statistical mechanics / information)");
    add("beta", "inverse temperature, beta = 1/(k*T)");
    add("k", "Boltzmann constant");
    add("CH", "the continuum hypothesis");
  }

  void add(String g, String m) {
    glyphs[filled] = g;
    meanings[filled] = m;
    filled = filled + 1;
  }

  int count() { return filled; }
  String glyphAt(int i) { return glyphs[i]; }
  String meaningAt(int i) { return meanings[i]; }

  String entryAt(int i) {
    return glyphs[i] + " = " + meanings[i];
  }
}