Match cyclic A B P Q => eqangle P A P B Q A Q B.
(
g: gh.Graph,
g_matcher: Callable[str, list[tuple[gm.Point, ...]]],
theorem: pr.Theorem,
)
| 427 | |
| 428 | |
| 429 | def match_cyclic_eqangle( |
| 430 | g: gh.Graph, |
| 431 | g_matcher: Callable[str, list[tuple[gm.Point, ...]]], |
| 432 | theorem: pr.Theorem, |
| 433 | ) -> Generator[dict[str, gm.Point], None, None]: |
| 434 | """Match cyclic A B P Q => eqangle P A P B Q A Q B.""" |
| 435 | record = set() |
| 436 | for a, b, c, d in g_matcher('cyclic'): |
| 437 | if (a, b, c, d) in record: |
| 438 | continue |
| 439 | record.add((a, b, c, d)) |
| 440 | record.add((a, b, d, c)) |
| 441 | record.add((b, a, c, d)) |
| 442 | record.add((b, a, d, c)) |
| 443 | yield dict(zip('ABPQ', [a, b, c, d])) |
| 444 | |
| 445 | |
| 446 | def rotate_simtri( |