7772c16033
After this commit, in the type checker, when checking convertability, we first compute a normal form without expanding opaque terms. If the terms are convertible, then we are done, and saved a lot of time by not expanding unnecessary definitions. If they are not, instead of throwing an error, we try again expanding the opaque terms. This seems to be the best of both worlds. The opaque flag is a hint for the type checker, but it would never prevent us from type checking a valid term. Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
9 lines
340 B
Text
9 lines
340 B
Text
(**
|
|
-- The elaborator does not expand definitions marked as 'opaque'.
|
|
-- To be able to prove the following theorem, we have to unmark the
|
|
-- 'forall'
|
|
local env = get_environment()
|
|
env:set_opaque("forall", false)
|
|
**)
|
|
Theorem ForallIntro2 (A : (Type U)) (P : A -> Bool) (H : Pi x, P x) : forall x, P x :=
|
|
Abst (fun x, EqTIntro (H x))
|