data.fin.tuple.sort
⟷
Mathlib.Data.Fin.Tuple.Sort
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -156,7 +156,7 @@ theorem eq_sort_iff' : σ = sort f ↔ StrictMono (σ.trans <| graphEquiv₁ f)
constructor <;> intro h
· rw [h, sort, Equiv.trans_assoc, Equiv.symm_trans_self]; exact (graph_equiv₂ f).StrictMono
· have := Subsingleton.elim (graph_equiv₂ f) (h.order_iso_of_surjective _ <| Equiv.surjective _)
- ext1; exact (graph_equiv₁ f).apply_eq_iff_eq_symm_apply.1 (FunLike.congr_fun this x).symm
+ ext1; exact (graph_equiv₁ f).apply_eq_iff_eq_symm_apply.1 (DFunLike.congr_fun this x).symm
#align tuple.eq_sort_iff' Tuple.eq_sort_iff'
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -179,7 +179,7 @@ theorem eq_sort_iff :
/-- The permutation that sorts `f` is the identity if and only if `f` is monotone. -/
theorem sort_eq_refl_iff_monotone : sort f = Equiv.refl _ ↔ Monotone f :=
by
- rw [eq_comm, eq_sort_iff, Equiv.coe_refl, Function.comp.right_id]
+ rw [eq_comm, eq_sort_iff, Equiv.coe_refl, Function.comp_id]
simp only [id.def, and_iff_left_iff_imp]
exact fun _ _ _ hij _ => hij
#align tuple.sort_eq_refl_iff_monotone Tuple.sort_eq_refl_iff_monotone
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,10 +3,10 @@ Copyright (c) 2021 Kyle Miller. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
-/
-import Mathbin.Data.Finset.Sort
-import Mathbin.Data.List.FinRange
-import Mathbin.Data.Prod.Lex
-import Mathbin.GroupTheory.Perm.Basic
+import Data.Finset.Sort
+import Data.List.FinRange
+import Data.Prod.Lex
+import GroupTheory.Perm.Basic
#align_import data.fin.tuple.sort from "leanprover-community/mathlib"@"4d392a6c9c4539cbeca399b3ee0afea398fbd2eb"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,17 +2,14 @@
Copyright (c) 2021 Kyle Miller. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
-
-! This file was ported from Lean 3 source module data.fin.tuple.sort
-! leanprover-community/mathlib commit 4d392a6c9c4539cbeca399b3ee0afea398fbd2eb
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Finset.Sort
import Mathbin.Data.List.FinRange
import Mathbin.Data.Prod.Lex
import Mathbin.GroupTheory.Perm.Basic
+#align_import data.fin.tuple.sort from "leanprover-community/mathlib"@"4d392a6c9c4539cbeca399b3ee0afea398fbd2eb"
+
/-!
# Sorting tuples by their values
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -101,10 +101,12 @@ def sort (f : Fin n → α) : Equiv.Perm (Fin n) :=
#align tuple.sort Tuple.sort
-/
+#print Tuple.graphEquiv₂_apply /-
theorem graphEquiv₂_apply (f : Fin n → α) (i : Fin n) :
graphEquiv₂ f i = graphEquiv₁ f (sort f i) :=
((graphEquiv₁ f).apply_symm_apply _).symm
#align tuple.graph_equiv₂_apply Tuple.graphEquiv₂_apply
+-/
#print Tuple.self_comp_sort /-
theorem self_comp_sort (f : Fin n → α) : f ∘ sort f = graph.proj ∘ graphEquiv₂ f :=
@@ -112,12 +114,14 @@ theorem self_comp_sort (f : Fin n → α) : f ∘ sort f = graph.proj ∘ graphE
#align tuple.self_comp_sort Tuple.self_comp_sort
-/
+#print Tuple.monotone_proj /-
theorem monotone_proj (f : Fin n → α) : Monotone (graph.proj : graph f → α) :=
by
rintro ⟨⟨x, i⟩, hx⟩ ⟨⟨y, j⟩, hy⟩ (_ | h)
· exact le_of_lt ‹_›
· simp [graph.proj]
#align tuple.monotone_proj Tuple.monotone_proj
+-/
#print Tuple.monotone_sort /-
theorem monotone_sort (f : Fin n → α) : Monotone (f ∘ sort f) :=
@@ -174,6 +178,7 @@ theorem eq_sort_iff :
#align tuple.eq_sort_iff Tuple.eq_sort_iff
-/
+#print Tuple.sort_eq_refl_iff_monotone /-
/-- The permutation that sorts `f` is the identity if and only if `f` is monotone. -/
theorem sort_eq_refl_iff_monotone : sort f = Equiv.refl _ ↔ Monotone f :=
by
@@ -181,6 +186,7 @@ theorem sort_eq_refl_iff_monotone : sort f = Equiv.refl _ ↔ Monotone f :=
simp only [id.def, and_iff_left_iff_imp]
exact fun _ _ _ hij _ => hij
#align tuple.sort_eq_refl_iff_monotone Tuple.sort_eq_refl_iff_monotone
+-/
#print Tuple.comp_sort_eq_comp_iff_monotone /-
/-- A permutation of a tuple `f` is `f` sorted if and only if it is monotone. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -170,7 +170,7 @@ theorem eq_sort_iff :
refine' ⟨fun h => ⟨(monotone_proj f).comp h.Monotone, fun i j hij hfij => _⟩, fun h i j hij => _⟩
· exact (((Prod.Lex.lt_iff _ _).1 <| h hij).resolve_left hfij.not_lt).2
· obtain he | hl := (h.1 hij.le).eq_or_lt <;> apply (Prod.Lex.lt_iff _ _).2
- exacts[Or.inr ⟨he, h.2 i j hij he⟩, Or.inl hl]
+ exacts [Or.inr ⟨he, h.2 i j hij he⟩, Or.inl hl]
#align tuple.eq_sort_iff Tuple.eq_sort_iff
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -86,11 +86,13 @@ theorem proj_equiv₁' (f : Fin n → α) : graph.proj ∘ graphEquiv₁ f = f :
#align tuple.proj_equiv₁' Tuple.proj_equiv₁'
-/
+#print Tuple.graphEquiv₂ /-
/-- `graph_equiv₂ f` is an equivalence between `fin n` and `graph f` that respects the order.
-/
def graphEquiv₂ (f : Fin n → α) : Fin n ≃o graph f :=
Finset.orderIsoOfFin _ (by simp)
#align tuple.graph_equiv₂ Tuple.graphEquiv₂
+-/
#print Tuple.sort /-
/-- `sort f` is the permutation that orders `fin n` according to the order of the outputs of `f`. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -86,12 +86,6 @@ theorem proj_equiv₁' (f : Fin n → α) : graph.proj ∘ graphEquiv₁ f = f :
#align tuple.proj_equiv₁' Tuple.proj_equiv₁'
-/
-/- warning: tuple.graph_equiv₂ -> Tuple.graphEquiv₂ is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α), OrderIso.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Fin.hasLe n) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))
-but is expected to have type
- forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α), OrderIso.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (instLEFin n) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))
-Case conversion may be inaccurate. Consider using '#align tuple.graph_equiv₂ Tuple.graphEquiv₂ₓ'. -/
/-- `graph_equiv₂ f` is an equivalence between `fin n` and `graph f` that respects the order.
-/
def graphEquiv₂ (f : Fin n → α) : Fin n ≃o graph f :=
@@ -105,9 +99,6 @@ def sort (f : Fin n → α) : Equiv.Perm (Fin n) :=
#align tuple.sort Tuple.sort
-/
-/- warning: tuple.graph_equiv₂_apply -> Tuple.graphEquiv₂_apply is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align tuple.graph_equiv₂_apply Tuple.graphEquiv₂_applyₓ'. -/
theorem graphEquiv₂_apply (f : Fin n → α) (i : Fin n) :
graphEquiv₂ f i = graphEquiv₁ f (sort f i) :=
((graphEquiv₁ f).apply_symm_apply _).symm
@@ -119,12 +110,6 @@ theorem self_comp_sort (f : Fin n → α) : f ∘ sort f = graph.proj ∘ graphE
#align tuple.self_comp_sort Tuple.self_comp_sort
-/
-/- warning: tuple.monotone_proj -> Tuple.monotone_proj is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α), Monotone.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) α (Subtype.preorder.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.preorder.{u1, 0} α (Fin n) (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1)))) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1)))) (Tuple.graph.proj.{u1} n α _inst_1 f)
-but is expected to have type
- forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α), Monotone.{u1, u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) α (Subtype.preorder.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.preorder.{u1, 0} α (Fin n) (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1))))) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1))))) (Tuple.graph.proj.{u1} n α _inst_1 f)
-Case conversion may be inaccurate. Consider using '#align tuple.monotone_proj Tuple.monotone_projₓ'. -/
theorem monotone_proj (f : Fin n → α) : Monotone (graph.proj : graph f → α) :=
by
rintro ⟨⟨x, i⟩, hx⟩ ⟨⟨y, j⟩, hy⟩ (_ | h)
@@ -187,12 +172,6 @@ theorem eq_sort_iff :
#align tuple.eq_sort_iff Tuple.eq_sort_iff
-/
-/- warning: tuple.sort_eq_refl_iff_monotone -> Tuple.sort_eq_refl_iff_monotone is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {f : (Fin n) -> α}, Iff (Eq.{1} (Equiv.Perm.{1} (Fin n)) (Tuple.sort.{u1} n α _inst_1 f) (Equiv.refl.{1} (Fin n))) (Monotone.{0, u1} (Fin n) α (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1)))) f)
-but is expected to have type
- forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] {f : (Fin n) -> α}, Iff (Eq.{1} (Equiv.Perm.{1} (Fin n)) (Tuple.sort.{u1} n α _inst_1 f) (Equiv.refl.{1} (Fin n))) (Monotone.{0, u1} (Fin n) α (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1))))) f)
-Case conversion may be inaccurate. Consider using '#align tuple.sort_eq_refl_iff_monotone Tuple.sort_eq_refl_iff_monotoneₓ'. -/
/-- The permutation that sorts `f` is the identity if and only if `f` is monotone. -/
theorem sort_eq_refl_iff_monotone : sort f = Equiv.refl _ ↔ Monotone f :=
by
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -166,11 +166,9 @@ strictly monotone (w.r.t. the lexicographic ordering on the target). -/
theorem eq_sort_iff' : σ = sort f ↔ StrictMono (σ.trans <| graphEquiv₁ f) :=
by
constructor <;> intro h
- · rw [h, sort, Equiv.trans_assoc, Equiv.symm_trans_self]
- exact (graph_equiv₂ f).StrictMono
+ · rw [h, sort, Equiv.trans_assoc, Equiv.symm_trans_self]; exact (graph_equiv₂ f).StrictMono
· have := Subsingleton.elim (graph_equiv₂ f) (h.order_iso_of_surjective _ <| Equiv.surjective _)
- ext1
- exact (graph_equiv₁ f).apply_eq_iff_eq_symm_apply.1 (FunLike.congr_fun this x).symm
+ ext1; exact (graph_equiv₁ f).apply_eq_iff_eq_symm_apply.1 (FunLike.congr_fun this x).symm
#align tuple.eq_sort_iff' Tuple.eq_sort_iff'
-/
@@ -223,9 +221,7 @@ theorem comp_perm_comp_sort_eq_comp_sort : (f ∘ σ) ∘ sort (f ∘ σ) = f
/-- If a permutation `f ∘ σ` of the tuple `f` is not the same as `f ∘ sort f`, then `f ∘ σ`
has a pair of strictly decreasing entries. -/
theorem antitone_pair_of_not_sorted' (h : f ∘ σ ≠ f ∘ sort f) :
- ∃ i j, i < j ∧ (f ∘ σ) j < (f ∘ σ) i :=
- by
- contrapose! h
+ ∃ i j, i < j ∧ (f ∘ σ) j < (f ∘ σ) i := by contrapose! h;
exact comp_sort_eq_comp_iff_monotone.mpr (monotone_iff_forall_lt.mpr h)
#align tuple.antitone_pair_of_not_sorted' Tuple.antitone_pair_of_not_sorted'
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -106,10 +106,7 @@ def sort (f : Fin n → α) : Equiv.Perm (Fin n) :=
-/
/- warning: tuple.graph_equiv₂_apply -> Tuple.graphEquiv₂_apply is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α) (i : Fin n), Eq.{succ u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (coeFn.{succ u1, succ u1} (OrderIso.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Fin.hasLe n) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (fun (_x : RelIso.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))))) => (Fin n) -> (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (RelIso.hasCoeToFun.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))))) (Tuple.graphEquiv₂.{u1} n α _inst_1 f) i) (coeFn.{succ u1, succ u1} (Equiv.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (fun (_x : Equiv.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) => (Fin n) -> (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (Equiv.hasCoeToFun.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (Tuple.graphEquiv₁.{u1} n α _inst_1 f) (coeFn.{1, 1} (Equiv.Perm.{1} (Fin n)) (fun (_x : Equiv.{1, 1} (Fin n) (Fin n)) => (Fin n) -> (Fin n)) (Equiv.hasCoeToFun.{1, 1} (Fin n) (Fin n)) (Tuple.sort.{u1} n α _inst_1 f) i))
-but is expected to have type
- forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α) (i : Fin n), Eq.{succ u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (FunLike.coe.{succ u1, 1, succ u1} (RelIso.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1285 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1287 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1285 x._@.Mathlib.Order.Hom.Basic._hyg.1287) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1300 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1302 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1300 x._@.Mathlib.Order.Hom.Basic._hyg.1302)) (Fin n) (fun (_x : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (RelHomClass.toFunLike.{u1, 0, u1} (RelIso.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1285 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1287 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1285 x._@.Mathlib.Order.Hom.Basic._hyg.1287) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1300 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1302 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1300 x._@.Mathlib.Order.Hom.Basic._hyg.1302)) (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1285 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1287 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1285 x._@.Mathlib.Order.Hom.Basic._hyg.1287) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1300 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1302 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1300 x._@.Mathlib.Order.Hom.Basic._hyg.1302) (RelIso.instRelHomClassRelIso.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1285 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1287 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1285 x._@.Mathlib.Order.Hom.Basic._hyg.1287) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1300 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1302 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1300 x._@.Mathlib.Order.Hom.Basic._hyg.1302))) (Tuple.graphEquiv₂.{u1} n α _inst_1 f) i) (FunLike.coe.{succ u1, 1, succ u1} (Equiv.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) _x) (Equiv.instFunLikeEquiv.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Tuple.graphEquiv₁.{u1} n α _inst_1 f) (FunLike.coe.{1, 1, 1} (Equiv.Perm.{1} (Fin n)) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Fin n) => Fin n) _x) (Equiv.instFunLikeEquiv.{1, 1} (Fin n) (Fin n)) (Tuple.sort.{u1} n α _inst_1 f) i))
+<too large>
Case conversion may be inaccurate. Consider using '#align tuple.graph_equiv₂_apply Tuple.graphEquiv₂_applyₓ'. -/
theorem graphEquiv₂_apply (f : Fin n → α) (i : Fin n) :
graphEquiv₂ f i = graphEquiv₁ f (sort f i) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/95a87616d63b3cb49d3fe678d416fbe9c4217bf4
@@ -109,7 +109,7 @@ def sort (f : Fin n → α) : Equiv.Perm (Fin n) :=
lean 3 declaration is
forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α) (i : Fin n), Eq.{succ u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (coeFn.{succ u1, succ u1} (OrderIso.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Fin.hasLe n) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (fun (_x : RelIso.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))))) => (Fin n) -> (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (RelIso.hasCoeToFun.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))))) (Tuple.graphEquiv₂.{u1} n α _inst_1 f) i) (coeFn.{succ u1, succ u1} (Equiv.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (fun (_x : Equiv.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) => (Fin n) -> (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (Equiv.hasCoeToFun.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (Tuple.graphEquiv₁.{u1} n α _inst_1 f) (coeFn.{1, 1} (Equiv.Perm.{1} (Fin n)) (fun (_x : Equiv.{1, 1} (Fin n) (Fin n)) => (Fin n) -> (Fin n)) (Equiv.hasCoeToFun.{1, 1} (Fin n) (Fin n)) (Tuple.sort.{u1} n α _inst_1 f) i))
but is expected to have type
- forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α) (i : Fin n), Eq.{succ u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (FunLike.coe.{succ u1, 1, succ u1} (RelIso.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298)) (Fin n) (fun (_x : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (RelHomClass.toFunLike.{u1, 0, u1} (RelIso.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298)) (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298) (RelIso.instRelHomClassRelIso.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298))) (Tuple.graphEquiv₂.{u1} n α _inst_1 f) i) (FunLike.coe.{succ u1, 1, succ u1} (Equiv.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) _x) (Equiv.instFunLikeEquiv.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Tuple.graphEquiv₁.{u1} n α _inst_1 f) (FunLike.coe.{1, 1, 1} (Equiv.Perm.{1} (Fin n)) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Fin n) => Fin n) _x) (Equiv.instFunLikeEquiv.{1, 1} (Fin n) (Fin n)) (Tuple.sort.{u1} n α _inst_1 f) i))
+ forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α) (i : Fin n), Eq.{succ u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (FunLike.coe.{succ u1, 1, succ u1} (RelIso.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1285 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1287 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1285 x._@.Mathlib.Order.Hom.Basic._hyg.1287) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1300 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1302 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1300 x._@.Mathlib.Order.Hom.Basic._hyg.1302)) (Fin n) (fun (_x : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (RelHomClass.toFunLike.{u1, 0, u1} (RelIso.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1285 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1287 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1285 x._@.Mathlib.Order.Hom.Basic._hyg.1287) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1300 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1302 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1300 x._@.Mathlib.Order.Hom.Basic._hyg.1302)) (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1285 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1287 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1285 x._@.Mathlib.Order.Hom.Basic._hyg.1287) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1300 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1302 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1300 x._@.Mathlib.Order.Hom.Basic._hyg.1302) (RelIso.instRelHomClassRelIso.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1285 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1287 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1285 x._@.Mathlib.Order.Hom.Basic._hyg.1287) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1300 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1302 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1300 x._@.Mathlib.Order.Hom.Basic._hyg.1302))) (Tuple.graphEquiv₂.{u1} n α _inst_1 f) i) (FunLike.coe.{succ u1, 1, succ u1} (Equiv.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) _x) (Equiv.instFunLikeEquiv.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Tuple.graphEquiv₁.{u1} n α _inst_1 f) (FunLike.coe.{1, 1, 1} (Equiv.Perm.{1} (Fin n)) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Fin n) => Fin n) _x) (Equiv.instFunLikeEquiv.{1, 1} (Fin n) (Fin n)) (Tuple.sort.{u1} n α _inst_1 f) i))
Case conversion may be inaccurate. Consider using '#align tuple.graph_equiv₂_apply Tuple.graphEquiv₂_applyₓ'. -/
theorem graphEquiv₂_apply (f : Fin n → α) (i : Fin n) :
graphEquiv₂ f i = graphEquiv₁ f (sort f i) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -86,13 +86,17 @@ theorem proj_equiv₁' (f : Fin n → α) : graph.proj ∘ graphEquiv₁ f = f :
#align tuple.proj_equiv₁' Tuple.proj_equiv₁'
-/
-#print Tuple.graphEquiv₂ /-
+/- warning: tuple.graph_equiv₂ -> Tuple.graphEquiv₂ is a dubious translation:
+lean 3 declaration is
+ forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α), OrderIso.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Fin.hasLe n) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))
+but is expected to have type
+ forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α), OrderIso.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (instLEFin n) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))
+Case conversion may be inaccurate. Consider using '#align tuple.graph_equiv₂ Tuple.graphEquiv₂ₓ'. -/
/-- `graph_equiv₂ f` is an equivalence between `fin n` and `graph f` that respects the order.
-/
def graphEquiv₂ (f : Fin n → α) : Fin n ≃o graph f :=
Finset.orderIsoOfFin _ (by simp)
#align tuple.graph_equiv₂ Tuple.graphEquiv₂
--/
#print Tuple.sort /-
/-- `sort f` is the permutation that orders `fin n` according to the order of the outputs of `f`. -/
@@ -103,7 +107,7 @@ def sort (f : Fin n → α) : Equiv.Perm (Fin n) :=
/- warning: tuple.graph_equiv₂_apply -> Tuple.graphEquiv₂_apply is a dubious translation:
lean 3 declaration is
- forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α) (i : Fin n), Eq.{succ u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (coeFn.{succ u1, succ u1} (OrderIso.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Fin.hasLe n) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (fun (_x : RelIso.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))))) => (Fin n) -> (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (RelIso.hasCoeToFun.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))))) (Tuple.graphEquiv₂.{u1} n α _inst_1 f) i) (coeFn.{succ u1, succ u1} (Equiv.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (fun (_x : Equiv.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) => (Fin n) -> (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (Equiv.hasCoeToFun.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (Tuple.graphEquiv₁.{u1} n α _inst_1 f) (coeFn.{1, 1} (Equiv.Perm.{1} (Fin n)) (fun (_x : Equiv.{1, 1} (Fin n) (Fin n)) => (Fin n) -> (Fin n)) (Equiv.hasCoeToFun.{1, 1} (Fin n) (Fin n)) (Tuple.sort.{u1} n α _inst_1 f) i))
+ forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α) (i : Fin n), Eq.{succ u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (coeFn.{succ u1, succ u1} (OrderIso.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Fin.hasLe n) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (fun (_x : RelIso.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))))) => (Fin n) -> (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (RelIso.hasCoeToFun.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))))) (Tuple.graphEquiv₂.{u1} n α _inst_1 f) i) (coeFn.{succ u1, succ u1} (Equiv.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (fun (_x : Equiv.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) => (Fin n) -> (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (Equiv.hasCoeToFun.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (Tuple.graphEquiv₁.{u1} n α _inst_1 f) (coeFn.{1, 1} (Equiv.Perm.{1} (Fin n)) (fun (_x : Equiv.{1, 1} (Fin n) (Fin n)) => (Fin n) -> (Fin n)) (Equiv.hasCoeToFun.{1, 1} (Fin n) (Fin n)) (Tuple.sort.{u1} n α _inst_1 f) i))
but is expected to have type
forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α) (i : Fin n), Eq.{succ u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (FunLike.coe.{succ u1, 1, succ u1} (RelIso.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298)) (Fin n) (fun (_x : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (RelHomClass.toFunLike.{u1, 0, u1} (RelIso.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298)) (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298) (RelIso.instRelHomClassRelIso.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298))) (Tuple.graphEquiv₂.{u1} n α _inst_1 f) i) (FunLike.coe.{succ u1, 1, succ u1} (Equiv.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) _x) (Equiv.instFunLikeEquiv.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Tuple.graphEquiv₁.{u1} n α _inst_1 f) (FunLike.coe.{1, 1, 1} (Equiv.Perm.{1} (Fin n)) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Fin n) => Fin n) _x) (Equiv.instFunLikeEquiv.{1, 1} (Fin n) (Fin n)) (Tuple.sort.{u1} n α _inst_1 f) i))
Case conversion may be inaccurate. Consider using '#align tuple.graph_equiv₂_apply Tuple.graphEquiv₂_applyₓ'. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/730c6d4cab72b9d84fcfb9e95e8796e9cd8f40ba
@@ -105,7 +105,7 @@ def sort (f : Fin n → α) : Equiv.Perm (Fin n) :=
lean 3 declaration is
forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α) (i : Fin n), Eq.{succ u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (coeFn.{succ u1, succ u1} (OrderIso.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Fin.hasLe n) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (fun (_x : RelIso.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))))) => (Fin n) -> (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (RelIso.hasCoeToFun.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))))) (Tuple.graphEquiv₂.{u1} n α _inst_1 f) i) (coeFn.{succ u1, succ u1} (Equiv.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (fun (_x : Equiv.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) => (Fin n) -> (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (Equiv.hasCoeToFun.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (Tuple.graphEquiv₁.{u1} n α _inst_1 f) (coeFn.{1, 1} (Equiv.Perm.{1} (Fin n)) (fun (_x : Equiv.{1, 1} (Fin n) (Fin n)) => (Fin n) -> (Fin n)) (Equiv.hasCoeToFun.{1, 1} (Fin n) (Fin n)) (Tuple.sort.{u1} n α _inst_1 f) i))
but is expected to have type
- forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α) (i : Fin n), Eq.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) i) (FunLike.coe.{succ u1, 1, succ u1} (Function.Embedding.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) _x) (EmbeddingLike.toFunLike.{succ u1, 1, succ u1} (Function.Embedding.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Function.instEmbeddingLikeEmbedding.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))))) (RelEmbedding.toEmbedding.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298) (RelIso.toRelEmbedding.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298) (Tuple.graphEquiv₂.{u1} n α _inst_1 f))) i) (FunLike.coe.{succ u1, 1, succ u1} (Equiv.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) _x) (Equiv.instFunLikeEquiv.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Tuple.graphEquiv₁.{u1} n α _inst_1 f) (FunLike.coe.{1, 1, 1} (Equiv.Perm.{1} (Fin n)) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Fin n) => Fin n) _x) (Equiv.instFunLikeEquiv.{1, 1} (Fin n) (Fin n)) (Tuple.sort.{u1} n α _inst_1 f) i))
+ forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α) (i : Fin n), Eq.{succ u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (FunLike.coe.{succ u1, 1, succ u1} (RelIso.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298)) (Fin n) (fun (_x : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (RelHomClass.toFunLike.{u1, 0, u1} (RelIso.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298)) (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298) (RelIso.instRelHomClassRelIso.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298))) (Tuple.graphEquiv₂.{u1} n α _inst_1 f) i) (FunLike.coe.{succ u1, 1, succ u1} (Equiv.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) _x) (Equiv.instFunLikeEquiv.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Tuple.graphEquiv₁.{u1} n α _inst_1 f) (FunLike.coe.{1, 1, 1} (Equiv.Perm.{1} (Fin n)) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Fin n) => Fin n) _x) (Equiv.instFunLikeEquiv.{1, 1} (Fin n) (Fin n)) (Tuple.sort.{u1} n α _inst_1 f) i))
Case conversion may be inaccurate. Consider using '#align tuple.graph_equiv₂_apply Tuple.graphEquiv₂_applyₓ'. -/
theorem graphEquiv₂_apply (f : Fin n → α) (i : Fin n) :
graphEquiv₂ f i = graphEquiv₁ f (sort f i) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -105,7 +105,7 @@ def sort (f : Fin n → α) : Equiv.Perm (Fin n) :=
lean 3 declaration is
forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α) (i : Fin n), Eq.{succ u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (coeFn.{succ u1, succ u1} (OrderIso.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Fin.hasLe n) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (fun (_x : RelIso.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))))) => (Fin n) -> (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (RelIso.hasCoeToFun.{0, u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{u1} (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f)) (Subtype.hasLe.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_1))))) (Fin.hasLe n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.Mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.hasMem.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))))) (Tuple.graphEquiv₂.{u1} n α _inst_1 f) i) (coeFn.{succ u1, succ u1} (Equiv.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (fun (_x : Equiv.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) => (Fin n) -> (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (Equiv.hasCoeToFun.{1, succ u1} (Fin n) (coeSort.{succ u1, succ (succ u1)} (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) Type.{u1} (Finset.hasCoeToSort.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Tuple.graph.{u1} n α _inst_1 f))) (Tuple.graphEquiv₁.{u1} n α _inst_1 f) (coeFn.{1, 1} (Equiv.Perm.{1} (Fin n)) (fun (_x : Equiv.{1, 1} (Fin n) (Fin n)) => (Fin n) -> (Fin n)) (Equiv.hasCoeToFun.{1, 1} (Fin n) (Fin n)) (Tuple.sort.{u1} n α _inst_1 f) i))
but is expected to have type
- forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α) (i : Fin n), Eq.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) i) (FunLike.coe.{succ u1, 1, succ u1} (Function.Embedding.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) _x) (EmbeddingLike.toFunLike.{succ u1, 1, succ u1} (Function.Embedding.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Function.instEmbeddingLikeEmbedding.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))))) (RelEmbedding.toEmbedding.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298) (RelIso.toRelEmbedding.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298) (Tuple.graphEquiv₂.{u1} n α _inst_1 f))) i) (FunLike.coe.{succ u1, 1, succ u1} (Equiv.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) _x) (Equiv.instFunLikeEquiv.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Tuple.graphEquiv₁.{u1} n α _inst_1 f) (FunLike.coe.{1, 1, 1} (Equiv.Perm.{1} (Fin n)) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Fin n) => Fin n) _x) (Equiv.instFunLikeEquiv.{1, 1} (Fin n) (Fin n)) (Tuple.sort.{u1} n α _inst_1 f) i))
+ forall {n : Nat} {α : Type.{u1}} [_inst_1 : LinearOrder.{u1} α] (f : (Fin n) -> α) (i : Fin n), Eq.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) i) (FunLike.coe.{succ u1, 1, succ u1} (Function.Embedding.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) _x) (EmbeddingLike.toFunLike.{succ u1, 1, succ u1} (Function.Embedding.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Function.instEmbeddingLikeEmbedding.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))))) (RelEmbedding.toEmbedding.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298) (RelIso.toRelEmbedding.{0, u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1281 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.1283 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.1281 x._@.Mathlib.Order.Hom.Basic._hyg.1283) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.1296 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (x._@.Mathlib.Order.Hom.Basic._hyg.1298 : Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) => LE.le.{u1} (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) (Subtype.le.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Prod.Lex.instLE.{u1, 0} α (Fin n) (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_1)))))) (instLEFin n)) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) x._@.Mathlib.Order.Hom.Basic._hyg.1296 x._@.Mathlib.Order.Hom.Basic._hyg.1298) (Tuple.graphEquiv₂.{u1} n α _inst_1 f))) i) (FunLike.coe.{succ u1, 1, succ u1} (Equiv.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Fin n) => Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f))) _x) (Equiv.instFunLikeEquiv.{1, succ u1} (Fin n) (Subtype.{succ u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (fun (x : Lex.{u1} (Prod.{u1, 0} α (Fin n))) => Membership.mem.{u1, u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n))) (Finset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) (Finset.instMembershipFinset.{u1} (Lex.{u1} (Prod.{u1, 0} α (Fin n)))) x (Tuple.graph.{u1} n α _inst_1 f)))) (Tuple.graphEquiv₁.{u1} n α _inst_1 f) (FunLike.coe.{1, 1, 1} (Equiv.Perm.{1} (Fin n)) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Fin n) => Fin n) _x) (Equiv.instFunLikeEquiv.{1, 1} (Fin n) (Fin n)) (Tuple.sort.{u1} n α _inst_1 f) i))
Case conversion may be inaccurate. Consider using '#align tuple.graph_equiv₂_apply Tuple.graphEquiv₂_applyₓ'. -/
theorem graphEquiv₂_apply (f : Fin n → α) (i : Fin n) :
graphEquiv₂ f i = graphEquiv₁ f (sort f i) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -185,7 +185,7 @@ theorem eq_sort_iff :
/-- The permutation that sorts `f` is the identity if and only if `f` is monotone. -/
theorem sort_eq_refl_iff_monotone : sort f = Equiv.refl _ ↔ Monotone f := by
rw [eq_comm, eq_sort_iff, Equiv.coe_refl, Function.comp_id]
- simp only [id.def, and_iff_left_iff_imp]
+ simp only [id, and_iff_left_iff_imp]
exact fun _ _ _ hij _ => hij
#align tuple.sort_eq_refl_iff_monotone Tuple.sort_eq_refl_iff_monotone
Empty lines were removed by executing the following Python script twice
import os
import re
# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
for filename in files:
if filename.endswith('.lean'):
file_path = os.path.join(dir_path, filename)
# Open the file and read its contents
with open(file_path, 'r') as file:
content = file.read()
# Use a regular expression to replace sequences of "variable" lines separated by empty lines
# with sequences without empty lines
modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)
# Write the modified content back to the file
with open(file_path, 'w') as file:
file.write(modified_content)
@@ -31,7 +31,6 @@ This file provides an API for doing so, with the sorted `n`-tuple given by
namespace Tuple
variable {n : ℕ}
-
variable {α : Type*} [LinearOrder α]
/-- `graph f` produces the finset of pairs `(f i, i)`
@@ -52,7 +52,7 @@ theorem graph.card (f : Fin n → α) : (graph f).card = n := by
rw [graph, Finset.card_image_of_injective]
· exact Finset.card_fin _
· intro _ _
- -- Porting note: was `simp`
+ -- porting note (#10745): was `simp`
dsimp only
rw [Prod.ext_iff]
simp
have
, replace
and suffices
(#10640)
No changes to tactic file, it's just boring fixes throughout the library.
This follows on from #6964.
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -121,8 +121,8 @@ variable {n : ℕ} {α : Type*}
theorem lt_card_le_iff_apply_le_of_monotone [PartialOrder α] [DecidableRel (α := α) LE.le]
{m : ℕ} (f : Fin m → α) (a : α) (h_sorted : Monotone f) (j : Fin m) :
j < Fintype.card {i // f i ≤ a} ↔ f j ≤ a := by
- suffices h1 : ∀ k : Fin m, (k < Fintype.card {i // f i ≤ a}) → f k ≤ a
- · refine ⟨h1 j, fun h ↦ ?_⟩
+ suffices h1 : ∀ k : Fin m, (k < Fintype.card {i // f i ≤ a}) → f k ≤ a by
+ refine ⟨h1 j, fun h ↦ ?_⟩
by_contra! hc
let p : Fin m → Prop := fun x ↦ f x ≤ a
let q : Fin m → Prop := fun x ↦ x < Fintype.card {i // f i ≤ a}
FunLike
to DFunLike
(#9785)
This prepares for the introduction of a non-dependent synonym of FunLike, which helps a lot with keeping #8386 readable.
This is entirely search-and-replace in 680197f combined with manual fixes in 4145626, e900597 and b8428f8. The commands that generated this change:
sed -i 's/\bFunLike\b/DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoFunLike\b/toDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/import Mathlib.Data.DFunLike/import Mathlib.Data.FunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bHom_FunLike\b/Hom_DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\binstFunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bfunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoo many metavariables to apply `fun_like.has_coe_to_fun`/too many metavariables to apply `DFunLike.hasCoeToFun`/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
@@ -168,7 +168,7 @@ theorem eq_sort_iff' : σ = sort f ↔ StrictMono (σ.trans <| graphEquiv₁ f)
exact (graphEquiv₂ f).strictMono
· have := Subsingleton.elim (graphEquiv₂ f) (h.orderIsoOfSurjective _ <| Equiv.surjective _)
ext1 x
- exact (graphEquiv₁ f).apply_eq_iff_eq_symm_apply.1 (FunLike.congr_fun this x).symm
+ exact (graphEquiv₁ f).apply_eq_iff_eq_symm_apply.1 (DFunLike.congr_fun this x).symm
#align tuple.eq_sort_iff' Tuple.eq_sort_iff'
/-- A permutation `σ` equals `sort f` if and only if `f ∘ σ` is monotone and whenever `i < j`
Function.left_id
and Function.comp.left_id
into Function.id_comp
.Function.right_id
and Function.comp.right_id
into Function.comp_id
.Function.comp_const_right
and Function.comp_const
into Function.comp_const
, use explicit arguments.Function.const_comp
to Mathlib.Init.Function
, use explicit arguments.@@ -185,7 +185,7 @@ theorem eq_sort_iff :
/-- The permutation that sorts `f` is the identity if and only if `f` is monotone. -/
theorem sort_eq_refl_iff_monotone : sort f = Equiv.refl _ ↔ Monotone f := by
- rw [eq_comm, eq_sort_iff, Equiv.coe_refl, Function.comp.right_id]
+ rw [eq_comm, eq_sort_iff, Equiv.coe_refl, Function.comp_id]
simp only [id.def, and_iff_left_iff_imp]
exact fun _ _ _ hij _ => hij
#align tuple.sort_eq_refl_iff_monotone Tuple.sort_eq_refl_iff_monotone
@@ -123,7 +123,7 @@ theorem lt_card_le_iff_apply_le_of_monotone [PartialOrder α] [DecidableRel (α
j < Fintype.card {i // f i ≤ a} ↔ f j ≤ a := by
suffices h1 : ∀ k : Fin m, (k < Fintype.card {i // f i ≤ a}) → f k ≤ a
· refine ⟨h1 j, fun h ↦ ?_⟩
- by_contra' hc
+ by_contra! hc
let p : Fin m → Prop := fun x ↦ f x ≤ a
let q : Fin m → Prop := fun x ↦ x < Fintype.card {i // f i ≤ a}
let q' : {i // f i ≤ a} → Prop := fun x ↦ q x
For a sorted (monotone) tuple containing n elements with exactly r elements less than or equal some value, all these elements are at the first r locations of the tuple.
Proofs by @Ruben-VandeVelde , @ericrbg @eric-wieser see Zulip Thread
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -7,6 +7,7 @@ import Mathlib.Data.Finset.Sort
import Mathlib.Data.List.FinRange
import Mathlib.Data.Prod.Lex
import Mathlib.GroupTheory.Perm.Basic
+import Mathlib.Data.Fin.Interval
#align_import data.fin.tuple.sort from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
@@ -115,6 +116,40 @@ open List
variable {n : ℕ} {α : Type*}
+/-- If `f₀ ≤ f₁ ≤ f₂ ≤ ⋯` is a sorted `m`-tuple of elements of `α`, then for any `j : Fin m` and
+`a : α` we have `j < #{i | fᵢ ≤ a}` iff `fⱼ ≤ a`. -/
+theorem lt_card_le_iff_apply_le_of_monotone [PartialOrder α] [DecidableRel (α := α) LE.le]
+ {m : ℕ} (f : Fin m → α) (a : α) (h_sorted : Monotone f) (j : Fin m) :
+ j < Fintype.card {i // f i ≤ a} ↔ f j ≤ a := by
+ suffices h1 : ∀ k : Fin m, (k < Fintype.card {i // f i ≤ a}) → f k ≤ a
+ · refine ⟨h1 j, fun h ↦ ?_⟩
+ by_contra' hc
+ let p : Fin m → Prop := fun x ↦ f x ≤ a
+ let q : Fin m → Prop := fun x ↦ x < Fintype.card {i // f i ≤ a}
+ let q' : {i // f i ≤ a} → Prop := fun x ↦ q x
+ have hw : 0 < Fintype.card {j : {x : Fin m // f x ≤ a} // ¬ q' j} :=
+ Fintype.card_pos_iff.2 ⟨⟨⟨j, h⟩, not_lt.2 hc⟩⟩
+ apply hw.ne'
+ have he := Fintype.card_congr <| Equiv.sumCompl <| q'
+ have h4 := (Fintype.card_congr (@Equiv.subtypeSubtypeEquivSubtype _ p q (h1 _)))
+ have h_le : Fintype.card { i // f i ≤ a } ≤ m := by
+ conv_rhs => rw [← Fintype.card_fin m]
+ exact Fintype.card_subtype_le _
+ rwa [Fintype.card_sum, h4, Fintype.card_fin_lt_of_le h_le, add_right_eq_self] at he
+ intro _ h
+ contrapose! h
+ rw [← Fin.card_Iio, Fintype.card_subtype]
+ refine Finset.card_mono (fun i => Function.mtr ?_)
+ simp_rw [Finset.mem_filter, Finset.mem_univ, true_and, Finset.mem_Iio]
+ intro hij hia
+ apply h
+ exact (h_sorted (le_of_not_lt hij)).trans hia
+
+theorem lt_card_ge_iff_apply_ge_of_antitone [PartialOrder α] [DecidableRel (α := α) LE.le]
+ {m : ℕ} (f : Fin m → α) (a : α) (h_sorted : Antitone f) (j : Fin m) :
+ j < Fintype.card {i // a ≤ f i} ↔ a ≤ f j :=
+ lt_card_le_iff_apply_le_of_monotone _ (OrderDual.toDual a) h_sorted.dual_right j
+
/-- If two permutations of a tuple `f` are both monotone, then they are equal. -/
theorem unique_monotone [PartialOrder α] {f : Fin n → α} {σ τ : Equiv.Perm (Fin n)}
(hfσ : Monotone (f ∘ σ)) (hfτ : Monotone (f ∘ τ)) : f ∘ σ = f ∘ τ :=
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -31,7 +31,7 @@ namespace Tuple
variable {n : ℕ}
-variable {α : Type _} [LinearOrder α]
+variable {α : Type*} [LinearOrder α]
/-- `graph f` produces the finset of pairs `(f i, i)`
equipped with the lexicographic order.
@@ -113,7 +113,7 @@ namespace Tuple
open List
-variable {n : ℕ} {α : Type _}
+variable {n : ℕ} {α : Type*}
/-- If two permutations of a tuple `f` are both monotone, then they are equal. -/
theorem unique_monotone [PartialOrder α] {f : Fin n → α} {σ τ : Equiv.Perm (Fin n)}
@@ -2,17 +2,14 @@
Copyright (c) 2021 Kyle Miller. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
-
-! This file was ported from Lean 3 source module data.fin.tuple.sort
-! leanprover-community/mathlib commit 8631e2d5ea77f6c13054d9151d82b83069680cb1
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Finset.Sort
import Mathlib.Data.List.FinRange
import Mathlib.Data.Prod.Lex
import Mathlib.GroupTheory.Perm.Basic
+#align_import data.fin.tuple.sort from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
+
/-!
# Sorting tuples by their values
@@ -148,7 +148,7 @@ theorem eq_sort_iff :
refine' ⟨fun h => ⟨(monotone_proj f).comp h.monotone, fun i j hij hfij => _⟩, fun h i j hij => _⟩
· exact (((Prod.Lex.lt_iff _ _).1 <| h hij).resolve_left hfij.not_lt).2
· obtain he | hl := (h.1 hij.le).eq_or_lt <;> apply (Prod.Lex.lt_iff _ _).2
- exacts[Or.inr ⟨he, h.2 i j hij he⟩, Or.inl hl]
+ exacts [Or.inr ⟨he, h.2 i j hij he⟩, Or.inl hl]
#align tuple.eq_sort_iff Tuple.eq_sort_iff
/-- The permutation that sorts `f` is the identity if and only if `f` is monotone. -/
fix-comments.py
on all files.@@ -25,7 +25,7 @@ This file provides an API for doing so, with the sorted `n`-tuple given by
## Main declarations
* `Tuple.sort`: given `f : Fin n → α`, produces a permutation on `Fin n`
-* `Tuple.monotone_sort`: `f ∘ Tuple.sort f` is `monotone`
+* `Tuple.monotone_sort`: `f ∘ Tuple.sort f` is `Monotone`
-/
List.Sorted
(#2311)
List.Sorted.le_of_lt
and List.Sorted.lt_of_le
(new).List.Sorted.rel_get_of_lt
and List.Sorted.rel_get_of_le
(get
versions of nthLe
lemmas).List.sorted_ofFn_iff
, List.sorted_lt_ofFn_iff
, and List.sorted_le_ofFn_iff
(new).List.monotone_iff_ofFn_sorted
in favor of List.sorted_le_ofFn_iff
.List.Monotone.ofFn_sorted
to Monotone.ofFn_sorted
. In Lean 3, dot notation hf.of_fn_sorted
used lift.monotone.of_fn_sorted
if the list
namespace is open. This is no longer the case in Lean 4.@@ -62,8 +62,7 @@ theorem graph.card (f : Fin n → α) : (graph f).card = n := by
/-- `graphEquiv₁ f` is the natural equivalence between `Fin n` and `graph f`,
mapping `i` to `(f i, i)`. -/
-def graphEquiv₁ (f : Fin n → α) : Fin n ≃ graph f
- where
+def graphEquiv₁ (f : Fin n → α) : Fin n ≃ graph f where
toFun i := ⟨(f i, i), by simp [graph]⟩
invFun p := p.1.2
left_inv i := by simp
@@ -124,9 +123,7 @@ theorem unique_monotone [PartialOrder α] {f : Fin n → α} {σ τ : Equiv.Perm
(hfσ : Monotone (f ∘ σ)) (hfτ : Monotone (f ∘ τ)) : f ∘ σ = f ∘ τ :=
ofFn_injective <|
eq_of_perm_of_sorted ((σ.ofFn_comp_perm f).trans (τ.ofFn_comp_perm f).symm)
- -- Porting note: used to use dot notation
- (List.Monotone.ofFn_sorted hfσ)
- (List.Monotone.ofFn_sorted hfτ)
+ hfσ.ofFn_sorted hfτ.ofFn_sorted
#align tuple.unique_monotone Tuple.unique_monotone
variable [LinearOrder α] {f : Fin n → α} {σ : Equiv.Perm (Fin n)}
The unported dependencies are