Skip to content

chore: rename Array.mkArray to replicate - #7544

Merged
Kha merged 3 commits into
masterfrom
array_replicate
Mar 24, 2025
Merged

Kha merged 3 commits into
masterfrom
array_replicate

Conversation

@kim-em

@kim-em kim-em commented Mar 18, 2025

Copy link
Copy Markdown
Collaborator

This PR renames Array.mkArray to Array.replicate (note that it is no longer exported), and Vector.mkVector to Vector.replicate, for consistency with List.replicate, and easier interpretation.

@kim-em kim-em added the changelog-library Library label Mar 18, 2025
@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Mar 19, 2025
@ghost

ghost commented Mar 19, 2025 •

Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Mathlib CI can not be attempted yet, as the nightly-testing-2025-03-18 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-mathlib, Mathlib CI should run now. You can force Mathlib CI using the force-mathlib-ci label. (2025-03-19 02:13:45)
  • 💥 Mathlib branch lean-pr-testing-7544 build failed against this PR. (2025-03-20 02:27:22) View Log
  • 💥 Mathlib branch lean-pr-testing-7544 build failed against this PR. (2025-03-20 03:14:05) View Log
  • 💥 Mathlib branch lean-pr-testing-7544 build failed against this PR. (2025-03-20 04:09:31) View Log
  • 🟡 Mathlib branch lean-pr-testing-7544 build against this PR was cancelled. (2025-03-20 05:05:28) View Log
  • 💥 Mathlib branch lean-pr-testing-7544 build failed against this PR. (2025-03-20 05:37:42) View Log
  • ✅ Mathlib branch lean-pr-testing-7544 has successfully built against this PR. (2025-03-20 06:46:48) View Log
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase cbfb9e482f1022dbe975ed48cb8da319210e9352 --onto a97813e11f962bc422a03c30b7e29dd2eefb92c8. You can force Mathlib CI using the force-mathlib-ci label. (2025-03-20 10:34:58)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 414ba28cef96a498eae5dcaf0d671d36c00c46ff --onto eb0c015e7c7c0d9b77362847b3630894cea81bae. You can force Mathlib CI using the force-mathlib-ci label. (2025-03-24 00:01:03)

@github-actions
github-actions Bot temporarily deployed to lean-lang.org/lean4/doc March 20, 2025 02:14 Inactive
ghost pushed a commit to leanprover-community/batteries that referenced this pull request Mar 20, 2025
ghost pushed a commit to leanprover-community/mathlib4 that referenced this pull request Mar 20, 2025
@ghost ghost added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Mar 20, 2025
kim-em added a commit to leanprover-community/batteries that referenced this pull request Mar 20, 2025
kim-em added a commit to leanprover-community/aesop that referenced this pull request Mar 20, 2025
kim-em added a commit to leanprover-community/mathlib4 that referenced this pull request Mar 20, 2025
kim-em added a commit to leanprover-community/mathlib4 that referenced this pull request Mar 20, 2025
@github-actions
github-actions Bot temporarily deployed to lean-lang.org/lean4/doc March 20, 2025 04:13 Inactive
ghost pushed a commit to leanprover-community/batteries that referenced this pull request Mar 20, 2025
ghost pushed a commit to leanprover-community/mathlib4 that referenced this pull request Mar 20, 2025
@github-actions github-actions Bot added the changes-stage0 Contains stage0 changes, merge manually using rebase label Mar 20, 2025
@github-actions
github-actions Bot temporarily deployed to lean-lang.org/lean4/doc March 20, 2025 04:49 Inactive
ghost pushed a commit to leanprover-community/batteries that referenced this pull request Mar 20, 2025
ghost pushed a commit to leanprover-community/mathlib4 that referenced this pull request Mar 20, 2025
kim-em added a commit to leanprover-community/mathlib4 that referenced this pull request Mar 20, 2025
kim-em added a commit to leanprover-community/mathlib4 that referenced this pull request Mar 20, 2025
@ghost ghost added builds-mathlib CI has verified that Mathlib builds against this PR and removed breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan labels Mar 20, 2025
@github-actions
github-actions Bot temporarily deployed to lean-lang.org/lean4/doc March 20, 2025 10:21 Inactive
@github-actions
github-actions Bot temporarily deployed to lean-lang.org/lean4/doc March 23, 2025 23:50 Inactive
@Kha
Kha merged commit 7c41aad into master Mar 24, 2025
kmill added a commit to leanprover-community/aesop that referenced this pull request Mar 24, 2025
kim-em added a commit to leanprover-community/mathlib4 that referenced this pull request Mar 31, 2025
* fix

