Skip to content

Commit 477172b

Browse files
proof(SafeUrl): DISCHARGE appendAssociative via Data.List.Equalities (proven#90 #107 #119) (#128)
\`\`\`idris appendAssociative qs1 qs2 qs3 = Data.List.Equalities.appendAssociative qs1 qs2 qs3 \`\`\` \`appendQueryStrings = (++)\` (Query.idr L205-206), so the goal reduces to standard list append-associativity. Discharged via contrib's \`Data.List.Equalities.appendAssociative\` (already imported here via #97). The OWED comment said this was "stdlib-plumbing, not a fundamental gap" — confirmed. Refs #90 #107 #119 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4e333d0 commit 477172b

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)