Documentation

HexGraphIso.Nauty.Equitable.Count

theorem Hex.GraphIso.Nauty.sum_range_succ (f : NatNat) (m : Nat) :
(List.map f (List.range (m + 1))).sum = (List.map f (List.range m)).sum + f m

Peel the last summand off a sum over List.range.

theorem Hex.GraphIso.Nauty.sum_range_two (f : NatNat) :
(List.map f (List.range 2)).sum = f 0 + f 1

A sum over List.range 2 in closed form.

theorem Hex.GraphIso.Nauty.sum_range_three (f : NatNat) :
(List.map f (List.range 3)).sum = f 0 + f 1 + f 2

A sum over List.range 3 in closed form.

theorem Hex.GraphIso.Nauty.sum_range_const (c m : Nat) :
(List.map (fun (x : Nat) => c) (List.range m)).sum = m * c

A constant sum over List.range.

theorem Hex.GraphIso.Nauty.sum_range_le (f : NatNat) (m : Nat) :
(∀ (o : Nat), o < mf o 1)(List.map f (List.range m)).sum m

A sum of values at most one over List.range m is at most m.

theorem Hex.GraphIso.Nauty.sum_range_eq_zero {f : NatNat} (m : Nat) :
(List.map f (List.range m)).sum = 0∀ (o : Nat), o < mf o = 0

A vanishing sum over List.range has every summand zero.

theorem Hex.GraphIso.Nauty.sum_range_eq_len {f : NatNat} (m : Nat) :
(∀ (o : Nat), o < mf o 1)(List.map f (List.range m)).sum = m∀ (o : Nat), o < mf o = 1

A sum of values at most one over List.range m that reaches m has every summand one.

theorem Hex.GraphIso.Nauty.countP_zero_of_none {p : NatBool} (l : List Nat) :
(∀ (i : Nat), i l¬p i = true)List.countP p l = 0

A predicate satisfied nowhere in a list counts zero.

theorem Hex.GraphIso.Nauty.countP_range_le_one {p : NatBool} {n : Nat} (h : ∀ (i j : Nat), i < nj < np i = truep j = truei = j) :

A predicate satisfied at no two distinct positions counts at most one over List.range.

theorem Hex.GraphIso.Nauty.countP_range_one {p : NatBool} {n i₀ : Nat} (hi₀ : i₀ < n) (hp : p i₀ = true) (huniq : ∀ (j : Nat), j < np j = truej = i₀) :

A predicate satisfied at exactly one position of List.range n counts one.

theorem Hex.GraphIso.Nauty.countP_le_one_unique {p : NatBool} (l : List Nat) :
List.countP p l 1∀ (w : Nat), w lp w = true∀ (w' : Nat), w' lp w' = truew = w'

A predicate counting at most one is satisfied by at most one member.

theorem Hex.GraphIso.Nauty.sum_sizes_split (l : List (Nat × Nat)) :
(∀ (p : Nat × Nat), p lp.fst p.snd)(List.map (fun (p : Nat × Nat) => p.snd + 1 - p.fst) l).sum = (List.map (fun (p : Nat × Nat) => p.snd - p.fst) l).sum + l.length

The window sizes of a list of intervals split into the excesses plus the number of intervals.

theorem Hex.GraphIso.Nauty.sum_excess_ge_countP (l : List (Nat × Nat)) :
(∀ (p : Nat × Nat), p lp.fst p.snd)(List.map (fun (p : Nat × Nat) => p.snd - p.fst) l).sum List.countP (fun (p : Nat × Nat) => decide (p.fst < p.snd)) l

The excesses of a list of intervals sum to at least the number of nontrivial ones.

theorem Hex.GraphIso.Nauty.sum_excess_ge_countP_add {q : Nat × Nat} (l : List (Nat × Nat)) :
(∀ (p : Nat × Nat), p lp.fst p.snd)q l(List.map (fun (p : Nat × Nat) => p.snd - p.fst) l).sum List.countP (fun (p : Nat × Nat) => decide (p.fst < p.snd)) l + (q.snd - q.fst) - 1

The excess sum also carries one distinguished interval's excess in full.

theorem Hex.GraphIso.Nauty.sum_excess_ge_countP_add2 {q q' : Nat × Nat} (l : List (Nat × Nat)) :
(∀ (p : Nat × Nat), p lp.fst p.snd)q lq' lq q'(List.map (fun (p : Nat × Nat) => p.snd - p.fst) l).sum List.countP (fun (p : Nat × Nat) => decide (p.fst < p.snd)) l + (q.snd - q.fst) + (q'.snd - q'.fst) - 2

The excess sum also carries two distinct distinguished intervals' excesses in full.

theorem Hex.GraphIso.Nauty.exc_ge_one {q : Nat × Nat} (l : List (Nat × Nat)) :
q l(List.map (fun (p : Nat × Nat) => p.snd - p.fst) l).sum q.snd - q.fst

The excesses of a list of intervals sum to at least one member's excess.

theorem Hex.GraphIso.Nauty.exc_ge_two {q q' : Nat × Nat} (l : List (Nat × Nat)) :
q lq' lq q'(List.map (fun (p : Nat × Nat) => p.snd - p.fst) l).sum q.snd - q.fst + (q'.snd - q'.fst)

The excesses of a list of intervals sum to at least two distinct members' excesses.

theorem Hex.GraphIso.Nauty.exc_ge_three {q q' q'' : Nat × Nat} (l : List (Nat × Nat)) :
q lq' lq'' lq q'q q''q' q''(List.map (fun (p : Nat × Nat) => p.snd - p.fst) l).sum q.snd - q.fst + (q'.snd - q'.fst) + (q''.snd - q''.fst)

The excesses of a list of intervals sum to at least three distinct members' excesses.