Derangements on types #
In this file we define derangements α, the set of derangements on a type α.
We also define some equivalences involving various subtypes of Perm α and derangements α:
derangementsOptionEquivSigmaAtMostOneFixedPoint: An equivalence betweenderangements (Option α)and the sigma-typeΣ a : α, {f : Perm α // fixed_points f ⊆ a}.derangementsRecursionEquiv: An equivalence betweenderangements (Option α)and the sigma-typeΣ a : α, (derangements (({a}ᶜ : Set α) : Type*) ⊕ derangements α)which is later used to inductively count the number of derangements.
In order to prove the above, we also prove some results about the effect of Equiv.removeNone
on derangements: RemoveNone.fiber_none and RemoveNone.fiber_some.
A permutation is a derangement if it has no fixed points.
Equations
- derangements α = {f : Equiv.Perm α | ∀ (x : α), f x ≠ x}
Instances For
If α is equivalent to β, then derangements α is equivalent to derangements β.
Equations
Instances For
Derangements on a subtype are equivalent to permutations on the original type where points are fixed iff they are not in the subtype.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The set of permutations that fix either a or nothing is equivalent to the sum of:
- derangements on
α - derangements on
αminusa.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The set of permutations f such that the preimage of (a, f) under
Equiv.Perm.decomposeOption is a derangement.
Equations
Instances For
For any a : α, the fiber over some a is the set of permutations
where a is the only possible fixed point.
The set of derangements on Option α is equivalent to the union over a : α
of "permutations with a the only possible fixed point".
Equations
- One or more equations did not get rendered due to their size.
Instances For
The set of derangements on Option α is equivalent to the union over all a : α of
"derangements on α ⊕ derangements on {a}ᶜ".