lemmanat_le_strictMono {n : ℕ} (f : Fin n →ℕ) (hf : StrictMono f) (i : Fin n) :
i.val ≤ f i :=by
proof · 10
lines
obtain ⟨i, hi⟩ := i
induction i with
| zero => exact Nat.zero_le _
| succ i ih =>havehi' : i < n :=by omega
have hl := hf (show (⟨i, hi'⟩ : Fin n) < ⟨i+1, hi⟩ fromby simp)
have hp := ih hi'
change i ≤ f ⟨i, hi'⟩ at hp
change i + 1≤ f ⟨i+1, hi⟩
omega
lemmasum_orderEmb (s : Finsetℕ) :
∑i : Fin s.card, s.orderEmbOfFin rfl i = ∑ i ∈ s, i :=by
proof · 4
lines
have h :=Finset.sum_map (s := (Finset.univ : Finset (Fin s.card)))
(s.orderEmbOfFin rfl).toEmbedding (funi : ℕ=> i)
rw [s.map_orderEmbOfFin_univ rfl] at h
exact h.symm
lemmarange_sum_le (s : Finsetℕ) :
∑ i ∈Finset.range s.card, i ≤∑ i ∈ s, i :=by
proof · 4
lines
let e := s.orderEmbOfFin rfl
have h :=Finset.sum_le_sum (s :=Finset.univ)
(fun i _ => nat_le_strictMono e e.strictMono i)
simpa only [←Fin.sum_univ_eq_sum_range, e, sum_orderEmb] using h
lemmaeq_range_of_sum_eq (s : Finsetℕ)
(h : ∑ i ∈ s, i = ∑ i ∈Finset.range s.card, i) : s = Finset.range s.card :=by
proof · 19
lines
let e := s.orderEmbOfFin rfl
havehe : ∀i : Fin s.card, e i = i.val :=byhavehsum : ∑i : Fin s.card, i.val = ∑i : Fin s.card, e i :=by
dsimp only [e]
rw [sum_orderEmb, Fin.sum_univ_eq_sum_range (funi : ℕ=> i)]
exact h.symm
have hh := (Finset.sum_eq_sum_iff_of_le
(fun (i : Fin s.card) _ => nat_le_strictMono e e.strictMono i)).mp hsum
exact fun i => (hh i (Finset.mem_univ i)).symm
ext i
constructor
· intro hi
obtain ⟨j, hj⟩ := (s.range_orderEmbOfFin rfl ▸ hi : i ∈Set.range e)
rw [← hj, he]
exact Finset.mem_range.mpr j.isLt
· intro hi
letj : Fin s.card := ⟨i, Finset.mem_range.mp hi⟩
rw [←show e j = i from he j]
exact s.orderEmbOfFin_mem rfl j
lemmasum_columnCells_le (μ : YoungDiagram) (f : Cell μ →ℕ) (j : ℕ)
(hf : Set.InjOn f (columnCells μ j)) :
∑ x ∈ columnCells μ j, row x ≤∑ x ∈ columnCells μ j, f x :=by
proof · 3
lines
have h := range_sum_le ((columnCells μ j).image f)
rw [Finset.card_image_of_injOn hf, card_columnCells, Finset.sum_image hf] at h
rwa [sum_row_columnCells]
carrier := {π | ∀ x, f (π x) = f x}
one_mem' :=by intro x; rfl
mul_mem' :=by intro a b ha hb x; exact (ha (b x)).trans (hb x)
inv_mem' :=by
intro a ha x
have h := ha (a⁻¹ x)
simpa using h.symm
theoremrow_col_alternative (μ : YoungDiagram) (π : Equiv.Perm (Cell μ)) :
(∃x y : Cell μ, x ≠ y ∧ col x = col y ∧ row (π x) = row (π y)) ∨
(∃ r ∈ rowStabilizer μ, ∃ c ∈ colStabilizer μ, π = r * c) :=by
proof · 7
lines
by_cases hc : ∀ j, Set.InjOn (fun x => row (π x)) (columnCells μ j)
· exact Or.inr (row_col_factorization μ π hc)
· left
simp only [Set.InjOn] at hc
push Not at hc
obtain ⟨j, x, hx, y, hy, hrow, hne⟩ := hc
exact ⟨x, y, hne, (mem_columnCells.mp hx).trans (mem_columnCells.mp hy).symm, hrow⟩