Skip to content

Commit f9788ba

Browse files
committed
Progress
1 parent 8811458 commit f9788ba

File tree

2 files changed

+41
-10
lines changed

2 files changed

+41
-10
lines changed

src/Lean/Meta/Match/MatchEqs.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ def genMatchCongrEqnsImpl (matchDeclName : Name) : MetaM (Array Name) := do
409409
realizeConst matchDeclName firstEqnName (go baseName)
410410
return matchCongrEqnsExt.getState (asyncMode := .async .asyncEnv) (asyncDecl := firstEqnName) (← getEnv) |>.find! matchDeclName
411411
where go baseName :=
412+
withoutExporting do
412413
withConfig (fun c => { c with etaStruct := .none }) do
413414
trace[Meta.Match.matchEqs] "genMatchCongrEqnsImpl on {matchDeclName}"
414415
let constInfo ← getConstInfo matchDeclName

tests/lean/run/issue2237.lean

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,46 @@ abbrev plus : Term Γ a → Term Γ a
2020

2121
/--
2222
error: failed to generate equational theorem for `plus`
23-
failed to generate equality theorems for `match` expression `plus.match_1`
24-
Γ✝ : Context
25-
a✝ : Ty
26-
motive✝ : Term Γ✝ a✝ → Sort u_1
27-
n✝ : Term ( ✶ :: Γ✝) ✶
28-
h_1✝ : (i : Lookup Γ✝ a✝) → motive✝ (Term.var i)
29-
h_2✝ : (n : Term ( ✶ :: Γ✝) ✶ ) → motive✝ n.lam
30-
h_3✝ : (a : Term ( ✶ :: Γ✝) ✶ ) → (m : Term Γ✝ ✶ ) → motive✝ (a.lam.ap m)
31-
h_4✝ : (l m : Term Γ✝ ✶ ) → motive✝ (l.ap m)
32-
⊢ (⋯ ▸ fun x motive h_1 h_2 h_3 h_4 h => ⋯ ▸ h_2 n✝) n✝.lam motive✝ h_1✝ h_2✝ h_3✝ h_4✝ ⋯ = h_2✝ n✝
23+
Application type mismatch: The argument
24+
l.ap m
25+
has type
26+
Term Γ ✶
27+
but is expected to have type
28+
Term Γ a
29+
in the application
30+
@HEq (Term Γ a) (l.ap m)
3331
-/
3432
#guard_msgs in
3533
#print equations plus
34+
35+
36+
/--
37+
error: Failed to realize constant plus.match_1.eq_1:
38+
Application type mismatch: The argument
39+
l.ap m
40+
has type
41+
Term Γ ✶
42+
but is expected to have type
43+
Term Γ a
44+
in the application
45+
@HEq (Term Γ a) (l.ap m)
46+
---
47+
error: Unknown constant `plus.match_1.eq_1`
48+
-/
49+
#guard_msgs in #print sig plus.match_1.eq_1
50+
51+
/--
52+
error: Failed to realize constant plus.match_1.congr_eq_1:
53+
Tactic `subst` failed: did not find equation for eliminating 'heq✝'
54+
55+
Γ : Context
56+
a : Ty
57+
x✝ : Term Γ a
58+
l m : Term Γ ✶
59+
heq✝ : x✝ ≍ l.ap m
60+
⊢ (∀ (a_1 : Term ( ✶ :: Γ) ✶ ) (m_1 : Term Γ ✶ ), l.ap m ≍ a_1.lam.ap m_1 → False) →
61+
∀ (a_1 : Term ( ✶ :: Γ) ✶ ) (m : Term Γ ✶ ), x✝ ≍ a_1.lam.ap m → False
62+
---
63+
error: Unknown constant `plus.match_1.congr_eq_1`
64+
-/
65+
#guard_msgs in #print sig plus.match_1.congr_eq_1

0 commit comments

Comments
 (0)