Skip to content

Commit

Permalink
Add Arbitrary implementation for other types in fp (#174)
Browse files Browse the repository at this point in the history
* Implement `Arbitrary` for `FqVector`

* Implement `Arbitrary` for `Matrix`

* Implement `Arbitrary` for `Subspace`

* Implement `Arbitrary` for `Subquotient`

* Add proptest for `Subquotient`

* Fix bug in `Subquotient::complement_pivots`

* Introduce `Matrix::arbitrary_rref`

* Export `arbitrary` modules properly

* Use `Matrix::arbitrary_rref` for `row_reduce` integration test
  • Loading branch information
github-actions[bot] committed Oct 11, 2024
1 parent 26706eb commit 4792d04
Show file tree
Hide file tree
Showing 96 changed files with 1,490 additions and 151 deletions.
Binary file modified calculator/steenrod_calculator_wasm_bg.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/algebra/adem_algebra/struct.AdemBasisElement.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/algebra/algebra/milnor_algebra/struct.Matrix2D.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/algebra/enum.AlgebraType.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/algebra/module/struct.ModuleFailedRelationError.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/fp/all.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/fp/field/element/struct.FieldElement.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/fp/field/field_internal/trait.FieldInternal.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
});
</script>

</head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../fp/index.html">fp</a><span class="version">0.1.0</span></h2></div><h2 class="location"><a href="#">FieldInternal</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.ElementContainer">ElementContainer</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.add_assign">add_assign</a></li><li><a href="#tymethod.bit_length">bit_length</a></li><li><a href="#tymethod.decode">decode</a></li><li><a href="#tymethod.el">el</a></li><li><a href="#tymethod.encode">encode</a></li><li><a href="#tymethod.fma_limb">fma_limb</a></li><li><a href="#tymethod.frobenius">frobenius</a></li><li><a href="#tymethod.inv">inv</a></li><li><a href="#tymethod.mul_assign">mul_assign</a></li><li><a href="#tymethod.neg">neg</a></li><li><a href="#tymethod.reduce">reduce</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.add">add</a></li><li><a href="#method.bitmask">bitmask</a></li><li><a href="#method.div">div</a></li><li><a href="#method.entries_per_limb">entries_per_limb</a></li><li><a href="#method.is_reduced">is_reduced</a></li><li><a href="#method.limb_bit_index_pair">limb_bit_index_pair</a></li><li><a href="#method.mul">mul</a></li><li><a href="#method.number">number</a></li><li><a href="#method.pack">pack</a></li><li><a href="#method.range">range</a></li><li><a href="#method.sub">sub</a></li><li><a href="#method.sub_assign">sub_assign</a></li><li><a href="#method.truncate">truncate</a></li><li><a href="#method.unpack">unpack</a></li></ul><h3><a href="#object-safety">Object Safety</a></h3><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In fp::field::field_internal</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../../index.html">fp</a>::<wbr><a href="../index.html">field</a>::<wbr><a href="index.html">field_internal</a>::<wbr><a class="trait" href="#">FieldInternal</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/fp/field/field_internal.rs.html#49-193">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait FieldInternal: <a class="trait" href="https://doc.rust-lang.org/1.81.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/1.81.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="https://doc.rust-lang.org/1.81.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> + <a class="trait" href="https://doc.rust-lang.org/1.81.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/1.81.0/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/1.81.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="../../trait.MaybeArbitrary.html" title="trait fp::MaybeArbitrary">MaybeArbitrary</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.81.0/std/primitive.unit.html">()</a>&gt; {
</head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../fp/index.html">fp</a><span class="version">0.1.0</span></h2></div><h2 class="location"><a href="#">FieldInternal</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.ElementContainer">ElementContainer</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.add_assign">add_assign</a></li><li><a href="#tymethod.bit_length">bit_length</a></li><li><a href="#tymethod.decode">decode</a></li><li><a href="#tymethod.el">el</a></li><li><a href="#tymethod.encode">encode</a></li><li><a href="#tymethod.fma_limb">fma_limb</a></li><li><a href="#tymethod.frobenius">frobenius</a></li><li><a href="#tymethod.inv">inv</a></li><li><a href="#tymethod.mul_assign">mul_assign</a></li><li><a href="#tymethod.neg">neg</a></li><li><a href="#tymethod.reduce">reduce</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.add">add</a></li><li><a href="#method.bitmask">bitmask</a></li><li><a href="#method.div">div</a></li><li><a href="#method.entries_per_limb">entries_per_limb</a></li><li><a href="#method.is_reduced">is_reduced</a></li><li><a href="#method.limb_bit_index_pair">limb_bit_index_pair</a></li><li><a href="#method.mul">mul</a></li><li><a href="#method.number">number</a></li><li><a href="#method.pack">pack</a></li><li><a href="#method.range">range</a></li><li><a href="#method.sub">sub</a></li><li><a href="#method.sub_assign">sub_assign</a></li><li><a href="#method.truncate">truncate</a></li><li><a href="#method.unpack">unpack</a></li></ul><h3><a href="#object-safety">Object Safety</a></h3><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In fp::field::field_internal</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../../index.html">fp</a>::<wbr><a href="../index.html">field</a>::<wbr><a href="index.html">field_internal</a>::<wbr><a class="trait" href="#">FieldInternal</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/fp/field/field_internal.rs.html#49-193">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait FieldInternal: <a class="trait" href="https://doc.rust-lang.org/1.81.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/1.81.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="https://doc.rust-lang.org/1.81.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> + <a class="trait" href="https://doc.rust-lang.org/1.81.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/1.81.0/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/1.81.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="../../trait.MaybeArbitrary.html" title="trait fp::MaybeArbitrary">MaybeArbitrary</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.81.0/std/primitive.unit.html">()</a>&gt; + 'static {
type <a href="#associatedtype.ElementContainer" class="associatedtype">ElementContainer</a>: <a class="trait" href="../element/trait.FieldElementContainer.html" title="trait fp::field::element::FieldElementContainer">FieldElementContainer</a>;