* fix again

* chore: bump to nightly-2025-03-15

* fix

* harden script

* chore: bump to nightly-2025-03-16

* Update lean-toolchain for testing leanprover/lean4#7516

* lake update

* fixes for leanprover/lean4#7516

* fixes for leanprover/lean4#7516

* partial test fixes

* fix stacks

* "fix" eqns test

* Remove neg instance, there is one upstream now

* chore: bump to nightly-2025-03-17

* lake update

* lake update

* lint

* Update lean-toolchain for testing leanprover/lean4#7522

* Update lean-toolchain for testing leanprover/lean4#5182

* Bump batteries for leanprover/lean4#5182

* simp works

* Fewer unseal

* Trigger CI for leanprover/lean4#5182

* max heartbeats

* update test

* Update lean-toolchain for testing leanprover/lean4#7519

* Update lean-toolchain for testing leanprover/lean4#7302

* Fix

* fixes

* Trigger CI for leanprover/lean4#5182

* chore: bump to nightly-2025-03-18

* Less rfl abuse

* fix `compile_inductive%` regression

* Trigger CI for leanprover/lean4#5182

* Trigger CI for leanprover/lean4#5182

* Trigger CI for leanprover/lean4#5182

* Adapt

* process deprecations

* Update lean-toolchain for testing leanprover/lean4#7558

* Adapt

* deprecations

* chore: bump to nightly-2025-03-19

* chore: fixes for leanprover/lean4#7519

* Update lean-toolchain for testing leanprover/lean4#7544

* lake update

* fixes for leanprover/lean4#7544

* fixes for leanprover/lean4#7544

* fixes for leanprover/lean4#7544

* fixes for leanprover/lean4#7544

* Trigger CI for leanprover/lean4#7544

* .

* cleaning up

* chore: bump to nightly-2025-03-20

* update

* deprecation/note about upstreamed version

* fix

* Update lean-toolchain for testing leanprover/lean4#7614

* chore: bump to nightly-2025-03-21

* Adapt back

* fix test output

* chore: bump to nightly-2025-03-22

* Merge master into nightly-testing

* chore: adaptations for nightly-2025-03-22

* fix

* Merge master into nightly-testing

* protected

* chore: bump to nightly-2025-03-24

* update batteries and aesop

* fixes for count_cons_of_ne

* fix fix to Sym.inhabitedSym' (need `default`, not the `a` that happens to be in context)

* bump heartbeats in MathlibTest/observe

* fix, deprecated

* fix merge

* Update lean-toolchain for testing leanprover/lean4#7672

* Trigger CI for leanprover/lean4#7672

* update batteries

* fixes for leanprover/lean4#7672

* Trigger CI for leanprover/lean4#7672

* Trigger CI for leanprover/lean4#7672

* Trigger CI for leanprover/lean4#7672

* Trigger CI for leanprover/lean4#7672

* Trigger CI for leanprover/lean4#7672

* update batteries

* fixes

* chore: bump to nightly-2025-03-25

* Trigger CI for leanprover/lean4#7672

* Trigger CI for leanprover/lean4#7672

* update batteries

* Trigger CI for leanprover/lean4#7672

* one fix

* fixes

* maxheartbeats

* fixes for leanprover/lean4#7672

* fixes for leanprover/lean4#7672

* fixes for leanprover/lean4#7672

* fixes for leanprover/lean4#7672

* cleanups

* .

* chore: bump to nightly-2025-03-26

* update aesop

* Update lean-toolchain for testing leanprover/lean4#7690

* Trigger CI for leanprover/lean4#7690

* Trigger CI for leanprover/lean4#7690

* maxHeartbeats

* max heartbeats

* invalidate cache

* another heartbeats

* bump batteries

* deprecation

* Update lean-toolchain for testing leanprover/lean4#7692

* Delete

* chore: bump to nightly-2025-03-27

* update batteries

* bump batteries

* many more maxHeartbeats

* chore: bump leantar v0.1.15

* invalidate cache

* cache flush, take 2

* feat(Cache): root hash generation counter

* 1-line fix

* chore: bump to nightly-2025-03-28

* update deps

* remove upstreamed

