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

Method __init__

problem.py:414–442  ·  view source on GitHub ↗
(
      self, premise: list[Construction], conclusion: list[Construction]
  )

Source from the content-addressed store, hash-verified

412 )
413
414 def __init__(
415 self, premise: list[Construction], conclusion: list[Construction]
416 ):
417 if len(conclusion) != 1:
418 raise ValueError('Cannot have more than one conclusion')
419 self.name = '_'.join([p.name for p in premise + conclusion])
420 self.premise = premise
421 self.conclusion = conclusion
422 self.is_arg_reduce = False
423
424 assert len(self.conclusion) == 1
425 con = self.conclusion[0]
426
427 if con.name in [
428 'eqratio3',
429 'midp',
430 'contri',
431 'simtri',
432 'contri2',
433 'simtri2',
434 'simtri*',
435 'contri*',
436 ]:
437 return
438
439 prem_args = set(sum([p.args for p in self.premise], []))
440 con_args = set(con.args)
441 if len(prem_args) <= len(con_args):
442 self.is_arg_reduce = True
443
444 def txt(self) -> str:
445 premise_txt = ', '.join([clause.txt() for clause in self.premise])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected