Mirror of https://github.com/leanprover/lean2 in case it ever disappears
Find a file
Leonardo de Moura 872b698bc3 feat(elaborator): add option m_assume_injectivity for getting more concise solutions
We may miss solutions, but the solutions found are much more readable.
For example, without this option, for elaboration problem

Theorem Example4 (a b c d e : N) (H: (a = b ∧ b = e ∧ b = c) ∨ (a = d ∧ d = c)) : (h a c) = (h c a) :=
    DisjCases H
              (fun H1 : _,
                   let AeqC := Trans (Conjunct1 H1) (Conjunct2 (Conjunct2 H1))
                   in CongrH AeqC (Symm AeqC))
              (fun H1 : _,
                   let AeqC := Trans (Conjunct1 H1) (Conjunct2 H1)
                   in CongrH AeqC (Symm AeqC))

the elaborator generates

Theorem Example4 (a b c d e : N) (H : a = b ∧ b = e ∧ b = c ∨ a = d ∧ d = c) : (h a c) = (h c a) :=
    DisjCases
        H
        (λ H1 : if
               Bool
               (if Bool (a = b) (if Bool (if Bool (if Bool (b = e) (if Bool (b = c) ⊥ ⊤) ⊤) ⊥ ⊤) ⊥ ⊤) ⊤)
               ⊥
               ⊤,
           let AeqC := Trans (Conjunct1 H1) (Conjunct2 (Conjunct2 H1)) in CongrH AeqC (Symm AeqC))
        (λ H1 : if Bool (if Bool (a = d) (if Bool (d = c) ⊥ ⊤) ⊤) ⊥ ⊤,
           let AeqC := Trans (Conjunct1 H1) (Conjunct2 H1) in CongrH AeqC (Symm AeqC))

The solution is correct, but it is not very readable. The problem is that the elaborator expands the definitions of \/ and /\.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-24 16:47:50 -07:00
doc doc(todo): update todo.md 2013-10-02 09:56:45 -07:00
examples/lean Fix typo 2013-09-05 19:18:55 -07:00
script fix(script/demangle_cpptype): process line-by-line, instead of waiting for EOF 2013-09-29 18:36:01 -07:00
src feat(elaborator): add option m_assume_injectivity for getting more concise solutions 2013-10-24 16:47:50 -07:00
tests/lean fix(tests/lean): adjust tests 2013-10-24 15:42:17 -07:00
.gitignore Add more tests 2013-08-31 18:46:18 -07:00
.travis.osx.yml chore(travis): use demangle_cpptype.py to print out test/valgrind output 2013-09-29 16:30:02 -07:00
.travis.windows.yml chore(travis): fix git-commit-msg extraction 2013-09-28 13:33:13 -07:00
.travis.yml chore(travis): use demangle_cpptype.py to print out test/valgrind output 2013-09-29 16:30:02 -07:00
LICENSE Add LICENSE file 2013-07-15 18:55:48 -07:00
README.md doc(commit_convention): add git commit_convention 2013-09-25 19:45:15 -07:00

Build Status Ubuntu 12.04 LTS 64bit, g++-4.8 | clang++-3.3

Build Status Mac OS X 10.8.2, g++-4.9

Build Status Windows, x86_64-w64-mingw32-g++-4.8.1

[Result of Build/UnitTest/Coverage/Dynamic Analysis]

About

Requirements

Installing required packages at

Build Instructions

Miscellaneous