Documentation

Mathlib.Data.Multiset.Antidiagonal

The antidiagonal on a multiset. #

The antidiagonal of a multiset s consists of all pairs (t₁, t₂) such that t₁ + t₂ = s. These pairs are counted with multiplicities.

The antidiagonal of a multiset s consists of all pairs (t₁, t₂) such that t₁ + t₂ = s. These pairs are counted with multiplicities.

Equations
    Instances For
      theorem Multiset.antidiagonal_coe {α : Type u_1} (l : List α) :
      @[simp]
      theorem Multiset.antidiagonal_coe' {α : Type u_1} (l : List α) :
      @[simp]
      theorem Multiset.mem_antidiagonal {α : Type u_1} {s : Multiset α} {x : Multiset α × Multiset α} :
      x s.antidiagonal x.1 + x.2 = s

      A pair (t₁, t₂) of multisets is contained in antidiagonal s if and only if t₁ + t₂ = s.

      @[simp]
      @[simp]
      theorem Multiset.antidiagonal_eq_map_powerset {α : Type u_1} [DecidableEq α] (s : Multiset α) :
      s.antidiagonal = map (fun (t : Multiset α) => (s - t, t)) s.powerset
      @[simp]
      theorem Multiset.card_antidiagonal {α : Type u_1} (s : Multiset α) :