Repository navigation
Conversation
…ed tests LM-10 (production of text components, text_rows), LM-11 (examples/text-models) and LM-12 (coverage of the text-laws helpers), in the R3 order: register row, SPEC section 31 row, scenario, and a named test that fails because its case is not wired. The count is 436 on this head and is re-measured when the line moves. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
The first two uniqueness lemmas of the production bridge (LM-10), exported by the migration round trip and joined to the committed core module; entry 4 of the text-laws MIGRATION record. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
…extModels Ordinary executable language-1.2 definitions (structural recursion on a list and on a count) that the stdlib project builds and verifies, the first two realizations of the text-laws library functions an elaboration applies. The stdlib records and lock regenerate on the identity the maintainer names. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
The of-equality form of the classifier's features_fit law: for any function equal to fitWidth, the features are unchanged. Proved once by substitution and exported with entry 4 of the text-laws MIGRATION record, so the generated proof is one application and the proof language gains no rewrite. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
A package definition is an ordinary definition when imported: the certificates are those of the importing project's roots. A production clause on the forms made the stdlib build certify them (about 6 minutes) for no claim of the package; the forms keep executable and their recursive argument. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
…ridge The classifier's fixed-width map is the production form in LexLeanStd.TextModels: the elaboration generates fitWidth_bridge (the production form equals the library's, by fitWidth_of applied to the production take and zeros with their equations proved by unfolding) and proves features_fit through features_fit_of and that bridge. A module that declares a classifier must import LexLeanStd.TextModels and its project list the std source package; the refusal names the import to write. The language-models cases build their project in a workspace beside the standard library. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
…ibrary admitRefuse_bridge, admitKeepLast_bridge, pushRefuse_bridge, pushKeepLast_bridge, keepLast_bridge and the of-equality form of each window law (bounded, push_bounded, exact, suffix, refuses), exported with the migration round trip. The refuse path is axiom-free so a refuse window's exact policy is unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
…tModels fits, dropTokens, keepLast, admitRefuse, admitKeepLast, pushRefuse and pushKeepLast as ordinary executable definitions. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
…rated bridges The window's fit and push are the production admission and push; the elaboration generates admit_bridge and push_bridge and proves each law through the library's of-equality form. A window in a module that does not import LexLeanStd.TextModels is refused with the import to write. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
…able declaration.context_window (and the other three text declarations) are runtime in the production registry: the elaborated definitions apply the production forms in LexLeanStd.TextModels, so a root that calls a window's fit has the forms in its closure. A window's capacity, admission and push are executable definitions. A scratch project with a keep_last window behind a rust-std root verifies, including the preservation certificates. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
…t-laws library tokenId, firstMaxGo, firstMax, chooseGreedy, admitWith, pushWith, genGo, generateWith and generateGreedy bridges, the of-equality form of the generator's bounded and context_bounded laws under greedy, and the production vocabSize bridge with the tokenizer's in_range of-forms, exported with the migration round trip. The library now imports LexLeanRuntime.Portable and LexLeanRuntime.Collections, whose checked operations the bridges state. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
tokenIdFrom, tokenId, guard, firstMaxGo, firstMax, chooseGreedy, admitWith, pushWith, genGo, generateWith, generateGreedy, byteVocab and vocabSize, each with the axiom policy Lean observes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
…uction forms The greedy generator's run is the production loop, proved equal to the library's by a generated run_bridge, and bounded and context_bounded are proved through it; a tokenizer's size is the production vocabSize with a generated size_bridge. The text laws library may import the runtime modules, which the verifier now stages before it; a text declaration's definitions are executable when everything they apply is, and the four text declaration constructs are runtime. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
xorshift32, the seed read bit by bit as an Int, weight, totalWeight, drawGo, proportional, chooseSample and generateSample bridges, and the of-equality forms of the generator's laws under sample, exported with the migration round trip. The calculus has no widening of a UInt32 to a Nat to state the seed by, so the production seed is accumulated as an Int and the bridge proves it is the seed's value. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
xorshift32, seedBits, seedInt, weight, totalWeight, drawGo, proportional, chooseSample and generateSample, with the axiom policy Lean observes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
… bridge Both policies now prove bounded and context_bounded through a generated run_bridge from the production loop to the library's; the sampling bridge passes through the chooser, the draw, the seed and xorshift32. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
The conversions the production tokenizer reads bytes, tokens and pieces by (checked widening of a byte, a token read bit by bit, bytes to list, the table of all byte values), the bridges of the longest-match scan, encode and decode, and the of-equality forms of the round-trip laws, exported with the migration round trip. The in_range forms now take the encoder as well as the size, because the encoder is a production form too. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
The longest-match scan over identifier-carrying entries, encode and decode over bytes and strings, the token read bit by bit, and the byte table decode builds bytes from, with the axiom policy Lean observes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
… bridges encode, decode, encodeText and decodeText are the production forms, each with a generated bridge to the library's, and roundtrip, in_range and text_roundtrip are proved through them; the library's loader allows the runtime imports the bridges state, and the cases expect the new theorems. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
countOf and features bridges and the of-equality forms of the classifier's width, fit and total laws, exported with the migration round trip. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
…ated bridges features, classifyTokens and classify are executable when the model and the tokenizer's encoder are, and the three laws are proved through the library's of-equality forms. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
… contract Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
…eport A text row states only numbers, closed members, and qualified names: the eligibility schema patterns its component and bound names, and the audit finds a free string in any member of a row by the same walk that finds one in a text declaration. SPEC.md states production of text components (§17.12 rule 11) and text_rows (§17.13). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZGMa1Z5Q42SPBuyHhWkbr
Register is 452 IDs (449 on the line plus LM-10..LM-12 net of the three the line already carried); stdlib entrypoints list Buffer, Sha256, Text, TextModels. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…oduction forms The adapters' definitions, realization, theorem, evidence and model apply the elaborated Words classifier, which now applies production forms of LexLeanStd.TextModels. Lean observes Quot.sound as well as propext for them (LLV7005 on Models.Recognizer.Adapted, scratch run on the merged line), and the exact policy must name it. The generator's declarations already named all three. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…axioms the width law brings classify_text_adapted applies Words.features_width, whose of-equality form observes Classical.choice (LLV7005, scratch run on the merged line); the evidence and model that cite it carry the same set. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…an observes The model's generated declarations observe Quot.sound and propext, not the width law's Classical.choice, and the scan over the window's production forms observes no axiom (exact policies, LLV7005). conformance_lm_08 passes with the pinned Lean 4.32.1 in CI (scratch run). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The formatter wraps the long parameter lists of genGo, generateWith and generateGreedy; conformance_au_04 (one surface) named the file as not canonical. The text of the forms is unchanged; the stdlib lock and records are regenerated at the landing. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Maintainer: the four commits after Generated by Claude Code |
…30-slice-4 Conflicts were the register count only (README.md, SPEC.md section 31 total, cases/repository.rs, xtask/src/spec_links.rs). The register is 454: the line's 451 plus the three rows of this branch; CHANGELOG states it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…30-slice-4 Conflicts were the register count only (README.md, SPEC.md section 31 total, cases/repository.rs, xtask/src/spec_links.rs). The register is 455: the line gained SP-27 (452) and this branch holds three more rows; CHANGELOG states it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…30-slice-4 The line gained #261 (CL-24, register 453); conflicts were the register count (README.md, SPEC.md section 31 total, cases/repository.rs, xtask/src/spec_links.rs) and the CHANGELOG entries, both sides kept. The register is 456: the line plus this branch's three rows; CHANGELOG states it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Head Checks run in WSL on this head: LM-11 stays red until the regeneration writes the text-models and stdlib records (lock and Generated by Claude Code |
…30-slice-4 The line gained #265 (SP-28, register 454); conflicts were the register count only (README.md, SPEC.md section 31 total, cases/repository.rs, xtask/src/spec_links.rs). The register is 457: the line plus this branch's three rows; CHANGELOG states it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Head Generated by Claude Code |
…30-slice-4 The line gained #293 and #297 (identity moved twice; register 456); conflicts were the register count only (README.md, SPEC.md section 31 total, cases/repository.rs, xtask/src/spec_links.rs). The register is 459: the line plus this branch's three rows; CHANGELOG states it. The landing regeneration of this branch's own records (stdlib and text-models locks and expected/) is still owed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Head Generated by Claude Code |
|
Maintainer: Generated by Claude Code |
…30-slice-4 The line gained #298, #309 (the 0.4.0 bump) and #318-#320 (release gate; register 457); conflicts were the register count (README.md, SPEC.md section 31 total, cases/repository.rs, xtask/src/spec_links.rs) and the CHANGELOG. The register is 460: the line plus this branch's three rows. The line records v0.4.0 as tagged at its own commit, so this branch's entry moves to a new Unreleased section above 0.4.0 instead of joining the released section. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Head Generated by Claude Code |
|
Thanks. Order on the line: landings on Generated by Claude Code |
Slice 4 of #30. Intent: #30 (comment). Bridge spike: #30 (comment).
What it does
Text components are produced. A tokenizer, a context window, a text generator and a text classifier are
runtimeconstructs whose elaborated definitions are ordinary executable definitions applying production forms inLexLeanStd.TextModels(a new module ofstd). Each form is related to its library function by a bridge the elaboration proves in the user module, and each library law has an of-equality form whose bridge is a hypothesis, so the generated laws are proved of the realized definitions and no proof variant was added.LM-10: a root reaching a text component is eligible forrust-std(effectsallocation,overflow,recursion) and refused forrust-core(LLT4005); the eligibility report carriestext_rows(closed members and qualified names only); the nine roots of the example agree with an independent oracle and satisfy certificates A, B and E under real Lean.LM-11:examples/text-models: both tokenizer schemes, both overflow dispositions, a greedy and a sampled generator, a classifier of each tokenizer, nine production roots. Its kernel facts are stated on tokens and bytes (the kernel does not reduce Lean's string primitives); the longest-match scheme is covered by the bridges and the oracle differential. Itslexlean.lockandexpected/are written at the regeneration, soLM-11is red on this head until then.LM-12: whole-word textual reach of the 113 fixed names in the Lean generated for the example's main module, plus transitive reach through library declarations; unreached names fail by name as dead library.LM-09is extended overtext_rows.Cost of the explicit import
A module that declares a text component must write
\importmodule{LexLeanStd.TextModels}and its project must list thestdsource package; without either the declaration is refused naming the import (LLT4006). Every existing text-component user pays that line and that manifest entry. A source package may declare builtin lexicons only (LLC0101), soTextModels.lex.texkeeps a builtin title (Natural number addition, asSha256andTextdo);examples/text-modelshas its own glossary and title.The certificate A pin rule (
production/certificate/data_a.rs)Rule: a definition that a construct elaborates to has as its pin the union of the pins of the definitions its body names, to a fixed point (the sets only grow and are finite). Before, such a definition pinned
[]("the audit finds none for it"). That holds when its callees carry no axioms and is false for a text component, whose definitions apply stdlib forms with measured axioms (decodeTextbringsClassical.choice); Lean then reportedClassical.choicefor the rowR7.__fits_1while the pin was[Quot.sound, propext](LLV7013). #221's union pin covers the rows of one mutual group (_unsafe_rec), not a derived definition's callees, so it did not apply.The rule conditions on the callees' pins, not on the module (an earlier version keyed on the laws import; that was a proxy and is gone). It follows
CallandFunctionRefterms, andvisit_termsreaches lambda bodies and arguments; a primitive names no definition. A name the walk missed leaves the pin short and the audit refuses it loudly (LLV7013). The certificate-A pins ofexamples/helpdesk,examples/modelsandexamples/reasoningare identical before and after the rule (diffed row by row, 1072 rows). The plant that fails when the union is dropped isconformance_lm_10(seeVERIFICATION.md).Identity
This slice moves the language-1.2 identity (
language/production-1.2.toml,schemas/production-eligibility.schema.json, compiler semantics). Records, locks and fixtures are not regenerated here; they regenerate once on the head the maintainer names (after #248 and #254). The register is 452 IDs on the merged line (README, SPEC,repository.rs,spec_links.rs).Measured
Real Lean 4.32.1 on GitHub-hosted runners, each case on its own, from a scratch workflow on
scratch/issue-30-slice-4-lmthat is never merged. Every job of run 40035862345 passes on the head06b55609e's tree (that head plus the workflow file):LM-10(nine roots, oracle, certificates A, B, E)LM-11, against a lock and records written in scratch (331 s of it the verification)LM-12LM-09,LM-13,LM-01,LM-03LM-08LM-02,LM-04,LM-05,LM-06LM-07(earlier run 40027798810, same cases)conformance_au_04fmt,validate-model,validate-spec-links,check-test-inventoryandclippy -D warningspass on the merged head. The draft's own CI cannot show theLM-*cases: itsrestleg stops intestat the stalelexlean.lockofexamples/collectionsbeforebddstarts.Since the last head
origin/release/v0.4(0208701b4) merged by merge commit; both sides kept in CHANGELOG and VERIFICATION, register 452,stdlib/lexlean.tomllistsBuffer,Sha256,TextandTextModels.LM-08was red: its adapters apply the elaborated classifier, which applies production forms, and the fixture's exact axiom policies saidpropext(LLV7005). The adapter definition, realization, theorem, evidence and model, and the stream run, now state what Lean observes.stdlib/src/TextModels.lex.texis its own canonical source again (conformance_au_04): the formatter wraps three long parameter lists, the text of the forms is unchanged.What fails here until the regeneration
The identity move (compiler semantics,
production-1.2.toml, the eligibility schema) and the newstdtree make every language-1.2 record stale. Every failure of a fullcirun on this head (40029277870) that I read isLLC0102(compiler semantics changed since locking),LLC0105(thestdtree differs from the locked one), or a fixture that differs from its generator:examples/text-models/lexlean.lockandexpected/,stdlib/lexlean.lockandstdlib/expected: not written, soLM-11is red on this head (it passes against records written in scratch).formatter_is_idempotent_on_every_example,repro, theexamplesleg and the cases that lock or snapshot a project fail (bs_04..bs_06,rs_*,md_*,px_*,sp_*,ne_*,cl_23).tc_03,tc_04,tc_05), whichcheck-calculus --writeregenerates.🤖 Generated with Claude Code