Skip to content

Commit 0576c32

Browse files
proof(SafeChecksum): DISCHARGE crc32PolynomialIsIEEE via Refl (proven#90, #107) (#108)
Per [proven#107](#107) "overly cautious OWED" pattern. \`\`\`idris public export crc32PolynomialIsIEEE : crc32Polynomial = 0xEDB88320 crc32PolynomialIsIEEE = Refl \`\`\` \`crc32Polynomial\` is \`public export\` with body \`0xEDB88320\` (SafeChecksum.idr L21-23). Both sides are the same \`Bits32\` literal — primitive equality, `Refl` closes. The OWED's "numeric-literal opaque under Bits32" blocker only applies to REDUCING `crc32Polynomial` to a *different* literal. Here LHS and RHS are the same literal so no reduction is needed. Refs #90 #107 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4057f22 commit 0576c32

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

src/Proven/SafeChecksum/Proofs.idr

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,15 @@ import Data.Bits
5252
--------------------------------------------------------------------------------
5353

5454
||| OWED: CRC32 polynomial is the IEEE 802.3 bit-reversed value
55-
||| `0xEDB88320`. Held back by Idris2 0.8.0 not reducing the named
56-
||| `crc32Polynomial : Bits32` constant to its literal value by Refl
57-
||| alone (numeric-literal opaque under `Bits32`). Discharge once a
58-
||| `Data.Bits` reflective tactic is available.
55+
||| `0xEDB88320`. DISCHARGED: `crc32Polynomial` is `public export`
56+
||| with body `0xEDB88320` (SafeChecksum.idr L21-23). `Bits32` literal
57+
||| equality is primitive — both sides reduce to the same literal and
58+
||| `Refl` closes. The "numeric-literal opaque under Bits32" cited in
59+
||| the OWED only applies to REDUCING `crc32Polynomial` to a *different*
60+
||| literal; here LHS and RHS are the same literal.
5961
public export
60-
0 crc32PolynomialIsIEEE : crc32Polynomial = 0xEDB88320
62+
crc32PolynomialIsIEEE : crc32Polynomial = 0xEDB88320
63+
crc32PolynomialIsIEEE = Refl
6164

6265
||| OWED: Adler-32 modulus is `65521`, the largest prime less than
6366
||| `2^16` (the choice is load-bearing — primality is what gives

0 commit comments

Comments
 (0)