ark-r1cs-std/r1cs-std/src/instantiated/mnt4_298/fields.rs
r1cs-std/src/instantiated/mnt4_298/fields.rsRaw
1use algebra::mnt4_298::{Fq, Fq2Parameters, Fq4Parameters};
2
3use crate::fields::{fp::FpVar, fp2::Fp2Var, fp4::Fp4Var};
4
5/// A variable that is the R1CS equivalent of `algebra::mnt4_298::Fq`.
6pub type FqVar = FpVar<Fq>;
7/// A variable that is the R1CS equivalent of `algebra::mnt4_298::Fq2`.
8pub type Fq2Var = Fp2Var<Fq2Parameters>;
9/// A variable that is the R1CS equivalent of `algebra::mnt4_298::Fq4`.
10pub type Fq4Var = Fp4Var<Fq4Parameters>;
11
12#[test]
13fn mnt4_298_field_gadgets_test() {
14 use super::*;
15 use crate::fields::tests::*;
16 use algebra::mnt4_298::{Fq, Fq2, Fq4};
17
18 field_test::<_, _, FqVar>().unwrap();
19 frobenius_tests::<Fq, _, FqVar>(13).unwrap();
20
21 field_test::<_, _, Fq2Var>().unwrap();
22 frobenius_tests::<Fq2, _, Fq2Var>(13).unwrap();
23
24 field_test::<_, _, Fq4Var>().unwrap();
25 frobenius_tests::<Fq4, _, Fq4Var>(13).unwrap();
26}