Prover#
- class tensor_theorem_prover.ResolutionProver(knowledge=None, max_proof_depth=10, max_resolvent_width=None, max_resolution_attempts=None, similarity_func=<function cosine_similarity>, min_similarity_threshold=0.5, cache_similarity=True, skip_seen_resolvents=False, find_highest_similarity_proofs=True, num_workers=None, eval_batch_size=5000)[source]#
Core theorem prover class that uses input resolution to prove a goal
- prove(goal, extra_knowledge=None)[source]#
Find the proof for the given goal with highest similarity score
- prove_all(goal, extra_knowledge=None, max_proofs=None, skip_seen_resolvents=None)[source]#
Find all possible proofs for the given goal, sorted by similarity score
- class tensor_theorem_prover.Proof(goal, similarity, stats, proof_steps, depth, substitutions)[source]#
Respresentation of a successful proof of a goal
- depth#
- goal#
- proof_steps#
- similarity#
- stats#
- substitutions#
- class tensor_theorem_prover.ProofStep(source, target, source_unification_literal, target_unification_literal, source_substitutions, target_substitutions, resolvent, similarity, running_similarity, depth)[source]#
A single step in a proof of a goal
- depth#
- resolvent#
- running_similarity#
- similarity#
- source#
- source_substitutions#
- source_unification_literal#
- target#
- target_substitutions#
- target_unification_literal#
- class tensor_theorem_prover.ProofStats(attempted_resolutions=0, successful_resolutions=0, max_resolvent_width_seen=0, max_depth_seen=0, discarded_proofs=0)[source]#
Stats on how complex a proof was to compute
- attempted_resolutions = 0#
- discarded_proofs = 0#
- max_depth_seen = 0#
- max_resolvent_width_seen = 0#
- successful_resolutions = 0#