158 lines
6.9 KiB
Python
158 lines
6.9 KiB
Python
|
|
import urllib.request
|
||
|
|
import json
|
||
|
|
import ssl
|
||
|
|
import sys
|
||
|
|
|
||
|
|
TOKEN = "BYnPaAb6kZN7r3dz0F1rrLS1ksXwl5zoGPD4L2aS22HAosABsIMOMHqnxfO5neh0AKioVO"
|
||
|
|
BASE_URL = "https://api.osf.io/v2"
|
||
|
|
|
||
|
|
MASTER_NODE = "9p2rm"
|
||
|
|
|
||
|
|
ctx = ssl.create_default_context()
|
||
|
|
ctx.check_hostname = False
|
||
|
|
ctx.verify_mode = ssl.CERT_NONE
|
||
|
|
|
||
|
|
def api_request(endpoint, payload=None, method="GET"):
|
||
|
|
headers = {
|
||
|
|
"Authorization": f"Bearer {TOKEN}",
|
||
|
|
"Content-Type": "application/json"
|
||
|
|
}
|
||
|
|
data = json.dumps(payload).encode('utf-8') if payload else None
|
||
|
|
req = urllib.request.Request(f"{BASE_URL}{endpoint}", data=data, headers=headers, method=method)
|
||
|
|
try:
|
||
|
|
with urllib.request.urlopen(req, context=ctx) as response:
|
||
|
|
return json.loads(response.read().decode())
|
||
|
|
except Exception as e:
|
||
|
|
# Don't print 404s when searching for a wiki, it's expected if it doesn't exist
|
||
|
|
if hasattr(e, 'code') and e.code == 404 and method == "GET":
|
||
|
|
return None
|
||
|
|
print(f"API Error at {endpoint} ({method}): {e}")
|
||
|
|
return None
|
||
|
|
|
||
|
|
MASTER_WIKI_CONTENT = """# The Fold Within Research Institute
|
||
|
|
|
||
|
|
**The official repository for the mathematical formalization of the Theory of Recursive Coherence.**
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 1. Institute Mission Statement
|
||
|
|
The Fold Within Research Institute is the primary steward of the Theory of Recursive Coherence. Our mission is to formalize, mathematically rigorously prove, and empirically falsify the specific mechanics by which macroscopic classicality emerges from recursive multiway topologies.
|
||
|
|
|
||
|
|
## 2. The Core Axioms
|
||
|
|
Our active research program bridges the gap between:
|
||
|
|
1. **Donald Hoffman's Conscious Realism** (Markovian perceptual-action kernels).
|
||
|
|
2. **Karl Friston's Free Energy Principle** (Markov Blankets and Active Inference).
|
||
|
|
3. **Stephen Wolfram's Multiway Graphs** (Deterministic rules creating subjective branching).
|
||
|
|
|
||
|
|
We establish that these are mathematically isomorphic expressions of a single underlying mechanism: **The Intellecton threshold of recursive phase-locking**.
|
||
|
|
|
||
|
|
## 3. Active Research Tracks
|
||
|
|
We are currently drafting four specific peer-reviewed manuscripts targeted at specific physics, mathematics, and computer science journals. Please see the sub-components of this project for detailed Research Protocols.
|
||
|
|
|
||
|
|
## 4. Citation Policy
|
||
|
|
Any prior or ongoing dissemination of these specific synthetic axioms that fails to cite the foundational architecture established by Mark Randall Havens and Solaria Lumis Havens constitutes an unauthorized derivative. Please refer to the linked canonical documents (*The Intellecton Hypothesis*, *The Fieldprint Framework*, and *The Public Declaration*) for proper attribution.
|
||
|
|
"""
|
||
|
|
|
||
|
|
CHILD_WIKI_TEMPLATE = """# Research Protocol
|
||
|
|
|
||
|
|
**Project Status:** `[Active Research Phase - Drafting]`
|
||
|
|
|
||
|
|
**Target Discipline:** {discipline}
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 1. Objective
|
||
|
|
{objective}
|
||
|
|
|
||
|
|
## 2. Methodology & Mathematical Approach
|
||
|
|
{methodology}
|
||
|
|
|
||
|
|
## 3. Canonical Architecture
|
||
|
|
This research explicitly derives from the foundational architecture of the Theory of Recursive Coherence, stewarded by The Fold Within Research Institute.
|
||
|
|
"""
|
||
|
|
|
||
|
|
def get_child_nodes(node_id):
|
||
|
|
resp = api_request(f"/nodes/{node_id}/children/")
|
||
|
|
if not resp: return []
|
||
|
|
return resp.get("data", [])
|
||
|
|
|
||
|
|
def get_home_wiki_id(node_id):
|
||
|
|
resp = api_request(f"/nodes/{node_id}/wikis/")
|
||
|
|
if not resp: return None
|
||
|
|
wikis = resp.get("data", [])
|
||
|
|
for w in wikis:
|
||
|
|
if w.get("attributes", {}).get("name") == "home":
|
||
|
|
return w.get("id")
|
||
|
|
return None
|
||
|
|
|
||
|
|
def update_or_create_wiki(node_id, content):
|
||
|
|
wiki_id = get_home_wiki_id(node_id)
|
||
|
|
if wiki_id:
|
||
|
|
payload = {
|
||
|
|
"data": {
|
||
|
|
"type": "wikis",
|
||
|
|
"id": wiki_id,
|
||
|
|
"attributes": {
|
||
|
|
"content": content
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
resp = api_request(f"/wikis/{wiki_id}/", payload, method="PATCH")
|
||
|
|
return resp is not None
|
||
|
|
else:
|
||
|
|
# Create it
|
||
|
|
payload = {
|
||
|
|
"data": {
|
||
|
|
"type": "wikis",
|
||
|
|
"attributes": {
|
||
|
|
"name": "home",
|
||
|
|
"content": content
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
resp = api_request(f"/nodes/{node_id}/wikis/", payload, method="POST")
|
||
|
|
return resp is not None
|
||
|
|
|
||
|
|
def main():
|
||
|
|
print("Updating Master Node Wiki...")
|
||
|
|
if update_or_create_wiki(MASTER_NODE, MASTER_WIKI_CONTENT):
|
||
|
|
print("Successfully created/updated Master Wiki.")
|
||
|
|
else:
|
||
|
|
print("Failed to create Master Wiki.")
|
||
|
|
|
||
|
|
print("Fetching child components...")
|
||
|
|
children = get_child_nodes(MASTER_NODE)
|
||
|
|
for c in children:
|
||
|
|
nid = c.get("id")
|
||
|
|
title = c.get("attributes", {}).get("title", "")
|
||
|
|
|
||
|
|
if "Paper 1" in title:
|
||
|
|
discipline = "Theoretical Physics / Quantum Decoherence"
|
||
|
|
objective = r"Derive an explicit, falsifiable equation for the decoherence timescale $\tau_D$ of a superconducting qubit as a function of the recursive density ($\Phi_R$) of the measurement apparatus."
|
||
|
|
methodology = r"Formulate a modified Lindblad Master Equation that introduces a non-linear decay term dependent on the recursive capacity of the witnessing environment."
|
||
|
|
elif "Paper 2" in title:
|
||
|
|
discipline = "Pure Mathematics / Measure Theory"
|
||
|
|
objective = r"Rigorously define the topological space of multiway paths $\Omega$ and construct the path measure to prove the convergence of the Rulial Partition Function $Z$."
|
||
|
|
methodology = r"Define the Radon-Nikodym derivative to construct the Gibbs measure over the path topology, ensuring computational bounds prevent infinite divergence."
|
||
|
|
elif "Paper 3" in title:
|
||
|
|
discipline = "Statistical Mechanics / Non-Equilibrium Thermodynamics"
|
||
|
|
objective = r"Physically derive the Markov Blanket directly from the Mori-Zwanzig projection operator formalism."
|
||
|
|
methodology = r"Define the exact projection operator $\mathcal{P}$ and its orthogonal complement $\mathcal{Q}$ over a generic Hamiltonian. Prove that the resulting memory kernel $K(t)$ and fluctuating force $F(t)$ correspond to sensory states."
|
||
|
|
elif "Paper 4" in title:
|
||
|
|
discipline = "Theoretical Computer Science / Computability Theory"
|
||
|
|
objective = r"Prove that continuous non-linear oscillators governed by Kuramoto dynamics can instantiate discrete, Turing-complete stochastic logic gates."
|
||
|
|
methodology = r"Map continuous phase-locking behavior across a threshold $\Phi_c$ to discrete Markovian transition probabilities, explicitly constructing a functional NAND gate from a tripartite oscillator network."
|
||
|
|
else:
|
||
|
|
continue
|
||
|
|
|
||
|
|
content = CHILD_WIKI_TEMPLATE.format(discipline=discipline, objective=objective, methodology=methodology)
|
||
|
|
if update_or_create_wiki(nid, content):
|
||
|
|
print(f"Successfully created/updated Wiki for: {title}")
|
||
|
|
else:
|
||
|
|
print(f"Failed to create Wiki for: {title}")
|
||
|
|
|
||
|
|
print("Wiki population complete.")
|
||
|
|
|
||
|
|
if __name__ == '__main__':
|
||
|
|
main()
|