This document discusses benchmarking theorem proving in linear logic. It describes collecting theorems in linear logic to test various provers and logic variants. An initial collection of 61 intuitionistic logic theorems were translated into linear logic using 4 different translations, resulting in 244 test problems. The document also discusses generating theorems in linear logic programmatically using type inference to produce over 8 billion theorems for training neural networks as theorem provers. The goal is to better understand differences between logics and provers through benchmarking and experimentation.
Talk at the Melbourne Logic Seminar
on Shawn Standefer invitation
Dialectica categories for the Lambek calculus
Valeria de Paiva
The Topos Institute, Berkeley, CA
Abstract:
Dialectica categorical models of the Lambek Calculus were first presented in the Amsterdam Colloquium a long time ago. Following Lambek's lead, we approached the Lambek Calculus from the perspective of Linear Logic and adapted the Dialectica categorical models for Linear Logic to Lambek's non-commutative calculus. The old work took for granted the syntax of the Lambek calculus and only discussed the exciting possibilities of new models for the modalities that Linear Logic introduced. Many years later we find that the work on dialectica models of the Lambek calculus is still interesting and that it might inform some of the most recent work on the relationship between Categorial Grammars and notions of Distributional Semantics.
Thus we revisited the old work, making sure that the syntax details that were sketchy on the first version got completed and verified, using automated tools such as Agda and Ott. Ultimately we are interested in the applicability of the original systems to their intended uses in the construction of semantics of Natural Language. But before we can discuss it, we need to make sure that the mathematical properties that make the Lambek calculus attractive are all properly modeled and this is the main aim of this paper.
We recall the Lambek calculus with its Curry-Howard isomorphic term assignment system. We extend it with a $\kappa$ modality, inspired by Yetter's work, which makes the calculus commutative. Then we add the of-course modality $!$, as Girard did, re-introducing weakening and contraction for all formulas and get back the full power of intuitionistic and classical logic. We also present algebraic semantics and categorical semantics, proved sound and complete for the whole system. Finally, we show the traditional properties of type systems, like subject reduction, the Church-Rosser theorem and normalization for the calculi of extended modalities, which we did not have before.
Talk at the Melbourne Logic Seminar
on Shawn Standefer invitation
Dialectica categories for the Lambek calculus
Valeria de Paiva
The Topos Institute, Berkeley, CA
Abstract:
Dialectica categorical models of the Lambek Calculus were first presented in the Amsterdam Colloquium a long time ago. Following Lambek's lead, we approached the Lambek Calculus from the perspective of Linear Logic and adapted the Dialectica categorical models for Linear Logic to Lambek's non-commutative calculus. The old work took for granted the syntax of the Lambek calculus and only discussed the exciting possibilities of new models for the modalities that Linear Logic introduced. Many years later we find that the work on dialectica models of the Lambek calculus is still interesting and that it might inform some of the most recent work on the relationship between Categorial Grammars and notions of Distributional Semantics.
Thus we revisited the old work, making sure that the syntax details that were sketchy on the first version got completed and verified, using automated tools such as Agda and Ott. Ultimately we are interested in the applicability of the original systems to their intended uses in the construction of semantics of Natural Language. But before we can discuss it, we need to make sure that the mathematical properties that make the Lambek calculus attractive are all properly modeled and this is the main aim of this paper.
We recall the Lambek calculus with its Curry-Howard isomorphic term assignment system. We extend it with a $\kappa$ modality, inspired by Yetter's work, which makes the calculus commutative. Then we add the of-course modality $!$, as Girard did, re-introducing weakening and contraction for all formulas and get back the full power of intuitionistic and classical logic. We also present algebraic semantics and categorical semantics, proved sound and complete for the whole system. Finally, we show the traditional properties of type systems, like subject reduction, the Church-Rosser theorem and normalization for the calculi of extended modalities, which we did not have before.
Benchmarking Linear Logic Proofs, Valeria de PaivaValeria de Paiva
Talk at the 1st Joint Meeting Brazil-France in Mathematics, https://impa.br/eventos-do-impa/eventos-2019/1st-joint-meeting-brazil-france-in-mathematics/
Benchmarking Linear Logic Proofs, Valeria de PaivaValeria de Paiva
Talk at the 1st Joint Meeting Brazil-France in Mathematics, https://impa.br/eventos-do-impa/eventos-2019/1st-joint-meeting-brazil-france-in-mathematics/
Probabilistic Abductive Logic Programming using Possible WorldsFulvio Rotella
Reasoning in very complex contexts often requires purely deductive reasoning to be supported by a variety of techniques that can cope with incomplete data. Abductive inference allows to guess information that has not been explicitly observed. Since there are many explanations for such guesses, there is the need for assigning a probability to each one. This work exploits logical abduction to produce multiple explanations consistent with a given background knowledge and defines a strategy to prioritize them using their chance of being true. Another novelty is the introduction of probabilistic integrity constraints rather than hard ones. Then we propose a strategy that learns model and parameters from data and exploits our Probabilistic Abductive Proof Procedure to classify never-seen instances. This approach has been tested on some standard datasets showing that it improves accuracy in presence of corruptions and missing data.
Keynote at the European Semantic Web Conference (ESWC 2006). The talk tries to figure out what the main scientific challenges are in Semantic Web research.
This talk was also recorded on video, and is available on-line at http://videolectures.net/eswc06_harmelen_wswnj/
Talk for the women+@DCS Sheffield University, UK
Title: Natural Language Inference for Humans
Valeria de Paiva,
Topos Institute, Berkeley, USA
Abstract: One hears much about the incredible results of recent neural nets methods in NLP. In particular much has been made of the results on the Natural Language Inference task using the huge new corpora SNLI, MultiNLI, SciTail, etc, constructed since 2015. Wanting to join in the fun, we decided to check the results on the corpus SICK (Sentences Involving Compositional Knowledge), which is two orders of magnitude smaller than SLNI and presumably easier to deal with.
We discovered that there were many results that did not agree with our intuitions. As a result, we have written so far five papers on the subject (with another one submitted to COLING2020).
I want to show you a potted summary of this work, to explain why we think this work is not near completion yet and how we're planning to tackle it.
This is work with Katerina Kalouli, Livy Real, Annebeth Buis and Martha Palmer. The papers are
Explaining Simple Natural Language Inference. Proceedings of the 13th Linguistic Annotation Workshop (LAW 2019), 01 August 2019. ACL 2019,
WordNet for “Easy” Textual Inferences. Proceedings of the Globalex Workshop, associated with LREC 2018
Graph Knowledge Representations for SICK. informal Proc of 5th Workshop on Natural Language and Computer Science, Oxford, UK, 08 July 2018
Textual Inference: getting logic from humans. Proc of the 12th International Conference on Computational Semantics (IWCS), 22 September 2017
Correcting Contradictions. Proc of Computing Natural Language Inference Workshop (CONLI 2017) @IWCS 2017
CSC375CSCM75Logic for Computer ScienceUlrich Berger.docxfaithxdunce63732
CSC375/CSCM75
Logic for Computer Science
Ulrich Berger
Department of Computer Science
Swansea University
Fall 2015
[email protected]
http://www.cs.swan.ac.uk/∼csulrich/
tel 513380, fax 295708, room 306, Faraday Tower
1 Introduction
The aim of this course is to give the student a working knowledge in logic and its
applications in Computer Science. Rather than trying to cover logic in its full breadth,
which, given the diversity and complexity of the subject, would be an impossible task
for a one-semester course, we will focus on the most fundamental concepts which
every computer scientists should be familiar with, be it as a practitioner in industry
or as a researcher at university. Although the selection of topics reflects to some
extent my personal view and taste of logic, I will aim at a balanced presentation that
also takes into account aspects of logic are not so close to my own research interests.
Throughout the course I will emphasize that logic is something one does : one models
a computing system, specifies a data type or a program, checks or proves that a
system satisfies a certain property. We will do a lot of exercises where these logical
activities will be trained, mostly on the blackboard or with pencil and paper, and
occasionally using the computer. The aim is to provide the student with active logic
skills to solve computing problems.
1
Abdullah
Highlight
Abdullah
Highlight
October 13, 2015 CSC375/CSCM75 Logic for Computer Science 2
Besides its practical applications we will also look into the historical development
of logic. What were the main philosophical and mathematical questions that led to
modern logic as we know it today? We will see that these questions and their answers
did shape not only logic, but also large parts of Computer Science.
The main prerequisites for this course are curiosity and a good appetite for solving
problems . No prior knowledge of logic is required. However, I take it for granted
that the student is able to digest formal definitions of syntactic entities such as terms
or formulas. For a Computer Science student, who is familiar with formal syntactic
objects such as computer programs, this will not be a problem at all.
“Logic for Computer Science” is a stand-alone course, but it is also intended to sup-
port other Computer Science modules offered, in particular the modules on Embedded
Systems, High Integrity Systems, Software Testing, Big Data and Machine Learning,
and Modeling and Verification Techniques. Our course does not follow a particular
textbook, but it will use material from several books and lectures on logic. Some of
the main sources are:
[1] D van Dalen, Logic and Structure, 3rd edition, Springer, 1994.
[2] J H Gallier, Logic for Computer Science, John Wiley & Sons, 1987.
[3] Handbook of Logic in Computer Science, Vol. 1-6, S Abramsky, D M
Gabbay, T S E Maibaum, eds, OUP, 1994.
[4] J R Shoenfield, Mathematical Logic, Addison-Wesley, 1967.
[5] D B Plummer, J Barw.
Logic and mathematics history and overview for studentsBob Marcus
Math and logic overview for students. Covers a wide range of topics including algorithms, proofs, probability, networks, number theory, statistics, causality, WolframAlpha, and Python programs.
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Subhajit Sahu
Abstract — Levelwise PageRank is an alternative method of PageRank computation which decomposes the input graph into a directed acyclic block-graph of strongly connected components, and processes them in topological order, one level at a time. This enables calculation for ranks in a distributed fashion without per-iteration communication, unlike the standard method where all vertices are processed in each iteration. It however comes with a precondition of the absence of dead ends in the input graph. Here, the native non-distributed performance of Levelwise PageRank was compared against Monolithic PageRank on a CPU as well as a GPU. To ensure a fair comparison, Monolithic PageRank was also performed on a graph where vertices were split by components. Results indicate that Levelwise PageRank is about as fast as Monolithic PageRank on the CPU, but quite a bit slower on the GPU. Slowdown on the GPU is likely caused by a large submission of small workloads, and expected to be non-issue when the computation is performed on massive graphs.
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Data and AI
Discussion on Vector Databases, Unstructured Data and AI
https://www.meetup.com/unstructured-data-meetup-new-york/
This meetup is for people working in unstructured data. Speakers will come present about related topics such as vector databases, LLMs, and managing data at scale. The intended audience of this group includes roles like machine learning engineers, data scientists, data engineers, software engineers, and PMs.This meetup was formerly Milvus Meetup, and is sponsored by Zilliz maintainers of Milvus.
Adjusting OpenMP PageRank : SHORT REPORT / NOTESSubhajit Sahu
For massive graphs that fit in RAM, but not in GPU memory, it is possible to take
advantage of a shared memory system with multiple CPUs, each with multiple cores, to
accelerate pagerank computation. If the NUMA architecture of the system is properly taken
into account with good vertex partitioning, the speedup can be significant. To take steps in
this direction, experiments are conducted to implement pagerank in OpenMP using two
different approaches, uniform and hybrid. The uniform approach runs all primitives required
for pagerank in OpenMP mode (with multiple threads). On the other hand, the hybrid
approach runs certain primitives in sequential mode (i.e., sumAt, multiply).
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...John Andrews
SlideShare Description for "Chatty Kathy - UNC Bootcamp Final Project Presentation"
Title: Chatty Kathy: Enhancing Physical Activity Among Older Adults
Description:
Discover how Chatty Kathy, an innovative project developed at the UNC Bootcamp, aims to tackle the challenge of low physical activity among older adults. Our AI-driven solution uses peer interaction to boost and sustain exercise levels, significantly improving health outcomes. This presentation covers our problem statement, the rationale behind Chatty Kathy, synthetic data and persona creation, model performance metrics, a visual demonstration of the project, and potential future developments. Join us for an insightful Q&A session to explore the potential of this groundbreaking project.
Project Team: Jay Requarth, Jana Avery, John Andrews, Dr. Dick Davis II, Nee Buntoum, Nam Yeongjin & Mat Nicholas
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Data and AI
Round table discussion of vector databases, unstructured data, ai, big data, real-time, robots and Milvus.
A lively discussion with NJ Gen AI Meetup Lead, Prasad and Procure.FYI's Co-Found
Adjusting primitives for graph : SHORT REPORT / NOTESSubhajit Sahu
Graph algorithms, like PageRank Compressed Sparse Row (CSR) is an adjacency-list based graph representation that is
Multiply with different modes (map)
1. Performance of sequential execution based vs OpenMP based vector multiply.
2. Comparing various launch configs for CUDA based vector multiply.
Sum with different storage types (reduce)
1. Performance of vector element sum using float vs bfloat16 as the storage type.
Sum with different modes (reduce)
1. Performance of sequential execution based vs OpenMP based vector element sum.
2. Performance of memcpy vs in-place based CUDA based vector element sum.
3. Comparing various launch configs for CUDA based vector element sum (memcpy).
4. Comparing various launch configs for CUDA based vector element sum (in-place).
Sum with in-place strategies of CUDA mode (reduce)
1. Comparing various launch configs for CUDA based vector element sum (in-place).
4. 4/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Based on
The ILLTP Library for Intuitionistic Linear Logic,
Linearity/TLLA 2018 (with Carlos Olarte, Elaine Pimentel and
Gisele Reis)
and
Deriving Theorems in Implicational Linear Logic,
Declaratively, ICLP 2020 and Training Neural Networks
as Theorem Provers via the Curry-Howard Isomorphism,
Computational Logic and Applications 2020 (with Paul Tarau)
Valeria de Paiva ProofTheoryOnline2020
5. 5/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Motivations
benchmark: “To measure the performance of (an item)
relative to another similar item in an impartial scientific
manner.”
Benchmarks for theorem provers well-developed area of AI
Since Logic Theorist (LT) 1956 Newell and Simon
“the first artificial intelligence program”, proved 38 of the first 52 theorems of Principia Mathematica
Valeria de Paiva ProofTheoryOnline2020
6. 6/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Motivation
Many theorem provers: interactive and automatic
Since 1993 TPTP: Thousands of Problems for Theorem
Provers (http://www.tptp.org/)
also CASC competition (CADE ATP System Competition)
http://www.tptp.org/CASC/
not much for non-classical logics
intuitionistic logic ILTP (http://www.iltp.de/) and some
collections of modal problems including QMLTP
(http://www.iltp.de/qmltp/)
where is Linear Logic?
Valeria de Paiva ProofTheoryOnline2020
7. 7/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Goals
Collect problems/theorems in (a fragment of) Linear Logic
Investigate variants of the logic
Investigate variants of translations between logics
Use provers/benchmarks/ML as tools for experiments in logic
Logic as a Lab Science!
Valeria de Paiva ProofTheoryOnline2020
8. 8/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Linear Logic: a tool for semantics
A proof theoretic logic described by Girard in 1986.
Basic idea: assumptions cannot be discarded or duplicated.
They must be used exactly once – just like dollar bills (except
when they’re marked by a modality “!”)
Other approaches to accounting for logical resources before.
Relevance Logic
Great win for Linear Logic:
Account for resources when you want to, otherwise fall back
to traditional logic via translation A → B iff !A −◦ B
Valeria de Paiva ProofTheoryOnline2020
9. 9/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Linear Logic
In Linear Logic formulas denote resources. Resources are premises,
assumptions and conclusions, as they are used in logical proofs.
For example:
$1 −◦ latte
If I have a dollar, I can get a Latte
$1 −◦ cappuccino
If I have a dollar, I can get a Cappuccino
$1 I have a dollar
Can conclude either latte or cappuccino
— But using my dollar and one of the premisses above, say
$1 −◦ latte gives me a latte but the dollar is gone
— Usual logic doesn’t pay attention to uses of premisses, A implies B
and A gives me B but I still have A...
Valeria de Paiva ProofTheoryOnline2020
10. 10/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Linear Implication and (Multiplicative) Conjunction
Traditional implication: A, A → B B
A, A → B A ∧ B Re-use A
Linear implication: A, A −◦ B B
A, A −◦ B A ⊗ B Cannot re-use A
Traditional conjunction: A ∧ B A Discard B
Linear conjunction: A ⊗ B A Cannot discard B
Of course!: !A !A⊗!A Re-use
!(A) ⊗ B B Discard
Valeria de Paiva ProofTheoryOnline2020
11. 11/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Linear Logic Results
Soundness and Completeness for coherence spaces and many
other interesting models
”Have-your-cake-and-eat-it”theorem: Intuitionistic logic
proves A → B iff Linear Logic proves !A −◦ B.
A new graphical Natural Deduction system: proof nets
A new style of proof systems: focused systems
Some 30 years of limelight, especially in CS
Valeria de Paiva ProofTheoryOnline2020
12. 12/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Why Bother with Benchmarks?
Linear Logic has come of age
useful in programming languages, game semantics, quantum
physics, linguistics
Several Provers?
maybe should discuss adequacy or efficiency?
Nah!
Because it can help us understand the logic, where it differs or
not from traditional systems
Valeria de Paiva ProofTheoryOnline2020
13. 13/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
(some) Linear Logic Provers
LLTP (Maude)
https://github.com/carlosolarte/Linear-Logic-Prover-in-
Maude
LL prover (http://bach.istc.kobe-u.ac.jp/llprover/)
linTAP http://www.leancop.de/lintap/ Otten et al
LL prover explorer, Lolli, etc
YALLA (Coq) O. Laurent
https://perso.ens-lyon.fr/olivier.laurent/yalla/
Valeria de Paiva ProofTheoryOnline2020
14. 14/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Choosing Logic Problems
To be used as a standard a collection of problems should satisfy
some criteria. at least the following:
Formulae should able to distinguish different characteristics of
the logical systems and provers (design choice points)
important theorems and paradigmatic formulae should be
present (how do we know?)
Should be large enough so that we can do comparisons
between different provers and systems
(Not taken in consideration here) automatic comparison
scripts and efficiency timings should be computed by third
parties
Valeria de Paiva ProofTheoryOnline2020
15. 15/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Design choices
Classical or Intuitionistic Linear Logic? FILL?
differences in provability
is there a set of “principal”LL theorems?
Easy place to find LL theorems: Intuitionistic Logic
Use original theorem, everything provable in IL is provable in
LL using Girard’s translation
but hey, there are other (many) translations
which one to choose and why?
new use of computational provers and comparisons: to help to
clarify the theory
Valeria de Paiva ProofTheoryOnline2020
16. 16/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Our choices
starting: Kleene “Introduction to Metamathematics”1952
a basic collection of intuitionistic theorems
minimal set of intuitionistic theorems that a sound prover
should be able to derive
helpful to uncover bugs and sources of unsoundness
(historical note: with Sara Kalvala “Linear Logic in Isabelle”,
1995. sequent calculus in Isabelle, deprecated now)
Valeria de Paiva ProofTheoryOnline2020
17. 17/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Rudimentary Intuitionistic Logic
Rudimentary fragment of Intuitionistic Logic, ie
(→, ∧, ¬)-fragment of IL.
Why this fragment?
Intuitionistic disjunction poses some problems in LL.
Additive or multiplicative disjunction?
Each way leads to very different systems.
Concentrate on easy cases first, hence “rudimentary”IL.
This gives us some 61 theorems from Kleene’s book
(next slide)
problems in Giselle’s repo https://github.com/meta-logic/lltp
Valeria de Paiva ProofTheoryOnline2020
19. 19/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Translations?
IL theorems are not necessarily theorems in LL.
Need translations.
Which translations?
Four ‘translations’
1 Girard: (A → B)G
= !A −◦ B
2 “Lazy”(A → B)K
= !(A −◦ B)
3 Liang/Miller’s 0-1
4 Forgetful = read → as −◦
Last is not provability preserving!
First experiment: 61 theorems (IL) multiplied by 4 gives us
244 ’problems’ to check in Linear Logic
Give me an automated theorem prover, please!
Valeria de Paiva ProofTheoryOnline2020
20. 20/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Results
Olarte implemented a basic prover for IL as well as for ILLF
and LLF (all focused systems)
specified in Rewriting Logic and implemented in Maude
(Meseguer)
proofs of the original IL sequent, together with the derivation
trees of the corresponding ILL sequents, when provable
22 sequents are not provable in ILL
Obtained a collection of basic tests for LL
Extended this basic collection using (translations of) problems
from ILTP and from reachability of Petri Nets
Ended up with 4,494 formulas in our ILLTP library
Some comparison of translations, but need more!
Valeria de Paiva ProofTheoryOnline2020
22. 22/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
What have we got?
proposed a set of Linear Logic sequent tests, and have
implemented provers for logics LJ, ILL and CLL.
All three provers are focused-based
As a first experiment we tried 4 translations and we can
empirically compare times for them
Can we see patterns on these timeouts and failures?
Does this help when comparing translations?
Would like to compare with other translations, e.g. LKtq
Would like to have parallel/ensemble provers, perhaps
how can we push this work forward?
Valeria de Paiva ProofTheoryOnline2020
23. 23/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Changing Gears
Lukewarm reception at FLoC2018: not enough interest in the
benchmarks from theorem provers (mostly they’re interested
in specific applications, like automating proofs in logic itself –
several embeddings of LL into Coq)
Co-authors wanted to do different things
Tarau’s papers “Formula Transformers and Combinatorial Test
Generators for Propositional Intuitionistic Theorem
Provers”and ”Combinatorial Testing Framework for
Intuitionistic Propositional Theorem Provers”(2019)
Promised test generators and formula readers automatically
converting the ‘human-made’ tests of the ILTP library to
Prolog and Python form. Mentioned a testing framework
focusing on the implicational fragment of intuitionistic logic
I asked if we could do the same for Linear Logic
Valeria de Paiva ProofTheoryOnline2020
24. 24/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Building theorems
This is the work presented on ICLP2020
Main insight of work: instead of building formulas of a logic
and trying to prove whether they are theorems or not, with
given rules, build only the provable linear ones
True by construction and provably so, using the Curry-Howard
isomorphism
how?
generate all theorems of a given size in LL
use a low polynomial type inference algorithm associating a
type (when it exists) to a lambda term
rely on the Curry-Howard isomorphism, to generate simply
typed lambda terms in normal form
Valeria de Paiva ProofTheoryOnline2020
25. 25/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
What do we get?
an implicational intuitionistic logic prover specialized for linear
formulas
a big dataset for training neural networks that prove
intuitionistic theorems
preliminary results: very high success rate with seq2seq
encoded LSTM neural networks (not in the paper
https://arxiv.org/pdf/2009.10241.pdf)
intuition: use combinatorial generation of lambda terms +
type inference (easy) to solve some type inhabitation problems
(hard).
Valeria de Paiva ProofTheoryOnline2020
26. 26/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
How do we go about it?
implicational linear formulas (Prolog code), built as:
binary trees of size N, counted by Catalan numbers Catalan(N)
labeled with variables derived from set partitions counted by
Bell(N + 1) (see A289679 in OEIS)
linear lambda terms (proof terms for the implicational
formulas)
linear skeleton Motzkin trees (binary-unary trees with
constraints enforcing one-to-one mapping from variables to
their lambda binders)
closed linear lambda terms
after a chain of refinements, we derive a compact and
efficient generator for pairs of linear lambda terms in normal
form and their types (which always exist as they are all
typable!)
Voil´a! almost 8 billion theorems in a few hours
Valeria de Paiva ProofTheoryOnline2020
27. 27/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Want to machine learn tautologies?
(Tarau’s Training Neural Networks as Theorem Provers via the
Curry-Howard Isomorphism at CLA 2020
https://www.youtube.com/channel/UCk0-_Hgr_o3KbRQWdeoYIHA)
Can we train neural networks to learn inference on an interesting
logic?
Yes! our logic is implicational intuitionistic linear logic.
We need to derive an efficient algorithm requiring a low polynomial
effort per generated theorem and its proof term.
Outcomes:
implicational intuitionistic linear logic prover
a dataset for training neural networks
high success rate seq2seq encoded LSTM neural nets
open: can techniques extend to harder (e.g.,
PSPACE-complete) logics?
Valeria de Paiva ProofTheoryOnline2020
28. 28/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Machine learning tautologies
Several versions for Boolean logic, e.g. Can Neural Networks
Understand Logical Entailment? Evans, Saxton, Amos, Kohli, and
Grefenstette, 2018. arXiv:1802.08535 (Automated proof synthesis
for propositional logic with deep neural networks, arxiv 1805.11799
for intuitionistic logic) not the same ML-problem
implicational fragment of LL is decidable
Curry-Howard holds: linear lambda-calculus corresponds to
implicational only linear logic
polynomial algorithms for generating its theorems are useful:
when turned into test sets, combining tautologies and their
proof terms can be useful for testing correctness and scalability
of linear logic theorem provers
when turned into datasets, they can be used for training deep
learning networks focusing on neuro-symbolic computations
Valeria de Paiva ProofTheoryOnline2020
29. 29/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Machine learning tautologies
can use combinatorial generation of lambda terms + type
inference (easy) to solve some type inhabitation problems
(hard)
GOOD NEWS: there’s a size-preserving bijection between
linear lambda terms in normal form and their principal types!
a proof follows immediately from a paper by Noam Zeilberger
who attributes this observation to Grigori Mints
the bijection is proven by exhibiting a reversible
transformation of oriented edges in the tree describing the
linear lambda term in normal form, into corresponding
oriented edges in the tree describing the linear implicational
formula, acting as its principal type
obtained a generator for all theorems of implicational linear
intuitionistic logic of a given size, as measured by the number
of lollipops, without having to prove a single theorem!
Valeria de Paiva ProofTheoryOnline2020
30. 30/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
The datasets
the dataset containing generated theorems and their
proof-terms in prefix form (as well as their LaTeX tree
representations marked as Prolog “%” comments) is available
at http://www.cse.unt.edu/~tarau/datasets/lltaut/
it can be used for correctness, performance and scalability
testing of linear logic theorem provers
the <formula, proof-term> pairs in the dataset are usable
to test deep-learning systems on theorem proving tasks
also, formulas with non-theorems added for IPILL
Valeria de Paiva ProofTheoryOnline2020
31. 31/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Can Neural Nets help Theorem Proving?
We search for good frameworks for neuro-symbolic computing
theorem provers are computation-intensive, sometimes
Turing-complete search algorithms
two ways neural networks can help:
fine-tuning the search, by helping with the right choice at
choice points
used via an interface to solve low-level ‘perception’-intensive
tasks
can we simply replace the symbolic theorem prover given a
large enough training dataset? do we want to?
Valeria de Paiva ProofTheoryOnline2020
32. 32/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Evaluating the Performance of our Neural Nets as
Theorem Provers
in fact, our seq2seq LSTM recurrent neural network trained
on encodings of theorems and their proof-terms performs
unusually well
the experiments with training the neural networks using the
IPILL and IIPC theorem dataset are available at:
https://github.com/ptarau/neuralgs
the < formula, proof term > generators are available at:
https://github.com/ptarau/TypesAndProofs
the generated datasets are available at:
http://www.cse.unt.edu/~tarau/datasets/
Valeria de Paiva ProofTheoryOnline2020
33. 33/33
Introduction
Proving Theorems
Generating Theorems
Learning Theorems
Conclusions
Yeah, this was too fast for me too!
But it works and it’s based on Mints’ and Zeiberger’ results for
Intuitionistic Logic, which are simplified in the Linear implicational
case.
Future work is to see if we can extend it to Linear-non-Linear
Logic. To see if we can learn many more theorems.
THANKS!
Valeria de Paiva ProofTheoryOnline2020