<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ansuman Das</title>
    <description>The latest articles on DEV Community by Ansuman Das (@ansumandas441).</description>
    <link>https://dev.to/ansumandas441</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1301707%2F73200bb8-f458-4e07-9297-d9e97e8e1a24.jpg</url>
      <title>DEV Community: Ansuman Das</title>
      <link>https://dev.to/ansumandas441</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ansumandas441"/>
    <language>en</language>
    <item>
      <title>I built a system that discovers math proofs by treating them as graph search</title>
      <dc:creator>Ansuman Das</dc:creator>
      <pubDate>Tue, 02 Jun 2026 13:50:00 +0000</pubDate>
      <link>https://dev.to/ansumandas441/i-built-a-system-that-discovers-math-proofs-by-treating-them-as-graph-search-21c8</link>
      <guid>https://dev.to/ansumandas441/i-built-a-system-that-discovers-math-proofs-by-treating-them-as-graph-search-21c8</guid>
      <description>&lt;p&gt;Every major theorem in mathematics was discovered by applying a known technique to a known fact.&lt;/p&gt;

&lt;p&gt;Euclid used proof by contradiction to show there are infinitely many primes. Euler plugged a series into a product formula to crack the Basel problem. Galois used symmetry reduction on polynomial roots. Wiles bridged modular forms and elliptic curves to close Fermat's Last Theorem. The techniques repeat — the same proof method appears across centuries and subdisciplines.&lt;/p&gt;

&lt;p&gt;So I asked: &lt;strong&gt;what if you could map all of these techniques and facts into a single graph, and let a machine search for new paths through it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's what I built.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/ypj-h_Aih5Q" rel="noopener noreferrer"&gt;https://youtu.be/ypj-h_Aih5Q&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fukmkide53re7opcwtvmg.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fukmkide53re7opcwtvmg.gif" alt="3D Knowledge Graph" width="720" height="368"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The core idea: proof is path-finding
&lt;/h2&gt;

&lt;p&gt;Here's the insight that makes this tractable.&lt;/p&gt;

&lt;p&gt;A mathematical proof is a chain: you start from known facts (axioms), apply a technique, get a new result, apply another technique, and eventually arrive at the theorem. That chain is a &lt;strong&gt;path through a directed graph&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Axiom → Technique → Intermediate state → Technique → Theorem
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Instead of searching over all possible mathematical statements (infinite and hopeless), the engine searches over &lt;strong&gt;compositions of known techniques applied to known states&lt;/strong&gt; — a finite, structured search space.&lt;/p&gt;
&lt;h2&gt;
  
  
  The knowledge graph
&lt;/h2&gt;

&lt;p&gt;I started from ~100 pivotal theorems in mathematics — from Pythagoras to Perelman — tracing the discovery context, motivation, and proof ideas behind each. Then I distilled everything into a structured directed graph:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What&lt;/th&gt;
&lt;th&gt;Count&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Axiom nodes (starting facts)&lt;/td&gt;
&lt;td&gt;3,791&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;State nodes (intermediate results)&lt;/td&gt;
&lt;td&gt;4,994&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Theorem nodes (proved results)&lt;/td&gt;
&lt;td&gt;4,262&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Technique nodes (proof methods)&lt;/td&gt;
&lt;td&gt;873&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Directed edges&lt;/td&gt;
&lt;td&gt;23,397&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Technique clusters&lt;/td&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total nodes&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;13,920&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each technique has a formal signature — inputs, process, outputs, preconditions — organized into 12 clusters like &lt;em&gt;algebraic manipulation&lt;/em&gt;, &lt;em&gt;symmetry &amp;amp; invariants&lt;/em&gt;, &lt;em&gt;cross-field transfer&lt;/em&gt;, &lt;em&gt;topology &amp;amp; obstruction&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The graph captures not just &lt;em&gt;what&lt;/em&gt; is true, but &lt;em&gt;how&lt;/em&gt; each truth was reached from earlier ones.&lt;/p&gt;
&lt;h2&gt;
  
  
  Walking through an example
&lt;/h2&gt;

&lt;p&gt;Let's trace how the Pythagorean theorem lives in this graph.&lt;/p&gt;

&lt;p&gt;The theorem node &lt;code&gt;Pythagorean theorem&lt;/code&gt; has incoming edges from the technique &lt;code&gt;Complete the square&lt;/code&gt; — that's one of the classical proof methods. Its outgoing edges feed into &lt;code&gt;Compose with identity&lt;/code&gt; and &lt;code&gt;Conjecture refinement&lt;/code&gt;, which means it acts as a building block for later results.&lt;/p&gt;

&lt;p&gt;That's the power of the graph structure: every theorem is both a destination (proved by applying techniques) and a launchpad (feeding into future proofs).&lt;/p&gt;
&lt;h2&gt;
  
  
  The surprising connections
