# statements/UnionClosed.lean @ main

````
/-
Ported from google-deepmind/formal-conjectures at commit a61ab09632df039ef8381b6ac8accc5ce4d954d7,
file FormalConjectures/Wikipedia/UnionClosed.lean, declaration UnionClosed.union_closed.
Copyright 2025 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0
(https://www.apache.org/licenses/LICENSE-2.0).
Port: `public import FormalConjecturesUtil` replaced by specific Mathlib imports; the
`@[category …, AMS …]` attributes and the doc comments dropped; only `IsUnionClosed`, the file's
`open` and `variable` lines and the target kept (not the API lemmas or the variants).
The definition and the proposition are unchanged.
-/
module

public import Mathlib.Data.Finset.Card
public import Mathlib.Data.Finset.Filter
public import Mathlib.Algebra.Order.Field.Rat

@[expose] public section

open Finset

variable {n : Type*} [DecidableEq n] {A : Finset (Finset n)}

namespace UnionClosed

-- Note: Mathlib v4.36.0's extended-binder linter warns on upstream's `∀ᵉ` below and does not
-- read its own option `linter.style.extendedBinder`, so the warning stays; the text is upstream's.
/-- A family of finite sets closed under binary union. -/
abbrev IsUnionClosed (A : Finset (Finset n)) : Prop :=
  ∀ᵉ (X ∈ A) (Y ∈ A), X ∪ Y ∈ A

theorem union_closed
    [Nonempty n]
    (h_ne_singleton_empty : A ≠ {∅})
    (h_union_closed : IsUnionClosed A) :
    ∃ i : n, (1 / 2 : ℚ) * #A ≤ #{x ∈ A | i ∈ x} := by
  sorry

end UnionClosed

/-- The family's target (decision 0100), under the family's name: its type is taken from upstream's
`UnionClosed.union_closed` above, so the two cannot differ. Upstream's declaration is kept for provenance; it is not a
target. -/
theorem UnionClosed.{u} : type_of% @UnionClosed.union_closed.{u} := by
  sorry

````

API: `https://git.neoopensource.com/v1/repos/math/blob?rev=main&path=statements%2FUnionClosed.lean`
