Commit 71644f4
committed
feat(Combinatorics/SimpleGraph):
Add the standard `Quot.mk` / `Quot.out` style toolage for converting between labeled
and unlabeled copies / embeddings:
* `Copy.toUnlabeledCopy : Copy G H → G.UnlabeledCopy H` — canonical projection
(computable).
* `UnlabeledCopy.out : G.UnlabeledCopy H → Copy G H` — non-canonical representative
(noncomputable).
* `Copy.toUnlabeledCopy_val` and `UnlabeledCopy.toSubgraph_out` give the matching simp
specs.
* `UnlabeledCopy.exists_toSubgraph_eq_val` packages the underlying existence statement.
Mirrored on the Embedding side: `Embedding.toUnlabeledEmbedding`,
`UnlabeledEmbedding.exists_toSubgraph_eq_val`, `UnlabeledEmbedding.out`, and their
respective spec lemmas.
Refactor the existing `unlabeledCopyCount_le_copyCount` and
`unlabeledEmbeddingCount_le_embeddingCount` proofs to use the new names — both shrink
from a 5- and 7-line `apply ... ; rintro ...; obtain ...; exact ...` chain to a
two-line `exact Nat.card_le_card_of_surjective ... fun S ↦ ⟨S.out, ...⟩`.Copy.toUnlabeledCopy / UnlabeledCopy.out (and embedding mirror)1 parent 58f2aa3 commit 71644f4
2 files changed
Lines changed: 40 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
441 | 458 | | |
442 | 459 | | |
443 | 460 | | |
| |||
458 | 475 | | |
459 | 476 | | |
460 | 477 | | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
| 478 | + | |
| 479 | + | |
467 | 480 | | |
468 | 481 | | |
469 | 482 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
277 | 296 | | |
278 | 297 | | |
279 | 298 | | |
| |||
298 | 317 | | |
299 | 318 | | |
300 | 319 | | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
| 320 | + | |
| 321 | + | |
308 | 322 | | |
309 | 323 | | |
310 | 324 | | |
| |||
0 commit comments