Logic and Mechanized Reasoning

Related tags

Miscellaneous lamr
Overview

Logic and Mechanized Reasoning

This repository is designed to accompany the course by the same name. See also:

This repository contains a supporting library and files containing examples from the textbook that you can edit and experiment with.

The course requires the Lean 4 programming language and theorem prover, as well as three additional automated reasoning tools: CaDiCaL (a SAT solver), Z3 (an SMT solver), and Vampire (a resolution theorem prover).

There are three ways for you to use the software and supporting libraries.

Option 1: Use Gitpod and the source repository

This is the easiest option. Gitpod will give you 50 free hours every month to run a virtual workspace through your browser.

  1. Register for Gitpod account at https://gitpod.io/login/.

  2. Go to https://gitpod.io/#/https://github.com/avigad/lamr. In other words, preface the url of this repository with https://gitpod.io/#. This will start a new workspace based on this repository.

  3. It may take a little while for the workspace to start, but when it does, you will be looking at a VS Code editor window with a terminal at the bottom and a file browser on the left. If you open the file User/Examples/hello_world.lean, you should see output in a Lean Infoview window. Also, hovering over the #eval commands with the blue squiggly lines underneath should show you the output of those commands.

  4. The folder User/Examples contains a copy all the examples from the textbook. Feel free to edit these files and experiment. You can also create new files to your heart's content. You should not change anything in the Mathlib or LAMR directories; we recommend keeping all your own files in the User folder. There is an original copy of the Examples folder in the LAMR directory, so you can copy these to User/Examples if you wish to restore the original files.

  5. When you are done, choose Stop workspace from the menu on the left. The workspace should also stop automatically 30 minutes after the last interaction or 3 minutes after closing the tab.

Every time you return to the link in Step 2, Gitpod will start a fresh workspace. To restart a previous workspace, go to https://gitpod.io/workspaces/. If you change the filter from Active to All, you will see all your recent workspaces. You can pin a workspace to keep it on the list of active ones.

With this method, you can save files on a virtual machine and start and stop it at will. There isn't an easy way to transfer files from the virtual machine to your own computer, but you can simply copy text from the editor in the browser and paste it anywhere you want.

We will update the repository, including the examples folder, as the course proceeds. To update the copy of the repository on an existing virtual machine, type git pull --no-rebase in the terminal window. You will then have to manually copy new files from the LAMR/Examples folder to the User/Examples folder. Alternatively, you can simply follow the instructions above to start a new workspace.

Option 2: Use Gitpod and a forked repository

Git is a powerful version control system and Github allows you to share repositories in the cloud. If you are familiar with these or willing to learn how to use them, you can fork this repository to your github account and use the fork as a file system for the virtual machine.

  1. Create a fork of https://github.com/avigad/lamr by clicking the Fork button in the upper right corner.

  2. Follow the instructions above to start a virtual machine on your copy of the repository.

You can merge updates from the master lamr repository clicking Fetch upstream from your repository page on Github. And now you can use the usual git commands from the terminal inside your virtual machine to synchronize with your copy of the repository. Use git pull to update the local copy in the virtual machine from your repository, and use git commit and git push to transfer changes from the virtual machine to your repository.

Option 3: Install Lean, the repository, and course software locally

It should not be too hard to install Lean and all the course software on your own computer, on Windows, OS/X, or Linux.

  1. Install Lean and VS Code following the instructions here.

  2. Clone this repository, using git clone or the Download ZIP option on the Code button above.

  3. Inside the top folder of the repository, type leanpkg build to compile the library files. Also, copy the examples folder from the LAMR folder to the User folder.

  4. Open the repository folder in VS Code.

From there, you should be able to use Lean and experiment with the example files as described in Option 1.

To use CaDiCaL, Z3, and Vampire, you will have to add them to manually to the folder LAMR/bin. There are instructions on how to obtain CaDiCaL here. We will later provide instructions for obtaining Z3 and Vampire.

You might also like...
ESP32 firmware to read and control EMS and Heatronic compatible equipment such as boilers, thermostats, solar modules, and heat pumps
ESP32 firmware to read and control EMS and Heatronic compatible equipment such as boilers, thermostats, solar modules, and heat pumps

EMS-ESP is an open-source firmware for the Espressif ESP8266 and ESP32 microcontroller that communicates with EMS (Energy Management System) based equipment from manufacturers like Bosch, Buderus, Nefit, Junkers, Worcester and Sieger.

Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.
Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.

SynnixOS Epic Hobby OS targeting x86_64 CPUs, it includes some hacked together functionality for most essential OSs although, with interactivity via Q

🎮 Plants vs. Zombies multiplayer battle, developed via reverse engineering, inline hook and dynamic-link library injection. Two online players defend and attack as the plant side and zombie side respectively.
🎮 Plants vs. Zombies multiplayer battle, developed via reverse engineering, inline hook and dynamic-link library injection. Two online players defend and attack as the plant side and zombie side respectively.

Plants vs. Zombies Online Battle This project has two original repositories: https://github.com/czs108/Plants-vs.-Zombies-Online-Battle https://github

