Giter VIP home page Giter VIP logo

lean2's Introduction

This is a snapshot of the Lean 0.2 theorem prover. We have this separate repository because this version has special support for Homotopy Type Theory.

About

Requirements

Installing

Windows

Linux

OS X

Build Instructions

Miscellaneous

lean2's People

Contributors

avigad avatar c-cube avatar digama0 avatar dselsam avatar eigengrau avatar favonia avatar fgdorais avatar gebner avatar htzh avatar ia0 avatar jacobgross avatar johoelzl avatar kha avatar leodemoura avatar levnach avatar robertylewis avatar skbaek avatar soonhokong avatar spl avatar syohex avatar ulrikbuchholtz avatar xrchz avatar zimmi48 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lean2's Issues

Compilation errors under newer GCC

Currently, Lean 2 cannot be compiled under newer versions of GCC (like 6.3 or 7). With GCC 7.1.1, it fails with the following error message:

[ 59%] Building CXX object frontends/lean/CMakeFiles/lean_frontend.dir/token_table.cpp.o
In file included from /tmp/lean2/src/frontends/lean/token_table.h:10:0,
                 from /tmp/lean2/src/frontends/lean/token_table.cpp:11:
/tmp/lean2/src/util/trie.h: In lambda function:
/tmp/lean2/src/util/trie.h:69:70: error: ‘this’ was not captured for this lambda function
                     new_t1->m_children.insert(k, merge(n1.steal(), c2));
                                                                      ^
/tmp/lean2/src/util/trie.h: In lambda function:
/tmp/lean2/src/util/trie.h:82:38: error: ‘this’ was not captured for this lambda function
                 for_each(f, c, prefix);
                                      ^
make[2]: *** [frontends/lean/CMakeFiles/lean_frontend.dir/build.make:87: frontends/lean/CMakeFiles/lean_frontend.dir/token_table.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2516: frontends/lean/CMakeFiles/lean_frontend.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

unreachable code was reached on some machines

In the commit d38979f 'unreachable' code was reached when elaborating this theorem on some machines:

theorem is_trunc_trunctype [instance] (n : ℕ₋₂) : is_trunc n.+1 (n-Type) :=

I worked around it by rewriting the proof in the two commits after that.

This error occurred on a machine with Ubuntu 17.04 with g++ 6.3.0 or with g++ 5.4.1 (I believe) and on a mac (with unknown version gcc/g++).

There were no errors on a machine with Ubuntu 16.04 with gcc 5.4.0/g++ 5.4.0

Align the result of `operator new` to `alignof(max_align_t)`

The C++ spec requires the result of operator new to be aligned to alignof(max_align_t), which is 16 on x86_64 Linux. However, lean's operator new returns 8 byte aligned memory under tcmalloc, where malloc_usable_size, malloc_size and _msize are unavailable.
As clang assumes 16-byte-aligned memory and uses movaps for zero-filling, 8-byte-aligned memory causes a segmentation fault.

The 8-byte alignment is from lean::save_alloc_size in src/util/memory.cpp, that stores the size of allocation into a 8 byte leading region of the allocated memory chunk. So, to fix the alignment issue, the leading region should be alignof(max_align_t) instead of a single size_t.

Readability of imaginaroid.lean

It is quite difficult to read imaginaroid.lean since * is used both for multiplication and conjugation. May I suggest using ^ instead? This will improve readability a lot.

ill-typed goal after esimp

The following code gives an ill-typed goal. More specifically, there is a variable pt in the goal (not to be confused with foo.pt) which is not in the local context. The code is for HoTT Lean, but the same error occurs in standard Lean if Type₀ is replaced by Type₁

prelude
import init.tactic
open unit

structure foo.{} (B : Type₀) (A : Type₀) : Type₀ :=
  (pt : B)

definition bar :=
foo unit

definition bar.mk [constructor] : bar unit :=
!foo.mk star
definition bar.mk2 [constructor] : bar unit :=
bar.mk

set_option pp.all true
example : eq (foo.pt (bar.mk2)) star :=
begin esimp end

Given output in release mode:

1 unsolved subgoal
⊢ @eq.{0} unit pt unit.star

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.