From e16046a1e891eeebc439fea03018942f523b2d58 Mon Sep 17 00:00:00 2001 From: lonerapier Date: Wed, 31 Jul 2024 22:53:53 +0530 Subject: [PATCH] change example name and AbelianGroup impl --- Cargo.toml | 2 +- examples/{permutation_group.rs => symmetric_group.rs} | 0 src/algebra/group/mod.rs | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename examples/{permutation_group.rs => symmetric_group.rs} (100%) diff --git a/Cargo.toml b/Cargo.toml index 3abfb75..c991542 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,4 +32,4 @@ ark-std ={ git="https://github.com/arkworks-rs/std/" } name="aes_chained_cbc" [[example]] -name="permutation_group" +name="symmetric_group" diff --git a/examples/permutation_group.rs b/examples/symmetric_group.rs similarity index 100% rename from examples/permutation_group.rs rename to examples/symmetric_group.rs diff --git a/src/algebra/group/mod.rs b/src/algebra/group/mod.rs index 85ea2e8..9b9cc37 100644 --- a/src/algebra/group/mod.rs +++ b/src/algebra/group/mod.rs @@ -60,7 +60,7 @@ pub trait FiniteGroup: Finite + Group { /// Defines a group with commutative operation: `a·b=b·a` pub trait AbelianGroup: Group { /// Returns whether the group is an abelian group - fn is_abelian(a: &Self, b: &Self) -> bool { Self::op(a, b) == Self::op(b, a) } + fn is_abelian(a: &Self, b: &Self) { assert!(Self::op(a, b) == Self::op(b, a)) } } #[const_trait]