Free,Open-Source,Cross-platform agent and Post-exploiton tool written in Golang and C++, the architecture and usage like Cobalt Strike
Free,Open-Source,Cross-platform agent and Post-exploiton tool written in Golang and C++, the architecture and usage like Cobalt Strike

Khepri Free,Open-Source,Cross-platform agent and Post-exploiton tool written in Golang and C++ Description Khepri is a Cross-platform agent, the archi

PLP Project Programming Language | Programming for projects and computer science and research on computer and programming.
PLP Project Programming Language | Programming for projects and computer science and research on computer and programming.

PLPv2b PLP Project Programming Language Programming Language for projects and computer science and research on computer and programming. What is PLP L

A run-time C++ library for working with units of measurement and conversions between them and with string representations of units and measurements

Units What's new Some of the CMake target names have changed in the latest release, please update builds appropriately Documentation A library that pr

Second life for famous JPEGView - fast and tiny viewer/editor for JPEG, BMP, PNG, WEBP, TGA, GIF and TIFF images with a minimalist GUI and base image processing.
Second life for famous JPEGView - fast and tiny viewer/editor for JPEG, BMP, PNG, WEBP, TGA, GIF and TIFF images with a minimalist GUI and base image processing.

JPEGView-Image-Viewer-and-Editor Updated Dec 07 2021. Version 1.1.1.0 has been released. Download link1, link2 added. Second life for famous JPEGView

An easy to build CO2 Monitor/Meter with Android and iOS App for real time visualization and charting of air data, data logger, a variety of communication options (BLE, WIFI, MQTT, ESP-Now) and many supported sensors.
An easy to build CO2 Monitor/Meter with Android and iOS App for real time visualization and charting of air data, data logger, a variety of communication options (BLE, WIFI, MQTT, ESP-Now) and many supported sensors.

CO2-Gadget An easy to build CO2 Monitor/Meter with cell phone App for real time visualization and charting of air data, datalogger, a variety of commu

Allows to swap the Fn key and left Control key and other tweaks on Macbook Pro and Apple keyboards in GNU/Linux

A patched hid-apple kernel module UPDATE August 2020: swap_fn_leftctrl is now built-in in Linux 5.8 🎉 UPDATE Jun 2020: New feature added (swap_fn_f13

Owner
Jeremy Avigad
Jeremy Avigad
Stock exchange simulator made in Swing using Java with logic backend in C++ giving it faster load time and better data control

StockSimulator Stock exchange simulator made in Swing using Java with logic backend in C++ giving it faster load time and better data control Features

Dušan Todorović 0 Mar 1, 2022
A model checker for the Dynamic Logic of Propositional Assignments (DL-PA) with solving and parameterized random formula generation functionalities.

A model checker for the Dynamic Logic of Propositional Assignments (DL-PA) with solving and parameterized random formula generation functionalities.

Jeffrey Yang 7 Dec 31, 2021
This repo contains BOTH c++ and BP examples to acheive the same logic, but in each frameworks specific ways

ApparatusCppMoveRandomly Hey there! This repo contains BOTH c++ and BP examples to acheive the same logic, but in each frameworks specific ways. I int

null 2 Jan 24, 2022
Using a RP2040 Pico as a basic logic analyzer, exporting CSV data to read in sigrok / Pulseview

rp2040-logic-analyzer This project modified the PIO logic analyzer example that that was part of the Raspberry Pi Pico examples. The example now allow

Mark 62 Dec 29, 2022
NAND (JEDEC / ONFI) Analyzer for Saleae Logic

NandAnalyzer NAND (JEDEC / ONFI) Analyzer for Saleae Logic The plugin was only tested against NV-DDR3 traces (and I use the term "test" lightly). You

null 9 Dec 12, 2022
Adjust Cirrus Logic CL-GD542x memory clock (DOS tool)

clmclk This is a tool for DOS to adjust Cirrus Logic CL-GD542x memory clock. This tool works on ISA and VL graphics cards with the CL-GD542, CL-GD5426

Michael Karcher 3 Apr 6, 2022
Repository of the <> team for the third project in 2022, titled <>

『 ?? 』magnUS-Snakemen『 ?? 』 ?? About It's been a tough day at school. You come back home, leave your bag on your bed and sit on your desk. You think i

Yordan Stoyanov 6 Nov 17, 2022
null 313 Dec 31, 2022
PikaScript is an ultra-lightweight Python engine with zero dependencies and zero-configuration, that can run with 4KB of RAM (such as STM32G030C8 and STM32F103C8), and is very easy to deploy and expand.

PikaScript 中文页| Star please~ 1. Abstract PikaScript is an ultra-lightweight Python engine with zero dependencies and zero-configuration, that can run

Lyon 906 Dec 29, 2022
Signed - a 3D modeling and construction language based on Lua and SDFs. Signed will be available for macOS and iOS and is heavily optimized for Metal.

Signed - A 3D modeling language Abstract Signed is a Lua based 3D modeling language, it provides a unique way to create high quality 3D content for yo

Markus Moenig 90 Nov 21, 2022