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

Function match_cyclic_eqangle_cong

dd.py:227–239  ·  view source on GitHub ↗

Match cyclic A B C P Q R, eqangle C A C B R P R Q => cong A B P Q.

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

Source from the content-addressed store, hash-verified

225
226
227def match_cyclic_eqangle_cong(
228 g: gh.Graph,
229 g_matcher: Callable[str, list[tuple[gm.Point, ...]]],
230 theorem: pr.Theorem,
231) -> Generator[dict[str, gm.Point], None, None]:
232 """Match cyclic A B C P Q R, eqangle C A C B R P R Q => cong A B P Q."""
233 for c in g.type2nodes[gm.Circle]:
234 ps = c.neighbors(gm.Point)
235 for (a, b, c), (x, y, z) in utils.comb2(list(utils.perm3(ps))):
236 if {a, b, c} == {x, y, z}:
237 continue
238 if g.check_eqangle([c, a, c, b, z, x, z, y]):
239 yield dict(zip('ABCPQR', [a, b, c, x, y, z]))
240
241
242def match_circle_eqangle_perp(

Callers

nothing calls this directly

Calls 2

neighborsMethod · 0.80
check_eqangleMethod · 0.80

Tested by

no test coverage detected