Skip to content

Instantly share code, notes, and snippets.

View kim-em's full-sized avatar

Kim Morrison kim-em

View GitHub Profile
@kim-em
kim-em / simps_tier2_filtered.txt
Created April 2, 2026 05:12
Tier 2 @[simps] defeq warnings (126 cases, filtered)
warning: Mathlib/Algebra/AddConstMap/Basic.lean:407:2: `@[simps]` generated lemma `AddConstMap.toEnd_apply : ⇑toEnd = DFunLike.coe` where the type of the LHS
(G →+c[a✝¹, a✝¹] G) → Function.End G
is not definitionally equal to the type of the RHS
(G →+c[a✝¹, a✝¹] G) → G → G
Use `set_option simps.defeqWarn false in` to suppress this warning.
warning: Mathlib/Algebra/Algebra/Subalgebra/MulOpposite.lean:149:2: `@[simps]` generated lemma `Subalgebra.algEquivOpMop_apply : S.algEquivOpMop a✝ =
MulOpposite.op (S.addEquivOp a✝)` where the type of the LHS
(↥S.op)ᵐᵒᵖ
is not definitionally equal to the type of the RHS
@kim-em
kim-em / zen-lana-gist.md
Last active March 31, 2026 08:42
ZEN Mathematics Center LANA Project announcement (2026-03-31) — Lean formalization of anabelian geometry & IUT theory verification

ZEN Mathematics Center: New Project "LANA" Announcement

ZEN大学「ZMC(ZEN Mathematics Center; ZEN数学センター)」新プロジェクト「LANA」の発表

  • Date: March 31, 2026
  • Video: https://www.youtube.com/live/b9ZV-4T3iUo
  • Duration: 1h 24m (first ~11 minutes are pre-stream holding screen)
  • Language: Japanese (with some English from online participants, consecutively translated)

English Summary

@kim-em
kim-em / repro.sh
Created March 26, 2026 08:39
Repro script for ProofWidgets not up-to-date bug (leanprover/lean4#13127)
#!/usr/bin/env bash
set -uo pipefail
PASS=0
FAIL=0
run_expect_success() {
echo " \$ $*"
output=$("$@" 2>&1)
if [ $? -eq 0 ]; then
@kim-em
kim-em / repro.sh
Last active March 26, 2026 08:03
Repro script for ProofWidgets not up-to-date bug (leanprover/lean4#13127)
#!/usr/bin/env bash
set -uo pipefail
PASS=0
FAIL=0
run_expect_success() {
echo " \$ $*"
output=$("$@" 2>&1)
if [ $? -eq 0 ]; then
@kim-em
kim-em / mark-set-option-viewed.sh
Last active March 23, 2026 00:32
Mark trivial set_option backward.* files as viewed in a GitHub PR
#!/usr/bin/env bash
# Mark as "viewed" any file in a PR whose diff only adds/removes
# "set_option backward.isDefEq.respectTransparency false in" or
# "set_option backward.whnf.reducibleClassField false in".
# Usage: ./mark-set-option-viewed.sh [owner/repo] [pr-number]
# Requires: gh (GitHub CLI), python3
REPO="${1:-leanprover-community/mathlib4-nightly-testing}"
PR="${2:-201}"
@kim-em
kim-em / ci_timing_report.py
Created March 7, 2026 00:25
Mathlib CI timing report script and sample output
#!/usr/bin/env python3
"""
Mathlib CI timing report.
Fetches recent CI run data from GitHub Actions and produces a report showing:
- Per-step timing for the Build job (in execution order)
- Grouped timing summary
- All jobs overview
- Linear regression of build time vs cache misses
@kim-em
kim-em / mathlib-bench-all.sh
Created March 6, 2026 05:29
Mathlib build benchmark across Hetzner Cloud CCX instances
#!/bin/bash
# Mathlib Build Benchmark on Hetzner Cloud
#
# Prerequisites:
# 1. Install hcloud CLI: https://github.com/hetznercloud/cli/releases
# macOS: brew install hcloud
# Linux: apt install hcloud-cli (or download binary from releases page)
# 2. export HCLOUD_TOKEN="your-api-token-here"
# 3. Account needs dedicated core quota >= 48 (runs sequentially)
#
@kim-em
kim-em / pseudo_parents_results.log
Created March 4, 2026 03:05
Pseudo-parent declarations in Mathlib that may need reducibility changes
[semireducible] AbsoluteValue.comp : AbsoluteValue → AbsoluteValue (shared: MulHom)
[semireducible] AddCon.comap : AddCon → AddCon (shared: Setoid)
[semireducible] AddCon.prod : AddCon → AddCon (shared: Setoid)
[semireducible] AddConstEquiv.symm : AddConstEquiv → AddConstEquiv (shared: Equiv, AddConstMap)
[semireducible] AddConstEquiv.trans : AddConstEquiv → AddConstEquiv (shared: Equiv, AddConstMap)
[semireducible] AddEquiv.mapMatrix : AddEquiv → AddEquiv (shared: AddHom, Equiv)
[semireducible] AddEquiv.prodCongr : AddEquiv → AddEquiv (shared: AddHom, Equiv)
[semireducible] AddEquiv.symm : AddEquiv → AddEquiv (shared: AddHom, Equiv)
[semireducible] AddEquiv.toContinuousAddEquiv : AddEquiv → ContinuousAddEquiv (shared: AddHom, Equiv)
[semireducible] AddEquiv.toLinearEquiv : AddEquiv → LinearEquiv (shared: AddHom, Equiv)
@kim-em
kim-em / 00_index.md
Last active March 3, 2026 00:46
defeq_abuse failure patterns (>=10 occurrences)

defeq_abuse failure patterns

175 canonical =?= patterns (reversed pairs merged), each appearing in >= 10 set_option occurrences.

# pattern occurrences locations
1 ⊤ =?= ⊤ 119 locations
2 Quiver C =?= Quiver C 115 locations
3 WithTop ℕ =?= ℕ∞ 114 locations
4 Quotient.mk'' 0 =?= Quotient.mk'' 0 111 locations
@kim-em
kim-em / SKILL.md
Created February 25, 2026 23:03
Mark PR files as viewed by predicate (Claude Code skill)
name mark-pr-files-viewed
description Mark files as viewed in a GitHub PR, filtering by a predicate on the diff. Use when the user asks to mark files as viewed, dismiss trivial changes, or batch-review PR files matching a pattern.

Mark PR Files as Viewed by Predicate

Use when the user asks to mark files as viewed in a GitHub PR, typically filtering by some predicate on the diff (e.g., "only whitespace changes", "only toolchain bumps", "only import changes").

Steps