Skip to content

Commit 081c570

Browse files
hyperpolymathclaude
andcommitted
proof(SafeUrl): DISCHARGE appendAssociative via Data.List.Equalities
`appendQueryStrings = (++)` (Query.idr L205-206), so the goal reduces to standard list append-associativity. Discharged via contrib's `Data.List.Equalities.appendAssociative`. One-line proof: - appendAssociative qs1 qs2 qs3 = Data.List.Equalities.appendAssociative qs1 qs2 qs3 The OWED comment correctly noted this was a "stdlib-plumbing OWED, not a fundamental gap" — just hadn't been wired up. Contrib's `appendAssociative` is already used (imported) by this file via `Data.List.Equalities` (added in #97 for lengthSnoc). Refs #90 #107 #119 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 52a8dd3 commit 081c570

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

src/Proven/SafeUrl/Proofs.idr

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,16 @@ export
257257
||| `Data.List` not exposing `appendAssociative` as a `%reducible`
258258
||| rewrite (the proof exists in Prelude but requires induction on
259259
||| `qs1`, and `Refl` cannot close it for abstract `qs1`). Discharge
260-
||| by importing `Data.List.appendAssociative` and rewriting (the
261-
||| proof is in-Idris2 — this is a stdlib-plumbing OWED, not a
262-
||| fundamental gap).
263-
export
264-
0 appendAssociative : (qs1, qs2, qs3 : QueryString) ->
265-
appendQueryStrings (appendQueryStrings qs1 qs2) qs3 =
266-
appendQueryStrings qs1 (appendQueryStrings qs2 qs3)
260+
||| DISCHARGED via `Data.List.Equalities.appendAssociative` from
261+
||| contrib. `appendQueryStrings = (++)` (Query.idr L205-206), so the
262+
||| goal reduces to `(qs1 ++ qs2) ++ qs3 = qs1 ++ (qs2 ++ qs3)` —
263+
||| exactly the stdlib lemma. The OWED was a stdlib-plumbing residual,
264+
||| not a fundamental gap, as the comment noted.
265+
public export
266+
appendAssociative : (qs1, qs2, qs3 : QueryString) ->
267+
appendQueryStrings (appendQueryStrings qs1 qs2) qs3 =
268+
appendQueryStrings qs1 (appendQueryStrings qs2 qs3)
269+
appendAssociative qs1 qs2 qs3 = Data.List.Equalities.appendAssociative qs1 qs2 qs3
267270

268271
--------------------------------------------------------------------------------
269272
-- URL Security Properties

0 commit comments

Comments
 (0)