wisnesky
Re:Formal Reasoning [pdf]
on Sunday October 26, 2025 @03:41PM (#45714627)
That's the approach we're taking to verify LLM-generated SQL code at http://sql.ai.
Re:Graphs Are Programs
on Thursday August 14, 2025 @01:38PM (#44903325)
Hydra is a programming language that uses mathematical abstraction to model graphs within the language itself. It’s an open-source project spearheaded by Josh Shinavier, co-creator of Apache TinkerPop. In Josh’s own words: “In Hydra, programs are graphs, and graphs are programs.”
Re:Sql Semantic Search
on Thursday April 17, 2025 @04:12PM (#43721676)
An open source project to search SQL code 'semantically': up to the meaning of parse trees. For example, searching for 'select from A,B' matches 'select from B,A'.
Sql Semantic Search
Re:Code in Database vs. Code in Application
on Wednesday October 02, 2024 @08:45PM (#41726282)
The code in database vs database in code duality has a long history, and one way to formalize it mathematically uses category theory: the notion of LINQ (language integrated query, such as collection comprehensions) is formally related to the notion of "query-integrated languages" (where data integrity constraints are Turing-complete domain specific languages extending the database vocabulary). https://arxiv.org/pdf/1511.06459
Re:GPTs and Hallucination
on Tuesday September 10, 2024 @12:34PM (#41502655)
There is a partial solution to this problem: use formal methods such as symbolic logic and theorem proving to check the LLM output for correctness. We are launching a semantic validator for LLM-generated SQL code at sql.ai even now. (It checks for things like missing joins.) And others are using logic and math to create LLMs that don't hallucinate or have safety nets for hallucination, such as Symbolica. It is only when the LLM output doesn't have a correct answer that the technical issues become complicated.
Re:Ask HN: What is the current state of "logical" AI?
on Tuesday December 26, 2023 @12:07PM (#38773542)
Yes; categories extend traditional graphs with systems of equations. Hypergraphs extend traditional graphs by allowing edges to be between multiple nodes. Most operations on categories are formally undecidable because of the systems of equations; most operations on graphs/hypergraphs are decidable. This makes working with categorical databases a lot like doing computer algebra in e.g. Mathematica and provides a huge increase in expressive power (you can e.g. encode Turing machines with equations.)
Re:Ask HN: What is the current state of "logical" AI?
on Tuesday December 26, 2023 @11:44AM (#38773319)
At https://www.categoricaldata.net we claim that symbolic AI is also generative, when eg used in data warehousing. Instead of eg new images, the generatively gives you new primary and foreign keys, new ontologies, contradiction detection, etc.
Re:18.S097 Applied Category Theory: Textbook (2019)
on Monday November 06, 2023 @10:56AM (#38164262)
We use it for data integration https://www.categoricaldata.net
Re:What do we mean by "the foundations of mathematics"?
on Wednesday November 01, 2023 @03:45PM (#38103841)
Yes, at least with a strong enough arithmetic (such as Peano's), but that is usually more complicated; for example, you might have to create a Godel numbering or some other "deep embedding" to represent each set as a number. There's also so-called "reverse mathematics", which tries to determine the weakest axiom system capable of establishing a particular result.
Re:What do we mean by "the foundations of mathematics"?
on Wednesday November 01, 2023 @03:33PM (#38103670)
A foundation for mathematics is any formalism sufficient to prove the results typically taken as axioms in practical mathematics. For example, in ZFC you can define numbers as sets in many different ways and prove that 1+1=2 for each of them - other foundations include higher order logic, topos theory, other set theories, etc.
Re:The Deep Link Equating Math Proofs and Computer Programs
on Wednesday October 11, 2023 @01:31PM (#37847544)
Yes, although Dijkstra was interested in proving programs correct in general, not just in how lambda calculi correspond to logics correspond to categories (a proof technique for program correctness, among other things).
Re:Applied Category Theory Course
on Thursday September 28, 2023 @04:41PM (#37695527)
We've used Poly to prove results about functorial data migration.
Re:Did studying proof based math topics e.g. analysis make you a bette...
on Saturday June 24, 2023 @06:59PM (#36463440)
Yes, in the sense that "math is programming paper instead of computers", being better at one translates to being better at the other. This intuition can even be made precise via the "Curry-Howard isomorphism", upon which "proof assistants" such as Coq are built.
Re:Category Theory Illustrated
on Saturday March 18, 2023 @12:37PM (#35210546)
If you have a symmetric system, you can use group theory to make predictions about it. Similarly, if you have a compositional system, you can use category theory to make predictions about it. As for whether those predictions are useful, or non-obvious, or worth it, etc, tends to very a lot depending on the application, and the other techniques available- it's not a matter of being smart enough to get it. FWIW, I think category theory is certainly indispensable in denotational programming language semantics.
Re:Hydra: Type-aware transformations for data and programs
on Monday December 05, 2022 @04:43PM (#33872321)
Hydra is a transformation toolkit along the lines of Dragon (Uber), but open source, and with a more advanced type system and other new features. Hydra maps data and schemas between languages in a way which maintains type conformance. It will even map functional programs between selected languages, including parts of its own source code.
Hydra: Type-aware transformations for data and programs
Re:Why I am learning category theory
on Thursday December 01, 2022 @02:43PM (#33821617)
You might try pages 8-16 of this presentation: https://www.categoricaldata.net/cql/lambdaconf.pdf . The examples are relational to relational and simplistic but they do illustrate running the same transformation both forward and backward, as well as show the "unit" of such a "monad". We implemented everything in public software, so hopefully the software is even better than my word! As for loading SQL to RDF specifically, I'd be happy to share that technique, but it isn't public yet- please ping me at [email protected].
Re:Why I am learning category theory
on Thursday December 01, 2022 @05:47AM (#33814634)
Bi-directional data exchange has many uses. For example, given a set of conjunctive queries Q, because coeval_Q is left adjoint to eval_Q, the composition coeval_Q o eval_Q forms a monad, whose unit can be used to quantify the extent to which the original query Q is "information preserving" on a particular source (so query/data quality). As another example, we use the technique to load data into OWL ontologies from SQL sources, by specifying an OWL to SQL projection query (tends to be easy) and then running it in reverse (tends to be hard). But no doubt more applications await!
Re:Why I am learning category theory
on Wednesday November 30, 2022 @05:18PM (#33808686)
The way to run conjunctive SQL queries forward and backward is described in this paper, https://www.cambridge.org/core/journals/journal-of-functiona... , (also available on the arxiv), where they are referred to as query 'evaluation' and 'co-evaluation', respectively. We never would have been able to discover co-evaluation if not for category theory! The previous link includes this paper, and many others.
Re:Why I am learning category theory
on Wednesday November 30, 2022 @01:00PM (#33804730)
Category theory does provide new algorithms if you unroll all of its definitions. For example, it reveals that SQL conjunctive queries can be run both "forward" and "backward" - an algorithm that is invisible in traditional SQL literature because that literature lacks the vocabulary to even talk about what "running backward" even means - it isn't an 'inverse' relationship but an 'adjoint' one. We also use it to provide a new semantics for data integration. Link: https://www.categoricaldata.net
Re:Ask HN: Can the same individual accomplish more with programming th...
on Thursday April 14, 2022 @11:15AM (#31028037)
When I write math papers I often use proof assistants such as Coq to leverage my programming background to avoid some pencil and paper proofs altogether and rule out many sources of human error. If you consider yourself better at programming than proving, definitely take a look at proof assistants to leverage the former to enhance the latter.
Re:Category theory is a universal modeling language
on Thursday April 29, 2021 @04:04PM (#26986007)
Welcome to the applied category theory community :-)
Re:Category theory is a universal modeling language
on Thursday April 29, 2021 @03:26PM (#26985471)
The answer is yes. There's even a notion of 'categorical normal form' that extends 3NF that guarantees the direct representability of such relational databases as set-valued functors. Spivak talks about it in e.g. http://math.mit.edu/~dspivak/informatics/FunctorialDataMigra...
Re:Category theory is a universal modeling language
on Thursday April 29, 2021 @03:11PM (#26985261)
The trade-off has to do with computability: because (finitely presented) categories can express so much, reasoning about them (for example, the 'word problem' for them) is undecidable. So to use CT as a modeling language requires automated theorem proving techniques, which are computationally expensive, and fast reasoning is a large part of what we're commercializing.
Re:Category theory is a universal modeling language
on Thursday April 29, 2021 @03:02PM (#26985124)
The categorical databases formalism is also known as 'sketches'. For example, here are some slides from NASA et al that connect to David's work but use this alternative phrasing. It shows how to use category theory to 'align' ontologies, with an example about voting. https://www.nasa.gov/sites/default/files/ivv_wojtowicz_sketc...
Re:Category theory is a universal modeling language
on Thursday April 29, 2021 @02:28PM (#26984655)
Open source implementation and academic papers on using CT for databases: https://www.categoricaldata.net
Re:Old, Good Database Design
on Monday September 14, 2020 @04:12PM (#24474565)
Sum types are harder to express as data integrity constraints that product types - for example, Horn clause constraints can be used to express that a table is a product (or limit, more generally) of other tables, but to express that a table is a co-product (or colimit, more generally) requires a stronger logic (handling disjunction, for example). This has implications for data processing algorithms such as the chase that depend on the strength underling logic.
Re:How close are computers to automating mathematical reasoning?
on Saturday August 29, 2020 @03:07PM (#24318640)
Oh, such as a list of statements unprovable under a specific Godel numbering? Definitely much more difficult - I never saw such a list in grad school, although I wouldn't rule out the existence of one.