Commit d100a1e
committed
refactor(match): retry f_match_core under eta-normalisation
When [f_match_core] hits a mismatch it already tries beta-reduction,
higher-order matching, and delta-unfolding. Adds an eta-normalisation
fallback that runs [EcReduction.eta_norm] on both sides and retries
once. Also exposes [eta_norm] from [EcReduction]'s signature.
The matcher is sensitive to how functions are eta-packaged: a slot
written `fun i => f i` vs the equivalent `f` would fail to match if
one side was stored with an extra lambda. Rather than normalising at
every rewrite site, handle it once inside the unifier.1 parent af029c9 commit d100a1e
2 files changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1144 | 1144 | | |
1145 | 1145 | | |
1146 | 1146 | | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
1147 | 1154 | | |
1148 | 1155 | | |
1149 | 1156 | | |
| |||
1193 | 1200 | | |
1194 | 1201 | | |
1195 | 1202 | | |
1196 | | - | |
| 1203 | + | |
1197 | 1204 | | |
1198 | 1205 | | |
1199 | 1206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
| |||
0 commit comments