Partial permutation #
This files defines permutations on a set.
A partial permutation on α
is a domain Set α
and two functions α → α
that map domain
to
domain
and are inverse to each other on domain
.
Main declarations #
PartialPerm α
: The type of partial permutations onα
.
A Perm
gives rise to a PartialPerm
defined on the entire type.
Equations
- π.toPartialPerm = { toFun := ⇑π, invFun := ⇑(Equiv.symm π), domain := Set.univ, toFun_domain' := ⋯, invFun_domain' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
Instances For
The inverse of a partial permutation.
Equations
- π.symm = { toFun := π.invFun, invFun := π.toFun, domain := π.domain, toFun_domain' := ⋯, invFun_domain' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
Instances For
Equations
- PartialPerm.instCoeFunForall = { coe := PartialPerm.toFun }
Create a copy of a PartialPerm
providing better definitional equalities.
Equations
- π.copy f hf g hg s hs = { toFun := f, invFun := g, domain := s, toFun_domain' := ⋯, invFun_domain' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
Instances For
Associating to a partial_perm a permutation of the domain.
Equations
- π.toPerm = { toFun := fun (x : ↑π.domain) => ⟨π.toFun ↑x, ⋯⟩, invFun := fun (y : ↑π.domain) => ⟨π.symm.toFun ↑y, ⋯⟩, left_inv := ⋯, right_inv := ⋯ }
Instances For
Restrict a PartialPerm
to a stable subset.
Equations
Instances For
Alias of the reverse direction of PartialPerm.IsStable.iff_preimage_eq
.
Alias of the forward direction of PartialPerm.IsStable.iff_preimage_eq
.
Alias of the forward direction of PartialPerm.IsStable.iff_symm_preimage_eq
.
Alias of the reverse direction of PartialPerm.IsStable.iff_symm_preimage_eq
.
Two partial permutations that have the same domain
, same toFun
and same invFun
, coincide.
The identity partial permutation.
Equations
Instances For
Equations
- PartialPerm.instInhabited = { default := PartialPerm.refl α }
Composing two partial permutations if the domain of the first coincides with the domain of the second.
Equations
Instances For
The identity partial PERMUTATION on a set s
Equations
- PartialPerm.ofSet s = { toFun := id, invFun := id, domain := s, toFun_domain' := ⋯, invFun_domain' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
Instances For
Reinterpret a partial permutation as a partial equivalence.
Equations
- π.toPartialEquiv = { toFun := π.toFun, invFun := π.symm.toFun, source := π.domain, target := π.domain, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
Instances For
EqOnDomain π π'
means that π
and π'
have the same domain, and coincide there. Then π
and π'
should really be considered the same partial permutation.
Instances For
eq_on_domain
is an equivalence relation
Equations
- PartialPerm.eqOnDomainSetoid = { r := PartialPerm.EqOnDomain, iseqv := ⋯ }
Two equivalent partial permutations have the same domain
Two equivalent partial permutations coincide on the domain
If two partial permutations are equivalent, so are their inverses.
Two equivalent partial permutations have coinciding inverses on the domain
Preimages are respected by equivalence.
Two equivalent partial permutations are equal when the domain and domain are univ.
We define a preorder on partial permutations by saying π ≤ π'
if the domain of π
is contained
in the domain of π'
, and the permutations agree on the domain of π
.
Equations
- PartialPerm.instPreorder = Preorder.mk ⋯ ⋯ ⋯
Construct a partial permutation from two partial permutations with disjoint domains.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A bijection between two sets s : Set α
and t : Set α
provides a partial permutation on α
.
Equations
- Set.BijOn.toPartialPerm f s hf = { toFun := f, invFun := Function.invFunOn f s, domain := s, toFun_domain' := ⋯, invFun_domain' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
Instances For
Perm.toPartialPerm
#
A Perm
can be be interpreted as a PartialPerm
. We set up simp lemmas to reduce most
properties of the PartialPerm
to that of the Perm
.