lean4-htt/src/frontends/lean
Leonardo de Moura 4dd6cead83 refactor(equality): make homogeneous equality the default equality
It was not a good idea to use heterogeneous equality as the default equality in Lean.
It creates the following problems.

- Heterogeneous equality does not propagate constraints in the elaborator.
For example, suppose that l has type (List Int), then the expression
     l = nil
will not propagate the type (List Int) to nil.

- It is easy to write false. For example, suppose x has type Real, and the user
writes x = 0. This is equivalent to false, since 0 has type Nat. The elaborator cannot introduce
the coercion since x = 0 is a type correct expression.

Homogeneous equality does not suffer from the problems above.
We keep heterogeneous equality because it is useful for generating proof terms.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-29 16:20:06 -07:00
..
CMakeLists.txt refactor(frontends/lean/elaborator): delete old_elaborator, and create frontend_elaborator class that will be based on library/elaborator/elaborator 2013-10-24 10:45:59 -07:00
coercion.h Rename lean frontend files. The prefix lean_ is not necessary anymore. 2013-09-12 20:09:35 -07:00
frontend.cpp feat(frontends/lean): make the first argument of if-expression implicit, add support for marking implicit arguments on builtin symbols (aka semantic attachments) 2013-10-29 15:53:50 -07:00
frontend.h feat(frontends/lean): make the first argument of if-expression implicit, add support for marking implicit arguments on builtin symbols (aka semantic attachments) 2013-10-29 15:53:50 -07:00
frontend_elaborator.cpp feat(frontends/lean/elaborator): solve easy overloads at preprocessing time 2013-10-29 10:07:15 -07:00
frontend_elaborator.h feat(frontends/lean): hook new elaborator in the default frontend 2013-10-24 15:14:29 -07:00
notation.cpp refactor(equality): make homogeneous equality the default equality 2013-10-29 16:20:06 -07:00
notation.h Rename lean frontend files. The prefix lean_ is not necessary anymore. 2013-09-12 20:09:35 -07:00
operator_info.cpp refactor(debug): improve lean_unreachable(), now we can avoid 'fake' return statements 2013-09-25 21:27:20 -07:00
operator_info.h Use fullpath in #include directives, add missing STL headers 2013-09-13 03:35:29 -07:00
parser.cpp feat(frontends/lean): make the first argument of if-expression implicit, add support for marking implicit arguments on builtin symbols (aka semantic attachments) 2013-10-29 15:53:50 -07:00
parser.h Rename lean frontend files. The prefix lean_ is not necessary anymore. 2013-09-12 20:09:35 -07:00
pp.cpp refactor(equality): make homogeneous equality the default equality 2013-10-29 16:20:06 -07:00
pp.h refactor(kernel): move printer and formatter objects to the kernel 2013-10-22 08:15:36 -07:00
scanner.cpp refactor(equality): make homogeneous equality the default equality 2013-10-29 16:20:06 -07:00
scanner.h Use fullpath in #include directives, add missing STL headers 2013-09-13 03:35:29 -07:00