&lt;/h2&gt;

&lt;p&gt;The most interesting part isn't the individual theorems — it's the &lt;strong&gt;cross-field bridges&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The technique &lt;code&gt;Conserved quantity&lt;/code&gt; (from the symmetry &amp;amp; invariants cluster) connects to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fermat's little theorem&lt;/strong&gt; (number theory)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Euler's polyhedron formula V-E+F=2&lt;/strong&gt; (topology)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Eulerian path criterion&lt;/strong&gt; (graph theory)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Three completely different areas of mathematics, one underlying proof technique. The graph makes these connections explicit.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Symmetry reduction&lt;/code&gt; connects Desargues's theorem in projective geometry to the Cantor-Bernstein-Schroeder theorem in set theory to Cauchy's group theorem in algebra. Same technique, different worlds.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Duality&lt;/code&gt; bridges Stokes's theorem (calculus), Hilbert's Nullstellensatz (algebraic geometry), and Green's theorem (vector analysis).&lt;/p&gt;

&lt;p&gt;These cross-field transfers are exactly where novel proofs live — and the engine knows it.&lt;/p&gt;
&lt;h2&gt;
  
  
  How the discovery engine works
&lt;/h2&gt;

&lt;p&gt;The engine reframes proof discovery as a search problem:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    ┌──────────────────────┐
                    │   ORCHESTRATOR LLM   │
                    │  Picks techniques,   │
                    │  evaluates results   │
                    └──────────┬───────────┘
                               │
                 ┌─────────────┼─────────────┐
                 │             │             │
          ┌──────▼──────┐ ┌───▼────────┐ ┌──▼───────────┐
          │  WORKER A   │ │  WORKER B  │ │  WORKER C    │
          │  Tries      │ │  Tries     │ │  Tries       │
          │  Technique 1│ │  Technique 2│ │  Technique 3 │
          └──────┬──────┘ └───┬────────┘ └──┬───────────┘
                 │            │             │
                 ▼            ▼             ▼
              PRUNER → removes impossible branches
                 │
            SEARCH TREE → expands most promising node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;An &lt;strong&gt;orchestrator&lt;/strong&gt; LLM selects which techniques to try based on a scoring heuristic. &lt;strong&gt;Worker&lt;/strong&gt; LLMs apply each technique in parallel. A &lt;strong&gt;pruner&lt;/strong&gt; kills branches that violate impossibility theorems (Abel-Ruffini, Godel, Turing). The search tree grows until a path from axioms to goal is found — or the frontier is exhausted.&lt;/p&gt;

&lt;p&gt;The scoring heuristic gives bonus points to &lt;strong&gt;cross-field transfers&lt;/strong&gt; — techniques that bridge different clusters — because history shows that's where the novel proofs come from.&lt;/p&gt;
&lt;h2&gt;
  
  
  The 3D visualization
&lt;/h2&gt;

