Zulip Chat Archive

Stream: Is there code for X?

Topic: counting arguments for relations on finsets


Jakob von Raumer (Jul 31 2025 at 08:47):

Do we have something similar to this?

lemma _root_.right_unique_of_left_total_of_left_unique {α β : Type*} (A : Finset α) (B : Finset β)
    (hcard : #A = #B)
    (R : α → β → Prop)
    (htotal : ∀ a ∈ A, ∃ b ∈ B, R a b)
    (hunique : ∀ a₁ ∈ A, ∀ a₂ ∈ A, ∀ b ∈ B, R a₁ b → R a₂ b → a₁ = a₂) :
    ∀ a ∈ A, ∀ b₁ ∈ B, ∀ b₂ ∈ B, R a b₁ → R a b₂ → b₁ = b₂ :=
  sorry

Yaël Dillies (Jul 31 2025 at 08:51):

That's very similar to what's in file#Combinatorics/Enumerative/DoubleCounting

Jakob von Raumer (Jul 31 2025 at 09:21):

Seems like it's the reverse direction to card_le_card_of_forall_subsingleton

Yaël Dillies (Jul 31 2025 at 10:37):

If it's not in that file, then it's not there! PR welcome :slight_smile:


Last updated: Feb 28 2026 at 14:05 UTC