Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/ext.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ jobs:
- name: Run ext examples
run: make -C ext benchmarks

- name: Run ext examples (nassau)
run: make -C ext benchmarks-nassau

- name: Run ext examples (concurrent)
run: make -C ext benchmarks-concurrent

Expand Down
1 change: 0 additions & 1 deletion ext/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ concurrent = [
]
odd-primes = ["fp/odd-primes", "algebra/odd-primes", "sseq/odd-primes"]
logging = []
nassau = []

[workspace]
members = [
Expand Down
15 changes: 1 addition & 14 deletions ext/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ docs:
echo "window.ALL_CRATES = [$$(ls crates/ | sed "s/.*/'&',/; s/-/_/g")'ext'];" > target/doc/crates.js


BENCHMARKS = $(filter-out examples/benchmarks/%-nassau, $(wildcard examples/benchmarks/*))
BENCHMARKS = $(wildcard examples/benchmarks/*)

benchmarks: $(BENCHMARKS)
benchmarks-nassau: $(wildcard examples/benchmarks/*-nassau)

fix-benchmarks: $(patsubst examples/benchmarks/%, examples/benchmarks/%-fixed, BENCHMARKS)
fix-benchmarks-nassau: $(patsubst examples/benchmarks/%, examples/benchmarks/%-fixed, $(wildcard examples/benchmarks/*-nassau))

benchmarks-concurrent: $(patsubst examples/benchmarks/%, examples/benchmarks/%-concurrent, $(BENCHMARKS))

Expand All @@ -43,21 +41,10 @@ examples/benchmarks/%-fixed: dummy
else \
mv $@ $(FILE); \
fi
examples/benchmarks/%-nassau-fixed: dummy
(head -n 1 $(FILE)-nassau && bash -c "echo '' | cargo run --features nassau --example $$(head -n 1 $(FILE)-nassau)") > $@
if diff --color $(FILE)-nassau $@; then \
rm $@; \
else \
mv $@ $(FILE)-nassau; \
fi


examples/benchmarks/%: dummy
(head -n 1 $@ && bash -c "echo '' | cargo run --example $$(head -n 1 $@)") | diff --color $@ -

examples/benchmarks/%-nassau: dummy
(head -n 1 $@ && bash -c "echo '' | cargo run --features nassau --example $$(head -n 1 $@)") | diff --color $@ -

examples/benchmarks/%-concurrent: FILE = examples/benchmarks/$*
examples/benchmarks/%-concurrent: dummy
@{ \
Expand Down
2 changes: 1 addition & 1 deletion ext/crates/algebra/src/module/homomorphism/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub use quotient_homomorphism::{QuotientHomomorphism, QuotientHomomorphismSource
///
/// Note that an instance of a `ModuleHomomorphism` need not have the data available, even after
/// `compute_auxiliary_data_through_degree` is invoked.
pub trait ModuleHomomorphism: Send + Sync {
pub trait ModuleHomomorphism: Send + Sync + 'static {
type Source: Module;
type Target: Module<Algebra = <Self::Source as Module>::Algebra>;

Expand Down
4 changes: 4 additions & 0 deletions ext/crates/fp/src/matrix/matrix_inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,10 @@ impl Matrix {
}

pub fn trim(&mut self, row_start: usize, row_end: usize, col_start: usize, keep_pivots: bool) {
assert!(
!keep_pivots || col_start == 0,
"trim cannot keep pivots when col_start != 0: column indices would shift"
);
let mut new = Self::new(self.prime(), row_end - row_start, self.columns - col_start);
for (i, mut row) in new.iter_mut().enumerate() {
row.assign(self.row(row_start + i).restrict(col_start, self.columns));
Expand Down
22 changes: 0 additions & 22 deletions ext/examples/benchmarks/differentials-S_2-nassau

This file was deleted.

33 changes: 0 additions & 33 deletions ext/examples/benchmarks/filtration_one-S_2-nassau

This file was deleted.

12 changes: 0 additions & 12 deletions ext/examples/benchmarks/lift_hom-g-S_2-nassau

This file was deleted.

14 changes: 0 additions & 14 deletions ext/examples/benchmarks/resolve-S_2-nassau

This file was deleted.

14 changes: 0 additions & 14 deletions ext/examples/benchmarks/resolve_through_stem-S_2-nassau

This file was deleted.

12 changes: 0 additions & 12 deletions ext/examples/benchmarks/secondary-C2-nassau

This file was deleted.

38 changes: 0 additions & 38 deletions ext/examples/benchmarks/secondary_product-h_0-S_2-nassau

This file was deleted.

6 changes: 0 additions & 6 deletions ext/examples/benchmarks/steenrod-c_0-S_2-nassau

This file was deleted.

6 changes: 0 additions & 6 deletions ext/examples/benchmarks/yoneda-g-S_2-nassau

This file was deleted.

13 changes: 0 additions & 13 deletions ext/examples/bruner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ use ext::{
use fp::{matrix::Matrix, prime::TWO, vector::FpVector};
use sseq::coordinates::{Bidegree, BidegreeGenerator};

#[cfg(feature = "nassau")]
type FreeModule = FM<MilnorAlgebra>;
#[cfg(not(feature = "nassau"))]
type FreeModule = FM<algebra::SteenrodAlgebra>;

type FreeModuleHomomorphism = FMH<FreeModule>;
Expand Down Expand Up @@ -134,10 +131,6 @@ fn get_element(

/// Create a new `FiniteChainComplex` with `num_s` many non-zero modules.
fn create_chain_complex(num_s: usize) -> FiniteChainComplex {
#[cfg(feature = "nassau")]
let algebra: Arc<MilnorAlgebra> = Arc::new(MilnorAlgebra::new(TWO, false));

#[cfg(not(feature = "nassau"))]
let algebra: Arc<algebra::SteenrodAlgebra> = Arc::new(algebra::SteenrodAlgebra::MilnorAlgebra(
MilnorAlgebra::new(TWO, false),
));
Expand Down Expand Up @@ -235,12 +228,6 @@ fn main() -> anyhow::Result<()> {
core::result::Result::<PathBuf, std::convert::Infallible>::Ok(PathBuf::from(x))
});

#[cfg(feature = "nassau")]
assert!(
save_dir.is_some(),
"A save directory is required for comparison between Bruner and Nassau resolutions."
);

let resolution = ext::utils::construct("S_2@milnor", save_dir).unwrap();

resolution.compute_through_stem(max);
Expand Down
4 changes: 0 additions & 4 deletions ext/examples/ext_m_n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@ fn main() -> anyhow::Result<()> {
eprintln!("This script computes Ext(M, N)");
let res = ext::utils::query_module_only("Module M", None, false)?;
let module_spec = query::raw("Module N", ext::utils::parse_module_name);
#[cfg(not(feature = "nassau"))]
let module = algebra::module::steenrod_module::from_json(res.algebra(), &module_spec)?;

#[cfg(feature = "nassau")]
let module = algebra::module::FDModule::from_json(res.algebra(), &module_spec)?;

let max = Bidegree::n_s(
query::raw("Max n", str::parse),
query::raw("Max s", str::parse),
Expand Down
45 changes: 20 additions & 25 deletions ext/examples/lift_hom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
use std::{path::PathBuf, sync::Arc};

use algebra::module::Module;
use anyhow::{Context, anyhow};
use anyhow::Context;
use ext::{
chain_complex::{AugmentedChainComplex, ChainComplex, FreeChainComplex},
resolution_homomorphism::ResolutionHomomorphism,
Expand All @@ -61,30 +61,25 @@ fn main() -> anyhow::Result<()> {
);

let source_name = source.name();
let target = query::with_default("Target module", source_name, |s| {
if s == source_name {
Ok(Arc::clone(&source))
} else if cfg!(feature = "nassau") {
Err(anyhow!("Can only resolve S_2 with nassau"))
} else {
let config: utils::Config = s.try_into()?;
let save_dir = query::optional("Target save directory", |x| {
Result::<PathBuf, std::convert::Infallible>::Ok(PathBuf::from(x))
});

let mut target = utils::construct(config, save_dir)
.context("Failed to load module from save file")
.unwrap();

target.set_name(s.to_owned());

#[cfg(feature = "nassau")]
unreachable!();

#[cfg(not(feature = "nassau"))]
Ok(Arc::new(target))
}
});
let target: Arc<utils::QueryModuleResolution> =
query::with_default("Target module", source_name, |s| -> anyhow::Result<_> {
if s == source_name {
Ok(Arc::clone(&source))
} else {
let config: utils::Config = s.try_into()?;
let save_dir = query::optional("Target save directory", |x| {
Result::<PathBuf, std::convert::Infallible>::Ok(PathBuf::from(x))
});

let mut target = utils::construct(config, save_dir)
.context("Failed to load module from save file")
.unwrap();

target.set_name(s.to_owned());

Ok(Arc::new(target))
}
});

assert_eq!(source.prime(), target.prime());
let p = source.prime();
Expand Down
4 changes: 2 additions & 2 deletions ext/examples/mahowald_invariant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ struct MahowaldInvariant {
}

fn resolve_s_2(s_2_path: Option<PathBuf>, k_max: i32) -> Result<Arc<Resolution>> {
let s_2_resolution = Arc::new(utils::construct_standard("S_2", s_2_path)?);
let s_2_resolution = Arc::new(utils::construct("S_2", s_2_path)?);
// Here are some bounds on the bidegrees in which we have should have resolutions available.
//
// A class in stem n won't be detected before RP_-{n+1}_inf, so we can only detect Mahowald
Expand Down Expand Up @@ -142,7 +142,7 @@ impl PKData {
if let Some(p) = p_k_path.as_mut() {
p.push(PathBuf::from(&format!("RP_{minus_k}_inf", minus_k = -k)));
};
let resolution = Arc::new(utils::construct_standard(
let resolution = Arc::new(utils::construct(
(p_k_config, AlgebraType::Milnor),
p_k_path,
)?);
Expand Down
1 change: 0 additions & 1 deletion ext/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
make lint
make test
make benchmarks
make benchmarks-nassau
make benchmarks-concurrent
make miri
'');
Expand Down
2 changes: 1 addition & 1 deletion ext/src/chain_complex/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ where

/// A chain complex is defined to start in degree 0. The min_degree is the min_degree of the
/// modules in the chain complex, all of which must be the same.
pub trait ChainComplex: Send + Sync {
pub trait ChainComplex: Send + Sync + 'static {
type Algebra: Algebra;
type Module: Module<Algebra = Self::Algebra>;
type Homomorphism: ModuleHomomorphism<Source = Self::Module, Target = Self::Module>;
Expand Down
4 changes: 0 additions & 4 deletions ext/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,6 @@
//! $\mathrm{tmf}$ modules.
//! - `logging`: Print timing information of the computations to stderr. Note that this has no
//! effect unless the `RUST_LOG` environment variable is set appropriately.
//! - `nassau`: Use Nassau's algorithm to compute the minimal resolution instead of the usual
//! minimal resolution algorithm. When this feature is enabled, only finite dimensional modules
//! at the prime 2 can be resolved.

#![allow(clippy::upper_case_acronyms)]
#![deny(clippy::use_self, unsafe_op_in_unsafe_fn)]
Expand All @@ -179,7 +176,6 @@ use algebra::module::SteenrodModule;
use crate::chain_complex::FiniteChainComplex;
pub type CCC = FiniteChainComplex<SteenrodModule>;

pub mod nassau;
pub mod secondary;
pub mod utils;

Expand Down
Loading
Loading