Skip to content

Make ListBlank quotient-free, add zero-axiom gate, and make Riemannn95 choice-free - #25

Merged
mo271 merged 2 commits into
mainfrom
zero-axiom-gate
Nov 25, 2026
Merged

mo271 merged 2 commits into
mainfrom
zero-axiom-gate

Conversation

@mo271

@mo271 mo271 commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator
  • Replace Quot-based ListBlank in Challenge.lean and Cryptids/Machines.lean with canonical blank-trimmed lists (ListBlank.IsTrimmed / ListBlank.trimCons) and constructive Zero/LT/LE/OfNat/Inhabited/NeZero instances + listGetD so ListBlank, Tape, Halts, Machine, BundledMachine, and PAProvable depend on zero axioms ([]).
  • Make ConjectureMachines.Semantics.PA.not_paProvable_false and all four candidate_fewer_states theorems completely axiom-free (permitted_axioms = []) and audit them in CI via comparator/zero_axioms.json.
  • Eliminate Classical.choice from ConjectureMachines.Riemann95.candidate_equivalent (constructive primality witness in ShuniaCounterexample, constructive order instances on Fin/Nat, and constructive contradiction handling in run_return98_after_one and fenceReturn_exact) and add it to comparator/constructive.json and comparator/riemann_95_reduction.json.

@TomZahavy TomZahavy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very clean refactor — replacing Quot-based ListBlank with canonical blank-trimmed lists, proving not_paProvable_false in pure CIC ([]), and removing Classical.choice from Riemann95.candidate_equivalent via isPrimeBool brings all five state reductions into comparator/constructive.json. Verified locally that #print axioms on ListBlank, Tape.move, init, Halts, and BundledMachine.Halts reports zero axioms, and verify.py, render_challenge.py --check, check_manifest.py, and formalization.yaml (all 36 main_results) are in sync.

Left a few inline comments (most notably a coverage gap in zero_axioms.json for ListBlank/Tape/Halts, plus unused/single-caller helpers), along with minor metadata/doc nits:

  • PR title & body: typo Riemannn95 → Riemann95 in the PR title, and the PR body still says "all four candidate_fewer_states theorems" (already updated to "all five" and 17 theorems in constructive.json in the amended commit message).
  • artifacts/riemann_95/README.md: lines 34–43 still only mention comparator/riemann_95.json (propext, Classical.choice, Quot.sound); worth noting comparator/riemann_95_reduction.json (propext, Quot.sound, no Classical.choice) there too.

Comment on lines +4 to +12
"theorem_names": [
"ConjectureMachines.Goldbach21.candidate_fewer_states",
"ConjectureMachines.Zf380.candidate_fewer_states",
"ConjectureMachines.Riemann104.candidate_fewer_states",
"ConjectureMachines.Riemann95.candidate_fewer_states",
"ConjectureMachines.ErdosTernary14.candidate_fewer_states",
"ConjectureMachines.Semantics.PA.not_paProvable_false"
],
"permitted_axioms": []

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the 6 theorems here transitively reference ListBlank, Tape, step, init, or Halts (*.candidate_fewer_states only projects .states on BundledMachine/Machine/listGetD, and not_paProvable_false only touches PAFormula/PAProvable). While ConjectureMachines.BundledMachine.Halts really is axiom-free right now, if propext or Classical.choice later crept back into ListBlank (e.g. via by_cases/simp in isTrimmed_trimCons), zero_axioms.json would still pass green.

Adding a #guard_msgs check in Cryptids/Machines.lean (and/or Challenge.lean), e.g.:

/-- info: 'ConjectureMachines.BundledMachine.Halts' does not depend on any axioms -/
#guard_msgs in #print axioms ConjectureMachines.BundledMachine.Halts

(or adding a small zero-axiom theorem mentioning Halts to zero_axioms.json) would mechanically enforce the zero-axiom guarantee on ListBlank, Tape, step, init, and Halts in CI.

Comment thread Challenge.lean Outdated
Comment on lines +158 to +160
protected abbrev ListBlank.liftOn {Γ : Type*} [Inhabited Γ] {α : Sort*} (l : ListBlank Γ)
(f : List Γ → α) (H : ∀ a b, Turing.BlankExtends a b → f a = f b) : α :=
Quot.liftOn l f fun a b h => h.elim (H a b) fun h' => (H b a h').symm
(f : List Γ → α) (_H : ∀ a b, Turing.BlankExtends a b → f a = f b) : α :=
f l.toList

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that ListBlank.head, tail, and cons operate directly on l.toList and trimCons, ListBlank.liftOn has no callers in Challenge.lean and is outside the statement closure of every challenge theorem. Keeping ListBlank.liftOn in Cryptids/Machines.lean (for PA/Adequacy.lean and CtlCertificate.lean) and dropping this unused copy from Challenge.lean keeps the challenge specification minimal.

