Skip to content

Rickerd1234/RelationalAlgebra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

285 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Formalizing Relational Algebra and its Equivalence to First-Order Logic in Lean

This repository contains the formalization code and supporting materials for my thesis project: "Formalizing the Relational Algebra and Its Equivalence to First-Order Logic in the Lean Proof Assistant", conducted at Eindhoven University of Technology.

๐Ÿ“š Overview

Relational Algebra (RA) is the theoretical foundation of SQL and a cornerstone of database theory. It has a deep and well-understood connection to First-Order Logic (FOL), with known equivalences under active domain semantics.

This project formalizes:

  • The core constructs of Relational Algebra (i.e. selection, projection, join, renaming, union, difference).
  • A corresponding fragment of First-Order Logic with active domain semantics.
  • The expressive equivalence between RA and FOL under this interpretation.

The formalization is developed in Lean 4, using its dependent type theory framework and the mathlib4 library where possible.

โœ… Goals

  • โœ… Formalize relational algebra.
  • โœ… Formalize equivalent fragments of FOL.
  • โœ… Prove equivalence theorems between RA and FOL expressions.
  • ๐Ÿ”„ Ensure reusable and well-documented Lean definitions.