Commit edf804c
authored
feat: heterogeneous noConfusion (#11474)
This PR generalizes the `noConfusion` constructions to heterogeneous
equalities (assuming propositional equalities between the indices). This
lays ground work for better support for applying injection to
heterogeneous equalities in grind.
The `Meta.mkNoConfusion` app builder shields most of the code from these
changes.
Since the per-constructor noConfusion principles are now more
expressive, `Meta.mkNoConfusion` no longer uses the general one.
In `Init.Prelude` some proofs are more pedestrian because `injection`
now needs a bit more machinery.
This is a breaking change for whoever uses the `noConfusion` principle
manually and explicitly for a type with indices.
Fixes #11450.1 parent 8b7cbe7 commit edf804c
File tree
15 files changed
+437
-224
lines changed- src
- Init
- Data/Int
- Lean
- Compiler/LCNF
- Meta
- Constructions
- Tactic
- tests/lean/run
15 files changed
+437
-224
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
282 | 286 | | |
283 | 287 | | |
284 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1837 | 1837 | | |
1838 | 1838 | | |
1839 | 1839 | | |
| 1840 | + | |
| 1841 | + | |
1840 | 1842 | | |
1841 | 1843 | | |
1842 | 1844 | | |
| |||
1860 | 1862 | | |
1861 | 1863 | | |
1862 | 1864 | | |
1863 | | - | |
1864 | | - | |
1865 | | - | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
1866 | 1873 | | |
1867 | 1874 | | |
1868 | 1875 | | |
| |||
1999 | 2006 | | |
2000 | 2007 | | |
2001 | 2008 | | |
| 2009 | + | |
2002 | 2010 | | |
2003 | 2011 | | |
2004 | 2012 | | |
2005 | 2013 | | |
| 2014 | + | |
2006 | 2015 | | |
2007 | 2016 | | |
2008 | 2017 | | |
| |||
2059 | 2068 | | |
2060 | 2069 | | |
2061 | 2070 | | |
| 2071 | + | |
| 2072 | + | |
2062 | 2073 | | |
2063 | 2074 | | |
2064 | 2075 | | |
| |||
2216 | 2227 | | |
2217 | 2228 | | |
2218 | 2229 | | |
2219 | | - | |
2220 | | - | |
2221 | | - | |
2222 | 2230 | | |
2223 | 2231 | | |
2224 | 2232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
669 | | - | |
| 669 | + | |
670 | 670 | | |
671 | 671 | | |
672 | | - | |
673 | | - | |
| 672 | + | |
| 673 | + | |
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
482 | | - | |
483 | | - | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
521 | 529 | | |
522 | 530 | | |
523 | 531 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1834 | 1834 | | |
1835 | 1835 | | |
1836 | 1836 | | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
1837 | 1840 | | |
1838 | 1841 | | |
1839 | 1842 | | |
| |||
0 commit comments