The compiled form of iterUp.
Equations
- Hex.GraphIso.Nauty.iterUpImpl k f a = Hex.GraphIso.Nauty.iterUpImpl.go✝ f k 0 a
Instances For
The compiled form of fuelRec.
Equations
- Hex.GraphIso.Nauty.fuelRecImpl 0 x✝¹ x✝ = x✝¹
- Hex.GraphIso.Nauty.fuelRecImpl k.succ x✝¹ x✝ = x✝ (Hex.GraphIso.Nauty.fuelRecImpl k x✝¹ x✝)
Instances For
fuelRec k base step = step (… (step base)), k times: the
fuel-bounded recursion of a loop with an early exit as one Nat.rec
step per unfolding (β is the loop's function type).
Equations
- Hex.GraphIso.Nauty.fuelRec k base step = Nat.rec base (fun (x : Nat) (ih : β) => step ih) k
Instances For
(List.range k).map f, built by the loop driver.
Equations
- Hex.GraphIso.Nauty.mapRange k f = (Hex.GraphIso.Nauty.iterUp k (fun (o : Nat) (acc : List α) => f o :: acc) []).reverse
Instances For
(List.range k).all p, by the loop driver.
Equations
- Hex.GraphIso.Nauty.allRange k p = Hex.GraphIso.Nauty.iterUp k (fun (v : Nat) (b : Bool) => b && p v) true
Instances For
Membership with the accelerated steps only.
Equations
- Hex.GraphIso.Nauty.elemK s v = ((s.shiftRight v).land 1).beq 1
Instances For
NatSet.insert, raw: a no-op outside the vertex range.
Equations
- Hex.GraphIso.Nauty.insertK n s v = bif v.blt n then s.lor (Nat.shiftLeft 1 v) else s
Instances For
NatSet.erase, raw: a no-op outside the vertex range.
Equations
- Hex.GraphIso.Nauty.eraseK n s v = bif v.blt n then bif Hex.GraphIso.Nauty.elemK s v then s.xor (Nat.shiftLeft 1 v) else s else s
Instances For
popCount of every byte, four bits per entry.
Equations
- One or more equations did not get rendered due to their size.
Instances For
lowBit of every nonzero byte (and 0 for the zero byte), four
bits per entry.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The table entry of byte b.
Equations
- Hex.GraphIso.Nauty.byteEntry table b = (table.shiftRight (Nat.mul 4 b)).land 15
Instances For
popCount by bytes, raw.
Equations
- Hex.GraphIso.Nauty.popCountK s = Hex.GraphIso.Nauty.popCountKGo (s + 1) s 0
Instances For
lowBit by bytes, raw.
Equations
- Hex.GraphIso.Nauty.lowBitK s = Hex.GraphIso.Nauty.lowBitKGo (s + 1) s 0
Instances For
nextElem, raw.
Equations
- Hex.GraphIso.Nauty.nextElemK s none = bif s.beq 0 then none else some (Hex.GraphIso.Nauty.lowBitK s)
- Hex.GraphIso.Nauty.nextElemK s (some p) = bif ((s.shiftRight (p.add 1)).shiftLeft (p.add 1)).beq 0 then none else some (Hex.GraphIso.Nauty.lowBitK ((s.shiftRight (p.add 1)).shiftLeft (p.add 1)))
Instances For
The packed number of a list, low field first.
Equations
- Hex.GraphIso.Nauty.pack w [] = 0
- Hex.GraphIso.Nauty.pack w (x_1 :: l) = x_1.add ((Hex.GraphIso.Nauty.pack w l).shiftLeft w)
Instances For
The kernel-facing read of field i; m = 2 ^ w - 1 is the field
mask, passed rather than recomputed. Fields beyond the list read as
0, matching atD.
Equations
- Hex.GraphIso.Nauty.pget w m a i = (a.shiftRight (w.mul i)).land m
Instances For
Adjacency rows rebuilt from the flat literal as single-Nat
bitsets: the flat list is cut into rows once, and each row folds over
its own short segment instead of probing the flat list. This is the
row form the kernel replay computes with.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The same rows as packed vertex sets: the form the specification side consumes.
Equations
- Hex.GraphIso.rowsOfFlat nn flat = (List.map (fun (seg : List Bool) => Hex.GraphIso.Nauty.VSet.ofFn fun (j : Nat) => Hex.GraphIso.atD seg j false) (Hex.GraphIso.chunkRows nn nn flat)).toArray
Instances For
The kernel's Nat rows are the packed rows read as bitsets.
The bit set of a row segment whose head sits at position j.
Equations
- Hex.GraphIso.rowOfSegK [] x✝ = 0
- Hex.GraphIso.rowOfSegK (b :: rest) x✝ = bif b then (Hex.GraphIso.rowOfSegK rest (x✝.add 1)).lor (Nat.shiftLeft 1 x✝) else Hex.GraphIso.rowOfSegK rest (x✝.add 1)
Instances For
The rows packed with width n, read off the flat literal one
segment at a time.
Equations
- Hex.GraphIso.Kernel.packRows nn flat = Hex.GraphIso.Nauty.pack nn (List.map (fun (seg : List Bool) => Hex.GraphIso.rowOfSegK seg 0) (Hex.GraphIso.chunkRows nn nn flat))