Comment thread Cryptids/Machines.lean Outdated
Comment on lines +692 to +702
theorem list_getD_eq_getElem {α : Type*} : ∀ (l : List α) (d : α) {i : ℕ} (hi : i < l.length),
l.getD i d = l[i]
| [], _, _, hi => absurd hi (Nat.not_lt_zero _)
| _ :: _, _, 0, _ => rfl
| _ :: xs, d, _ + 1, hi => list_getD_eq_getElem xs d (Nat.lt_of_succ_lt_succ hi)

theorem list_getD_append_left {α : Type*} : ∀ (l₁ l₂ : List α) (d : α) (i : ℕ),
i < l₁.length → (l₁ ++ l₂).getD i d = l₁.getD i d
| [], _, _, _, hi => absurd hi (Nat.not_lt_zero _)
| _ :: _, _, _, 0, _ => rfl
| _ :: xs, l₂, d, n + 1, hi => list_getD_append_left xs l₂ d n (Nat.lt_of_succ_lt_succ hi)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: unlike list_length_five (shared across 3 files) and reaches_total_det / reaches_of_none (used in Machines.lean and Initializer95.lean), list_getD_eq_getElem is only called in Auxiliary95RawPhysical.lean and list_getD_append_left is only called in PhysicalTrace95.lean (and both are about List.getD rather than ConjectureMachines.listGetD). Making them private in their single caller files would match repo convention.

mo271 added a commit that referenced this pull request Nov 24, 2026
…scoping

- Challenge.lean & Cryptids/Machines.lean: add #guard_msgs in #print axioms ConjectureMachines.BundledMachine.Halts so CI mechanically rejects any axiom creeping into ListBlank, Tape, step, init, or Halts.
- Challenge.lean: drop unused ListBlank.liftOn (keeping it in Cryptids/Machines.lean for PA/Adequacy and CtlCertificate).
- Cryptids/Machines.lean & Riemann95/: move single-caller list_getD_eq_getElem and list_getD_append_left into Auxiliary95RawPhysical.lean and PhysicalTrace95.lean as private lemmas.
- artifacts/riemann_95/README.md: document comparator/riemann_95_reduction.json (no Classical.choice) and comparator/zero_axioms.json alongside comparator/riemann_95.json.
… choice-free

- Replace Quot-based ListBlank in Challenge.lean and Cryptids/Machines.lean with canonical blank-trimmed lists (ListBlank.IsTrimmed / ListBlank.trimCons) and constructive Zero/LT/LE/OfNat/Inhabited/NeZero instances + @[simp] def listGetD so ListBlank, Tape, Halts, Machine, BundledMachine, and PAProvable depend on zero axioms ([]), while keeping simp/dsimp unfolding compatible with BusyBeaver proofs.

- Make ConjectureMachines.Semantics.PA.not_paProvable_false and all five candidate_fewer_states theorems (including ErdosTernary14) completely axiom-free (permitted_axioms = []) and audit them in CI via comparator/zero_axioms.json.

- Eliminate Classical.choice from ConjectureMachines.Riemann95.candidate_equivalent (constructive primality witness in ShuniaCounterexample, constructive order instances on Fin/Nat, and constructive contradiction handling in run_return98_after_one and fenceReturn_exact) and add it to comparator/constructive.json (17 theorems including Brocard28) and comparator/riemann_95_reduction.json.

- Pin lean-action to v1.7.0 with exact semver tag comments in lean_action_ci.yml.
…scoping

- Challenge.lean & Cryptids/Machines.lean: add #guard_msgs in #print axioms ConjectureMachines.BundledMachine.Halts so CI mechanically rejects any axiom creeping into ListBlank, Tape, step, init, or Halts.
- Challenge.lean: drop unused ListBlank.liftOn (keeping it in Cryptids/Machines.lean for PA/Adequacy and CtlCertificate).
- Cryptids/Machines.lean & Riemann95/: move single-caller list_getD_eq_getElem and list_getD_append_left into Auxiliary95RawPhysical.lean and PhysicalTrace95.lean as private lemmas.
- artifacts/riemann_95/README.md: document comparator/riemann_95_reduction.json (no Classical.choice) and comparator/zero_axioms.json alongside comparator/riemann_95.json.
@mo271
mo271 merged commit f01ee56 into main Nov 25, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants