Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/696eca7b-acdc-800a-9ad9-5ebc9f477576
(section)
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== 9) A runnable miniature (toy simulation) — code ==== This is not “category theory software”; it’s a tiny program that implements the generated-category idea (states + primitive moves + history labels). You can run it anywhere Python runs. <syntaxhighlight lang="python">from dataclasses import dataclass from typing import List, Tuple, Optional @dataclass(frozen=True) class State: n: int # nuclei e: int # expression readiness c: int # contractile capacity @dataclass(frozen=True) class Arrow: src: State dst: State word: Tuple[str, ...] # sequence of generators, e.g. ("p","s","h") trace: Tuple[str, ...] # retained marks / history tokens (toy) def can_h(s: State, k: int = 2) -> bool: # myonuclear-like constraint: capacity can't exceed k*n return s.c + 1 <= k * s.n def step(s: State, gen: str, k: int = 2) -> Optional[State]: if gen == "h": if not can_h(s, k): return None return State(s.n, s.e, s.c + 1) if gen == "s": return State(s.n + 1, s.e, s.c) if gen == "p": return State(s.n, s.e + 1, s.c) return None def compose(f: Arrow, g: Arrow) -> Arrow: assert f.dst == g.src return Arrow( src=f.src, dst=g.dst, word=f.word + g.word, trace=f.trace + g.trace ) def mk_arrow(src: State, gens: List[str], k: int = 2) -> Optional[Arrow]: cur = src trace = [] for gen in gens: nxt = step(cur, gen, k) if nxt is None: return None # toy "memory": priming leaves a persistent mark; fusion leaves a mark if gen == "p": trace.append("primed") if gen == "s": trace.append("extra_nucleus_added") cur = nxt return Arrow(src, cur, tuple(gens), tuple(trace)) === Demo: two different paths to same endpoint (sometimes) but different traces === M0 = State(n=1, e=0, c=1) path_A = mk_arrow(M0, ["p", "s", "h", "h"], k=2) path_B = mk_arrow(M0, ["s", "p", "h", "h"], k=2) print("A:", path_A) print("B:", path_B) print("Same dst?", (path_A is not None and path_B is not None and path_A.dst == path_B.dst)) print("Different trace?", (path_A is not None and path_B is not None and path_A.trace != path_B.trace)) </syntaxhighlight> What you’ll see: * Sometimes both paths reach the same (n,e,c)(n,e,c)(n,e,c) (endpoint equality) * Their trace can differ (history dependence / “memory”) That’s the computational analogue of “2-morphisms vs plain morphisms”: same destination, distinct provenance.
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)