diff --git a/hott/algebra/category/constructions/hset.hlean b/hott/algebra/category/constructions/hset.hlean index c023d2d6c..ecca369eb 100644 --- a/hott/algebra/category/constructions/hset.hlean +++ b/hott/algebra/category/constructions/hset.hlean @@ -72,16 +72,20 @@ namespace category ua !equiv_equiv_iso definition is_univalent_hset (A B : Precategory_hset) : is_equiv (iso_of_eq : A = B → A ≅ B) := - have H : is_equiv (@iso_of_equiv A B ∘ @equiv_of_eq A B ∘ subtype_eq_inv _ _ ∘ - @ap _ _ (to_fun (trunctype.sigma_char 0)) A B), from - @is_equiv_compose _ _ _ _ _ + assert H₁ : is_equiv (@iso_of_equiv A B ∘ @equiv_of_eq A B ∘ subtype_eq_inv _ _ ∘ + @ap _ _ (to_fun (trunctype.sigma_char 0)) A B), from + @is_equiv_compose _ _ _ _ _ (@is_equiv_compose _ _ _ _ _ - (@is_equiv_compose _ _ _ _ _ - _ - (@is_equiv_subtype_eq_inv _ _ _ _ _)) - !univalence) - !is_equiv_iso_of_equiv, - (iso_of_eq_eq_compose A B)⁻¹ ▸ H + (@is_equiv_compose _ _ _ _ _ + _ + (@is_equiv_subtype_eq_inv _ _ _ _ _)) + !univalence) + !is_equiv_iso_of_equiv, + assert H₂ : _, from (iso_of_eq_eq_compose A B)⁻¹, + begin + rewrite H₂ at H₁, + assumption + end end set definition category_hset [instance] : category hset := diff --git a/hott/hit/circle.hlean b/hott/hit/circle.hlean index ca9e8a984..9ff84d609 100644 --- a/hott/hit/circle.hlean +++ b/hott/hit/circle.hlean @@ -213,7 +213,7 @@ namespace circle { exact idp}, { intros n p, apply transport (λ(y : base = base), transport circle.code y _ = _), apply power_con, - rewrite [▸*,con_tr, transport_code_loop, ↑[circle.encode,circle.code] at p, p]}, + rewrite [▸*,con_tr, transport_code_loop, ↑[circle.encode,circle.code] at p], krewrite p}, { intros n p, apply transport (λ(y : base = base), transport circle.code y _ = _), { exact !power_con_inv ⬝ ap (power loop) !neg_succ⁻¹}, diff --git a/src/frontends/lean/util.cpp b/src/frontends/lean/util.cpp index 7a5ea158b..73400b79d 100644 --- a/src/frontends/lean/util.cpp +++ b/src/frontends/lean/util.cpp @@ -15,6 +15,7 @@ Author: Leonardo de Moura #include "library/locals.h" #include "library/explicit.h" #include "library/aliases.h" +#include "library/normalize.h" #include "library/placeholder.h" #include "library/abbreviation.h" #include "library/unfold_macros.h" @@ -450,6 +451,6 @@ char const * close_binder_string(binder_info const & bi, bool unicode) { } expr postprocess(environment const & env, expr const & e) { - return expand_abbreviations(env, unfold_untrusted_macros(env, e)); + return eta_reduce(expand_abbreviations(env, unfold_untrusted_macros(env, e))); } } diff --git a/src/library/normalize.cpp b/src/library/normalize.cpp index 82c2cc8f7..ce81a34d9 100644 --- a/src/library/normalize.cpp +++ b/src/library/normalize.cpp @@ -220,6 +220,10 @@ expr beta_reduce(expr t) { return eta_beta_reduce_fn()(t); } +expr eta_reduce(expr t) { + return eta_beta_reduce_fn()(t); +} + expr beta_eta_reduce(expr t) { return eta_beta_reduce_fn()(t); } diff --git a/src/library/normalize.h b/src/library/normalize.h index b428df3fb..217bde2c5 100644 --- a/src/library/normalize.h +++ b/src/library/normalize.h @@ -62,6 +62,7 @@ optional has_constructor_hint(environment const & env, name const & d) expr try_eta(expr const & e); expr beta_reduce(expr t); +expr eta_reduce(expr t); expr beta_eta_reduce(expr t); void initialize_normalize(); diff --git a/tests/lean/550.lean.expected.out b/tests/lean/550.lean.expected.out index 3c90a002a..bbb377eb9 100644 --- a/tests/lean/550.lean.expected.out +++ b/tests/lean/550.lean.expected.out @@ -37,4 +37,4 @@ rinv : func ∘ finv = function.id 550.lean:43:2: error: failed to add declaration 'bijection.inv.linv' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term λ (A : Type) (f : …), - bijection.rec_on f (λ (func finv : …) (linv : …) (rinv : …), ?M_1) + bijection.rec_on f ?M_1 diff --git a/tests/lean/571.lean.expected.out b/tests/lean/571.lean.expected.out index 404d6f8f1..16e0b502f 100644 --- a/tests/lean/571.lean.expected.out +++ b/tests/lean/571.lean.expected.out @@ -9,5 +9,4 @@ H : ∃ (n : ℕ), P n ⊢ ℕ 571.lean:7:0: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (P : …) (H : …), - ?M_1 + ?M_1 diff --git a/tests/lean/583.lean.expected.out b/tests/lean/583.lean.expected.out index 1dcd41f33..4355b2dd0 100644 --- a/tests/lean/583.lean.expected.out +++ b/tests/lean/583.lean.expected.out @@ -11,5 +11,4 @@ P : f a⁻¹ * f a = 1 583.lean:27:8: error: failed to add declaration 'group_hom.hom_map_inv' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term λ (A : Type) (B : Type) (s1 : …) (s2 : …) (f : …) (Hom : …) (a : A), - assert P : …, from …, - ?M_1 + ?M_1 … diff --git a/tests/lean/608.hlean.expected.out b/tests/lean/608.hlean.expected.out index cfe04c347..e3bebab09 100644 --- a/tests/lean/608.hlean.expected.out +++ b/tests/lean/608.hlean.expected.out @@ -1,9 +1,9 @@ definition category.id [reducible] : Π {ob : Type} [C : precategory ob] {a : ob}, hom a a -λ (ob : Type) (C : precategory ob) (a : ob), ID a +ID definition function.id [reducible] : Π {A : Type}, A → A λ (A : Type) (a : A), a ----------- definition category.id [reducible] : Π {ob : Type} [C : precategory ob] {a : ob}, hom a a -λ (ob : Type) (C : precategory ob) (a : ob), ID a +ID definition function.id [reducible] : Π {A : Type}, A → A λ (A : Type) (a : A), a diff --git a/tests/lean/abbrev_paren.hlean.expected.out b/tests/lean/abbrev_paren.hlean.expected.out index 609b84b80..3a9c8e25f 100644 --- a/tests/lean/abbrev_paren.hlean.expected.out +++ b/tests/lean/abbrev_paren.hlean.expected.out @@ -3,5 +3,4 @@ C : Precategory ⊢ C = Precategory.mk (carrier C) C abbrev_paren.hlean:5:54: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (C : Precategory), - ?M_1 + ?M_1 diff --git a/tests/lean/apply_fail.lean.expected.out b/tests/lean/apply_fail.lean.expected.out index 4b1292b60..02876835c 100644 --- a/tests/lean/apply_fail.lean.expected.out +++ b/tests/lean/apply_fail.lean.expected.out @@ -10,5 +10,4 @@ a b : Prop ⊢ a ∧ b apply_fail.lean:4:0: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (a b : Prop), - ?M_1 + ?M_1 diff --git a/tests/lean/assert_fail.lean.expected.out b/tests/lean/assert_fail.lean.expected.out index 711351872..138330912 100644 --- a/tests/lean/assert_fail.lean.expected.out +++ b/tests/lean/assert_fail.lean.expected.out @@ -9,8 +9,7 @@ H : b ∧ a ⊢ a ∧ b assert_fail.lean:4:0: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (a b : Prop) (H : …), - ?M_1 + ?M_1 assert_fail.lean:9:2: error:invalid tactic, there are no goals to be solved proof state: no goals @@ -20,5 +19,4 @@ Ha : a ⊢ a assert_fail.lean:10:0: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (a : Prop) (Ha : a), - ?M_1 + ?M_1 diff --git a/tests/lean/beginend_bug.lean.expected.out b/tests/lean/beginend_bug.lean.expected.out index dbe18db7d..a22b77a86 100644 --- a/tests/lean/beginend_bug.lean.expected.out +++ b/tests/lean/beginend_bug.lean.expected.out @@ -22,5 +22,4 @@ Hbc : b = c ⊢ a = c beginend_bug.lean:9:0: error: failed to add declaration 'foo' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (A : Type) (a b c : A) (Hab : …) (Hbc : …), - ?M_1 + ?M_1 diff --git a/tests/lean/cases_failure.hlean.expected.out b/tests/lean/cases_failure.hlean.expected.out index a6c9c5ee2..37dfc8970 100644 --- a/tests/lean/cases_failure.hlean.expected.out +++ b/tests/lean/cases_failure.hlean.expected.out @@ -30,5 +30,4 @@ s : square t b l r ⊢ unit cases_failure.hlean:13:0: error: failed to add declaration 'foo' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (A : Type) (x y z : A) (t : …) (b : …) (l : …) (r : …) (s : …), - ?M_1 + ?M_1 diff --git a/tests/lean/check_expr.lean.expected.out b/tests/lean/check_expr.lean.expected.out index d942c95f4..7e467f07c 100644 --- a/tests/lean/check_expr.lean.expected.out +++ b/tests/lean/check_expr.lean.expected.out @@ -6,5 +6,4 @@ a b : A ⊢ list A check_expr.lean:8:0: error: failed to add declaration 'foo' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (A : Type) (l : …), - ?M_1 + ?M_1 diff --git a/tests/lean/constr_tac_errors.lean.expected.out b/tests/lean/constr_tac_errors.lean.expected.out index 11a2e0799..596992e29 100644 --- a/tests/lean/constr_tac_errors.lean.expected.out +++ b/tests/lean/constr_tac_errors.lean.expected.out @@ -19,8 +19,7 @@ a b : Prop ⊢ a → b → a ∧ b constr_tac_errors.lean:13:0: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (a b : Prop), - ?M_1 + ?M_1 constr_tac_errors.lean:18:2: error:invalid 'constructor' tactic, goal is an inductive datatype, but it does not have 2 constructor(s) proof state: a b : Prop, @@ -32,8 +31,7 @@ a b : Prop ⊢ a → b → a ∧ b constr_tac_errors.lean:19:0: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (a b : Prop), - ?M_1 + ?M_1 constr_tac_errors.lean:31:2: error:invalid 'constructor' tactic, too many arguments have been provided proof state: a b : Prop, @@ -45,8 +43,7 @@ a b : Prop ⊢ a → b → unit constr_tac_errors.lean:32:0: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (a b : Prop), - ?M_1 + ?M_1 constr_tac_errors.lean:39:2: error:invalid 'constructor' tactic, goal is not an inductive datatype proof state: diff --git a/tests/lean/crash.lean.expected.out b/tests/lean/crash.lean.expected.out index 7e21fe986..4ab1377c1 100644 --- a/tests/lean/crash.lean.expected.out +++ b/tests/lean/crash.lean.expected.out @@ -1,9 +1,9 @@ crash.lean:8:12: error: type mismatch at application - have H' : ¬ P, from H, + have H' : ¬P, from H, ?M_1 term H has type P but is expected to have type - ¬ P + ¬P diff --git a/tests/lean/ctx.lean.expected.out b/tests/lean/ctx.lean.expected.out index 626c414f0..37fd96775 100644 --- a/tests/lean/ctx.lean.expected.out +++ b/tests/lean/ctx.lean.expected.out @@ -7,5 +7,4 @@ p1 p2 : A × B ⊢ nat ctx.lean:3:0: error: failed to add declaration 'foo' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (A B : Type) (a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 : nat) (b1 b2 b3 : bool) (h : …) (p1 p2 : …), - ?M_1 + ?M_1 diff --git a/tests/lean/exact_partial.lean.expected.out b/tests/lean/exact_partial.lean.expected.out index 5a9eaa1a6..b75f0dc83 100644 --- a/tests/lean/exact_partial.lean.expected.out +++ b/tests/lean/exact_partial.lean.expected.out @@ -20,5 +20,4 @@ a b : Prop ⊢ a → b → a ∧ b exact_partial.lean:5:0: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (a b : Prop), - ?M_1 + ?M_1 diff --git a/tests/lean/exact_partial2.lean.expected.out b/tests/lean/exact_partial2.lean.expected.out index 9b253c2fd..9e9bb0e70 100644 --- a/tests/lean/exact_partial2.lean.expected.out +++ b/tests/lean/exact_partial2.lean.expected.out @@ -17,5 +17,4 @@ h₂ : b = c ⊢ a = c exact_partial2.lean:4:0: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (a b c : nat) (h₁ : …) (h₂ : …), - ?M_1 + ?M_1 diff --git a/tests/lean/finset_induction_bug.lean.expected.out b/tests/lean/finset_induction_bug.lean.expected.out index 641094896..53e651aa6 100644 --- a/tests/lean/finset_induction_bug.lean.expected.out +++ b/tests/lean/finset_induction_bug.lean.expected.out @@ -13,61 +13,49 @@ A : Type, h : decidable_eq A, P : finset A → Prop, H1 : P (@empty A), -H2 : ∀ ⦃s : finset A⦄ {a : A}, not (@mem A a s) → P s → P (@insert A (λ (a b : A), h a b) a s), +H2 : ∀ ⦃s : finset A⦄ {a : A}, not (@mem A a s) → P s → P (@insert A h a s), s : finset A, u : nodup_list A, l : list A, a : A, l' : list A, -IH : - ∀ (x : @nodup A l'), - P (@quot.mk (nodup_list A) (nodup_list_setoid A) (@subtype.tag (list A) (λ (l : list A), @nodup A l) l' x)), +IH : ∀ (x : @nodup A l'), P (@quot.mk (nodup_list A) (nodup_list_setoid A) (@subtype.tag (list A) (@nodup A) l' x)), nodup_al' : @nodup A (@cons A a l'), anl' : not (@list.mem A a l'), H3 : @eq (list A) (@list.insert A (λ (a b : A), h a b) a l') (@cons A a l'), nodup_l' : @nodup A l', -P_l' : - P (@quot.mk (nodup_list A) (nodup_list_setoid A) (@subtype.tag (list A) (λ (l : list A), @nodup A l) l' nodup_l')), +P_l' : P (@quot.mk (nodup_list A) (nodup_list_setoid A) (@subtype.tag (list A) (@nodup A) l' nodup_l')), H4 : P (@insert A (λ (a b : A), h a b) a - (@quot.mk (nodup_list A) (nodup_list_setoid A) - (@subtype.tag (list A) (λ (l : list A), @nodup A l) l' nodup_l'))) -⊢ P - (@quot.mk (nodup_list A) (nodup_list_setoid A) - (@subtype.tag (list A) (λ (l : list A), @nodup A l) (@cons A a l') nodup_al')) + (@quot.mk (nodup_list A) (nodup_list_setoid A) (@subtype.tag (list A) (@nodup A) l' nodup_l'))) +⊢ P (@quot.mk (nodup_list A) (nodup_list_setoid A) (@subtype.tag (list A) (@nodup A) (@cons A a l') nodup_al')) finset_induction_bug.lean:30:45: error: don't know how to synthesize placeholder A : Type, h : decidable_eq A, P : finset A → Prop, H1 : P (@empty A), -H2 : ∀ ⦃s : finset A⦄ {a : A}, not (@mem A a s) → P s → P (@insert A (λ (a b : A), h a b) a s), +H2 : ∀ ⦃s : finset A⦄ {a : A}, not (@mem A a s) → P s → P (@insert A h a s), s : finset A, u : nodup_list A, l : list A, a : A, l' : list A, -IH : - ∀ (x : @nodup A l'), - P (@quot.mk (nodup_list A) (nodup_list_setoid A) (@subtype.tag (list A) (λ (l : list A), @nodup A l) l' x)), +IH : ∀ (x : @nodup A l'), P (@quot.mk (nodup_list A) (nodup_list_setoid A) (@subtype.tag (list A) (@nodup A) l' x)), nodup_al' : @nodup A (@cons A a l'), anl' : not (@list.mem A a l'), H3 : @eq (list A) (@list.insert A (λ (a b : A), h a b) a l') (@cons A a l'), nodup_l' : @nodup A l', -P_l' : - P (@quot.mk (nodup_list A) (nodup_list_setoid A) (@subtype.tag (list A) (λ (l : list A), @nodup A l) l' nodup_l')), +P_l' : P (@quot.mk (nodup_list A) (nodup_list_setoid A) (@subtype.tag (list A) (@nodup A) l' nodup_l')), H4 : P (@insert A (λ (a b : A), h a b) a - (@quot.mk (nodup_list A) (nodup_list_setoid A) - (@subtype.tag (list A) (λ (l : list A), @nodup A l) l' nodup_l'))) -⊢ P - (@quot.mk (nodup_list A) (nodup_list_setoid A) - (@subtype.tag (list A) (λ (l : list A), @nodup A l) (@cons A a l') nodup_al')) + (@quot.mk (nodup_list A) (nodup_list_setoid A) (@subtype.tag (list A) (@nodup A) l' nodup_l'))) +⊢ P (@quot.mk (nodup_list A) (nodup_list_setoid A) (@subtype.tag (list A) (@nodup A) (@cons A a l') nodup_al')) finset_induction_bug.lean:16:5: error: failed to add declaration 'finset.induction₂' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term λ (A : Type) (h : …) (P : …) (H1 : …) (H2 : …) (s : …), - @quot.induction_on … … … s + @quot.induction_on … … P s (λ (u : …), @subtype.destruct … … … u (λ (l : …), @@ -77,6 +65,5 @@ remark: set 'formatter.hide_full_terms' to false to see the complete term assert H3 : …, from …, assert nodup_l' : …, from …, assert P_l' : …, from …, - assert H4 : …, from …, - ?M_1))) + ?M_1 …))) finset_induction_bug.lean:30:49: error: invalid end of module, expecting 'end' diff --git a/tests/lean/gen_bug.lean.expected.out b/tests/lean/gen_bug.lean.expected.out index 436f8c980..823cdfc8b 100644 --- a/tests/lean/gen_bug.lean.expected.out +++ b/tests/lean/gen_bug.lean.expected.out @@ -20,5 +20,4 @@ b : B ⊢ @heq A a B b → @heq B b A a gen_bug.lean:12:0: error: failed to add declaration 'tst' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (A B : Type) (a : A) (b : B), - ?M_1 + ?M_1 diff --git a/tests/lean/gen_fail.lean.expected.out b/tests/lean/gen_fail.lean.expected.out index a02aeab25..fd1b7614c 100644 --- a/tests/lean/gen_fail.lean.expected.out +++ b/tests/lean/gen_fail.lean.expected.out @@ -17,5 +17,4 @@ v : vector ℕ n ⊢ v = v gen_fail.lean:7:0: error: failed to add declaration 'tst' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (n : ℕ) (v : …), - ?M_1 + ?M_1 diff --git a/tests/lean/goals1.lean.expected.out b/tests/lean/goals1.lean.expected.out index f7b6f7571..43559098c 100644 --- a/tests/lean/goals1.lean.expected.out +++ b/tests/lean/goals1.lean.expected.out @@ -6,5 +6,4 @@ Hbc : eq b c ⊢ eq b c goals1.lean:9:0: error: failed to add declaration 'foo' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (A : Type) (a b c : A) (Hab : …) (Hbc : …), - ?M_1 + ?M_1 diff --git a/tests/lean/inv_del.lean.expected.out b/tests/lean/inv_del.lean.expected.out index 7faaf4b95..de25fcf6b 100644 --- a/tests/lean/inv_del.lean.expected.out +++ b/tests/lean/inv_del.lean.expected.out @@ -6,5 +6,4 @@ a : A ⊢ P (vone a) inv_del.lean:15:2: error: failed to add declaration 'vec.eone' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (A : Type) (P : …) (H : …) (v : …), - ?M_1 + ?M_1 diff --git a/tests/lean/print_ax2.lean.expected.out b/tests/lean/print_ax2.lean.expected.out index bc4e73fef..a109893ac 100644 --- a/tests/lean/print_ax2.lean.expected.out +++ b/tests/lean/print_ax2.lean.expected.out @@ -1,2 +1,2 @@ em : ∀ (a : Prop), a ∨ ¬a -strong_indefinite_description : Π {A : Type} (P : A → Prop), nonempty A → { (x : A)| (∃ (y : A), P y) → P x} +strong_indefinite_description : Π {A : Type} (P : A → Prop), nonempty A → { (x : A)| Exists P → P x} diff --git a/tests/lean/quasireducible.lean.expected.out b/tests/lean/quasireducible.lean.expected.out index 76c01bdae..6569e41b4 100644 --- a/tests/lean/quasireducible.lean.expected.out +++ b/tests/lean/quasireducible.lean.expected.out @@ -11,8 +11,7 @@ H : f a = a ⊢ g a = a quasireducible.lean:11:3: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (a : nat) (H : …), - ?M_1 + ?M_1 quasireducible.lean:16:11: error:invalid 'rewrite' tactic, rewrite step failed using pattern f a no subterm in the goal matched the pattern @@ -26,5 +25,4 @@ H : f a = a ⊢ g a = a quasireducible.lean:16:3: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (a : nat) (H : …), - ?M_1 + ?M_1 diff --git a/tests/lean/revert_fail.lean.expected.out b/tests/lean/revert_fail.lean.expected.out index eb8ff4155..38cb41329 100644 --- a/tests/lean/revert_fail.lean.expected.out +++ b/tests/lean/revert_fail.lean.expected.out @@ -11,8 +11,7 @@ v : vector A n ⊢ v = v revert_fail.lean:6:0: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (A : Type) (n : nat) (v : …), - ?M_1 + ?M_1 revert_fail.lean:11:2: error:invalid tactic, there are no goals to be solved proof state: no goals @@ -21,8 +20,7 @@ n : nat ⊢ n = n revert_fail.lean:12:0: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (n : nat), - ?M_1 + ?M_1 revert_fail.lean:16:2: error:invalid 'revert' tactic, unknown hypothesis 'm' proof state: n : nat @@ -32,5 +30,4 @@ n : nat ⊢ n = n revert_fail.lean:17:0: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (n : nat), - ?M_1 + ?M_1 diff --git a/tests/lean/rewrite_fail.lean.expected.out b/tests/lean/rewrite_fail.lean.expected.out index 707c23e07..f1dd34e0c 100644 --- a/tests/lean/rewrite_fail.lean.expected.out +++ b/tests/lean/rewrite_fail.lean.expected.out @@ -13,8 +13,7 @@ Hb : b = 0 ⊢ a + b = 0 rewrite_fail.lean:6:0: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (a b : ℕ) (Ha : …) (Hb : …), - ?M_1 + ?M_1 rewrite_fail.lean:11:2: error:invalid tactic, there are no goals to be solved proof state: no goals @@ -23,5 +22,4 @@ a : ℕ ⊢ a = a rewrite_fail.lean:12:0: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (a : ℕ), - ?M_1 + ?M_1 diff --git a/tests/lean/test.sh b/tests/lean/test.sh index 11787a083..617dbbedf 100755 --- a/tests/lean/test.sh +++ b/tests/lean/test.sh @@ -12,10 +12,16 @@ if [ $# -ne 2 ]; then else INTERACTIVE=$2 fi + NUM_ERRORS=0 for f in *.lean; do echo "-- testing $f" - "$LEAN" -t config.lean "$f" &> "$f.produced.out.1" + if [ ${f: -6} == ".hlean" ]; then + CONFIG="config.hlean" + else + CONFIG="config.lean" + fi + "$LEAN" -t $CONFIG "$f" &> "$f.produced.out.1" sed "/warning: imported file uses 'sorry'/d" "$f.produced.out.1" > "$f.produced.out" rm -f -- "$f.produced.out.1" if test -f "$f.expected.out"; then diff --git a/tests/lean/unsolved_proof_qed.lean.expected.out b/tests/lean/unsolved_proof_qed.lean.expected.out index dbd2fbfb0..cfa473b58 100644 --- a/tests/lean/unsolved_proof_qed.lean.expected.out +++ b/tests/lean/unsolved_proof_qed.lean.expected.out @@ -17,8 +17,7 @@ H₂ : b = c ⊢ a = c unsolved_proof_qed.lean:2:0: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (a b c : nat) (H₁ : …) (H₂ : …), - ?M_1 + ?M_1 unsolved_proof_qed.lean:5:33: error: don't know how to synthesize placeholder a b c : nat, H₁ : a = b, @@ -39,5 +38,4 @@ H₂ : b = c unsolved_proof_qed.lean:5:0: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term λ (a b c : nat) (H₁ : …) (H₂ : …), - have aux : …, from ?M_1, - … + … ?M_1 diff --git a/tests/lean/user_rec_crash.lean.expected.out b/tests/lean/user_rec_crash.lean.expected.out index c58a7ffb0..4dbaf6bdc 100644 --- a/tests/lean/user_rec_crash.lean.expected.out +++ b/tests/lean/user_rec_crash.lean.expected.out @@ -9,5 +9,4 @@ h : a ∧ b ⊢ a user_rec_crash.lean:4:0: error: failed to add declaration 'example' to environment, value has metavariables remark: set 'formatter.hide_full_terms' to false to see the complete term - λ (a b : Prop) (h : …), - ?M_1 + ?M_1 diff --git a/tests/lean/whnf.lean.expected.out b/tests/lean/whnf.lean.expected.out index 78ee85448..0c52b8723 100644 --- a/tests/lean/whnf.lean.expected.out +++ b/tests/lean/whnf.lean.expected.out @@ -1,4 +1,4 @@ -succ (nat.rec 2 (λ (b₁ r : ℕ), succ r) 0) +succ (nat.rec 2 (λ (b₁ : ℕ), succ) 0) 3 -succ (nat.rec a (λ (b₁ r : ℕ), succ r) 0) +succ (nat.rec a (λ (b₁ : ℕ), succ) 0) succ a