Skip to content

Commit

Permalink
Add proptest for Subquotient
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyBF committed Oct 7, 2024
1 parent ba36c88 commit a49229b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ext/crates/fp/src/matrix/subquotient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ pub mod arbitrary {
#[cfg(test)]
mod tests {
use expect_test::expect;
use proptest::prelude::*;

use super::*;

Expand Down Expand Up @@ -272,4 +273,14 @@ mod tests {

assert_eq!(sq.gens().count(), 1);
}

proptest! {
#[test]
fn test_sum_quotient_gens_complement_is_ambient(sq: Subquotient) {
let quotient_dim = sq.zeros().dimension();
let gens_dim = sq.gens().count();
let complement_dim = sq.complement_pivots().count();
assert_eq!(quotient_dim + gens_dim + complement_dim, sq.ambient_dimension());
}
}
}

0 comments on commit a49229b

Please sign in to comment.