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

Function match_midp_perp_cong

dd.py:212–224  ·  view source on GitHub ↗

Match midp M A B, perp O M A B => cong O A O B.

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

Source from the content-addressed store, hash-verified

210
211
212def match_midp_perp_cong(
213 g: gh.Graph,
214 g_matcher: Callable[str, list[tuple[gm.Point, ...]]],
215 theorem: pr.Theorem,
216) -> Generator[dict[str, gm.Point], None, None]:
217 """Match midp M A B, perp O M A B => cong O A O B."""
218 for m, a, b in g.all_midps():
219 ab = g._get_line(a, b)
220 for l in m.neighbors(gm.Line):
221 if g.check_perpl(l, ab):
222 for o in l.neighbors(gm.Point):
223 if o != m:
224 yield dict(zip('ABMO', [a, b, m, o]))
225
226
227def match_cyclic_eqangle_cong(

Callers

nothing calls this directly

Calls 4

all_midpsMethod · 0.80
_get_lineMethod · 0.80
neighborsMethod · 0.80
check_perplMethod · 0.80

Tested by

no test coverage detected