Skip to content

Commit 6f78591

Browse files
hyperpolymathclaude
andcommitted
chore(proofs): add TPTP corpus + known-good Agda witness
proofs/tptp/*.p — 8 hand-written first-order problems: modus_ponens, transitivity, socrates, group_left_identity, contradiction, disjunction_elim, double_negation, symmetry_eq Small, clean FOF problems for exercising Vampire / E Prover / SPASS runners. All but contradiction.p are Theorems; contradiction.p is deliberately CounterSatisfiable so the runner's unknown-outcome branch gets exercised. proofs/agda/IdentityLaws.agda — trivial proofs of +-left-id and +-right-id over ℕ, compiles cleanly against agda-stdlib v2.3. Serves as a known-good witness alongside the pre-existing Agda files which have their own scope/precedence bugs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3695e03 commit 6f78591

9 files changed

Lines changed: 100 additions & 0 deletions

File tree

proofs/agda/IdentityLaws.agda

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
-- SPDX-License-Identifier: PMPL-1.0-or-later
2+
-- IdentityLaws.agda — trivial proofs that compile cleanly against
3+
-- agda-stdlib v2.3. Exists to exercise the echidnabot agda runner
4+
-- with a known-good file alongside the pre-existing (broken) corpus.
5+
6+
module IdentityLaws where
7+
8+
open import Data.Nat using (ℕ; zero; suc; _+_)
9+
open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong)
10+
11+
-- Addition has zero as left identity, by definition.
12+
+-left-id : (n : ℕ) zero + n ≡ n
13+
+-left-id _ = refl
14+
15+
-- Zero as right identity needs induction on n.
16+
+-right-id : (n : ℕ) n + zero ≡ n
17+
+-right-id zero = refl
18+
+-right-id (suc n) = cong suc (+-right-id n)

proofs/tptp/contradiction.p

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
%-----------------------------------------------------------------------------
2+
% SPDX-License-Identifier: PMPL-1.0-or-later
3+
% File : contradiction.p
4+
% Status : CounterSatisfiable
5+
% Claim : Deliberately unprovable: asserting P and ¬P.
6+
% ATPs should report CounterSatisfiable (or Unsatisfiable of the
7+
% axioms, depending on mode) — any answer other than "Theorem"
8+
% is correct.
9+
%-----------------------------------------------------------------------------
10+
fof(p, axiom, p).
11+
fof(not_p, axiom, ~ p).
12+
fof(goal, conjecture, q).

proofs/tptp/disjunction_elim.p

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
%-----------------------------------------------------------------------------
2+
% SPDX-License-Identifier: PMPL-1.0-or-later
3+
% File : disjunction_elim.p
4+
% Status : Theorem
5+
% Claim : Disjunction eliminationfrom P∨Q, P→R, Q→R, conclude R.
6+
%-----------------------------------------------------------------------------
7+
fof(p_or_q, axiom, p | q).
8+
fof(p_imp, axiom, p => r).
9+
fof(q_imp, axiom, q => r).
10+
fof(goal, conjecture, r).

proofs/tptp/double_negation.p

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
%-----------------------------------------------------------------------------
2+
% SPDX-License-Identifier: PMPL-1.0-or-later
3+
% File : double_negation.p
4+
% Status : Theorem
5+
% Claim : ¬¬P → P (classical double-negation elimination).
6+
%-----------------------------------------------------------------------------
7+
fof(not_not_p, axiom, ~ ~ p).
8+
fof(goal, conjecture, p).

proofs/tptp/group_left_identity.p

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
%-----------------------------------------------------------------------------
2+
% SPDX-License-Identifier: PMPL-1.0-or-later
3+
% File : group_left_identity.p
4+
% Status : Theorem
5+
% Claim : In a group, e is also a right identity (proved from left-identity
6+
% + left-inverse axioms — a classical group-theory exercise).
7+
%-----------------------------------------------------------------------------
8+
fof(left_id, axiom, ! [X] : mult(e, X) = X).
9+
fof(left_inv, axiom, ! [X] : mult(inv(X), X) = e).
10+
fof(assoc, axiom,
11+
! [X,Y,Z] : mult(X, mult(Y, Z)) = mult(mult(X, Y), Z) ).
12+
fof(right_id_goal, conjecture, ! [X] : mult(X, e) = X).

proofs/tptp/modus_ponens.p

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
%-----------------------------------------------------------------------------
2+
% SPDX-License-Identifier: PMPL-1.0-or-later
3+
% File : modus_ponens.p
4+
% Syntax : TPTP FOF (First-Order Form)
5+
% Status : Theorem
6+
% Claim : Modus ponens: from P and P→Q, conclude Q.
7+
%-----------------------------------------------------------------------------
8+
fof(p, axiom, p).
9+
fof(p_imp_q, axiom, p => q).
10+
fof(goal, conjecture, q).

proofs/tptp/socrates.p

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
%-----------------------------------------------------------------------------
2+
% SPDX-License-Identifier: PMPL-1.0-or-later
3+
% File : socrates.p
4+
% Status : Theorem
5+
% Claim : Classical syllogism: all humans are mortal; Socrates is human;
6+
% therefore Socrates is mortal.
7+
%-----------------------------------------------------------------------------
8+
fof(all_humans_mortal, axiom,
9+
! [X] : (human(X) => mortal(X)) ).
10+
fof(socrates_is_human, axiom, human(socrates)).
11+
fof(goal, conjecture, mortal(socrates)).

proofs/tptp/symmetry_eq.p

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
%-----------------------------------------------------------------------------
2+
% SPDX-License-Identifier: PMPL-1.0-or-later
3+
% File : symmetry_eq.p
4+
% Status : Theorem
5+
% Claim : Equality is symmetric: a=b → b=a (follows from equality axioms).
6+
%-----------------------------------------------------------------------------
7+
fof(h, axiom, a = b).
8+
fof(goal, conjecture, b = a).

proofs/tptp/transitivity.p

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
%-----------------------------------------------------------------------------
2+
% SPDX-License-Identifier: PMPL-1.0-or-later
3+
% File : transitivity.p
4+
% Status : Theorem
5+
% Claim : Less-than is transitive: a<b ∧ b<c → a<c.
6+
%-----------------------------------------------------------------------------
7+
fof(trans, axiom,
8+
! [X,Y,Z] : (lt(X,Y) & lt(Y,Z) => lt(X,Z)) ).
9+
fof(h1, axiom, lt(a,b)).
10+
fof(h2, axiom, lt(b,c)).
11+
fof(goal, conjecture, lt(a,c)).

0 commit comments

Comments
 (0)