Mirror of https://github.com/leanprover/lean2 in case it ever disappears
Find a file
Leonardo de Moura 29e448f034 fix(library/simplifier): remove support in the simplifier for (forall x : A, B x) when it is not a proposition, the problem is that hpiext axiom produces an equality in a too big universe
For example, in the hpiext axiom, the resultant equality if for (Type M+1)

axiom hpiext {A A' : TypeM} {B : A -> TypeM} {B' : A' -> TypeM} :
      A = A' -> (∀ x x', x == x' -> B x = B' x') -> (∀ x, B x) = (∀ x, B' x)

even if the actual arguments A, A’, B, B’ "live" in a much smaller universe (e.g., Type).

So, it would be great if we could move the resultant equality back to the right universe.
I don't see how to do it right now.

The other solution would require a major rewrite of the code base.
We would have to support universe level arguments like Agda, and write the axiom hpiext as:

axiom hpiext {l : level} {A A' : (Type l)} {B : A -> (Type l)} {B' : A' -> (Type l)} :
      A = A' -> (∀ x x', x == x' -> B x = B' x') -> (∀ x, B x) = (∀ x, B' x)

This is the first instance I found where it is really handy to have this feature.
I think this would be a super clean solution, but it would require a big rewrite in the code base.
Another problem is that the actual semantics that Agda has for this kind of construction is not clear to me.
For instance, sometimes Agda reports that the type of an expression is (Set omega).

An easier to implement hack is to support "axiom templates".
We create instances of hipext "on-demand" for different universe levels.
This is essentially what Coq does, since the universe levels are implicit in Coq.
This is not as clean as the Agda approach, but it is much easier to implement.

A super dirty trick is to include some instances of hpiext for commonly used universes
(e.g., Type and (Type 1)).

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-26 12:10:34 -08:00
doc refactor(kernel): remove heterogeneous equality 2014-01-16 17:39:12 -08:00
examples/lean feat(builtin/Nat): flip orientation of associativity axioms for + and * 2014-01-20 15:38:00 -08:00
script fix(script/demangle_cpptype): process line-by-line, instead of waiting for EOF 2013-09-29 18:36:01 -07:00
src fix(library/simplifier): remove support in the simplifier for (forall x : A, B x) when it is not a proposition, the problem is that hpiext axiom produces an equality in a too big universe 2014-01-26 12:10:34 -08:00
tests feat(library/simplifier): support for dependent simplification in Pi/forall expressions 2014-01-26 00:32:05 -08:00
.gitignore chore(.gitignore): ignore .md.lean files 2013-12-27 16:50:06 -08:00
.travis.osx.yml chore(travis): fix typo 2013-12-26 02:38:16 -05:00
.travis.windows.yml chore(travis): fix typo 2013-12-26 02:38:16 -05:00
.travis.yml chore(travis): fix another typo 2013-12-26 02:57:13 -05:00
LICENSE Add LICENSE file 2013-07-15 18:55:48 -07:00
README.md doc(README.md): Boost support 2013-12-09 17:45:31 -08:00

UbuntuOS XWindowsCoverageBuilds / UnitTests / Dynamic Analyses
http://build.leanprover.net

About

Requirements

Installing required packages at

Build Instructions

Miscellaneous