Documentation

Mathlib.Data.Multiset.Range

Multiset.range n gives {0, 1, ..., n-1} as a multiset. #

def Multiset.range (n : ) :

range n is the multiset lifted from the list range n, that is, the set {0, 1, ..., n-1}.

Instances For
    theorem Multiset.coe_range (n : ) :
    (List.range n) = range n
    @[simp]
    theorem Multiset.range_succ (n : ) :
    range n.succ = n ::ₘ range n
    @[simp]
    theorem Multiset.card_range (n : ) :
    (range n).card = n
    theorem Multiset.range_subset {m n : } :
    range m range n m n
    @[simp]
    theorem Multiset.mem_range {m n : } :
    m range n m < n
    theorem Multiset.self_mem_range_succ (n : ) :
    n range (n + 1)
    theorem Multiset.range_add (a b : ) :
    range (a + b) = range a + map (fun (x : ) => a + x) (range b)
    theorem Multiset.range_disjoint_map_add (a : ) (m : Multiset ) :
    Disjoint (range a) (map (fun (x : ) => a + x) m)
    theorem Multiset.range_add_eq_union (a b : ) :
    range (a + b) = range a map (fun (x : ) => a + x) (range b)
    theorem Multiset.range_le {m n : } :
    range m range n m n