pub struct CubeSym {
pub perm: Vec<usize>,
pub flip: Vec<bool>,
}Expand description
A hypercube symmetry: permute coordinates, then optionally flip each one (Pnp.lean’s
CubeSymmetry). perm[j] is the coordinate that j’s value lands on; flip[j] negates it.
These are the automorphisms that move blockers among blockers and corners among corners with the
same action — the bridge that puts rules and solutions in one mathematical world.
Fields§
§perm: Vec<usize>§flip: Vec<bool>Implementations§
Source§impl CubeSym
impl CubeSym
Sourcepub fn map_corner(&self, c: Corner) -> Corner
pub fn map_corner(&self, c: Corner) -> Corner
Push a corner forward through the symmetry (mapVertex): coordinate j’s (possibly flipped)
value moves to coordinate perm[j].
Sourcepub fn map_subcube(&self, s: &Subcube) -> Subcube
pub fn map_subcube(&self, s: &Subcube) -> Subcube
Push a blocker forward through the symmetry (mapBlocker): each fixed coordinate j moves
to perm[j], its required value flipped when flip[j].
Sourcepub fn map_fractional(&self, point: &[f64]) -> Vec<f64>
pub fn map_fractional(&self, point: &[f64]) -> Vec<f64>
Act on a fractional point of the cube [0,1]ⁿ: coordinate j’s value (flipped to 1−x when
flip[j]) lands on coordinate perm[j]. The linear extension of map_corner to the solid cube.
Sourcepub fn compose(&self, other: &CubeSym) -> CubeSym
pub fn compose(&self, other: &CubeSym) -> CubeSym
Compose two cube symmetries: (self ∘ other) applies other then self.
Sourcepub fn is_automorphism(&self, cover: &Cover) -> bool
pub fn is_automorphism(&self, cover: &Cover) -> bool
Is this symmetry an automorphism of the cover — does it map the blocker set onto
itself? Re-verified directly (the soundness check), exactly as swap_is_automorphism is for
the clausal path: a finder that proposes a non-automorphism is caught here, never trusted.