&lt;p&gt;The entire graph is explorable in an interactive 3D viewer. Nodes glow by type, particles flow along edges showing the direction of mathematical reasoning, and you can orbit, zoom, and click to explore neighborhoods.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Element&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Gray dots&lt;/td&gt;
&lt;td&gt;Axioms — foundational definitions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Blue dots&lt;/td&gt;
&lt;td&gt;States — intermediate results&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Green stars&lt;/td&gt;
&lt;td&gt;Theorems — proved results&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Colored diamonds&lt;/td&gt;
&lt;td&gt;Techniques — sized by connections, colored by cluster&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Flowing particles&lt;/td&gt;
&lt;td&gt;Direction of logical dependency&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Hover any node to see its connections light up. Double-click to explore its full neighborhood.&lt;/p&gt;
&lt;h2&gt;
  
  
  Try it yourself
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/ansumandas441/mathematical-discovery-engine.git
&lt;span class="nb"&gt;cd &lt;/span&gt;mathematical-discovery-engine
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; http.server 8765
&lt;span class="c"&gt;# Open http://localhost:8765/graph_viewer_3d.html&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Or run the discovery engine:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;anthropic networkx
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; discovery_engine.discover &lt;span class="nt"&gt;--dry-run&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s2"&gt;"Prove the Erdos primitive set conjecture"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/ansumandas441" rel="noopener noreferrer"&gt;
        ansumandas441
      &lt;/a&gt; / &lt;a href="https://github.com/ansumandas441/mathematical-discovery-engine" rel="noopener noreferrer"&gt;
        mathematical-discovery-engine
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      This is a mathematical discovery engine, which searches new mathematics applying techniques to existing results
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Mathematical Discovery Engine (MDE)&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://github.com/ansumandas441/mathematical-discovery-engine/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667" alt="License: MIT"&gt;&lt;/a&gt;
&lt;a href="https://www.python.org/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/7856832dba5da6978f73123ee167994b01ba1cec502fab7d542d35eccc165deb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f507974686f6e2d332e31302532422d3337373641422e7376673f6c6f676f3d707974686f6e266c6f676f436f6c6f723d7768697465" alt="Python 3.10+"&gt;&lt;/a&gt;
&lt;a href="https://github.com/ansumandas441/mathematical-discovery-engine#knowledge-graph" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/f581bc71da9e92e9a886b4174ce159d1d4fb525c6c8f6ba4a6e429e50bb16f14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4e6f6465732d392532433436362d627269676874677265656e2e737667" alt="Knowledge Graph Nodes"&gt;&lt;/a&gt;
&lt;a href="https://github.com/ansumandas441/mathematical-discovery-engine#knowledge-graph" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/bde85b9ba4186e3a2140c276aaad958adad3d86e33006b61393d0046c34c9316/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f45646765732d31332532433530342d627269676874677265656e2e737667" alt="Knowledge Graph Edges"&gt;&lt;/a&gt;
&lt;a href="https://github.com/ansumandas441/mathematical-discovery-engine#knowledge-graph" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/54bab27650d8d519ea61fa01b53a909b81b1e241108bf379d2b7f530d2e03deb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f546563686e69717565732d3336302d6f72616e67652e737667" alt="Proof Techniques"&gt;&lt;/a&gt;
&lt;a href="https://github.com/ansumandas441/mathematical-discovery-engine#knowledge-graph" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/08910672e72da65f8b80242770f57e56064448b1b9f945a7d90e46d7a2d76956/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5468656f72656d732d322532433539332d707572706c652e737667" alt="Theorems"&gt;&lt;/a&gt;
&lt;a href="https://github.com/ansumandas441/mathematical-discovery-engine" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/55395966d9e1693865c204dc3caa5eeb1deb8a0c575bd1339e7878b247c9c339/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f616e73756d616e6461733434312f6d617468656d61746963616c2d646973636f766572792d656e67696e653f7374796c653d736f6369616c" alt="GitHub stars"&gt;&lt;/a&gt;
&lt;a href="https://github.com/ansumandas441/mathematical-discovery-engine/pulls" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/dd0b24c1e6776719edb2c273548a510d6490d8d25269a043dfabbd38419905da/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5052732d77656c636f6d652d627269676874677265656e2e737667" alt="PRs Welcome"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
  &lt;a rel="noopener noreferrer" href="https://github.com/ansumandas441/mathematical-discovery-engine/assets/knowledge_graph_3d_preview.gif"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fansumandas441%2Fmathematical-discovery-engine%2FHEAD%2Fassets%2Fknowledge_graph_3d_preview.gif" alt="3D Knowledge Graph — 9,466 mathematical nodes connected by 13,504 edges" width="720"&gt;&lt;/a&gt;
  &lt;br&gt;
  9,466 nodes · 13,504 edges · 360 proof techniques · 2,593 theorems — explore the full graph in 3D
&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;What This Repository Does&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;This repository is an attempt to &lt;strong&gt;encode the structure of mathematical knowledge and use it to discover new theorems automatically&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It starts from a simple observation: every major theorem in mathematics was discovered by applying known techniques to known facts. Galois used symmetry reduction on polynomial roots. Cantor used diagonalization on real numbers. Wiles used a bridge between modular forms and elliptic curves. The techniques are reusable — the same method of proof appears across centuries and subdisciplines.&lt;/p&gt;

&lt;p&gt;This project does three things:&lt;/p&gt;


&lt;ol&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Collects the knowledge.&lt;/strong&gt; A detailed report covering ~100 of the most consequential theorems in mathematics — from Pythagoras through Perelman — with the discovery context, motivation, thought process, and proof ideas behind each. The report spans 13 chapters organized…&lt;/p&gt;


&lt;/li&gt;

&lt;/ol&gt;
&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/ansumandas441/mathematical-discovery-engine" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;The graph currently covers ~100 pivotal theorems. The obvious next steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Expand coverage&lt;/strong&gt; — there are thousands more theorems worth mapping&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test against known proofs&lt;/strong&gt; — can the engine rediscover proofs that humans found?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Find genuinely new connections&lt;/strong&gt; — cross-field bridges that no one has explored yet&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Community contributions&lt;/strong&gt; — if you know a theorem and its proof technique, adding it to the graph is straightforward&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you work in mathematics, AI, or just find this interesting — I'd love feedback. Star the repo, open an issue, or reach out.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built with Claude, NetworkX, and an unhealthy obsession with mathematical structure.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>maths</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
