fix(frontends/lean/decl_cmds): support for section declarations with implicit parameters, they must be tagged with '@' when creating aliases
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
811f46e97b
commit
a5b9a7b296
2 changed files with 3 additions and 1 deletions
|
@ -8,7 +8,7 @@ using eq_proofs
|
||||||
-- Show that Excluded middle follows from
|
-- Show that Excluded middle follows from
|
||||||
-- Hilbert's choice operator, function extensionality and Prop extensionality
|
-- Hilbert's choice operator, function extensionality and Prop extensionality
|
||||||
section
|
section
|
||||||
hypothesis propext ⦃a b : Prop⦄ : (a → b) → (b → a) → a = b
|
hypothesis propext {a b : Prop} : (a → b) → (b → a) → a = b
|
||||||
|
|
||||||
parameter p : Prop
|
parameter p : Prop
|
||||||
|
|
||||||
|
|
|
@ -258,6 +258,8 @@ environment definition_cmd_core(parser & p, bool is_theorem, bool _is_opaque) {
|
||||||
type = Pi_as_is(section_ps, type, p);
|
type = Pi_as_is(section_ps, type, p);
|
||||||
value = Fun_as_is(section_ps, value, p);
|
value = Fun_as_is(section_ps, value, p);
|
||||||
levels section_ls = collect_section_levels(ls, p);
|
levels section_ls = collect_section_levels(ls, p);
|
||||||
|
for (expr & p : section_ps)
|
||||||
|
p = mk_explicit(p);
|
||||||
expr ref = mk_implicit(mk_app(mk_explicit(mk_constant(real_n, section_ls)), section_ps));
|
expr ref = mk_implicit(mk_app(mk_explicit(mk_constant(real_n, section_ls)), section_ps));
|
||||||
p.add_local_expr(n, ref);
|
p.add_local_expr(n, ref);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue