{"id":50531910,"url":"https://github.com/timcsy/cella-playground","last_synced_at":"2026-06-03T14:30:38.489Z","repository":{"id":349357435,"uuid":"1202019673","full_name":"timcsy/cella-playground","owner":"timcsy","description":"形式化證明工具：一個概念，各式投影","archived":false,"fork":false,"pushed_at":"2026-04-13T05:54:36.000Z","size":2053,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-13T07:23:10.134Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://timcsy.github.io/cella-playground/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timcsy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-05T13:43:13.000Z","updated_at":"2026-04-13T05:54:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/timcsy/cella-playground","commit_stats":null,"previous_names":["timcsy/cella-playground"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timcsy/cella-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timcsy%2Fcella-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timcsy%2Fcella-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timcsy%2Fcella-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timcsy%2Fcella-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timcsy","download_url":"https://codeload.github.com/timcsy/cella-playground/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timcsy%2Fcella-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33870025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-03T14:30:37.416Z","updated_at":"2026-06-03T14:30:38.483Z","avatar_url":"https://github.com/timcsy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cella Playground\n\n\u003e **一個概念，各式投影。**\n\n來玩：https://timcsy.github.io/cella-playground/\n\n---\n\n## 語言的牢籠\n\n維根斯坦說：「我的語言的界限意味著我的世界的界限。」\n\n我們每天都活在這個困境裡。你心中有一個想法——清澈、完整、活生生的——但當你開口說出來，它就變成了文字。文字不是想法本身，是想法的**投影**。換一種語言，投影就不同。「自由」和「freedom」和「自由（じゆう）」——三個符號，指向同一個概念，但每個都帶著自己文化的色彩和邊界。\n\n程式設計也是如此。同一個「排序」的概念，在 Python 裡長一個樣，在 Rust 裡長另一個樣。同一份資料，用 JSON 表達和用 XML 表達完全不同。我們花了無數時間在做一件事：**確認兩個不同的表達其實是同一個東西。**\n\n如果有一種方式，能讓「概念」本身成為主角，而不是它的某一個表達呢？\n\n---\n\n## 概念先於表達\n\n柏拉圖相信有一個理型（Form）的世界——椅子的「理型」先於任何一張具體的椅子存在。你看到的每一張椅子都是理型的投影，不完美的、局部的、受限於材料和工藝的。\n\n這聽起來很抽象，但程式設計師每天都在跟這件事搏鬥：\n\n- 你的 API 從 v1 升級到 v2，兩邊表達的是同一個能力，但格式不同。你得手動寫轉換器。\n- 你的資料庫改了 schema，資料的**意義**沒變，但結構變了。你得手動寫 migration。\n- 你想把一段邏輯從一個語言搬到另一個語言。概念相同，但你得從頭重寫。\n\n每一次，你都在做同一件事：**用手工勞動來彌補「概念」和「表達」之間的鴻溝。**\n\n---\n\n## Cella 做了什麼？\n\nCella 是一個實驗性的語言，基於一套叫 **Cubical Type Theory** 的數學理論。它做了一件前所未有的事：\n\n### 讓「等價」成為「相等」——而且可以計算\n\n如果兩個結構可以互相轉換，而且轉換是完美的（不丟失任何資訊），Cella 在數學上保證它們**就是同一個東西**。不是「看起來像」，不是「我們約定它們一樣」，是**定理**。\n\n而且這個定理不是空洞的宣言——Cella 可以**實際執行**這個轉換。你給它一邊的值，它自動幫你搬到另一邊。\n\n這叫 **Univalence**。在其他類似系統（如 Lean4、Coq）裡，它是一個公理——「我宣稱等價就是相等」，但系統無法用它做計算。在 Cella 裡，它是可以跑的程式碼。\n\n### 等式是路徑，不是判決\n\n傳統邏輯說 `a = b` 是一個命題——要麼成立，要麼不成立。黑或白，沒有中間地帶。\n\nCella 說 `a = b` 是一條**路徑**——從 a 到 b 的連續變形。路徑可以有很多條。不同的路徑代表不同的「相等方式」。\n\n這不只是數學的好奇心。它意味著我們可以追問：**這兩個東西是怎麼相等的？** 不只是「是或否」，而是「經由什麼路徑？」經由翻譯？經由重構？經由類比？每一條路徑都攜帶著轉換的**結構**。\n\n### 程式就是證明\n\n在 Cella 裡，寫程式和證明定理是同一件事。你寫的每一個函數都是一個邏輯論證。型別檢查通過 = 你的論證是有效的。\n\n這意味著 Cella 可以**保證**你的程式不會出現某些類型的錯誤——不是靠測試，是靠數學證明。\n\n---\n\n## 這跟我有什麼關係？\n\n**如果你是工程師**——你的公司把使用者資料從舊格式搬到新格式，工程師花了三週寫 migration script，上線後發現漏了兩個欄位。Cella 可以**證明**新舊格式等價，然後**自動產生**轉換，數學保證不丟任何一個欄位。\n\n**如果你是翻譯者或語言學家**——你知道「Home」翻成「家」丟掉了什麼，翻成「故鄉」又多加了什麼。每一次翻譯都是一條路徑，路徑不同，帶過去的東西就不同。Cella 讓你精確追問：**這條翻譯路徑保持了什麼？丟掉了什麼？**\n\n**如果你是哲學家**——忒修斯之船：把船的木板一塊一塊換掉，它還是同一艘船嗎？Cella 的回答：如果每一步替換都是「等價」的（功能完全相同），那是。如果不是，它能告訴你**從哪一步開始不是了**。身分不由名字決定，由結構決定。\n\n**如果你做社會科學**——你訪談了 30 個人關於「公平」的看法。每個人用不同的詞彙，但你覺得他們在講同一件事。怎麼確認？Cella 的思路：如果兩個人的「公平」概念可以互相翻譯而不丟失意義，它們就是同一個概念的不同投影。而且 Cella 正在研究衡量概念之間「距離」的方法——兩個人的「公平」有多像？（細節待發表）\n\n**如果你是老師**——你用三種方式解釋同一個觀念：比喻、公式、圖表。學生聽懂了其中一種。這三種解釋是同一個概念的三個投影。Cella 的世界觀讓你更清楚地思考：**我在投影什麼？投影保持了什麼？**\n\n**如果你只是好奇**——打開 Playground，選「初心者」路線，花 15 分鐘，不需要數學背景。你會發現：寫程式就是在證明定理，而等號比你以為的有趣得多。\n\n---\n\n## 試試看\n\n**[打開 Playground →](https://timcsy.github.io/cella-playground/)**\n\n三條路線，選適合你的：\n\n| | 路線 | 適合誰 | 你會體驗到 |\n|--|------|--------|-----------|\n| 🌱 | **初心者** | 我沒學過數學 | 用生活比喻理解「程式 = 證明」 |\n| 🔬 | **數學人** | 我學過數學 | 從古典數學走到同倫型別論 |\n| ⚡ | **老手** | 我用過 Lean4/Agda/Coq | Cella 能做到哪些它們做不到的事 |\n\n不用安裝。瀏覽器打開就能寫。\n\n---\n\n## Cella 和其他系統\n\n| | Lean4 | Cubical Agda | Coq | **Cella** |\n|---|-------|-------------|-----|-----------|\n| 等式可計算 | ✗ | ✓ | ✗ | **✓** |\n| transport 歸約 | ✗ | ✓ | ✗ | **✓** |\n| ua 可執行 | ✗ | ✓ | ✗ | **✓** |\n| 瀏覽器原生執行 | ✗ | ✗ | △ | **✓** |\n| 概念距離衡量 | ✗ | ✗ | ✗ | **研究中** |\n\n---\n\n\u003e **程式碼只是概念的投影。概念才是本體。**\n\u003e\n\u003e *—— Cella*\n\n---\n\n## 開發者：更新 Playground\n\n```bash\n# 1. Build WASM（在 cella repo 根目錄）\nwasm-pack build crates/playground-wasm --target web --out-dir ../../playground/pkg\n\n# 2. 推到 cella-playground repo\ngit push https://github.com/timcsy/cella-playground.git $(git subtree split --prefix=playground):main --force\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimcsy%2Fcella-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimcsy%2Fcella-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimcsy%2Fcella-playground/lists"}