feat(L-S37): PhiPriorQuantCorrect — Coq formal proof of phi-prior quantizer#794
Open
gHashTag wants to merge 1 commit into
Open
feat(L-S37): PhiPriorQuantCorrect — Coq formal proof of phi-prior quantizer#794gHashTag wants to merge 1 commit into
gHashTag wants to merge 1 commit into
Conversation
…correctness Closes #793 Adds formal Coq proof for L-S37 φ-prior on-chip weight quantizer correctness. Theorems proved (all Qed, no Admitted): - quantize_ternary: forall w, quantize w = TPos \/ TZero \/ TNeg - quantize_zero_region: forall w, |w| < phi_inv_sq -> quantize w = TZero - quantize_positive_region: phi_inv_sq <= w -> quantize w = TPos - quantize_negative_region: w <= -phi_inv_sq -> quantize w = TNeg - quantize_at_pos_boundary, quantize_just_below_pos_boundary - quantize_at_neg_boundary, quantize_just_below_neg_boundary - quantize_zero: quantize 0 = TZero - quantize_q115_complete: Q1.15 range completeness - quantize_symmetric_pos/neg/zero: anti-symmetry - phi_inv_sq_positive, phi_inv_sq_in_range, ternary_encoding_smaller Verification: coqc 8.20.1 exit 0 phi_inv_sq = 12533 (Q1.15 threshold) DOI: 10.5281/zenodo.19227877 Apache-2.0, no vendor IP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #793
L-S37: φ-prior Weight Quantizer — Coq Formal Proof
Summary
Adds
docs/phd/theorems/igla/PhiPriorQuantCorrect.v: a self-contained Coq 8.20.1 formal proof of correctness for the L-S37 φ-prior on-chip weight quantizer.Quantizer Rule
Theorems Proved (all Qed, zero Admitted)
quantize_ternaryforall w, quantize w = TPos \/ TZero \/ TNegquantize_zero_regionforall w, Z.abs w < phi_inv_sq -> quantize w = TZeroquantize_positive_regionphi_inv_sq <= w -> quantize w = TPosquantize_negative_regionw <= -phi_inv_sq -> quantize w = TNegquantize_at_pos_boundaryquantize phi_inv_sq = TPosquantize_just_below_pos_boundaryquantize (phi_inv_sq - 1) = TZeroquantize_at_neg_boundaryquantize (- phi_inv_sq) = TNegquantize_just_below_neg_boundaryquantize (-(phi_inv_sq-1)) = TZeroquantize_zeroquantize 0 = TZeroquantize_q115_completequantize_symmetric_pos/neg/zeroVerification
Coq version: 8.20.1
Anchor
φ² + φ⁻² = 3 ; phi_inv_sq = 12533 ; DOI: 10.5281/zenodo.19227877
Apache-2.0, no vendor IP, Author: Dmitrii Vasilev admin@t27.ai