* remove all adaptation notes, hooray

* merge lean-pr-testing-7692

* fixes from Kevin's review

---------

Co-authored-by: leanprover-community-mathlib4-bot <[email protected]>
Co-authored-by: Sebastian Ullrich <[email protected]>
Co-authored-by: Markus Himmel <[email protected]>
Co-authored-by: Johan Commelin <[email protected]>
Co-authored-by: Joachim Breitner <[email protected]>
Co-authored-by: Kyle Miller <[email protected]>
Co-authored-by: Mario Carneiro <[email protected]>
k5sko added a commit to colim-ai/colim that referenced this pull request Jul 27, 2026
…-class rate

1. assert_toolchain_intact is now universal, alongside the vacuous-green
   guard: local reproduction, the measurement workflow and tier-1 verification
   all discard a build whose actual lean-toolchain differs from the intended
   one. verify_build emits toolchain_intact/invalid/expected_toolchain and
   refuses to call such a build green; reproduce.py counts and prints INVALID.

3. fixers/tier1/renames_supplement.toml added for renames extraction cannot
   see. Evidence link and provenance are REQUIRED per entry and enforced by
   test; `config` entries are excluded from the rewrite map by construction so
   they can only be handled by tier-1b. Seeded with Array.mkArray ->
   Array.replicate, evidenced by leanprover/lean4#7544 ("chore: rename
   Array.mkArray to replicate") -- found by searching upstream rather than
   asserting it from memory. Fixture test also pins that Array.mkArray0..4,
   which still exist and are unrelated, are NOT rewritten.

4. lake_config_api renamed lake_api_churn and routed to tier-1b.

6. Per-class outcomes reported, and correcting two misclassifications found by
   reading the actual post-tier-1 logs:
   - `no such file or directory` was routed to tier-1b, but it is the SYMPTOM
     of a bad import, not lakefile config. Removed from TIER1B_CLASSES along
     with lake_stale_artifact.
   - Added a `bad_import` class. ImperialCollegeLondon/formalising-mathematics
     -2024 fails on `bad import 'Mathlib.MeasureTheory.Integral.Bochner'`: a
     MODULE was moved. The rename map covers declarations only, so module
     renames are a distinct and mechanically fixable tier-1 gap we do not yet
     handle. It was being misreported as a config failure.

7. Pruned the stray v4.33.0-rc1 toolchain that bug 2 of the previous commit
   caused elan to install.

Tier-1 fix rate on the 11-package sample is 0/11. Per-class: hard_removal 5,
config 2, import 1, semantic 1, other 2. --reclassify re-derives the breakdown
from stored transcripts in seconds rather than rebuilding for an hour.

Co-Authored-By: Claude Opus 5 <[email protected]>
k5sko added a commit to colim-ai/colim that referenced this pull request Jul 27, 2026
Two rewriter bugs found by actually running the pipeline end to end, both of
which corrupted source rather than failing safe:

1. Unqualified short-name rewriting hit ordinary field and local names.
   mathlib declares deprecated aliases for names like `mul`, so `Mul.mul`
   became `Mul.stdPart_mul` and `w.x` became an unknown identifier --
   105 substitutions, source destroyed.
2. Worse, a qualified map key can itself be BARE, when the alias was
   declared outside any namespace. mathlib has a root-level `lo`, which
   rewrote render's `lo` binders into `MonomialOrder.linearOrderSyn` and
   produced invalid non-atomic binder names.

Both now require a name to be distinctive before it may be rewritten bare.
The kernel caught both, as designed -- neither produced a false green -- but
they were destroying the fix rate.

With them fixed, kmill/render goes from 105 wrong substitutions to 2 correct
ones and builds GREEN on leanprover/lean4:v4.32.1. The fix is exactly the
curated supplement entry Array.mkArray -> Array.replicate, evidenced by
leanprover/lean4#7544.

demo/run_render.sh runs the whole thing in one command with readable output.
site/build.py generates the dashboard from the ledger; every figure is a SQL
query, nothing estimated.

Co-Authored-By: Claude Opus 5 <[email protected]>

This branch was previously deployed

1 inactive deployment
lean-lang.org/lean4/doc — 66b47a84 Deployed Mar 23, 2025 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builds-mathlib CI has verified that Mathlib builds against this PR changelog-library Library changes-stage0 Contains stage0 changes, merge manually using rebase toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants