Commit be301df
committed
proof(lean4/LambdaCNO): close church_zero (1 of 6); document 5 spec-blocked sorries
L168 church_zero example
- Was FALSE as stated. `(λf.λx.x)(λf.λx.x)` β-reduces by substituting
the second copy for `f` in `LAbs (LVar 0)` — but `f` (de Bruijn 1
inside the inner LAbs) does not occur, so the result is
`LAbs (LVar 0)` = `lambda_id`, NOT `church_zero`. Restated to the
correct target and closed in a single β-step.
The other 5 LambdaCNO sorries are spec-blocked, not proof-blocked.
Replaced bare `sorry` with detailed deferral comments enumerating the
spec choices the user needs to make:
L114 lambda_id_is_cno (1 sorry inside)
- β-reduction (λx.x) arg →* arg IS closed cleanly.
- Remaining sorry is `isNormalForm arg` inside `evaluatesTo`.
For arbitrary arg this is false; spec needs an arg-is-value
hypothesis on `isLambdaCNO`, OR drop `isNormalForm nf` from
`evaluatesTo`, OR restrict the universal to normal-form args.
L138/L141 lambda_cno_composition (2 sorries inside)
- `isLambdaCNO f` only gives `LApp f arg →* arg`; it does NOT tell
us f = LAbs body, so we cannot perform the outer β-reduction.
Spec needs either a syntactic f = LAbs _ constraint, an
arg-as-value hypothesis, or an η-equivalence reformulation.
L158 y_not_cno (1 sorry inside)
- BetaReduceStar is inductive (only finite reduction sequences),
so "no normal form exists for Y" cannot be proved directly. Need
either an axiom y_combinator_no_normal_form (cheapest, matches
file's existing axiom-heavy style - cf. eta_equivalence), a
coinductive reformulation of reduction, or strong-normalization.
L185 eta_expanded_id_is_cno (1 sorry, as written)
- Same arg-is-value gap; the original explicit β-walk now actually
builds under v4.16.0 (presumably because the seqComp abbrev
change + ProgramState BEq derivation in CNO.lean indirectly
affected simp normalization). Termination conjunct still gated
on the spec choice.
LambdaCNO file builds cleanly: 4 declarations with sorry, all documented.1 parent bd31ddf commit be301df
1 file changed
Lines changed: 66 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
99 | 114 | | |
100 | 115 | | |
101 | 116 | | |
| |||
104 | 119 | | |
105 | 120 | | |
106 | 121 | | |
107 | | - | |
| 122 | + | |
108 | 123 | | |
109 | 124 | | |
110 | 125 | | |
111 | 126 | | |
112 | 127 | | |
113 | | - | |
114 | | - | |
| 128 | + | |
| 129 | + | |
115 | 130 | | |
116 | | - | |
| 131 | + | |
117 | 132 | | |
118 | 133 | | |
119 | 134 | | |
| |||
126 | 141 | | |
127 | 142 | | |
128 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
129 | 157 | | |
130 | 158 | | |
131 | 159 | | |
| |||
134 | 162 | | |
135 | 163 | | |
136 | 164 | | |
137 | | - | |
| 165 | + | |
138 | 166 | | |
139 | | - | |
140 | | - | |
| 167 | + | |
141 | 168 | | |
142 | 169 | | |
143 | 170 | | |
| |||
148 | 175 | | |
149 | 176 | | |
150 | 177 | | |
151 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
152 | 192 | | |
153 | 193 | | |
154 | 194 | | |
155 | | - | |
156 | 195 | | |
157 | | - | |
158 | | - | |
| 196 | + | |
| 197 | + | |
159 | 198 | | |
160 | 199 | | |
161 | 200 | | |
162 | 201 | | |
163 | 202 | | |
164 | 203 | | |
165 | 204 | | |
166 | | - | |
167 | | - | |
168 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
169 | 221 | | |
170 | 222 | | |
171 | 223 | | |
| |||
0 commit comments