txgraffiti.playground
txgraffiti.playground.conjecture
- class txgraffiti.playground.conjecture.ConjecturePlayground(df, object_symbol='G', base=None)[source]
Bases:
object- append_row(row)[source]
Append a new row (dict of col:value) to self.df, then clear any cached conjectures.
- discover(*args, **kwargs)[source]
Run generate(…) with the given parameters, cache, and return the list.
- Return type:
list[Conjecture]
- discover_equalities(*, generators=None, min_fraction=0.15)[source]
Find all single‐feature inequalities of the form L≤R or L≥R (with hypothesis TRUE) that are tight (slack==0) on at least min_fraction of the rows. For each, register & return a Predicate L_eq_R.
- Return type:
list[Predicate]
- export_conjectures(path, format='json')[source]
Write self.conjectures to disk in JSON or CSV form.
- export_to_lean(path, name_prefix='conjecture', object_symbol=None)[source]
Write all cached conjectures to path in Lean theorem‐stub format. Each theorem will be named {name_prefix}_{i}.