{"id":17273047,"url":"https://github.com/mo271/stirling","last_synced_at":"2026-03-19T00:27:45.557Z","repository":{"id":152733606,"uuid":"488865040","full_name":"mo271/stirling","owner":"mo271","description":"A proof of Stirling's formula in Lean","archived":false,"fork":false,"pushed_at":"2022-06-17T11:54:28.000Z","size":127,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-02T04:16:35.665Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Lean","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mo271.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-05-05T07:00:34.000Z","updated_at":"2022-06-06T13:10:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"317db480-b7c6-4bc1-81ec-a13bee90142b","html_url":"https://github.com/mo271/stirling","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mo271/stirling","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mo271%2Fstirling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mo271%2Fstirling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mo271%2Fstirling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mo271%2Fstirling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mo271","download_url":"https://codeload.github.com/mo271/stirling/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mo271%2Fstirling/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28810945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-10-15T08:50:05.041Z","updated_at":"2026-01-27T09:39:28.600Z","avatar_url":"https://github.com/mo271.png","language":"Lean","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A proof of [Stirling's formula](https://en.wikipedia.org/wiki/Stirling%27s_approximation) in [Lean](https://leanprover.github.io/)\n\nWe provide a proof of Stirling's formula in the following form:\n\n$$n! \\sim \\sqrt{2\\pi n}\\left(\\frac{n}{e}\\right)^n.$$\n\nMore concretely, we define\n```lean\nnoncomputable def an (n : ℕ) : ℝ  :=\n  (n.factorial : ℝ) /\n  ((real.sqrt(2*n)*((n/(exp 1)))^n))\n```\n\nand prove\n\n```lean\nlemma an_has_limit_sqrt_pi: tendsto\n(λ (n : ℕ),  an n) at_top (𝓝 (sqrt π)) :=\n```\n\nWe follow roughly [this proof](https://proofwiki.org/wiki/Stirling%27s_Formula).\n\nCurrently the proof is complete, but in very messy state.\nWe plan to clean and streamline the proof soon.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmo271%2Fstirling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmo271%2Fstirling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmo271%2Fstirling/lists"}