Commit 21db757
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 3e317f2 commit 21db757
2 files changed
Lines changed: 40 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
464 | 481 | | |
465 | 482 | | |
466 | 483 | | |
| |||
492 | 509 | | |
493 | 510 | | |
494 | 511 | | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
| 512 | + | |
| 513 | + | |
501 | 514 | | |
502 | 515 | | |
503 | 516 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
283 | 302 | | |
284 | 303 | | |
285 | 304 | | |
| |||
304 | 323 | | |
305 | 324 | | |
306 | 325 | | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
| 326 | + | |
| 327 | + | |
314 | 328 | | |
315 | 329 | | |
316 | 330 | | |
| |||
0 commit comments