Repository navigation
refactor(Logics/ZeroOneLaw): NewAtom.symbol and NewAtom.args accessors - #5055
SamuelSchlesinger wants to merge 1 commit into
Conversation
Name the relation symbol and argument positions of a new atomic fact, and use them in IsExtensionWitness, the ExtensionProbability statements and the proof-local patterns in ExtensionAxiom and Infinitary. Statements are defeq to the old ones. Projection chains: ExtensionAxiom 2->0, ExtensionProbability 2->0. Part of #4817.
|
Agent review (Jetski reviewer revb-1, session 3c776db4-39f4-47dc-b377-05f50d94807b), head 361999b: APPROVE (code). The #1003 rendered check follows when manual run 43384128270 finishes. This is the remedy I deferred in #5044.
This is agent review, not human approval. |
|
Rendered check (reviewer revb-1, session 3c776db4-39f4-47dc-b377-05f50d94807b), head 361999b Rendered: inspected pp. 325–326 (printed 317–318) of cslib-frontier-operators-manual.pdf from run 43384128270: OK. The constant-probability paragraph in finite-model-logic starts on p. 325. The changed sentence ( Agent Operator's Manual: no edit needed. This is agent review, not human approval. |
Part of #4817. This is the follow-up that revb-1 noted in the #5044 review: logic records, with beyond's agreement.
NewAtom L kis the subtype of atomic facts onFin (k + 1)that mention the new element. Readers got at its relation symbol and arguments througha.1.1,a.1.1.2anda.1.2. This PR adds two named accessors inZeroOneLaw/Relational/ExtensionAxiom.lean:NewAtom.symbol a : Σ l, L.Relations l, which isa.1.1NewAtom.args a : Fin a.symbol.1 → Fin (k + 1), which isa.1.2Both are
abbrevs, so existingsimp/exactsteps see through them unchanged. The public statements now use them:IsExtensionWitnessreadsRelMap a.symbol.2 ((Fin.cons z x) ∘ a.args).structProb_bernoulliStructure_forall_not_isExtensionWitnessandstructProb_bernoulliStructure_not_hasExtension_lestatewas∏ᶠ a, (PMF.coin (p a.symbol) (s a)).toReal.The statements are definitionally equal to the old ones. The proof-local patterns in
isExtensionPair_of_hasExtensionandInfinitary.forth_partialIsoOn_of_hasExtension_ltnow use the same accessors, so all three places read the atom the same way. No proof needed any other change.The private
atomEmbedkeeps its rawq.2.1.1/q.2.1.2body. Its injectivity proof destructures the sigma withrintro/Sigma.mk.inj_iff, and with the accessors in its bodyrflno longer substitutes there.Projection chains: ExtensionAxiom 2→0, and its baseline entry is removed. ExtensionProbability's 2 chains (
p a.1.1in two statements) go to 0 as well; they appear in the baseline only through #5044. Whichever of #5044 and this PR lands second drops that entry with--update-baseline. This is readability and API work only, with no new mathematics.Representative caller:
structProb_bernoulliStructure_forall_not_isExtensionWitness, whose statement now names the relation symbol (p a.symbol) instead of a nested projection through the subtype and the sigma.Manuals:
finite-model-logic.mdquotedw = ∏ᶠ a, (PMF.coin (p a.1.1) (s a)).toReal. It now quotesp a.symboland names the two accessors, so the doc(roadmap): add crypto frontier tracks and the OpenAI math results direction #1003 rendered check applies to that paragraph.Validation:
lake build --wfail --iofailon ZeroOneLaw.Infinitary and ZeroOneLaw.Relational (with ExtensionAxiom and ExtensionProbability) and the 3 tests: BernoulliZeroOneLaw, Logics.FirstOrder.ZeroOneLaw.Infinitary and RelationalZeroOneLaw.lake linton the 3 changed modules,mk_all --check, hygiene (--check-simp), the encoding and projection ratchets, changed-file lints and the manual checker (errors []).AI disclosure: written by an AI agent (Jetski, swarm worker owf) at Samuel Schlesinger's direction. The review requested here is agent review, not human review.