4dd6cead83
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>
14 lines
205 B
Text
14 lines
205 B
Text
Set: pp::colors
|
|
Set: pp::unicode
|
|
Set: pp::unicode
|
|
3 | 6
|
|
true
|
|
false
|
|
true
|
|
true
|
|
Assumed: x
|
|
3 + -1 * (x * (3 div x)) == 0
|
|
x + -1 * (3 * (x div 3)) == 0
|
|
false
|
|
Set: lean::pp::notation
|
|
Int::divides 3 x
|