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

Function match_circle_perp_eqangle

dd.py:283–299  ·  view source on GitHub ↗

Match circle O A B C, perp O A A X => eqangle A X A B C A C B.

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

Source from the content-addressed store, hash-verified

281
282
283def match_circle_perp_eqangle(
284 g: gh.Graph,
285 g_matcher: Callable[str, list[tuple[gm.Point, ...]]],
286 theorem: pr.Theorem,
287) -> Generator[dict[str, gm.Point], None, None]:
288 """Match circle O A B C, perp O A A X => eqangle A X A B C A C B."""
289 for p, a, b, c in g.all_circles():
290 pa = g._get_line(p, a)
291 if pa is None:
292 continue
293 if pa.val is None:
294 continue
295 for l in a.neighbors(gm.Line):
296 if g.check_perpl(pa, l):
297 x = diff_point(l, a)
298 if x is not None:
299 yield dict(zip('OABCX', [p, a, b, c, x]))
300
301
302def match_perp_perp_ncoll_para(

Callers

nothing calls this directly

Calls 5

diff_pointFunction · 0.85
all_circlesMethod · 0.80
_get_lineMethod · 0.80
neighborsMethod · 0.80
check_perplMethod · 0.80

Tested by

no test coverage detected