Equivalences and sets #
In this file we provide lemmas linking equivalences to sets.
Some notable definitions are:
Equiv.ofInjective
: an injective function is (noncomputably) equivalent to its range.Equiv.setCongr
: two equal sets are equivalent as types.Equiv.Set.union
: a disjoint union of sets is equivalent to theirSum
.
This file is separate from Equiv/Basic
such that we do not require the full lattice structure
on sets before defining what an equivalence is.
Alias for Equiv.image_eq_preimage
Alias for Equiv.image_eq_preimage
The subtypes corresponding to equal sets are equivalent.
Equations
Instances For
univ α
is equivalent to α
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If sets s
and t
are separated by a decidable predicate, then s ∪ t
is equivalent to
s ⊕ t
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If sets s
and t
are disjoint, then s ∪ t
is equivalent to s ⊕ t
.
Equations
- Equiv.Set.union H = Equiv.Set.union' (fun (x : α) => x ∈ s) (_ : ∀ x ∈ s, x ∈ s) (_ : ∀ x ∈ t, x ∈ s → x ∈ ∅)
Instances For
If a ∉ s
, then insert a s
is equivalent to s ⊕ PUnit
.
Equations
- Equiv.Set.insert H = Trans.trans (Trans.trans (Equiv.Set.ofEq (_ : insert a s = s ∪ {a})) (Equiv.Set.union (_ : ∀ x ∈ s ∩ {a}, x ∈ ∅))) (Equiv.sumCongr (Equiv.refl ↑s) (Equiv.Set.singleton a))
Instances For
If s : Set α
is a set with decidable membership, then s ⊕ sᶜ
is equivalent to α
.
Equations
- Equiv.Set.sumCompl s = Trans.trans (Trans.trans (Equiv.Set.union (_ : s ∩ sᶜ ⊆ ∅)).symm (Equiv.Set.ofEq (_ : s ∪ sᶜ = Set.univ))) (Equiv.Set.univ α)
Instances For
sumDiffSubset s t
is the natural equivalence between
s ⊕ (t \ s)
and t
, where s
and t
are two sets.
Equations
- Equiv.Set.sumDiffSubset h = Trans.trans (Equiv.Set.union (_ : s ∩ (t \ s) ⊆ ∅)).symm (Equiv.Set.ofEq (_ : s ∪ t \ s = t))
Instances For
If s
is a set with decidable membership, then the sum of s ∪ t
and s ∩ t
is equivalent
to s ⊕ t
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given an equivalence e₀
between sets s : Set α
and t : Set β
, the set of equivalences
e : α ≃ β
such that e ↑x = ↑(e₀ x)
for each x : s
is equivalent to the set of equivalences
between sᶜ
and tᶜ
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If f
is an injective function, then s
is equivalent to f '' s
.
Equations
- Equiv.Set.image f s H = Equiv.Set.imageOfInjOn f s (_ : Set.InjOn f s)
Instances For
The set {x ∈ s | t x}
is equivalent to the set of x : s
such that t x
.
Equations
- Equiv.Set.sep s t = (Equiv.subtypeSubtypeEquivSubtypeInter s t).symm
Instances For
If s
is a set in range f
,
then its image under rangeSplitting f
is in bijection (via f
) with s
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If f : α → β
has a left-inverse when α
is nonempty, then α
is computably equivalent to the
range of f
.
While awkward, the Nonempty α
hypothesis on f_inv
and hf
allows this to be used when α
is
empty too. This hypothesis is absent on analogous definitions on stronger Equiv
s like
LinearEquiv.ofLeftInverse
and RingEquiv.ofLeftInverse
as their typeclass assumptions
are already sufficient to ensure non-emptiness.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If f : α → β
has a left-inverse, then α
is computably equivalent to the range of f
.
Note that if α
is empty, no such f_inv
exists and so this definition can't be used, unlike
the stronger but less convenient ofLeftInverse
.
Equations
- Equiv.ofLeftInverse' f f_inv hf = Equiv.ofLeftInverse f (fun (x : Nonempty α) => f_inv) (_ : Nonempty α → Function.LeftInverse f_inv f)
Instances For
If f : α → β
is an injective function, then domain α
is equivalent to the range of f
.
Equations
- Equiv.ofInjective f hf = Equiv.ofLeftInverse f (fun (x : Nonempty α) => Function.invFun f) (_ : ∀ (x : Nonempty α), Function.LeftInverse (Function.invFun f) f)
Instances For
sigmaPreimageEquiv f
for f : α → β
is the natural equivalence between
the type of all preimages of points under f
and the total space α
.
Equations
Instances For
If a function is a bijection between two sets s
and t
, then it induces an
equivalence between the types ↥s
and ↥t
.
Equations
- Set.BijOn.equiv f h = Equiv.ofBijective (Set.MapsTo.restrict f s t (_ : Set.MapsTo f s t)) (_ : Function.Bijective (Set.MapsTo.restrict f s t (_ : Set.MapsTo f s t)))
Instances For
The composition of an updated function with an equiv on a subtype can be expressed as an updated function.