<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 25 methods</span></summary> // Required methods
Expand Down
26 changes: 26 additions & 0 deletions docs/fp/matrix/constant.MAX_COLUMNS.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `MAX_COLUMNS` constant in crate `fp`."><title>MAX_COLUMNS in fp::matrix - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-c5d6553a23f1e5a6.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="fp" data-themes="" data-resource-suffix="" data-rustdoc-version="1.81.0 (eeb90cda1 2024-09-04)" data-channel="1.81.0" data-search-js="search-d234aafac6c221dd.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-d2fab2bf619172d3.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.3/dist/katex.min.css" integrity="sha384-ThssJ7YtjywV52Gj4JE/1SQEDoMEckXyhkFVwaf4nDSm5OBlXeedVYjuuUd0Yua+" crossorigin="anonymous">
<!-- The loading of KaTeX is deferred to speed up page rendering -->
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.3/dist/katex.min.js" integrity="sha384-Bi8OWqMXO1ta+a4EPkZv7bYGIes7C3krGSZoTGNTAnAn5eYQc7IIXrJ/7ck1drAi" crossorigin="anonymous"></script>
<!-- To automatically render math in text elements, include the auto-render extension: -->
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.3/dist/contrib/auto-render.min.js" integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "\\(", right: "\\)", display: false},
{left: "$", right: "$", display: false},
{left: "\\[", right: "\\]", display: true}
],
macros: {
"\\Ext": "\\operatorname{Ext}",
"\\Mod": "\\operatorname{Mod}",
"\\Hom": "\\operatorname{Hom}",
"\\Sq": "\\operatorname{Sq}",
"\\F": "\\mathbb{F}",
}
});
});
</script>

</head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../fp/index.html">fp</a><span class="version">0.1.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In fp::matrix</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../index.html">fp</a>::<wbr><a href="index.html">matrix</a>::<wbr><a class="constant" href="#">MAX_COLUMNS</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/fp/matrix/matrix_inner.rs.html#976">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub const MAX_COLUMNS: <a class="primitive" href="https://doc.rust-lang.org/1.81.0/std/primitive.usize.html">usize</a> = 100;</code></pre></section></div></main></body></html>
26 changes: 26 additions & 0 deletions docs/fp/matrix/constant.MAX_DIM.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `MAX_DIM` constant in crate `fp`."><title>MAX_DIM in fp::matrix - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-c5d6553a23f1e5a6.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="fp" data-themes="" data-resource-suffix="" data-rustdoc-version="1.81.0 (eeb90cda1 2024-09-04)" data-channel="1.81.0" data-search-js="search-d234aafac6c221dd.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-d2fab2bf619172d3.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.3/dist/katex.min.css" integrity="sha384-ThssJ7YtjywV52Gj4JE/1SQEDoMEckXyhkFVwaf4nDSm5OBlXeedVYjuuUd0Yua+" crossorigin="anonymous">
<!-- The loading of KaTeX is deferred to speed up page rendering -->
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.3/dist/katex.min.js" integrity="sha384-Bi8OWqMXO1ta+a4EPkZv7bYGIes7C3krGSZoTGNTAnAn5eYQc7IIXrJ/7ck1drAi" crossorigin="anonymous"></script>
<!-- To automatically render math in text elements, include the auto-render extension: -->
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.3/dist/contrib/auto-render.min.js" integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "\\(", right: "\\)", display: false},
{left: "$", right: "$", display: false},
{left: "\\[", right: "\\]", display: true}
],
macros: {
"\\Ext": "\\operatorname{Ext}",
"\\Mod": "\\operatorname{Mod}",
"\\Hom": "\\operatorname{Hom}",
"\\Sq": "\\operatorname{Sq}",
"\\F": "\\mathbb{F}",
}
});
});
</script>

</head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../fp/index.html">fp</a><span class="version">0.1.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In fp::matrix</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../index.html">fp</a>::<wbr><a href="index.html">matrix</a>::<wbr><a class="constant" href="#">MAX_DIM</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/fp/matrix/matrix_inner.rs.html#976">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub const MAX_DIM: <a class="primitive" href="https://doc.rust-lang.org/1.81.0/std/primitive.usize.html">usize</a> = 100;</code></pre></section></div></main></body></html>
Loading

0 comments on commit 4792d04

Please sign in to comment.