Commit f6717f5
committed
feat(L8): EffectSubsumes preorder + subsumeCompose (A5)
Closes PROOF-NEEDS §P0.4. The file already had reflexivity
(`effectSubsumesRefl`), single-element weakening (`effectWeaken`), and
single-declared-set composition (`combineSub`). This change adds the
missing transitivity, append-preservation for membership, two-list
weakening, and the flagship two-declared-set composition theorem.
Lemmas:
hasEffectTrans : HasEffect e ys -> EffectSubsumes xs ys ->
HasEffect e xs
— lift a membership proof through a subsumption.
hasEffectCombineL,
hasEffectCombineR : HasEffect e xs (resp. ys) ->
HasEffect e (combineEffects xs ys)
— membership survives appending.
subsumePrepend,
subsumeAppend : EffectSubsumes d2 a ->
EffectSubsumes (d1 ++ d2) a
(and dually for d1)
— prepending/appending declared effects
preserves subsumption of the actual set.
Theorems:
subsumeRefl : (xs : EffectSet) -> EffectSubsumes xs xs
— PROOF-NEEDS §P0.4 naming alias for the existing
`effectSubsumesRefl`.
subsumeTrans : EffectSubsumes xs ys -> EffectSubsumes ys zs ->
EffectSubsumes xs zs
— transitivity; together with subsumeRefl makes
`EffectSubsumes` a preorder on EffectSet.
subsumeCompose : EffectSubsumes d1 a1 -> EffectSubsumes d2 a2 ->
EffectSubsumes (d1 ++ d2) (a1 ++ a2)
— the composition theorem: sequencing two operations
is witnessed by the union of their declared and
actual effects; attestations now compose rather
than needing re-verification against the monolith.
Existing `SubNil`, `SubCons`, `combineSub`, `effectWeaken` untouched.
idris2 --check clean. panic-attack assail: 0 weak points.
Zero dangerous patterns. %default total.1 parent 81b191b commit f6717f5
2 files changed
Lines changed: 110 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
207 | 316 | | |
208 | 317 | | |
209 | 318 | | |
| |||
0 commit comments