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

Method test_imo_2022_p4_should_succeed

dd_test.py:36–56  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

34 cls.rules = pr.Theorem.from_txt_file('rules.txt', to_dict=True)
35
36 def test_imo_2022_p4_should_succeed(self):
37 p = pr.Problem.from_txt(
38 'a b = segment a b; g1 = on_tline g1 a a b; g2 = on_tline g2 b b a; m ='
39 ' on_circle m g1 a, on_circle m g2 b; n = on_circle n g1 a, on_circle n'
40 ' g2 b; c = on_pline c m a b, on_circle c g1 a; d = on_pline d m a b,'
41 ' on_circle d g2 b; e = on_line e a c, on_line e b d; p = on_line p a'
42 ' n, on_line p c d; q = on_line q b n, on_line q c d ? cong e p e q'
43 )
44 g, _ = gh.Graph.build_problem(p, DDTest.defs)
45 goal_args = g.names2nodes(p.goal.args)
46
47 success = False
48 for level in range(MAX_LEVEL):
49 added, _, _, _ = dd.bfs_one_level(g, DDTest.rules, level, p)
50 if g.check(p.goal.name, goal_args):
51 success = True
52 break
53 if not added: # saturated
54 break
55
56 self.assertTrue(success)
57
58 def test_incenter_excenter_should_fail(self):
59 p = pr.Problem.from_txt(

Callers

nothing calls this directly

Calls 4

build_problemMethod · 0.80
names2nodesMethod · 0.80
checkMethod · 0.80
from_txtMethod · 0.45

Tested by

no test coverage detected