Giter Club home page Giter Club logo

glimpseoflean's Introduction

A glimpse of Lean

This repository is an introduction to theorem proving in Lean for the impatient. The goal is to get a feel for what proving in Lean looks like in 2 or 3 hours. After reading the Introduction.lean file, you should read explanations and do exercises in the Basics folder, and then choose to work on one file from the Topics folder. Of course you can play with all files from that folder if you have more time.

To work using Lean, you either have to install Lean locally, use Codespaces or use Gitpod.

  • To use codespaces, make sure you're logged in to Github, click the button below, select 4-core, and then press Create codespace. After a few minutes an editor with Lean working will open in your browser.

Open in GitHub Codespaces

  • Gitpod is very similar to Codespaces, click the button below, press Continue and wait a few minutes.

Open in Gitpod

  • To install Lean locally, follow the instructions here.

If you have a lot more time, you should read the book Mathematics in Lean

glimpseoflean's People

Contributors

fpvandoorn avatar jcommelin avatar joneugster avatar kmill avatar patrickmassot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

glimpseoflean's Issues

Is the intuitionistic valid_of_provable sound?

I was working through the intuitionistic soundness theorem and came up with a proof, but had a critical insight when I trying to understand the mechanics of completeness. It looks like the soundness theorem works equally well for terms that denote false – for which the only satisfying value will be ⊥. That's fine and even expected for soundness – we can prove false things by putting falsehoods into Γ, and indeed any proof of a tautology of the form ~A will do exactly this.

But for valid_of_provable it seems like we need something stronger – that ∅ ⊨ A is non-bottom for any valuation, in some Heyting algebra H (perhaps every non-trivial Heyting algebra H). We'll need something similar for completeness as well.

Broken example?

This is 90% a me problem given my unfamiliarity with lean, but on the 10% chance it is a mistake in the repo:

For some reason I was unable to get the repo itself working, but the examples seemed standalone so I imagine they would work if they were pasted into a working lean project

Following the example in https://github.com/PatrickMassot/GlimpseOfLean/blob/master/GlimpseOfLean/Exercises/01Rewriting.lean#L155

When I write the code:

import Mathlib
import Lake
open Filter 

example (a b c d : ℝ) (h : c = d*a - b) (h' : b = a*d) : c = 0 := by {
  rw [h'] at h
  ring at h
  -- Our assumption `h` is now exactly what we have to prove
  exact h
}

I got an error:

unexpected token 'at'; expected '}'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.