MCPcopy Create free account
hub / github.com/google-deepmind/alphageometry / match_eqangle6_eqangle6_ncoll_simtri

Function match_eqangle6_eqangle6_ncoll_simtri

dd.py:569–590  ·  view source on GitHub ↗

Match eqangle6 B A B C Q P Q R, eqangle6 C A C B R P R Q, ncoll A B C => simtri A B C P Q R.

(
    g: gh.Graph,
    g_matcher: Callable[str, list[tuple[gm.Point, ...]]],
    theorem: pr.Theorem,
)

Source from the content-addressed store, hash-verified

567
568
569def match_eqangle6_eqangle6_ncoll_simtri(
570 g: gh.Graph,
571 g_matcher: Callable[str, list[tuple[gm.Point, ...]]],
572 theorem: pr.Theorem,
573) -> Generator[dict[str, gm.Point], None, None]:
574 """Match eqangle6 B A B C Q P Q R, eqangle6 C A C B R P R Q, ncoll A B C => simtri A B C P Q R."""
575 enums = g_matcher('eqangle6')
576
577 record = set()
578 for b, a, b, c, q, p, q, r in enums: # pylint: disable=redeclared-assigned-name,unused-variable
579 if (a, b, c) == (p, q, r):
580 continue
581 if any([x in record for x in rotate_simtri(a, b, c, p, q, r)]):
582 continue
583 if not g.check_eqangle([c, a, c, b, r, p, r, q]):
584 continue
585 if not g.check_ncoll([a, b, c]):
586 continue
587
588 mapping = dict(zip('ABCPQR', [a, b, c, p, q, r]))
589 record.add((a, b, c, p, q, r))
590 yield mapping
591
592
593def match_eqratio6_eqratio6_ncoll_simtri(

Callers

nothing calls this directly

Calls 4

rotate_simtriFunction · 0.85
check_eqangleMethod · 0.80
check_ncollMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected