File: Mathlib/Data/Set/Finite.lean

full_name: Set.Finite
code: /-- A set is finite if the corresponding `Subtype` is finite,
i.e., if there exists a natural `n : ℕ` and an equivalence `s ≃ Fin n`. -/
protected def Finite (s : Set α) : Prop 
goal: Prop

full_name: Set.finite_def
code: theorem finite_def {s : Set α} : s.Finite ↔ Nonempty (Fintype s) 
goal: s.Finite ↔ Nonempty (Fintype ↑s)

full_name: Set.finite_coe_iff
code: theorem finite_coe_iff {s : Set α} : Finite s ↔ s.Finite 
goal: Finite ↑s ↔ s.Finite

full_name: Set.toFinite
code: /-- Constructor for `Set.Finite` using a `Finite` instance. -/
theorem toFinite (s : Set α) [Finite s] : s.Finite 
goal: s.Finite

full_name: Set.Finite.ofFinset
code: /-- Construct a `Finite` instance for a `Set` from a `Finset` with the same elements. -/
protected theorem Finite.ofFinset {p : Set α} (s : Finset α) (H : ∀ x, x ∈ s ↔ x ∈ p) : p.Finite 
goal: p.Finite

full_name: Set.Finite.to_subtype
code: /-- Projection of `Set.Finite` to its `Finite` instance.
This is intended to be used with dot notation.
See also `Set.Finite.Fintype` and `Set.Finite.nonempty_fintype`. -/
protected theorem Finite.to_subtype {s : Set α} (h : s.Finite) : Finite s 
goal: Finite ↑s

full_name: Set.Finite.fintype
code: /-- A finite set coerced to a type is a `Fintype`.
This is the `Fintype` projection for a `Set.Finite`.

Note that because `Finite` isn't a typeclass, this definition will not fire if it
is made into an instance -/
protected noncomputable def Finite.fintype {s : Set α} (h : s.Finite) : Fintype s 
goal: Fintype ↑s

full_name: Set.Finite.toFinset
code: /-- Using choice, get the `Finset` that represents this `Set`. -/
protected noncomputable def Finite.toFinset {s : Set α} (h : s.Finite) : Finset α 
goal: Finset α

full_name: Set.Finite.toFinset_eq_toFinset
code: theorem Finite.toFinset_eq_toFinset {s : Set α} [Fintype s] (h : s.Finite) :
    h.toFinset = s.toFinset 
goal: h.toFinset = s.toFinset

full_name: Set.toFinite_toFinset
code: @[simp]
theorem toFinite_toFinset (s : Set α) [Fintype s] : s.toFinite.toFinset = s.toFinset 
goal: ⋯.toFinset = s.toFinset

full_name: Set.Finite.exists_finset
code: theorem Finite.exists_finset {s : Set α} (h : s.Finite) :
    ∃ s' : Finset α, ∀ a : α, a ∈ s' ↔ a ∈ s 
goal: ∃ s', ∀ (a : α), a ∈ s' ↔ a ∈ s

full_name: Set.Finite.exists_finset_coe
code: theorem Finite.exists_finset_coe {s : Set α} (h : s.Finite) : ∃ s' : Finset α, ↑s' = s 
goal: ∃ s', ↑s' = s

full_name: Set.instCanLiftFinsetToSetFinite
code: /-- Finite sets can be lifted to finsets. -/
instance : CanLift (Set α) (Finset α) (↑) Set.Finite 
goal: CanLift (Set α) (Finset α) Finset.toSet Set.Finite

full_name: Set.Infinite
code: /-- A set is infinite if it is not finite.

This is protected so that it does not conflict with global `Infinite`. -/
protected def Infinite (s : Set α) : Prop 
goal: Prop

full_name: Set.not_infinite
code: @[simp]
theorem not_infinite {s : Set α} : ¬s.Infinite ↔ s.Finite 
goal: ¬s.Infinite ↔ s.Finite

full_name: Set.finite_or_infinite
code: /-- See also `finite_or_infinite`, `fintypeOrInfinite`. -/
protected theorem finite_or_infinite (s : Set α) : s.Finite ∨ s.Infinite 
goal: s.Finite ∨ s.Infinite

full_name: Set.infinite_or_finite
code: protected theorem infinite_or_finite (s : Set α) : s.Infinite ∨ s.Finite 
goal: s.Infinite ∨ s.Finite

full_name: Set.Finite.mem_toFinset
code: @[simp]
protected theorem mem_toFinset : a ∈ hs.toFinset ↔ a ∈ s 
goal: a ∈ hs.toFinset ↔ a ∈ s

full_name: Set.Finite.coe_toFinset
code: @[simp]
protected theorem coe_toFinset : (hs.toFinset : Set α) = s 
goal: ↑hs.toFinset = s

full_name: Set.Finite.toFinset_nonempty
code: @[simp]
protected theorem toFinset_nonempty : hs.toFinset.Nonempty ↔ s.Nonempty 
goal: hs.toFinset.Nonempty ↔ s.Nonempty

full_name: Set.Finite.coeSort_toFinset
code: /-- Note that this is an equality of types not holding definitionally. Use wisely. -/
theorem coeSort_toFinset : ↥hs.toFinset = ↥s 
goal: { x // x ∈ hs.toFinset } = ↑s

full_name: Set.Finite.subtypeEquivToFinset_apply_coe
code: /-- The identity map, bundled as an equivalence between the subtypes of `s : Set α` and of
`h.toFinset : Finset α`, where `h` is a proof of finiteness of `s`. -/
@[simps!] def subtypeEquivToFinset : {x // x ∈ s} ≃ {x // x ∈ hs.toFinset} 
goal: ↑(hs.subtypeEquivToFinset a) = ↑a

full_name: Set.Finite.subtypeEquivToFinset
code: /-- The identity map, bundled as an equivalence between the subtypes of `s : Set α` and of
`h.toFinset : Finset α`, where `h` is a proof of finiteness of `s`. -/
@[simps!] def subtypeEquivToFinset : {x // x ∈ s} ≃ {x // x ∈ hs.toFinset} 
goal: { x // x ∈ s } ≃ { x // x ∈ hs.toFinset }

full_name: Set.Finite.subtypeEquivToFinset_symm_apply_coe
code: /-- The identity map, bundled as an equivalence between the subtypes of `s : Set α` and of
`h.toFinset : Finset α`, where `h` is a proof of finiteness of `s`. -/
@[simps!] def subtypeEquivToFinset : {x // x ∈ s} ≃ {x // x ∈ hs.toFinset} 
goal: ↑(hs.subtypeEquivToFinset.symm b) = ↑b

full_name: Set.Finite.toFinset_inj
code: @[simp]
protected theorem toFinset_inj : hs.toFinset = ht.toFinset ↔ s = t 
goal: hs.toFinset = ht.toFinset ↔ s = t

full_name: Set.Finite.toFinset_subset
code: @[simp]
theorem toFinset_subset {t : Finset α} : hs.toFinset ⊆ t ↔ s ⊆ t 
goal: hs.toFinset ⊆ t ↔ s ⊆ ↑t

full_name: Set.Finite.toFinset_ssubset
code: @[simp]
theorem toFinset_ssubset {t : Finset α} : hs.toFinset ⊂ t ↔ s ⊂ t 
goal: hs.toFinset ⊂ t ↔ s ⊂ ↑t

full_name: Set.Finite.subset_toFinset
code: @[simp]
theorem subset_toFinset {s : Finset α} : s ⊆ ht.toFinset ↔ ↑s ⊆ t 
goal: s ⊆ ht.toFinset ↔ ↑s ⊆ t

full_name: Set.Finite.ssubset_toFinset
code: @[simp]
theorem ssubset_toFinset {s : Finset α} : s ⊂ ht.toFinset ↔ ↑s ⊂ t 
goal: s ⊂ ht.toFinset ↔ ↑s ⊂ t

full_name: Set.Finite.toFinset_subset_toFinset
code: @[mono]
protected theorem toFinset_subset_toFinset : hs.toFinset ⊆ ht.toFinset ↔ s ⊆ t 
goal: hs.toFinset ⊆ ht.toFinset ↔ s ⊆ t

full_name: Set.Finite.toFinset_ssubset_toFinset
code: @[mono]
protected theorem toFinset_ssubset_toFinset : hs.toFinset ⊂ ht.toFinset ↔ s ⊂ t 
goal: hs.toFinset ⊂ ht.toFinset ↔ s ⊂ t

full_name: Set.Finite.toFinset_setOf
code: @[simp high]
protected theorem toFinset_setOf [Fintype α] (p : α → Prop) [DecidablePred p]
    (h : { x | p x }.Finite) : h.toFinset = Finset.univ.filter p 
goal: h.toFinset = Finset.filter p Finset.univ

full_name: Set.Finite.disjoint_toFinset
code: @[simp]
nonrec theorem disjoint_toFinset {hs : s.Finite} {ht : t.Finite} :
    Disjoint hs.toFinset ht.toFinset ↔ Disjoint s t 
goal: Disjoint hs.toFinset ht.toFinset ↔ Disjoint s t

full_name: Set.Finite.toFinset_inter
code: protected theorem toFinset_inter [DecidableEq α] (hs : s.Finite) (ht : t.Finite)
    (h : (s ∩ t).Finite) : h.toFinset = hs.toFinset ∩ ht.toFinset 
goal: h.toFinset = hs.toFinset ∩ ht.toFinset

full_name: Set.Finite.toFinset_union
code: protected theorem toFinset_union [DecidableEq α] (hs : s.Finite) (ht : t.Finite)
    (h : (s ∪ t).Finite) : h.toFinset = hs.toFinset ∪ ht.toFinset 
goal: h.toFinset = hs.toFinset ∪ ht.toFinset

full_name: Set.Finite.toFinset_diff
code: protected theorem toFinset_diff [DecidableEq α] (hs : s.Finite) (ht : t.Finite)
    (h : (s \ t).Finite) : h.toFinset = hs.toFinset \ ht.toFinset 
goal: h.toFinset = hs.toFinset \ ht.toFinset

full_name: Set.Finite.toFinset_symmDiff
code: protected theorem toFinset_symmDiff [DecidableEq α] (hs : s.Finite) (ht : t.Finite)
    (h : (s ∆ t).Finite) : h.toFinset = hs.toFinset ∆ ht.toFinset 
goal: h.toFinset = symmDiff hs.toFinset ht.toFinset

full_name: Set.Finite.toFinset_compl
code: protected theorem toFinset_compl [DecidableEq α] [Fintype α] (hs : s.Finite) (h : sᶜ.Finite) :
    h.toFinset = hs.toFinsetᶜ 
goal: h.toFinset = hs.toFinsetᶜ

full_name: Set.Finite.toFinset_univ
code: protected theorem toFinset_univ [Fintype α] (h : (Set.univ : Set α).Finite) :
    h.toFinset = Finset.univ 
goal: h.toFinset = Finset.univ

full_name: Set.Finite.toFinset_eq_empty
code: @[simp]
protected theorem toFinset_eq_empty {h : s.Finite} : h.toFinset = ∅ ↔ s = ∅ 
goal: h.toFinset = ∅ ↔ s = ∅

full_name: Set.Finite.toFinset_empty
code: protected theorem toFinset_empty (h : (∅ : Set α).Finite) : h.toFinset = ∅ 
goal: h.toFinset = ∅

full_name: Set.Finite.toFinset_eq_univ
code: @[simp]
protected theorem toFinset_eq_univ [Fintype α] {h : s.Finite} :
    h.toFinset = Finset.univ ↔ s = univ 
goal: h.toFinset = Finset.univ ↔ s = Set.univ

full_name: Set.Finite.toFinset_image
code: protected theorem toFinset_image [DecidableEq β] (f : α → β) (hs : s.Finite) (h : (f '' s).Finite) :
    h.toFinset = hs.toFinset.image f 
goal: h.toFinset = Finset.image f hs.toFinset

full_name: Set.Finite.toFinset_range
code: protected theorem toFinset_range [DecidableEq α] [Fintype β] (f : β → α) (h : (range f).Finite) :
    h.toFinset = Finset.univ.image f 
goal: h.toFinset = Finset.image f Finset.univ

full_name: Set.fintypeUniv
code: instance fintypeUniv [Fintype α] : Fintype (@univ α) 
goal: Fintype ↑Set.univ

full_name: Set.fintypeOfFiniteUniv
code: /-- If `(Set.univ : Set α)` is finite then `α` is a finite type. -/
noncomputable def fintypeOfFiniteUniv (H : (univ (α := α)).Finite) : Fintype α 
goal: Fintype α

full_name: Set.fintypeUnion
code: instance fintypeUnion [DecidableEq α] (s t : Set α) [Fintype s] [Fintype t] :
    Fintype (s ∪ t : Set α) 
goal: Fintype ↑(s ∪ t)

full_name: Set.fintypeSep
code: instance fintypeSep (s : Set α) (p : α → Prop) [Fintype s] [DecidablePred p] :
    Fintype ({ a ∈ s | p a } : Set α) 
goal: Fintype ↑{a | a ∈ s ∧ p a}

full_name: Set.fintypeInter
code: instance fintypeInter (s t : Set α) [DecidableEq α] [Fintype s] [Fintype t] :
    Fintype (s ∩ t : Set α) 
goal: Fintype ↑(s ∩ t)

full_name: Set.fintypeInterOfLeft
code: /-- A `Fintype` instance for set intersection where the left set has a `Fintype` instance. -/
instance fintypeInterOfLeft (s t : Set α) [Fintype s] [DecidablePred (· ∈ t)] :
    Fintype (s ∩ t : Set α) 
goal: Fintype ↑(s ∩ t)

full_name: Set.fintypeInterOfRight
code: /-- A `Fintype` instance for set intersection where the right set has a `Fintype` instance. -/
instance fintypeInterOfRight (s t : Set α) [Fintype t] [DecidablePred (· ∈ s)] :
    Fintype (s ∩ t : Set α) 
goal: Fintype ↑(s ∩ t)

full_name: Set.fintypeSubset
code: /-- A `Fintype` structure on a set defines a `Fintype` structure on its subset. -/
def fintypeSubset (s : Set α) {t : Set α} [Fintype s] [DecidablePred (· ∈ t)] (h : t ⊆ s) :
    Fintype t 
goal: Fintype ↑t

full_name: Set.fintypeDiff
code: instance fintypeDiff [DecidableEq α] (s t : Set α) [Fintype s] [Fintype t] :
    Fintype (s \ t : Set α) 
goal: Fintype ↑(s \ t)

full_name: Set.fintypeDiffLeft
code: instance fintypeDiffLeft (s t : Set α) [Fintype s] [DecidablePred (· ∈ t)] :
    Fintype (s \ t : Set α) 
goal: Fintype ↑(s \ t)

full_name: Set.fintypeiUnion
code: instance fintypeiUnion [DecidableEq α] [Fintype (PLift ι)] (f : ι → Set α) [∀ i, Fintype (f i)] :
    Fintype (⋃ i, f i) 
goal: Fintype ↑(⋃ i, f i)

full_name: Set.fintypesUnion
code: instance fintypesUnion [DecidableEq α] {s : Set (Set α)} [Fintype s]
    [H : ∀ t : s, Fintype (t : Set α)] : Fintype (⋃₀ s) 
goal: Fintype ↑(⋃₀ s)

full_name: Set.fintypeBiUnion
code: /-- A union of sets with `Fintype` structure over a set with `Fintype` structure has a `Fintype`
structure. -/
def fintypeBiUnion [DecidableEq α] {ι : Type*} (s : Set ι) [Fintype s] (t : ι → Set α)
    (H : ∀ i ∈ s, Fintype (t i)) : Fintype (⋃ x ∈ s, t x) 
goal: Fintype ↑(⋃ x ∈ s, t x)

full_name: Set.fintypeBiUnion'
code: instance fintypeBiUnion' [DecidableEq α] {ι : Type*} (s : Set ι) [Fintype s] (t : ι → Set α)
    [∀ i, Fintype (t i)] : Fintype (⋃ x ∈ s, t x) 
goal: Fintype ↑(⋃ x ∈ s, t x)

full_name: Set.toFinset_iUnion
code: lemma toFinset_iUnion [Fintype β] [DecidableEq α] (f : β → Set α)
    [∀ w, Fintype (f w)] :
    Set.toFinset (⋃ (x : β), f x) =
    Finset.biUnion (Finset.univ : Finset β) (fun x => (f x).toFinset) 
goal: (⋃ x, f x).toFinset = Finset.univ.biUnion fun x => (f x).toFinset

full_name: Set.fintypeBind
code: /-- If `s : Set α` is a set with `Fintype` instance and `f : α → Set β` is a function such that
each `f a`, `a ∈ s`, has a `Fintype` structure, then `s >>= f` has a `Fintype` structure. -/
def fintypeBind {α β} [DecidableEq β] (s : Set α) [Fintype s] (f : α → Set β)
    (H : ∀ a ∈ s, Fintype (f a)) : Fintype (s >>= f) 
goal: Fintype ↑(s >>= f)

full_name: Set.fintypeBind'
code: instance fintypeBind' {α β} [DecidableEq β] (s : Set α) [Fintype s] (f : α → Set β)
    [∀ a, Fintype (f a)] : Fintype (s >>= f) 
goal: Fintype ↑(s >>= f)

full_name: Set.fintypeEmpty
code: instance fintypeEmpty : Fintype (∅ : Set α) 
goal: Fintype ↑∅

full_name: Set.fintypeSingleton
code: instance fintypeSingleton (a : α) : Fintype ({a} : Set α) 
goal: Fintype ↑{a}

full_name: Set.fintypePure
code: instance fintypePure : ∀ a : α, Fintype (pure a : Set α) 
goal: Fintype ↑(pure a)

full_name: Set.fintypeInsert
code: /-- A `Fintype` instance for inserting an element into a `Set` using the
corresponding `insert` function on `Finset`. This requires `DecidableEq α`.
There is also `Set.fintypeInsert'` when `a ∈ s` is decidable. -/
instance fintypeInsert (a : α) (s : Set α) [DecidableEq α] [Fintype s] :
    Fintype (insert a s : Set α) 
goal: Fintype ↑(insert a s)

full_name: Set.fintypeInsertOfNotMem
code: /-- A `Fintype` structure on `insert a s` when inserting a new element. -/
def fintypeInsertOfNotMem {a : α} (s : Set α) [Fintype s] (h : a ∉ s) :
    Fintype (insert a s : Set α) 
goal: Fintype ↑(insert a s)

full_name: Set.fintypeInsertOfMem
code: /-- A `Fintype` structure on `insert a s` when inserting a pre-existing element. -/
def fintypeInsertOfMem {a : α} (s : Set α) [Fintype s] (h : a ∈ s) : Fintype (insert a s : Set α) 
goal: Fintype ↑(insert a s)

full_name: Set.fintypeInsert'
code: /-- The `Set.fintypeInsert` instance requires decidable equality, but when `a ∈ s`
is decidable for this particular `a` we can still get a `Fintype` instance by using
`Set.fintypeInsertOfNotMem` or `Set.fintypeInsertOfMem`.

This instance pre-dates `Set.fintypeInsert`, and it is less efficient.
When `Set.decidableMemOfFintype` is made a local instance, then this instance would
override `Set.fintypeInsert` if not for the fact that its priority has been
adjusted. See Note [lower instance priority]. -/
instance (priority := 100) fintypeInsert' (a : α) (s : Set α) [Decidable <| a ∈ s] [Fintype s] :
    Fintype (insert a s : Set α) 
goal: Fintype ↑(insert a s)

full_name: Set.fintypeImage
code: instance fintypeImage [DecidableEq β] (s : Set α) (f : α → β) [Fintype s] : Fintype (f '' s) 
goal: Fintype ↑(f '' s)

full_name: Set.fintypeOfFintypeImage
code: /-- If a function `f` has a partial inverse and sends a set `s` to a set with `[Fintype]` instance,
then `s` has a `Fintype` structure as well. -/
def fintypeOfFintypeImage (s : Set α) {f : α → β} {g} (I : IsPartialInv f g) [Fintype (f '' s)] :
    Fintype s 
goal: Fintype ↑s

full_name: Set.fintypeRange
code: instance fintypeRange [DecidableEq α] (f : ι → α) [Fintype (PLift ι)] : Fintype (range f) 
goal: Fintype ↑(Set.range f)

full_name: Set.fintypeMap
code: instance fintypeMap {α β} [DecidableEq β] :
    ∀ (s : Set α) (f : α → β) [Fintype s], Fintype (f <$> s) 
goal: Fintype ↑(f <$> s)

full_name: Set.fintypeLTNat
code: instance fintypeLTNat (n : ℕ) : Fintype { i | i < n } 
goal: Fintype ↑{i | i < n}

full_name: Set.fintypeLENat
code: instance fintypeLENat (n : ℕ) : Fintype { i | i ≤ n } 
goal: Fintype ↑{i | i ≤ n}

full_name: Set.Nat.fintypeIio
code: /-- This is not an instance so that it does not conflict with the one
in `Mathlib/Order/LocallyFinite.lean`. -/
def Nat.fintypeIio (n : ℕ) : Fintype (Iio n) 
goal: Fintype ↑(Set.Iio n)

full_name: Set.fintypeProd
code: instance fintypeProd (s : Set α) (t : Set β) [Fintype s] [Fintype t] :
    Fintype (s ×ˢ t : Set (α × β)) 
goal: Fintype ↑(s ×ˢ t)

full_name: Set.fintypeOffDiag
code: instance fintypeOffDiag [DecidableEq α] (s : Set α) [Fintype s] : Fintype s.offDiag 
goal: Fintype ↑s.offDiag

full_name: Set.fintypeImage2
code: /-- `image2 f s t` is `Fintype` if `s` and `t` are. -/
instance fintypeImage2 [DecidableEq γ] (f : α → β → γ) (s : Set α) (t : Set β) [hs : Fintype s]
    [ht : Fintype t] : Fintype (image2 f s t : Set γ) 
goal: Fintype ↑(Set.image2 f s t)

full_name: Set.fintypeSeq
code: instance fintypeSeq [DecidableEq β] (f : Set (α → β)) (s : Set α) [Fintype f] [Fintype s] :
    Fintype (f.seq s) 
goal: Fintype ↑(f.seq s)

full_name: Set.fintypeSeq'
code: instance fintypeSeq' {α β : Type u} [DecidableEq β] (f : Set (α → β)) (s : Set α) [Fintype f]
    [Fintype s] : Fintype (f <*> s) 
goal: Fintype ↑(Seq.seq f fun x => s)

full_name: Set.fintypeMemFinset
code: instance fintypeMemFinset (s : Finset α) : Fintype { a | a ∈ s } 
goal: Fintype ↑{a | a ∈ s}

full_name: Equiv.set_finite_iff
code: theorem Equiv.set_finite_iff {s : Set α} {t : Set β} (hst : s ≃ t) : s.Finite ↔ t.Finite 
goal: s.Finite ↔ t.Finite

full_name: Finset.finite_toSet
code: /-- Gives a `Set.Finite` for the `Finset` coerced to a `Set`.
This is a wrapper around `Set.toFinite`. -/
@[simp]
theorem finite_toSet (s : Finset α) : (s : Set α).Finite 
goal: (↑s).Finite

full_name: Finset.finite_toSet_toFinset
code: theorem finite_toSet_toFinset (s : Finset α) : s.finite_toSet.toFinset = s 
goal: ⋯.toFinset = s

full_name: Multiset.finite_toSet
code: @[simp]
theorem finite_toSet (s : Multiset α) : { x | x ∈ s }.Finite 
goal: {x | x ∈ s}.Finite

full_name: Multiset.finite_toSet_toFinset
code: @[simp]
theorem finite_toSet_toFinset [DecidableEq α] (s : Multiset α) :
    s.finite_toSet.toFinset = s.toFinset 
goal: ⋯.toFinset = s.toFinset

full_name: List.finite_toSet
code: @[simp]
theorem List.finite_toSet (l : List α) : { x | x ∈ l }.Finite 
goal: {x | x ∈ l}.Finite

full_name: Finite.Set.finite_union
code: instance finite_union (s t : Set α) [Finite s] [Finite t] : Finite (s ∪ t : Set α) 
goal: Finite ↑(s ∪ t)

full_name: Finite.Set.finite_sep
code: instance finite_sep (s : Set α) (p : α → Prop) [Finite s] : Finite ({ a ∈ s | p a } : Set α) 
goal: Finite ↑{a | a ∈ s ∧ p a}

full_name: Finite.Set.subset
code: protected theorem subset (s : Set α) {t : Set α} [Finite s] (h : t ⊆ s) : Finite t 
goal: Finite ↑t

full_name: Finite.Set.finite_inter_of_right
code: instance finite_inter_of_right (s t : Set α) [Finite t] : Finite (s ∩ t : Set α) 
goal: Finite ↑(s ∩ t)

full_name: Finite.Set.finite_inter_of_left
code: instance finite_inter_of_left (s t : Set α) [Finite s] : Finite (s ∩ t : Set α) 
goal: Finite ↑(s ∩ t)

full_name: Finite.Set.finite_diff
code: instance finite_diff (s t : Set α) [Finite s] : Finite (s \ t : Set α) 
goal: Finite ↑(s \ t)

full_name: Finite.Set.finite_range
code: instance finite_range (f : ι → α) [Finite ι] : Finite (range f) 
goal: Finite ↑(Set.range f)

full_name: Finite.Set.finite_iUnion
code: instance finite_iUnion [Finite ι] (f : ι → Set α) [∀ i, Finite (f i)] : Finite (⋃ i, f i) 
goal: Finite ↑(⋃ i, f i)

full_name: Finite.Set.finite_sUnion
code: instance finite_sUnion {s : Set (Set α)} [Finite s] [H : ∀ t : s, Finite (t : Set α)] :
    Finite (⋃₀ s) 
goal: Finite ↑(⋃₀ s)

full_name: Finite.Set.finite_biUnion
code: theorem finite_biUnion {ι : Type*} (s : Set ι) [Finite s] (t : ι → Set α)
    (H : ∀ i ∈ s, Finite (t i)) : Finite (⋃ x ∈ s, t x) 
goal: Finite ↑(⋃ x ∈ s, t x)

full_name: Finite.Set.finite_biUnion'
code: instance finite_biUnion' {ι : Type*} (s : Set ι) [Finite s] (t : ι → Set α) [∀ i, Finite (t i)] :
    Finite (⋃ x ∈ s, t x) 
goal: Finite ↑(⋃ x ∈ s, t x)

full_name: Finite.Set.finite_biUnion''
code: /-- Example: `Finite (⋃ (i < n), f i)` where `f : ℕ → Set α` and `[∀ i, Finite (f i)]`
(when given instances from `Order.Interval.Finset.Nat`).
-/
instance finite_biUnion'' {ι : Type*} (p : ι → Prop) [h : Finite { x | p x }] (t : ι → Set α)
    [∀ i, Finite (t i)] : Finite (⋃ (x) (_ : p x), t x) 
goal: Finite ↑(⋃ x, ⋃ (_ : p x), t x)

full_name: Finite.Set.finite_iInter
code: instance finite_iInter {ι : Sort*} [Nonempty ι] (t : ι → Set α) [∀ i, Finite (t i)] :
    Finite (⋂ i, t i) 
goal: Finite ↑(⋂ i, t i)

full_name: Finite.Set.finite_insert
code: instance finite_insert (a : α) (s : Set α) [Finite s] : Finite (insert a s : Set α) 
goal: Finite ↑(insert a s)

full_name: Finite.Set.finite_image
code: instance finite_image (s : Set α) (f : α → β) [Finite s] : Finite (f '' s) 
goal: Finite ↑(f '' s)

full_name: Finite.Set.finite_replacement
code: instance finite_replacement [Finite α] (f : α → β) :
    Finite {f x | x : α} 
goal: Finite ↑{x | ∃ x_1, f x_1 = x}

full_name: Finite.Set.finite_prod
code: instance finite_prod (s : Set α) (t : Set β) [Finite s] [Finite t] :
    Finite (s ×ˢ t : Set (α × β)) 
goal: Finite ↑(s ×ˢ t)

full_name: Finite.Set.finite_image2
code: instance finite_image2 (f : α → β → γ) (s : Set α) (t : Set β) [Finite s] [Finite t] :
    Finite (image2 f s t : Set γ) 
goal: Finite ↑(Set.image2 f s t)

full_name: Finite.Set.finite_seq
code: instance finite_seq (f : Set (α → β)) (s : Set α) [Finite f] [Finite s] : Finite (f.seq s) 
goal: Finite ↑(f.seq s)

full_name: Set.Finite.of_subsingleton
code: @[nontriviality]
theorem Finite.of_subsingleton [Subsingleton α] (s : Set α) : s.Finite 
goal: s.Finite

full_name: Set.finite_univ
code: theorem finite_univ [Finite α] : (@univ α).Finite 
goal: Set.univ.Finite

full_name: Set.finite_univ_iff
code: theorem finite_univ_iff : (@univ α).Finite ↔ Finite α 
goal: Set.univ.Finite ↔ Finite α

full_name: Set.Finite.subset
code: theorem Finite.subset {s : Set α} (hs : s.Finite) {t : Set α} (ht : t ⊆ s) : t.Finite 
goal: t.Finite

full_name: Set.Finite.union
code: theorem Finite.union {s t : Set α} (hs : s.Finite) (ht : t.Finite) : (s ∪ t).Finite 
goal: (s ∪ t).Finite

full_name: Set.Finite.finite_of_compl
code: theorem Finite.finite_of_compl {s : Set α} (hs : s.Finite) (hsc : sᶜ.Finite) : Finite α 
goal: Finite α

full_name: Set.Finite.sup
code: theorem Finite.sup {s t : Set α} : s.Finite → t.Finite → (s ⊔ t).Finite 
goal: s.Finite → t.Finite → (s ⊔ t).Finite

full_name: Set.Finite.sep
code: theorem Finite.sep {s : Set α} (hs : s.Finite) (p : α → Prop) : { a ∈ s | p a }.Finite 
goal: {a | a ∈ s ∧ p a}.Finite

full_name: Set.Finite.inter_of_left
code: theorem Finite.inter_of_left {s : Set α} (hs : s.Finite) (t : Set α) : (s ∩ t).Finite 
goal: (s ∩ t).Finite

full_name: Set.Finite.inter_of_right
code: theorem Finite.inter_of_right {s : Set α} (hs : s.Finite) (t : Set α) : (t ∩ s).Finite 
goal: (t ∩ s).Finite

full_name: Set.Finite.inf_of_left
code: theorem Finite.inf_of_left {s : Set α} (h : s.Finite) (t : Set α) : (s ⊓ t).Finite 
goal: (s ⊓ t).Finite

full_name: Set.Finite.inf_of_right
code: theorem Finite.inf_of_right {s : Set α} (h : s.Finite) (t : Set α) : (t ⊓ s).Finite 
goal: (t ⊓ s).Finite

full_name: Set.Infinite.mono
code: protected lemma Infinite.mono {s t : Set α} (h : s ⊆ t) : s.Infinite → t.Infinite 
goal: s.Infinite → t.Infinite

full_name: Set.Finite.diff
code: theorem Finite.diff {s : Set α} (hs : s.Finite) (t : Set α) : (s \ t).Finite 
goal: (s \ t).Finite

full_name: Set.Finite.of_diff
code: theorem Finite.of_diff {s t : Set α} (hd : (s \ t).Finite) (ht : t.Finite) : s.Finite 
goal: s.Finite

full_name: Set.finite_iUnion
code: theorem finite_iUnion [Finite ι] {f : ι → Set α} (H : ∀ i, (f i).Finite) : (⋃ i, f i).Finite 
goal: (⋃ i, f i).Finite

full_name: Set.Finite.biUnion'
code: /-- Dependent version of `Finite.biUnion`. -/
theorem Finite.biUnion' {ι} {s : Set ι} (hs : s.Finite) {t : ∀ i ∈ s, Set α}
    (ht : ∀ i (hi : i ∈ s), (t i hi).Finite) : (⋃ i ∈ s, t i ‹_›).Finite 
goal: (⋃ i, ⋃ (h : i ∈ s), t i h).Finite

full_name: Set.Finite.biUnion
code: theorem Finite.biUnion {ι} {s : Set ι} (hs : s.Finite) {t : ι → Set α}
    (ht : ∀ i ∈ s, (t i).Finite) : (⋃ i ∈ s, t i).Finite 
goal: (⋃ i ∈ s, t i).Finite

full_name: Set.Finite.sUnion
code: theorem Finite.sUnion {s : Set (Set α)} (hs : s.Finite) (H : ∀ t ∈ s, Set.Finite t) :
    (⋃₀ s).Finite 
goal: (⋃₀ s).Finite

full_name: Set.Finite.sInter
code: theorem Finite.sInter {α : Type*} {s : Set (Set α)} {t : Set α} (ht : t ∈ s) (hf : t.Finite) :
    (⋂₀ s).Finite 
goal: (⋂₀ s).Finite

full_name: Set.Finite.iUnion
code: /-- If sets `s i` are finite for all `i` from a finite set `t` and are empty for `i ∉ t`, then the
union `⋃ i, s i` is a finite set. -/
theorem Finite.iUnion {ι : Type*} {s : ι → Set α} {t : Set ι} (ht : t.Finite)
    (hs : ∀ i ∈ t, (s i).Finite) (he : ∀ i, i ∉ t → s i = ∅) : (⋃ i, s i).Finite 
goal: (⋃ i, s i).Finite

full_name: Set.Finite.bind
code: theorem Finite.bind {α β} {s : Set α} {f : α → Set β} (h : s.Finite) (hf : ∀ a ∈ s, (f a).Finite) :
    (s >>= f).Finite 
goal: (s >>= f).Finite

full_name: Set.finite_empty
code: @[simp]
theorem finite_empty : (∅ : Set α).Finite 
goal: ∅.Finite

full_name: Set.Infinite.nonempty
code: protected theorem Infinite.nonempty {s : Set α} (h : s.Infinite) : s.Nonempty 
goal: s.Nonempty

full_name: Set.finite_singleton
code: @[simp]
theorem finite_singleton (a : α) : ({a} : Set α).Finite 
goal: {a}.Finite

full_name: Set.finite_pure
code: theorem finite_pure (a : α) : (pure a : Set α).Finite 
goal: (pure a).Finite

full_name: Set.Finite.insert
code: @[simp]
protected theorem Finite.insert (a : α) {s : Set α} (hs : s.Finite) : (insert a s).Finite 
goal: (insert a s).Finite

full_name: Set.Finite.image
code: theorem Finite.image {s : Set α} (f : α → β) (hs : s.Finite) : (f '' s).Finite 
goal: (f '' s).Finite

full_name: Set.finite_range
code: theorem finite_range (f : ι → α) [Finite ι] : (range f).Finite 
goal: (Set.range f).Finite

full_name: Set.Finite.of_surjOn
code: lemma Finite.of_surjOn {s : Set α} {t : Set β} (f : α → β) (hf : SurjOn f s t) (hs : s.Finite) :
    t.Finite 
goal: t.Finite

full_name: Set.Finite.dependent_image
code: theorem Finite.dependent_image {s : Set α} (hs : s.Finite) (F : ∀ i ∈ s, β) :
    {y : β | ∃ x hx, F x hx = y}.Finite 
goal: {y | ∃ x, ∃ (hx : x ∈ s), F x hx = y}.Finite

full_name: Set.Finite.map
code: theorem Finite.map {α β} {s : Set α} : ∀ f : α → β, s.Finite → (f <$> s).Finite 
goal: s.Finite → (f <$> s).Finite

full_name: Set.Finite.of_finite_image
code: theorem Finite.of_finite_image {s : Set α} {f : α → β} (h : (f '' s).Finite) (hi : Set.InjOn f s) :
    s.Finite 
goal: s.Finite

full_name: Set.finite_of_finite_preimage
code: theorem finite_of_finite_preimage (h : (f ⁻¹' s).Finite) (hs : s ⊆ range f) : s.Finite 
goal: s.Finite

full_name: Set.Finite.of_preimage
code: theorem Finite.of_preimage (h : (f ⁻¹' s).Finite) (hf : Surjective f) : s.Finite 
goal: s.Finite

full_name: Set.Finite.preimage
code: theorem Finite.preimage (I : Set.InjOn f (f ⁻¹' s)) (h : s.Finite) : (f ⁻¹' s).Finite 
goal: (f ⁻¹' s).Finite

full_name: Set.Finite.preimage'
code: theorem Finite.preimage'  (h : s.Finite) (hf : ∀ b ∈ s, (f ⁻¹' {b}).Finite) :
    (f ⁻¹' s).Finite 
goal: (f ⁻¹' s).Finite

full_name: Set.Infinite.preimage
code: protected lemma Infinite.preimage (hs : s.Infinite) (hf : s ⊆ range f) : (f ⁻¹' s).Infinite 
goal: (f ⁻¹' s).Infinite

full_name: Set.Infinite.preimage'
code: lemma Infinite.preimage' (hs : (s ∩ range f).Infinite) : (f ⁻¹' s).Infinite 
goal: (f ⁻¹' s).Infinite

full_name: Set.Finite.preimage_embedding
code: theorem Finite.preimage_embedding {s : Set β} (f : α ↪ β) (h : s.Finite) : (f ⁻¹' s).Finite 
goal: (⇑f ⁻¹' s).Finite

full_name: Set.finite_lt_nat
code: theorem finite_lt_nat (n : ℕ) : Set.Finite { i | i < n } 
goal: {i | i < n}.Finite

full_name: Set.finite_le_nat
code: theorem finite_le_nat (n : ℕ) : Set.Finite { i | i ≤ n } 
goal: {i | i ≤ n}.Finite

full_name: Set.Finite.surjOn_iff_bijOn_of_mapsTo
code: theorem Finite.surjOn_iff_bijOn_of_mapsTo (hs : s.Finite) (hm : MapsTo f s s) :
    SurjOn f s s ↔ BijOn f s s 
goal: Set.SurjOn f s s ↔ Set.BijOn f s s

full_name: Set.Finite.injOn_iff_bijOn_of_mapsTo
code: theorem Finite.injOn_iff_bijOn_of_mapsTo (hs : s.Finite) (hm : MapsTo f s s) :
    InjOn f s ↔ BijOn f s s 
goal: Set.InjOn f s ↔ Set.BijOn f s s

full_name: Set.Finite.prod
code: protected theorem Finite.prod (hs : s.Finite) (ht : t.Finite) : (s ×ˢ t : Set (α × β)).Finite 
goal: (s ×ˢ t).Finite

full_name: Set.Finite.of_prod_left
code: theorem Finite.of_prod_left (h : (s ×ˢ t : Set (α × β)).Finite) : t.Nonempty → s.Finite 
goal: t.Nonempty → s.Finite

full_name: Set.Finite.of_prod_right
code: theorem Finite.of_prod_right (h : (s ×ˢ t : Set (α × β)).Finite) : s.Nonempty → t.Finite 
goal: s.Nonempty → t.Finite

full_name: Set.Infinite.prod_left
code: protected theorem Infinite.prod_left (hs : s.Infinite) (ht : t.Nonempty) : (s ×ˢ t).Infinite 
goal: (s ×ˢ t).Infinite

full_name: Set.Infinite.prod_right
code: protected theorem Infinite.prod_right (ht : t.Infinite) (hs : s.Nonempty) : (s ×ˢ t).Infinite 
goal: (s ×ˢ t).Infinite

full_name: Set.infinite_prod
code: protected theorem infinite_prod :
    (s ×ˢ t).Infinite ↔ s.Infinite ∧ t.Nonempty ∨ t.Infinite ∧ s.Nonempty 
goal: (s ×ˢ t).Infinite ↔ s.Infinite ∧ t.Nonempty ∨ t.Infinite ∧ s.Nonempty

full_name: Set.finite_prod
code: theorem finite_prod : (s ×ˢ t).Finite ↔ (s.Finite ∨ t = ∅) ∧ (t.Finite ∨ s = ∅) 
goal: (s ×ˢ t).Finite ↔ (s.Finite ∨ t = ∅) ∧ (t.Finite ∨ s = ∅)

full_name: Set.Finite.offDiag
code: protected theorem Finite.offDiag {s : Set α} (hs : s.Finite) : s.offDiag.Finite 
goal: s.offDiag.Finite

full_name: Set.Finite.image2
code: protected theorem Finite.image2 (f : α → β → γ) (hs : s.Finite) (ht : t.Finite) :
    (image2 f s t).Finite 
goal: (Set.image2 f s t).Finite

full_name: Set.Finite.seq
code: theorem Finite.seq {f : Set (α → β)} {s : Set α} (hf : f.Finite) (hs : s.Finite) :
    (f.seq s).Finite 
goal: (f.seq s).Finite

full_name: Set.Finite.seq'
code: theorem Finite.seq' {α β : Type u} {f : Set (α → β)} {s : Set α} (hf : f.Finite) (hs : s.Finite) :
    (f <*> s).Finite 
goal: (Seq.seq f fun x => s).Finite

full_name: Set.finite_mem_finset
code: theorem finite_mem_finset (s : Finset α) : { a | a ∈ s }.Finite 
goal: {a | a ∈ s}.Finite

full_name: Set.Subsingleton.finite
code: theorem Subsingleton.finite {s : Set α} (h : s.Subsingleton) : s.Finite 
goal: s.Finite

full_name: Set.Infinite.nontrivial
code: theorem Infinite.nontrivial {s : Set α} (hs : s.Infinite) : s.Nontrivial 
goal: s.Nontrivial

full_name: Set.finite_preimage_inl_and_inr
code: theorem finite_preimage_inl_and_inr {s : Set (α ⊕ β)} :
    (Sum.inl ⁻¹' s).Finite ∧ (Sum.inr ⁻¹' s).Finite ↔ s.Finite 
goal: (Sum.inl ⁻¹' s).Finite ∧ (Sum.inr ⁻¹' s).Finite ↔ s.Finite

full_name: Set.exists_finite_iff_finset
code: theorem exists_finite_iff_finset {p : Set α → Prop} :
    (∃ s : Set α, s.Finite ∧ p s) ↔ ∃ s : Finset α, p ↑s 
goal: (∃ s, s.Finite ∧ p s) ↔ ∃ s, p ↑s

full_name: Set.Finite.finite_subsets
code: /-- There are finitely many subsets of a given finite set -/
theorem Finite.finite_subsets {α : Type u} {a : Set α} (h : a.Finite) : { b | b ⊆ a }.Finite 
goal: {b | b ⊆ a}.Finite

full_name: Set.Finite.powerset
code: protected theorem Finite.powerset {s : Set α} (h : s.Finite) : (𝒫 s).Finite 
goal: (𝒫 s).Finite

full_name: Set.exists_subset_image_finite_and
code: theorem exists_subset_image_finite_and {f : α → β} {s : Set α} {p : Set β → Prop} :
    (∃ t ⊆ f '' s, t.Finite ∧ p t) ↔ ∃ t ⊆ s, t.Finite ∧ p (f '' t) 
goal: (∃ t ⊆ f '' s, t.Finite ∧ p t) ↔ ∃ t ⊆ s, t.Finite ∧ p (f '' t)

full_name: Set.Finite.pi
code: /-- Finite product of finite sets is finite -/
theorem Finite.pi (ht : ∀ i, (t i).Finite) : (pi univ t).Finite 
goal: (Set.univ.pi t).Finite

full_name: Set.Finite.pi'
code: /-- Finite product of finite sets is finite. Note this is a variant of `Set.Finite.pi` without the
extra `i ∈ univ` binder. -/
lemma Finite.pi' (ht : ∀ i, (t i).Finite) : {f : ∀ i, κ i | ∀ i, f i ∈ t i}.Finite 
goal: {f | ∀ (i : ι), f i ∈ t i}.Finite

full_name: Set.union_finset_finite_of_range_finite
code: /-- A finite union of finsets is finite. -/
theorem union_finset_finite_of_range_finite (f : α → Finset β) (h : (range f).Finite) :
    (⋃ a, (f a : Set β)).Finite 
goal: (⋃ a, ↑(f a)).Finite

full_name: Set.finite_range_ite
code: theorem finite_range_ite {p : α → Prop} [DecidablePred p] {f g : α → β} (hf : (range f).Finite)
    (hg : (range g).Finite) : (range fun x => if p x then f x else g x).Finite 
goal: (Set.range fun x => if p x then f x else g x).Finite

full_name: Set.finite_range_const
code: theorem finite_range_const {c : β} : (range fun _ : α => c).Finite 
goal: (Set.range fun x => c).Finite

full_name: Set.Finite.inhabited
code: instance Finite.inhabited : Inhabited { s : Set α // s.Finite } 
goal: Inhabited { s // s.Finite }

full_name: Set.finite_union
code: @[simp]
theorem finite_union {s t : Set α} : (s ∪ t).Finite ↔ s.Finite ∧ t.Finite 
goal: (s ∪ t).Finite ↔ s.Finite ∧ t.Finite

full_name: Set.finite_image_iff
code: theorem finite_image_iff {s : Set α} {f : α → β} (hi : InjOn f s) : (f '' s).Finite ↔ s.Finite 
goal: (f '' s).Finite ↔ s.Finite

full_name: Set.univ_finite_iff_nonempty_fintype
code: theorem univ_finite_iff_nonempty_fintype : (univ : Set α).Finite ↔ Nonempty (Fintype α) 
goal: Set.univ.Finite ↔ Nonempty (Fintype α)

full_name: Set.Finite.toFinset_singleton
code: theorem Finite.toFinset_singleton {a : α} (ha : ({a} : Set α).Finite := finite_singleton _) :
    ha.toFinset = {a} 
goal: Set.Finite.toFinset ha = {a}

full_name: Set.Finite.toFinset_insert
code: @[simp]
theorem Finite.toFinset_insert [DecidableEq α] {s : Set α} {a : α} (hs : (insert a s).Finite) :
    hs.toFinset = insert a (hs.subset <| subset_insert _ _).toFinset 
goal: hs.toFinset = insert a ⋯.toFinset

full_name: Set.Finite.toFinset_insert'
code: theorem Finite.toFinset_insert' [DecidableEq α] {a : α} {s : Set α} (hs : s.Finite) :
    (hs.insert a).toFinset = insert a hs.toFinset 
goal: ⋯.toFinset = insert a hs.toFinset

full_name: Set.Finite.toFinset_prod
code: theorem Finite.toFinset_prod {s : Set α} {t : Set β} (hs : s.Finite) (ht : t.Finite) :
    hs.toFinset ×ˢ ht.toFinset = (hs.prod ht).toFinset 
goal: hs.toFinset ×ˢ ht.toFinset = ⋯.toFinset

full_name: Set.Finite.toFinset_offDiag
code: theorem Finite.toFinset_offDiag {s : Set α} [DecidableEq α] (hs : s.Finite) :
    hs.offDiag.toFinset = hs.toFinset.offDiag 
goal: ⋯.toFinset = hs.toFinset.offDiag

full_name: Set.Finite.fin_embedding
code: theorem Finite.fin_embedding {s : Set α} (h : s.Finite) :
    ∃ (n : ℕ) (f : Fin n ↪ α), range f = s 
goal: ∃ n f, Set.range ⇑f = s

full_name: Set.Finite.fin_param
code: theorem Finite.fin_param {s : Set α} (h : s.Finite) :
    ∃ (n : ℕ) (f : Fin n → α), Injective f ∧ range f = s 
goal: ∃ n f, Function.Injective f ∧ Set.range f = s

full_name: Set.finite_option
code: theorem finite_option {s : Set (Option α)} : s.Finite ↔ { x : α | some x ∈ s }.Finite 
goal: s.Finite ↔ {x | some x ∈ s}.Finite

full_name: Set.finite_image_fst_and_snd_iff
code: theorem finite_image_fst_and_snd_iff {s : Set (α × β)} :
    (Prod.fst '' s).Finite ∧ (Prod.snd '' s).Finite ↔ s.Finite 
goal: (Prod.fst '' s).Finite ∧ (Prod.snd '' s).Finite ↔ s.Finite

full_name: Set.forall_finite_image_eval_iff
code: theorem forall_finite_image_eval_iff {δ : Type*} [Finite δ] {κ : δ → Type*} {s : Set (∀ d, κ d)} :
    (∀ d, (eval d '' s).Finite) ↔ s.Finite 
goal: (∀ (d : δ), (Function.eval d '' s).Finite) ↔ s.Finite

full_name: Set.finite_subset_iUnion
code: theorem finite_subset_iUnion {s : Set α} (hs : s.Finite) {ι} {t : ι → Set α} (h : s ⊆ ⋃ i, t i) :
    ∃ I : Set ι, I.Finite ∧ s ⊆ ⋃ i ∈ I, t i 
goal: ∃ I, I.Finite ∧ s ⊆ ⋃ i ∈ I, t i

full_name: Set.eq_finite_iUnion_of_finite_subset_iUnion
code: theorem eq_finite_iUnion_of_finite_subset_iUnion {ι} {s : ι → Set α} {t : Set α} (tfin : t.Finite)
    (h : t ⊆ ⋃ i, s i) :
    ∃ I : Set ι,
      I.Finite ∧
        ∃ σ : { i | i ∈ I } → Set α, (∀ i, (σ i).Finite) ∧ (∀ i, σ i ⊆ s i) ∧ t = ⋃ i, σ i 
goal: ∃ I, I.Finite ∧ ∃ σ, (∀ (i : ↑{i | i ∈ I}), (σ i).Finite) ∧ (∀ (i : ↑{i | i ∈ I}), σ i ⊆ s ↑i) ∧ t = ⋃ i, σ i

full_name: Set.Finite.induction_on
code: @[elab_as_elim]
theorem Finite.induction_on {C : Set α → Prop} {s : Set α} (h : s.Finite) (H0 : C ∅)
    (H1 : ∀ {a s}, a ∉ s → Set.Finite s → C s → C (insert a s)) : C s 
goal: C s

full_name: Set.Finite.induction_on'
code: /-- Analogous to `Finset.induction_on'`. -/
@[elab_as_elim]
theorem Finite.induction_on' {C : Set α → Prop} {S : Set α} (h : S.Finite) (H0 : C ∅)
    (H1 : ∀ {a s}, a ∈ S → s ⊆ S → a ∉ s → C s → C (insert a s)) : C S 
goal: C S

full_name: Set.Finite.dinduction_on
code: @[elab_as_elim]
theorem Finite.dinduction_on {C : ∀ s : Set α, s.Finite → Prop} (s : Set α) (h : s.Finite)
    (H0 : C ∅ finite_empty)
    (H1 : ∀ {a s}, a ∉ s → ∀ h : Set.Finite s, C s h → C (insert a s) (h.insert a)) : C s h 
goal: C s h

full_name: Set.Finite.induction_to
code: /-- Induction up to a finite set `S`. -/
theorem Finite.induction_to {C : Set α → Prop} {S : Set α} (h : S.Finite)
    (S0 : Set α) (hS0 : S0 ⊆ S) (H0 : C S0) (H1 : ∀ s ⊂ S, C s → ∃ a ∈ S \ s, C (insert a s)) :
    C S 
goal: C S

full_name: Set.Finite.induction_to_univ
code: /-- Induction up to `univ`. -/
theorem Finite.induction_to_univ [Finite α] {C : Set α → Prop} (S0 : Set α)
    (H0 : C S0) (H1 : ∀ S ≠ univ, C S → ∃ a ∉ S, C (insert a S)) : C univ 
goal: C Set.univ

full_name: Set.seq_of_forall_finite_exists
code: /-- If `P` is some relation between terms of `γ` and sets in `γ`, such that every finite set
`t : Set γ` has some `c : γ` related to it, then there is a recursively defined sequence `u` in `γ`
so `u n` is related to the image of `{0, 1, ..., n-1}` under `u`.

(We use this later to show sequentially compact sets are totally bounded.)
-/
theorem seq_of_forall_finite_exists {γ : Type*} {P : γ → Set γ → Prop}
    (h : ∀ t : Set γ, t.Finite → ∃ c, P c t) : ∃ u : ℕ → γ, ∀ n, P (u n) (u '' Iio n) 
goal: ∃ u, ∀ (n : ℕ), P (u n) (u '' Set.Iio n)

full_name: Set.empty_card
code: theorem empty_card : Fintype.card (∅ : Set α) = 0 
goal: Fintype.card ↑∅ = 0

full_name: Set.empty_card'
code: theorem empty_card' {h : Fintype.{u} (∅ : Set α)} : @Fintype.card (∅ : Set α) h = 0 
goal: Fintype.card ↑∅ = 0

full_name: Set.card_fintypeInsertOfNotMem
code: theorem card_fintypeInsertOfNotMem {a : α} (s : Set α) [Fintype s] (h : a ∉ s) :
    @Fintype.card _ (fintypeInsertOfNotMem s h) = Fintype.card s + 1 
goal: Fintype.card ↑(insert a s) = Fintype.card ↑s + 1

full_name: Set.card_insert
code: @[simp]
theorem card_insert {a : α} (s : Set α) [Fintype s] (h : a ∉ s)
    {d : Fintype.{u} (insert a s : Set α)} : @Fintype.card _ d = Fintype.card s + 1 
goal: Fintype.card ↑(insert a s) = Fintype.card ↑s + 1

full_name: Set.card_image_of_inj_on
code: theorem card_image_of_inj_on {s : Set α} [Fintype s] {f : α → β} [Fintype (f '' s)]
    (H : ∀ x ∈ s, ∀ y ∈ s, f x = f y → x = y) : Fintype.card (f '' s) = Fintype.card s 
goal: Fintype.card ↑(f '' s) = Fintype.card ↑s

full_name: Set.card_image_of_injective
code: theorem card_image_of_injective (s : Set α) [Fintype s] {f : α → β} [Fintype (f '' s)]
    (H : Function.Injective f) : Fintype.card (f '' s) = Fintype.card s 
goal: Fintype.card ↑(f '' s) = Fintype.card ↑s

full_name: Set.card_singleton
code: @[simp]
theorem card_singleton (a : α) : Fintype.card ({a} : Set α) = 1 
goal: Fintype.card ↑{a} = 1

full_name: Set.card_lt_card
code: theorem card_lt_card {s t : Set α} [Fintype s] [Fintype t] (h : s ⊂ t) :
    Fintype.card s < Fintype.card t 
goal: Fintype.card ↑s < Fintype.card ↑t

full_name: Set.card_le_card
code: theorem card_le_card {s t : Set α} [Fintype s] [Fintype t] (hsub : s ⊆ t) :
    Fintype.card s ≤ Fintype.card t 
goal: Fintype.card ↑s ≤ Fintype.card ↑t

full_name: Set.eq_of_subset_of_card_le
code: theorem eq_of_subset_of_card_le {s t : Set α} [Fintype s] [Fintype t] (hsub : s ⊆ t)
    (hcard : Fintype.card t ≤ Fintype.card s) : s = t 
goal: s = t

full_name: Set.card_range_of_injective
code: theorem card_range_of_injective [Fintype α] {f : α → β} (hf : Injective f) [Fintype (range f)] :
    Fintype.card (range f) = Fintype.card α 
goal: Fintype.card ↑(Set.range f) = Fintype.card α

full_name: Set.Finite.card_toFinset
code: theorem Finite.card_toFinset {s : Set α} [Fintype s] (h : s.Finite) :
    h.toFinset.card = Fintype.card s 
goal: h.toFinset.card = Fintype.card ↑s

full_name: Set.card_ne_eq
code: theorem card_ne_eq [Fintype α] (a : α) [Fintype { x : α | x ≠ a }] :
    Fintype.card { x : α | x ≠ a } = Fintype.card α - 1 
goal: Fintype.card ↑{x | x ≠ a} = Fintype.card α - 1

full_name: Set.infinite_univ_iff
code: theorem infinite_univ_iff : (@univ α).Infinite ↔ Infinite α 
goal: Set.univ.Infinite ↔ Infinite α

full_name: Set.infinite_univ
code: theorem infinite_univ [h : Infinite α] : (@univ α).Infinite 
goal: Set.univ.Infinite

full_name: Set.infinite_coe_iff
code: theorem infinite_coe_iff {s : Set α} : Infinite s ↔ s.Infinite 
goal: Infinite ↑s ↔ s.Infinite

full_name: Set.Infinite.exists_not_mem_finite
code: lemma Infinite.exists_not_mem_finite (hs : s.Infinite) (ht : t.Finite) : ∃ a, a ∈ s ∧ a ∉ t 
goal: ∃ a ∈ s, a ∉ t

full_name: Set.Infinite.exists_not_mem_finset
code: lemma Infinite.exists_not_mem_finset (hs : s.Infinite) (t : Finset α) : ∃ a ∈ s, a ∉ t 
goal: ∃ a ∈ s, a ∉ t

full_name: Set.Finite.exists_not_mem
code: lemma Finite.exists_not_mem (hs : s.Finite) : ∃ a, a ∉ s 
goal: ∃ a, a ∉ s

full_name: Finset.exists_not_mem
code: lemma _root_.Finset.exists_not_mem (s : Finset α) : ∃ a, a ∉ s 
goal: ∃ a, a ∉ s

full_name: Set.Infinite.natEmbedding
code: /-- Embedding of `ℕ` into an infinite set. -/
noncomputable def Infinite.natEmbedding (s : Set α) (h : s.Infinite) : ℕ ↪ s 
goal: ℕ ↪ ↑s

full_name: Set.Infinite.exists_subset_card_eq
code: theorem Infinite.exists_subset_card_eq {s : Set α} (hs : s.Infinite) (n : ℕ) :
    ∃ t : Finset α, ↑t ⊆ s ∧ t.card = n 
goal: ∃ t, ↑t ⊆ s ∧ t.card = n

full_name: Set.infinite_of_finite_compl
code: theorem infinite_of_finite_compl [Infinite α] {s : Set α} (hs : sᶜ.Finite) : s.Infinite 
goal: s.Infinite

full_name: Set.Finite.infinite_compl
code: theorem Finite.infinite_compl [Infinite α] {s : Set α} (hs : s.Finite) : sᶜ.Infinite 
goal: sᶜ.Infinite

full_name: Set.Infinite.diff
code: theorem Infinite.diff {s t : Set α} (hs : s.Infinite) (ht : t.Finite) : (s \ t).Infinite 
goal: (s \ t).Infinite

full_name: Set.infinite_union
code: @[simp]
theorem infinite_union {s t : Set α} : (s ∪ t).Infinite ↔ s.Infinite ∨ t.Infinite 
goal: (s ∪ t).Infinite ↔ s.Infinite ∨ t.Infinite

full_name: Set.Infinite.of_image
code: theorem Infinite.of_image (f : α → β) {s : Set α} (hs : (f '' s).Infinite) : s.Infinite 
goal: s.Infinite

full_name: Set.infinite_image_iff
code: theorem infinite_image_iff {s : Set α} {f : α → β} (hi : InjOn f s) :
    (f '' s).Infinite ↔ s.Infinite 
goal: (f '' s).Infinite ↔ s.Infinite

full_name: Set.infinite_range_iff
code: theorem infinite_range_iff {f : α → β} (hi : Injective f) :
    (range f).Infinite ↔ Infinite α 
goal: (Set.range f).Infinite ↔ Infinite α

full_name: Set.Infinite.image2_left
code: protected theorem Infinite.image2_left (hs : s.Infinite) (hb : b ∈ t)
    (hf : InjOn (fun a => f a b) s) : (image2 f s t).Infinite 
goal: (Set.image2 f s t).Infinite

full_name: Set.Infinite.image2_right
code: protected theorem Infinite.image2_right (ht : t.Infinite) (ha : a ∈ s) (hf : InjOn (f a) t) :
    (image2 f s t).Infinite 
goal: (Set.image2 f s t).Infinite

full_name: Set.infinite_image2
code: theorem infinite_image2 (hfs : ∀ b ∈ t, InjOn (fun a => f a b) s) (hft : ∀ a ∈ s, InjOn (f a) t) :
    (image2 f s t).Infinite ↔ s.Infinite ∧ t.Nonempty ∨ t.Infinite ∧ s.Nonempty 
goal: (Set.image2 f s t).Infinite ↔ s.Infinite ∧ t.Nonempty ∨ t.Infinite ∧ s.Nonempty

full_name: Set.finite_image2
code: lemma finite_image2 (hfs : ∀ b ∈ t, InjOn (f · b) s) (hft : ∀ a ∈ s, InjOn (f a) t) :
    (image2 f s t).Finite ↔ s.Finite ∧ t.Finite ∨ s = ∅ ∨ t = ∅ 
goal: (Set.image2 f s t).Finite ↔ s.Finite ∧ t.Finite ∨ s = ∅ ∨ t = ∅

full_name: Set.infinite_of_injOn_mapsTo
code: theorem infinite_of_injOn_mapsTo {s : Set α} {t : Set β} {f : α → β} (hi : InjOn f s)
    (hm : MapsTo f s t) (hs : s.Infinite) : t.Infinite 
goal: t.Infinite

full_name: Set.Infinite.exists_ne_map_eq_of_mapsTo
code: theorem Infinite.exists_ne_map_eq_of_mapsTo {s : Set α} {t : Set β} {f : α → β} (hs : s.Infinite)
    (hf : MapsTo f s t) (ht : t.Finite) : ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ f x = f y 
goal: ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ f x = f y

full_name: Set.infinite_range_of_injective
code: theorem infinite_range_of_injective [Infinite α] {f : α → β} (hi : Injective f) :
    (range f).Infinite 
goal: (Set.range f).Infinite

full_name: Set.infinite_of_injective_forall_mem
code: theorem infinite_of_injective_forall_mem [Infinite α] {s : Set β} {f : α → β} (hi : Injective f)
    (hf : ∀ x : α, f x ∈ s) : s.Infinite 
goal: s.Infinite

full_name: Set.not_injOn_infinite_finite_image
code: theorem not_injOn_infinite_finite_image {f : α → β} {s : Set α} (h_inf : s.Infinite)
    (h_fin : (f '' s).Finite) : ¬InjOn f s 
goal: ¬Set.InjOn f s

full_name: Set.infinite_of_forall_exists_gt
code: theorem infinite_of_forall_exists_gt (h : ∀ a, ∃ b ∈ s, a < b) : s.Infinite 
goal: s.Infinite

full_name: Set.infinite_of_forall_exists_lt
code: theorem infinite_of_forall_exists_lt (h : ∀ a, ∃ b ∈ s, b < a) : s.Infinite 
goal: s.Infinite

full_name: Set.finite_isTop
code: theorem finite_isTop (α : Type*) [PartialOrder α] : { x : α | IsTop x }.Finite 
goal: {x | IsTop x}.Finite

full_name: Set.finite_isBot
code: theorem finite_isBot (α : Type*) [PartialOrder α] : { x : α | IsBot x }.Finite 
goal: {x | IsBot x}.Finite

full_name: Set.Infinite.exists_lt_map_eq_of_mapsTo
code: theorem Infinite.exists_lt_map_eq_of_mapsTo [LinearOrder α] {s : Set α} {t : Set β} {f : α → β}
    (hs : s.Infinite) (hf : MapsTo f s t) (ht : t.Finite) : ∃ x ∈ s, ∃ y ∈ s, x < y ∧ f x = f y 
goal: ∃ x ∈ s, ∃ y ∈ s, x < y ∧ f x = f y

full_name: Set.Finite.exists_lt_map_eq_of_forall_mem
code: theorem Finite.exists_lt_map_eq_of_forall_mem [LinearOrder α] [Infinite α] {t : Set β} {f : α → β}
    (hf : ∀ a, f a ∈ t) (ht : t.Finite) : ∃ a b, a < b ∧ f a = f b 
goal: ∃ a b, a < b ∧ f a = f b

full_name: Set.exists_min_image
code: theorem exists_min_image [LinearOrder β] (s : Set α) (f : α → β) (h1 : s.Finite) :
    s.Nonempty → ∃ a ∈ s, ∀ b ∈ s, f a ≤ f b
  
goal: s.Nonempty → ∃ a ∈ s, ∀ b ∈ s, f a ≤ f b

full_name: Set.exists_max_image
code: theorem exists_max_image [LinearOrder β] (s : Set α) (f : α → β) (h1 : s.Finite) :
    s.Nonempty → ∃ a ∈ s, ∀ b ∈ s, f b ≤ f a
  
goal: s.Nonempty → ∃ a ∈ s, ∀ b ∈ s, f b ≤ f a

full_name: Set.exists_lower_bound_image
code: theorem exists_lower_bound_image [Nonempty α] [LinearOrder β] (s : Set α) (f : α → β)
    (h : s.Finite) : ∃ a : α, ∀ b ∈ s, f a ≤ f b 
goal: ∃ a, ∀ b ∈ s, f a ≤ f b

full_name: Set.exists_upper_bound_image
code: theorem exists_upper_bound_image [Nonempty α] [LinearOrder β] (s : Set α) (f : α → β)
    (h : s.Finite) : ∃ a : α, ∀ b ∈ s, f b ≤ f a 
goal: ∃ a, ∀ b ∈ s, f b ≤ f a

full_name: Set.Finite.iSup_biInf_of_monotone
code: theorem Finite.iSup_biInf_of_monotone {ι ι' α : Type*} [Preorder ι'] [Nonempty ι']
    [IsDirected ι' (· ≤ ·)] [Order.Frame α] {s : Set ι} (hs : s.Finite) {f : ι → ι' → α}
    (hf : ∀ i ∈ s, Monotone (f i)) : ⨆ j, ⨅ i ∈ s, f i j = ⨅ i ∈ s, ⨆ j, f i j 
goal: ⨆ j, ⨅ i ∈ s, f i j = ⨅ i ∈ s, ⨆ j, f i j

full_name: Set.Finite.iSup_biInf_of_antitone
code: theorem Finite.iSup_biInf_of_antitone {ι ι' α : Type*} [Preorder ι'] [Nonempty ι']
    [IsDirected ι' (swap (· ≤ ·))] [Order.Frame α] {s : Set ι} (hs : s.Finite) {f : ι → ι' → α}
    (hf : ∀ i ∈ s, Antitone (f i)) : ⨆ j, ⨅ i ∈ s, f i j = ⨅ i ∈ s, ⨆ j, f i j 
goal: ⨆ j, ⨅ i ∈ s, f i j = ⨅ i ∈ s, ⨆ j, f i j

full_name: Set.Finite.iInf_biSup_of_monotone
code: theorem Finite.iInf_biSup_of_monotone {ι ι' α : Type*} [Preorder ι'] [Nonempty ι']
    [IsDirected ι' (swap (· ≤ ·))] [Order.Coframe α] {s : Set ι} (hs : s.Finite) {f : ι → ι' → α}
    (hf : ∀ i ∈ s, Monotone (f i)) : ⨅ j, ⨆ i ∈ s, f i j = ⨆ i ∈ s, ⨅ j, f i j 
goal: ⨅ j, ⨆ i ∈ s, f i j = ⨆ i ∈ s, ⨅ j, f i j

full_name: Set.Finite.iInf_biSup_of_antitone
code: theorem Finite.iInf_biSup_of_antitone {ι ι' α : Type*} [Preorder ι'] [Nonempty ι']
    [IsDirected ι' (· ≤ ·)] [Order.Coframe α] {s : Set ι} (hs : s.Finite) {f : ι → ι' → α}
    (hf : ∀ i ∈ s, Antitone (f i)) : ⨅ j, ⨆ i ∈ s, f i j = ⨆ i ∈ s, ⨅ j, f i j 
goal: ⨅ j, ⨆ i ∈ s, f i j = ⨆ i ∈ s, ⨅ j, f i j

full_name: Set.iSup_iInf_of_monotone
code: theorem iSup_iInf_of_monotone {ι ι' α : Type*} [Finite ι] [Preorder ι'] [Nonempty ι']
    [IsDirected ι' (· ≤ ·)] [Order.Frame α] {f : ι → ι' → α} (hf : ∀ i, Monotone (f i)) :
    ⨆ j, ⨅ i, f i j = ⨅ i, ⨆ j, f i j 
goal: ⨆ j, ⨅ i, f i j = ⨅ i, ⨆ j, f i j

full_name: Set.iSup_iInf_of_antitone
code: theorem iSup_iInf_of_antitone {ι ι' α : Type*} [Finite ι] [Preorder ι'] [Nonempty ι']
    [IsDirected ι' (swap (· ≤ ·))] [Order.Frame α] {f : ι → ι' → α} (hf : ∀ i, Antitone (f i)) :
    ⨆ j, ⨅ i, f i j = ⨅ i, ⨆ j, f i j 
goal: ⨆ j, ⨅ i, f i j = ⨅ i, ⨆ j, f i j

full_name: Set.iInf_iSup_of_monotone
code: theorem iInf_iSup_of_monotone {ι ι' α : Type*} [Finite ι] [Preorder ι'] [Nonempty ι']
    [IsDirected ι' (swap (· ≤ ·))] [Order.Coframe α] {f : ι → ι' → α} (hf : ∀ i, Monotone (f i)) :
    ⨅ j, ⨆ i, f i j = ⨆ i, ⨅ j, f i j 
goal: ⨅ j, ⨆ i, f i j = ⨆ i, ⨅ j, f i j

full_name: Set.iInf_iSup_of_antitone
code: theorem iInf_iSup_of_antitone {ι ι' α : Type*} [Finite ι] [Preorder ι'] [Nonempty ι']
    [IsDirected ι' (· ≤ ·)] [Order.Coframe α] {f : ι → ι' → α} (hf : ∀ i, Antitone (f i)) :
    ⨅ j, ⨆ i, f i j = ⨆ i, ⨅ j, f i j 
goal: ⨅ j, ⨆ i, f i j = ⨆ i, ⨅ j, f i j

full_name: Set.iUnion_iInter_of_monotone
code: /-- An increasing union distributes over finite intersection. -/
theorem iUnion_iInter_of_monotone {ι ι' α : Type*} [Finite ι] [Preorder ι'] [IsDirected ι' (· ≤ ·)]
    [Nonempty ι'] {s : ι → ι' → Set α} (hs : ∀ i, Monotone (s i)) :
    ⋃ j : ι', ⋂ i : ι, s i j = ⋂ i : ι, ⋃ j : ι', s i j 
goal: ⋃ j, ⋂ i, s i j = ⋂ i, ⋃ j, s i j

full_name: Set.iUnion_iInter_of_antitone
code: /-- A decreasing union distributes over finite intersection. -/
theorem iUnion_iInter_of_antitone {ι ι' α : Type*} [Finite ι] [Preorder ι']
    [IsDirected ι' (swap (· ≤ ·))] [Nonempty ι'] {s : ι → ι' → Set α} (hs : ∀ i, Antitone (s i)) :
    ⋃ j : ι', ⋂ i : ι, s i j = ⋂ i : ι, ⋃ j : ι', s i j 
goal: ⋃ j, ⋂ i, s i j = ⋂ i, ⋃ j, s i j

full_name: Set.iInter_iUnion_of_monotone
code: /-- An increasing intersection distributes over finite union. -/
theorem iInter_iUnion_of_monotone {ι ι' α : Type*} [Finite ι] [Preorder ι']
    [IsDirected ι' (swap (· ≤ ·))] [Nonempty ι'] {s : ι → ι' → Set α} (hs : ∀ i, Monotone (s i)) :
    ⋂ j : ι', ⋃ i : ι, s i j = ⋃ i : ι, ⋂ j : ι', s i j 
goal: ⋂ j, ⋃ i, s i j = ⋃ i, ⋂ j, s i j

full_name: Set.iInter_iUnion_of_antitone
code: /-- A decreasing intersection distributes over finite union. -/
theorem iInter_iUnion_of_antitone {ι ι' α : Type*} [Finite ι] [Preorder ι'] [IsDirected ι' (· ≤ ·)]
    [Nonempty ι'] {s : ι → ι' → Set α} (hs : ∀ i, Antitone (s i)) :
    ⋂ j : ι', ⋃ i : ι, s i j = ⋃ i : ι, ⋂ j : ι', s i j 
goal: ⋂ j, ⋃ i, s i j = ⋃ i, ⋂ j, s i j

full_name: Set.iUnion_pi_of_monotone
code: theorem iUnion_pi_of_monotone {ι ι' : Type*} [LinearOrder ι'] [Nonempty ι'] {α : ι → Type*}
    {I : Set ι} {s : ∀ i, ι' → Set (α i)} (hI : I.Finite) (hs : ∀ i ∈ I, Monotone (s i)) :
    ⋃ j : ι', I.pi (fun i => s i j) = I.pi fun i => ⋃ j, s i j 
goal: (⋃ j, I.pi fun i => s i j) = I.pi fun i => ⋃ j, s i j

full_name: Set.iUnion_univ_pi_of_monotone
code: theorem iUnion_univ_pi_of_monotone {ι ι' : Type*} [LinearOrder ι'] [Nonempty ι'] [Finite ι]
    {α : ι → Type*} {s : ∀ i, ι' → Set (α i)} (hs : ∀ i, Monotone (s i)) :
    ⋃ j : ι', pi univ (fun i => s i j) = pi univ fun i => ⋃ j, s i j 
goal: (⋃ j, Set.univ.pi fun i => s i j) = Set.univ.pi fun i => ⋃ j, s i j

full_name: Set.finite_range_findGreatest
code: theorem finite_range_findGreatest {P : α → ℕ → Prop} [∀ x, DecidablePred (P x)] {b : ℕ} :
    (range fun x => Nat.findGreatest (P x) b).Finite 
goal: (Set.range fun x => Nat.findGreatest (P x) b).Finite

full_name: Set.Finite.exists_maximal_wrt
code: theorem Finite.exists_maximal_wrt [PartialOrder β] (f : α → β) (s : Set α) (h : s.Finite)
    (hs : s.Nonempty) : ∃ a ∈ s, ∀ a' ∈ s, f a ≤ f a' → f a = f a' 
goal: ∃ a ∈ s, ∀ a' ∈ s, f a ≤ f a' → f a = f a'

full_name: Set.Finite.exists_maximal_wrt'
code: /-- A version of `Finite.exists_maximal_wrt` with the (weaker) hypothesis that the image of `s`
  is finite rather than `s` itself. -/
theorem Finite.exists_maximal_wrt' [PartialOrder β] (f : α → β) (s : Set α) (h : (f '' s).Finite)
    (hs : s.Nonempty) : (∃ a ∈ s, ∀ (a' : α), a' ∈ s → f a ≤ f a' → f a = f a') 
goal: ∃ a ∈ s, ∀ a' ∈ s, f a ≤ f a' → f a = f a'

full_name: Set.Finite.exists_minimal_wrt
code: theorem Finite.exists_minimal_wrt [PartialOrder β] (f : α → β) (s : Set α) (h : s.Finite)
    (hs : s.Nonempty) : ∃ a ∈ s, ∀ a' ∈ s, f a' ≤ f a → f a = f a' 
goal: ∃ a ∈ s, ∀ a' ∈ s, f a' ≤ f a → f a = f a'

full_name: Set.Finite.exists_minimal_wrt'
code: /-- A version of `Finite.exists_minimal_wrt` with the (weaker) hypothesis that the image of `s`
  is finite rather than `s` itself. -/
lemma Finite.exists_minimal_wrt' [PartialOrder β] (f : α → β) (s : Set α) (h : (f '' s).Finite)
    (hs : s.Nonempty) : (∃ a ∈ s, ∀ (a' : α), a' ∈ s → f a' ≤ f a → f a = f a') 
goal: ∃ a ∈ s, ∀ a' ∈ s, f a' ≤ f a → f a = f a'

full_name: Set.Finite.bddAbove
code: /-- A finite set is bounded above. -/
protected theorem Finite.bddAbove (hs : s.Finite) : BddAbove s 
goal: BddAbove s

full_name: Set.Finite.bddAbove_biUnion
code: /-- A finite union of sets which are all bounded above is still bounded above. -/
theorem Finite.bddAbove_biUnion {I : Set β} {S : β → Set α} (H : I.Finite) :
    BddAbove (⋃ i ∈ I, S i) ↔ ∀ i ∈ I, BddAbove (S i) 
goal: BddAbove (⋃ i ∈ I, S i) ↔ ∀ i ∈ I, BddAbove (S i)

full_name: Set.infinite_of_not_bddAbove
code: theorem infinite_of_not_bddAbove : ¬BddAbove s → s.Infinite 
goal: ¬BddAbove s → s.Infinite

full_name: Set.Finite.bddBelow
code: /-- A finite set is bounded below. -/
protected theorem Finite.bddBelow (hs : s.Finite) : BddBelow s 
goal: BddBelow s

full_name: Set.Finite.bddBelow_biUnion
code: /-- A finite union of sets which are all bounded below is still bounded below. -/
theorem Finite.bddBelow_biUnion {I : Set β} {S : β → Set α} (H : I.Finite) :
    BddBelow (⋃ i ∈ I, S i) ↔ ∀ i ∈ I, BddBelow (S i) 
goal: BddBelow (⋃ i ∈ I, S i) ↔ ∀ i ∈ I, BddBelow (S i)

full_name: Set.infinite_of_not_bddBelow
code: theorem infinite_of_not_bddBelow : ¬BddBelow s → s.Infinite 
goal: ¬BddBelow s → s.Infinite

full_name: Finset.exists_card_eq
code: lemma exists_card_eq [Infinite α] : ∀ n : ℕ, ∃ s : Finset α, s.card = n
  
goal: ∃ s, s.card = n

full_name: Finset.bddAbove
code: /-- A finset is bounded above. -/
protected theorem bddAbove [SemilatticeSup α] [Nonempty α] (s : Finset α) : BddAbove (↑s : Set α) 
goal: BddAbove ↑s

full_name: Finset.bddBelow
code: /-- A finset is bounded below. -/
protected theorem bddBelow [SemilatticeInf α] [Nonempty α] (s : Finset α) : BddBelow (↑s : Set α) 
goal: BddBelow ↑s

full_name: Finite.of_forall_not_lt_lt
code: /-- If a linear order does not contain any triple of elements `x < y < z`, then this type
is finite. -/
lemma Finite.of_forall_not_lt_lt (h : ∀ ⦃x y z : α⦄, x < y → y < z → False) : Finite α 
goal: Finite α

full_name: Set.finite_of_forall_not_lt_lt
code: /-- If a set `s` does not contain any triple of elements `x < y < z`, then `s` is finite. -/
lemma Set.finite_of_forall_not_lt_lt (h : ∀ x ∈ s, ∀ y ∈ s, ∀ z ∈ s, x < y → y < z → False) :
    Set.Finite s 
goal: s.Finite

full_name: Set.finite_diff_iUnion_Ioo
code: lemma Set.finite_diff_iUnion_Ioo (s : Set α) : (s \ ⋃ (x ∈ s) (y ∈ s), Ioo x y).Finite 
goal: (s \ ⋃ x ∈ s, ⋃ y ∈ s, Set.Ioo x y).Finite

full_name: Set.finite_diff_iUnion_Ioo'
code: lemma Set.finite_diff_iUnion_Ioo' (s : Set α) : (s \ ⋃ x : s × s, Ioo x.1 x.2).Finite 
goal: (s \ ⋃ x, Set.Ioo ↑x.1 ↑x.2).Finite

full_name: Directed.exists_mem_subset_of_finset_subset_biUnion
code: lemma Directed.exists_mem_subset_of_finset_subset_biUnion {α ι : Type*} [Nonempty ι]
    {f : ι → Set α} (h : Directed (· ⊆ ·) f) {s : Finset α} (hs : (s : Set α) ⊆ ⋃ i, f i) :
    ∃ i, (s : Set α) ⊆ f i 
goal: ∃ i, ↑s ⊆ f i

full_name: DirectedOn.exists_mem_subset_of_finset_subset_biUnion
code: theorem DirectedOn.exists_mem_subset_of_finset_subset_biUnion {α ι : Type*} {f : ι → Set α}
    {c : Set ι} (hn : c.Nonempty) (hc : DirectedOn (fun i j => f i ⊆ f j) c) {s : Finset α}
    (hs : (s : Set α) ⊆ ⋃ i ∈ c, f i) : ∃ i ∈ c, (s : Set α) ⊆ f i 
goal: ∃ i ∈ c, ↑s ⊆ f i