Skip to content

Commit b1ac2e7

Browse files
committed
Expand comment
1 parent 83f4403 commit b1ac2e7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Lean/Meta/Constructions/NoConfusion.lean

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,13 @@ def Vec.cons.noConfusion.{u_1, u} : {α : Type u} → {P : Sort u_1} →
288288
→ P
289289
```
290290
291-
We specialize to homogeneous equalities here because it is the common case, used by `injection` and
292-
`Meta.mkNoConfusion`. Heterogeneous uses still use the general `noConfusion` declaration above.
291+
These are specialized to equal parameters. The main use of these theorems is `injection` through
292+
`Meta.mkNoConfusion`, which deals with homogeneous equalities, so no need for the generality.
293+
294+
These still accept a heterogeneous equality between the two constructor applications: if we tried
295+
to phrase this theroem with a homogeneous equality, this would force those constructor fields that
296+
appear in indices to be equal, which is too strong: we can have homogenenous equalities between
297+
two constructor applications with different fields but same indices.
293298
-/
294299
def mkNoConfusionCtors (declName : Name) : MetaM Unit := do
295300
-- Do not do anything unless can_elim_to_type.

0 commit comments

Comments
 (0)