Commit 3f592ab
authored
chore: privatize 4 same-file helpers + drop 7 dead @[simp] lemmas in InfraCore (#111)
* chore: privatize 4 same-file-only helper lemmas
Privatize lemmas with zero references anywhere in the repository (including
blueprint, docs, and the wider `Exchangeability/` tree) whose only callers
live in the same file:
* `ViaKoopman/CesaroL2ToL1.lean`: `iterate_shift_eval'`, `iterate_shift_eval0'`
— proof-step helpers; only in-file caller of each.
* `Ergodic/ShiftInvariantRepresentatives.lean`: `ae_shift_invariance_on_rep`
— proof helper; only caller at L338 in the same file.
* `Util/ProductBounds.lean`: `abs_prod_le_one` — only caller is its sibling
`abs_prod_sub_prod_le` directly below. Updated the file's docstring to
drop the now-private name from "Main results".
Candidate set produced by an audit script that enumerates non-private
`lemma`/`theorem` declarations, excludes anything with a tactic-database
attribute (`@[simp]`, `@[measurability]`, `@[fun_prop]`, etc.) where
grep can't see implicit use, and reports those with zero `git grep -lw`
hits outside their owner file. The audit found 25 candidates; the other
21 were judged to be real public API on public namespaces
(`Contractable.*`, `Exchangeable.*`, `Integrable.of_abs_bounded`,
`fixedSubspace_closed`, etc.) and left as-is even though no internal
caller currently uses them.
* chore(InfraCore): drop 7 dead @[simp] lemmas (probe verified, all unused)
Following the standard "delete + build" probe pattern (since `@[simp]`
lemmas can be used implicitly and grep can't see those uses), I removed
seven `@[simp]` lemmas in `ViaKoopman/InfraCore.lean` and confirmed via
`lake build` that none was load-bearing in any simp call across the
3527-job build:
* `shiftℤ_apply`, `shiftℤInv_apply`, `restrictNonneg_apply` — `rfl`
unfolding lemmas for `shiftℤ`/`shiftℤInv`/`restrictNonneg`.
* `shiftℤ_comp_shiftℤInv`, `shiftℤInv_comp_shiftℤ` — round-trip identities
for the two-sided shift and its inverse.
* `restrictNonneg_extendByZero`, `extendByZero_apply_nat` — interaction
lemmas for the nonneg-restrict / extend-by-zero pair.
All seven had zero named references outside their owning file; the probe
confirms that holds at the simp level too. If a future caller needs any
of them, re-add as a one-liner.
Net: −28 lines (file shrinks from 235 to 207 lines including the
preserved bridge `measurable_shiftℤ` and downstream defs).1 parent f83a441 commit 3f592ab
4 files changed
Lines changed: 10 additions & 36 deletions
File tree
- Exchangeability
- DeFinetti/ViaKoopman
- Ergodic
- Util
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
110 | | - | |
111 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 100 | | |
105 | 101 | | |
106 | 102 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | 103 | | |
120 | 104 | | |
121 | 105 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | 106 | | |
127 | 107 | | |
128 | 108 | | |
| |||
131 | 111 | | |
132 | 112 | | |
133 | 113 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | 114 | | |
143 | 115 | | |
144 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
24 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
0 commit comments