lean2/tests/lean/exists4.lean.expected.out
Leonardo de Moura 812c1a2960 feat(library/elaborator): only expand definitions that are not marked as hidden
The elaborator produces better proof terms. This is particularly important when we have to prove the remaining holes using tactics.
For example, in one of the tests, the elaborator was producing the sub-expression

 (λ x : N, if ((λ x::1 : N, if (P a x x::1) ⊥ ⊤) == (λ x : N, ⊤)) ⊥ ⊤)

After, this commit it produces

 (λ x : N, ¬ ∀ x::1 : N, ¬ P a x x::1)

The expressions above are definitionally equal, but the second is easier to work with.

Question: do we really need hidden definitions?
Perhaps, we can use only the opaque flag.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-20 02:16:49 -08:00

25 lines
753 B
Text

Set: pp::colors
Set: pp::unicode
Assumed: N
Assumed: a
Assumed: b
Assumed: c
Assumed: P
Assumed: H3
Proved: T1
Proved: T2
Proved: T3
Proved: T4
Theorem T1 : ∃ x y z : N, P x y z :=
ExistsIntro::explicit
N
(λ x : N, ∃ y z : N, P x y z)
a
(ExistsIntro::explicit
N
(λ x : N, ¬ ∀ x::1 : N, ¬ P a x x::1)
b
(ExistsIntro::explicit N (λ z : N, P a b z) c H3))
Theorem T2 : ∃ x y z : N, P x y z := ExistsIntro a (ExistsIntro b (ExistsIntro c H3))
Theorem T3 : ∃ x y z : N, P x y z := ExistsIntro a (ExistsIntro b (ExistsIntro c H3))
Theorem T4 (H : P a a b) : ∃ x y z : N, P x y z := ExistsIntro a (ExistsIntro a (ExistsIntro b H))